init ems server code

This commit is contained in:
2024-09-27 15:39:34 +08:00
parent 9d4009aaca
commit 9930e4e58f
1551 changed files with 110216 additions and 102864 deletions

45
plat/isdn/ut/Makefile Normal file
View File

@@ -0,0 +1,45 @@
#Create by Chen Gengxin
#2008-03-03
#WXC2 R9.0 ISDN makefile
CC = gcc
CFLAG = -g -Wall -c #-fprofile-arcs -ftest-coverage
ISDN_LIB_OBJ = ../src/isdn_msg.o ../src/isdn_fsm.o ../src/isdn_uif.o ../src/isdn_rm.o ../src/isdn_ie.o ../src/isdn_debug.o
ISDN_TST_OBJ = isdn_main.o isdn_test.o
ISDN_LIB = -L../../isdn/lib -lisdn
PLAT_LIB = -L../../8ecp/lib -l8ecp -L../../aif/lib -laif -L../../bicc/lib -lbicc -L../../debug/lib -ldebug -L../../haepub/lib -lhaepub -L../../iptrans/lib -liptrans -L../../isup/lib -lisup -L../../m2ua/lib -lm2ua -L../../mgc/lib -lmgc -L../../mgcp/lib -lmgcp -L../../mtp3/lib -lmtp3 -L../../public/lib -lpublic -L../../rtp/lib -lrtp -L../../sccp/lib -lsccp -L../../scf/lib -lscf -L../../snmp/lib -lsnmp -L../../smpp/lib -lsmpp -L../../tcap/lib -ltcap -L../../xapp/lib -lxapp
MSS_LIB = -L../../../mss/aas/lib -laas -L../../../mss/ae/lib -lae -L../../../mss/hlr/lib -lhlr -L../../../mss/mnp/lib -lmnp -L../../../mss/msc/lib -lmsc -L../../../mss/ssf/lib -lssf -L../../../mss/vlr/lib -lvlr
TEST_LIB = -L/usr/local/lib/CUnit -lcunit -lgcov
isdn_main: $(ISDN_TST_OBJ)
$(CC) $(ISDN_LIB_OBJ) $(ISDN_TST_OBJ) -o test_main $(ISDN_LIB) $(PLAT_LIB) -lm
isdn_main.o: isdn_main.c
$(CC) $(CFLAG) $<
isdn_test.o: isdn_test.c
$(CC) $(CFLAG) $<
isdn_msg.o: isdn_msg.c
$(CC) $(CFLAG) $<
isdn_fsm.o: isdn_fsm.c
$(CC) $(CFLAG) $<
isdn_uif.o: isdn_uif.c
$(CC) $(CFLAG) $<
isdn_rm.o: isdn_rm.c
$(CC) $(CFLAG) $<
isdn_ie.o: isdn_ie.c
$(CC) $(CFLAG) $<
isdn_debug.o: isdn_debug.c
$(CC) $(CFLAG) $<
clean:
rm -f main *.o *.a *.xml *.gcov *.gcda *.gcno core test_main

View File

@@ -0,0 +1,69 @@
Test 1
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
10 SCTP.SEND <Data-setup>
01 00 05 02 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 25
08 02 00 01 05 a1 04 03
80 90 a3 18 03 a1 83 81
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00 00;
10000 SCTP.RECV <Data-call proc>
01 00 05 01 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0E
08 02 80 01 02 18 03 A9
83 81 00 00;
10000 SCTP.RECV <Data-alert>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 01 18 03 A1
83 81 1E 02 83 88 ?? ??;
10000 SCTP.RECV <Data-conn>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 07 ?? ?? ??;
10 SCTP.SEND <Data-conn ack>
01 00 05 02 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 00 01 0F 00 00 00;
30 SCTP.SEND <Data-disconn>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 00 01 45 08 02 83
90 00 00 00;
10000 SCTP.RECV <Data-rel>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 4D ?? ?? ??;
10 SCTP.SEND <Data-rel comp>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 00 01 5A 08 02 83
90 00 00 00;

View File

@@ -0,0 +1,33 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10000 SCTP.RECV <Data-Service>
01 00 05 01 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 12
03 02 00 00 0F 01 01 C0
18 04 E9 80 83 90 00 00;
10 SCTP.SEND <Data-Service Ack>
01 00 05 02 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 12
03 02 80 00 07 01 01 C0
18 04 E9 80 83 90 00 00;

View File

@@ -0,0 +1,33 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
00 SCTP.SEND <Data-Service>
01 00 05 02 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 12
03 02 00 00 0F 01 01 C0
18 04 E9 80 83 90 00 00;
10000 SCTP.RECV <Data-Service Ack>
01 00 05 01 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 12
03 02 80 00 07 01 01 C0
18 04 E9 80 83 90 00 00;

View File

@@ -0,0 +1,3 @@
#define RE_IP 172.18.99.1
#define RE_PORT 0
#define LO_PORT 2904

View File

@@ -0,0 +1,19 @@
#include "headfile.txt"
test 1 sctp<iua data>
SCTP.Set remote_ip=RE_IP;
SCTP.Set remote_port=RE_PORT;
SCTP.Set local_port=LO_PORT;
SCTP.Set STREAM_ID=1
50 SCTP.Set server
0 SCTP.Send <data>
01 00 05 01 00 00 00 20 //common message header(version,spare,message class,message type,message length(<28><><EFBFBD>еij<D0B5><C4B3><EFBFBD>))
00 01 00 08 00 00 00 00 //iua message header(tag,length,interface id)
00 05 00 08 00 00 00 00 //iua message header(tag,length,DLCI)
00 0E 00 08 //iua message(tag,length(<28><><EFBFBD><EFBFBD>iua message<67>ij<EFBFBD><C4B3><EFBFBD>))
FF 01 F0 02; //iua message(protocol data)
1000 SCTP.Recv <asp up ack>
?? //common message header

View File

@@ -0,0 +1,47 @@
#include "headfile.txt"
test 1 sctp<iua set up>
SCTP.Set remote_ip=RE_IP;
SCTP.Set remote_port=RE_PORT;
SCTP.Set local_port=LO_PORT;
SCTP.Set STREAM_ID=1
500 SCTP.Set server
1000 SCTP.Recv <asp up>
01 00 03 01 00 00 00 10 //common message header(version,spare,message class,message type,message length)
00 11 00 08 ?? ?? ?? ??; //iua message(tag,length,content)
0 SCTP.Send <asp up ack>
01 00 03 04 00 00 00 08; //common message header
1 SCTP.Send <notify>
01 00 00 01 00 00 00 10 //common message header
00 0D 00 08 00 01 00 02; //iua message
1000 SCTP.FLTR <asp up>
01 00 03 01 00 00 00 10 //common message header
00 11 00 08 ?? ?? ?? ??; //iua message
1000 SCTP.Recv <asp active>
01 00 04 01 00 00 00 18
00 0B 00 08 00 00 00 01
00 01 00 08 00 00 00 00; //??
0 SCTP.Send <asp active ack>
01 00 04 03 00 00 00 10
00 0B 00 08 00 00 00 01;
0 SCTP.Send <notify>
01 00 00 01 00 00 00 10
00 0D 00 08 00 01 00 03;
1000 SCTP.Recv <establish req>
01 00 05 05 00 00 00 18 //common message header(version,spare,message class,message type,message length)
00 01 00 08 00 00 00 00 //iua message header(tag,length,interface id)
00 05 00 08 00 00 00 00; //iua message header(tag,length,DLCI)
0 SCTP.Send <establish cnf>
01 00 05 06 00 00 00 18
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00;

View File

@@ -0,0 +1,82 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
20 SCTP.SEND <Data-setup>
01 00 05 02 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 25
08 02 00 01 05 a1 04 03
80 90 a3 18 03 a1 83 81
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00 00;
10000 SCTP.RECV <Data-call proc>
01 00 05 01 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0E
08 02 80 01 02 18 03 A9
83 81 00 00;
10000 SCTP.RECV <Data-alert>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 01 18 03 A1
83 81 1E 02 83 88 ?? ??;
10000 SCTP.RECV <Data-conn>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 07 ?? ?? ??;
20 SCTP.SEND <Data-conn ack>
01 00 05 02 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 00 01 0F 00 00 00;
100 SCTP.RECV <Data-disconn>
01 00 05 01 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 45 08 02 83
90 00 00 00;
10 SCTP.SEND <Data-rel>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 00 01 4D 08 02 83
90 00 00 00;
100 SCTP.RECV <Data-rel comp>
01 00 05 01 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 5A 08 02 83
90 00 00 00;

View File

@@ -0,0 +1,41 @@
#include "headfile.txt"
test 1 sctp<iua set up>
SCTP.Set remote_ip=RE_IP;
SCTP.Set local_port=LO_PORT;
SCTP.Set STREAM_ID=2
10000 SCTP.RECEIVE <asp up>
01 00 03 01 00 00 00 10 //common message header(version,spare,message class,message type,message length)
00 11 00 08 ?? ?? ?? ??; //iua message(tag,length,content)
0 SCTP.Send <asp up ack>
01 00 03 04 00 00 00 08; //common message header
1 SCTP.Send <notify>
01 00 00 01 00 00 00 10 //common message header
00 0D 00 08 00 01 00 02; //iua message
1000 SCTP.Recv <asp active>
01 00 04 01 00 00 00 18
00 0B 00 08 00 00 00 01
00 01 00 08 00 00 00 00; //??
0 SCTP.Send <asp active ack>
01 00 04 03 00 00 00 10
00 0B 00 08 00 00 00 01;
0 SCTP.Send <notify>
01 00 00 01 00 00 00 10
00 0D 00 08 00 01 00 03;
1000 SCTP.Recv <establish req>
01 00 05 05 00 00 00 18 //common message header(version,spare,message class,message type,message length)
00 01 00 08 00 00 00 00 //iua message header(tag,length,interface id)
00 05 00 08 00 00 00 00; //iua message header(tag,length,DLCI)
0 SCTP.Send <establish cnf>
01 00 05 06 00 00 00 18
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00;

View File

@@ -0,0 +1,151 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up>
01 00 03 01 00 00 00 10
00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack>
01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify>
01 00 00 01 00 00 00 10
00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active>
01 00 04 01 00 00 00 20
00 0B 00 08 00 00 00 01
00 01 00 08 00 00 00 00 //interface id
00 01 00 08 00 00 00 01; //interface id
10 SCTP.SEND <asp active ack>
01 00 04 03 00 00 00 10
00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify>
01 00 00 01 00 00 00 10
00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish-0>
01 00 05 05 00 00 00 18
00 01 00 08 00 00 00 00 //interface id
00 05 00 08 00 00 00 00;
1000 SCTP.RECV <Establish-1>
01 00 05 05 00 00 00 18
00 01 00 08 00 00 00 01 //interface id
00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf-0>
01 00 05 06 00 00 00 18
00 01 00 08 00 00 00 00 //interface id
00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf-1>
01 00 05 06 00 00 00 18
00 01 00 08 00 00 00 01 //interface id
00 05 00 08 00 00 00 00;
test 1
10000 SCTP.RECV <Data-Service>
01 00 05 01 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 12
03 02 00 00 0F 01 01 C0
18 04 E9 80 83 90 00 00;
10 SCTP.SEND <Data-Service Ack>
01 00 05 02 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 12
03 02 80 00 07 01 01 C0
18 04 E9 80 83 90 00 00;
test 2
20 SCTP.SEND <Data-setup>
01 00 05 02 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 26
08 02 00 01 05 a1 04 03
80 90 a3 18 04 E1 82 83 01
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00;
10000 SCTP.RECV <Data-call proc>
01 00 05 01 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0F
08 02 80 01 02 18 04 E9 82
83 81 00;
10000 SCTP.RECV <Data-alert>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 01 18 04 E9 82
83 81 1E 02 83 88 ??;
10000 SCTP.RECV <Data-conn>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 07 ?? ?? ??;
20 SCTP.SEND <Data-conn ack>
01 00 05 02 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 00 01 0F 00 00 00;
test 3 <disable link 0>
10 SCTP.SEND <Release ind link 0>
01 00 05 0a 00 00 00 20
00 01 00 08 00 00 00 00 //interface id
00 05 00 08 00 00 00 00
00 0F 00 08 00 00 00 00;
1000 SCTP.RECV <Establish-0>
01 00 05 05 00 00 00 18
00 01 00 08 00 00 00 00 //interface id
00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf-0>
01 00 05 06 00 00 00 18
00 01 00 08 00 00 00 00 //interface id
00 05 00 08 00 00 00 00;
test 4 <continue rel call>
30 SCTP.SEND <Data-disconn>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 01 //interface id
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 00 01 45 08 02 83
90 00 00 00;
10000 SCTP.RECV <Data-rel>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 01 //interface id
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 4D 08 02 83
90 ?? ?? ??;
10 SCTP.SEND <Data-rel comp>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 01 //interface id
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 00 01 5A 08 02 83
90 00 00 00;
10000 SCTP.RECV <Data-??>
??;

View File

@@ -0,0 +1,82 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10000 SCTP.RECV <Data-setup>
01 00 05 01 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 25
08 02 00 01 05 a1 04 03
80 90 a3 18 03 a1 83 XX
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00 00;
20 SCTP.SEND <Data-call proc>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0E
08 02 80 01 02 18 03 A9
83 XX 00 00;
10 SCTP.SEND <Data-alert>
01 00 05 02 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 12
08 02 80 01 01 18 03 A1
83 XX 1E 02 83 88 00 00;
20 SCTP.SEND <Data-conn>
01 00 05 02 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 80 01 07 00 00 00;
10000 SCTP.RECV <Data-conn ack>
01 00 05 01 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 00 01 0F 00 00 00;
30 SCTP.SEND <Data-disconn>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 45 08 02 83
90 00 00 00;
10000 SCTP.RECV <Data-rel>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 00 01 4D 08 02 83
90 ?? ?? ??;
10 SCTP.SEND <Data-rel comp>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 5A 08 02 83
90 00 00 00;

View File

@@ -0,0 +1,82 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10000 SCTP.RECV <Data-setup>
01 00 05 01 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 25
08 02 00 01 05 a1 04 03
80 90 a3 18 03 a1 83 XX
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00 00;
20 SCTP.SEND <Data-call proc>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0E
08 02 80 01 02 18 03 A9
83 XX 00 00;
10 SCTP.SEND <Data-alert>
01 00 05 02 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 12
08 02 80 01 01 18 03 A1
83 XX 1E 02 83 88 00 00;
20 SCTP.SEND <Data-conn>
01 00 05 02 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 80 01 07 00 00 00;
10000 SCTP.RECV <Data-conn ack>
01 00 05 01 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 00 01 0F 00 00 00;
1000 SCTP.RECV <Data-disconn>
01 00 05 01 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 00 01 45 08 02 83
90 00 00 00;
10 SCTP.SEND <Data-rel>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 4D 08 02 83
90 00 00 00;
1000 SCTP.RECV <Data-rel comp>
01 00 05 01 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 00 01 5A 08 02 83
90 00 00 00;

View File

@@ -0,0 +1,83 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
20 SCTP.SEND <Data-setup>
01 00 05 02 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 28
08 02 00 01 05 a1 04 03
80 90 A3 18 06 a1 96 00 01 00 01
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31;
10000 SCTP.RECV <Data-call proc>
01 00 05 01 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 11
08 02 80 01 02 18 03 A9
83 01 01 00 81 00 00 00;
10000 SCTP.RECV <Data-alert>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 01 18 03 A1
83 00 00 00 81 1E 02 83
88 ?? ?? ??;
10000 SCTP.RECV <Data-conn>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 07 ?? ?? ??;
20 SCTP.SEND <Data-conn ack>
01 00 05 02 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 00 01 0F 00 00 00;
30 SCTP.SEND <Data-disconn>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 00 01 45 08 02 83
90 00 00 00;
10000 SCTP.RECV <Data-rel>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 4D 08 02 83
90 ?? ?? ??;
10 SCTP.SEND <Data-rel comp>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 00 01 5A 08 02 83
90 00 00 00;

View File

@@ -0,0 +1,85 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
20 SCTP.SEND <Data-setup>
01 00 05 02 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 25
08 02 00 01 05 a1 04 03
80 90 a3 18 03 a1 83 01
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00 00;
10000 SCTP.RECV <Data-call proc>
01 00 05 01 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0E
08 02 80 01 02 18 03 A9
83 81 00 00;
10000 SCTP.RECV <Data-alert>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 01 18 03 A9
83 81 1E 02 83 88 ?? ??;
10000 SCTP.RECV <Data-conn>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 07 ?? ?? ??;
20 SCTP.SEND <Data-conn ack>
01 00 05 02 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 00 01 0F 00 00 00;
30 SCTP.SEND <Data-disconn>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 00 01 45 08 02 83
90 00 00 00;
10000 SCTP.RECV <Data-rel>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 4D 08 02 83
90 ?? ?? ??;
10 SCTP.SEND <Data-rel comp>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 00 01 5A 08 02 83
90 00 00 00;
10000 SCTP.RECV <Data-??>
??;

View File

@@ -0,0 +1,82 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
20 SCTP.SEND <Data-setup>
01 00 05 02 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 25
08 02 00 01 05 a1 04 03
80 90 a3 18 03 a1 83 81
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00 00;
10000 SCTP.RECV <Data-call proc>
01 00 05 01 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0E
08 02 80 01 02 18 03 A9
83 81 00 00;
10000 SCTP.RECV <Data-alert>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 01 18 03 A1
83 81 1E 02 83 88 ?? ??;
10000 SCTP.RECV <Data-conn>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 80 01 07 ?? ?? ??;
20 SCTP.SEND <Data-conn ack>
01 00 05 02 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 00 01 0F 00 00 00;
100 SCTP.RECV <Data-disconn>
01 00 05 01 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 45 08 02 83
90 00 00 00;
10 SCTP.SEND <Data-rel>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 00 01 4D 08 02 83
90 00 00 00;
100 SCTP.RECV <Data-rel comp>
01 00 05 01 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 5A 08 02 83
90 00 00 00;

View File

@@ -0,0 +1,44 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10000 SCTP.RECV <Data-setup>
01 00 05 01 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 25
08 02 00 01 05 a1 04 03
80 90 a3 18 03 a1 83 XX
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00 00;
1000 SCTP.RECV <Data-restart>
01 00 05 01 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 11
08 02 00 00 46 18 03 A1
83 XX 79 01 80 ?? ?? ??;
20 SCTP.SEND <Data-restart ack>
01 00 05 02 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 11
08 02 80 00 4E 18 03 A1
83 XX 79 01 80 00 00 00;

View File

@@ -0,0 +1,44 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10000 SCTP.RECV <Data-setup>
01 00 05 01 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 25
08 02 00 01 05 a1 04 03
80 90 a3 18 03 a1 83 XX
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00 00;
20 SCTP.SEND <Data-restart>
01 00 05 02 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 11
08 02 00 00 46 18 03 A1
83 XX 79 01 80 00 00 00;
1000 SCTP.RECV <Data-restart ack>
01 00 05 01 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 11
08 02 80 00 4E 18 03 A1
83 XX 79 01 80 ?? ?? ??;

View File

@@ -0,0 +1,103 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
Test 1
10000 SCTP.RECV <Data-setup>
01 00 05 01 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 25
08 02 00 01 05 a1 04 03
80 90 a3 18 03 a1 83 XX
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00 00;
20 SCTP.SEND <Data-call proc>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0E
08 02 80 01 02 18 03 A9
83 XX 00 00;
10 SCTP.SEND <Data-alert>
01 00 05 02 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 12
08 02 80 01 01 18 03 A1
83 XX 1E 02 83 88 00 00;
20 SCTP.SEND <Data-conn>
01 00 05 02 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 80 01 07 00 00 00;
10000 SCTP.RECV <Data-conn ack>
01 00 05 01 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 00 01 0F 00 00 00;
30 SCTP.SEND <Data-disconn>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 45 08 02 83
90 00 00 00;
10000 SCTP.RECV <Data-rel>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 00 01 4D 08 02 83
90 ?? ?? ??;
10 SCTP.SEND <Data-rel comp>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 5A 08 02 83
90 00 00 00;
Test 2
10000 SCTP.RECV <Data-setup>
01 00 05 01 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 25
08 02 00 YY 05 a1 04 03
80 90 a3 18 03 a1 83 XX
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00 00;
20 SCTP.SEND <Data-status>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 10
08 02 80 YY 7D 08 02 83
E5 14 01 00;

View File

@@ -0,0 +1,47 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10000 SCTP.RECV <Data-setup>
01 00 05 01 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 25
08 02 00 01 05 a1 04 03
80 90 a3 18 03 a1 83 XX
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00 00;
10 SCTP.SEND <Data-rel>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 4D 08 02 83
90 00 00 00;
1000 SCTP.RECV <Data-rel comp>
01 00 05 01 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 00 01 5A 08 02 83
90 00 00 00;
10000 SCTP.RECV <Data-??>
??;

View File

@@ -0,0 +1,96 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10000 SCTP.RECV <Data-setup>
01 00 05 01 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 25
08 02 00 01 05 a1 04 03
80 90 a3 18 03 a1 83 XX
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00 00;
20 SCTP.SEND <Data-conn ack>
01 00 05 02 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 80 01 0F 00 00 00;
10000 SCTP.RECV <Data-status>
01 00 05 01 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 10
08 02 00 01 7D 08 02 83
E5 14 01 ??;
20 SCTP.SEND <Data-call proc>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0E
08 02 80 01 02 18 03 A9
83 XX 00 00;
10 SCTP.SEND <Data-alert>
01 00 05 02 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 12
08 02 80 01 01 18 03 A1
83 XX 1E 02 83 88 00 00;
20 SCTP.SEND <Data-conn>
01 00 05 02 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 80 01 07 00 00 00;
10000 SCTP.RECV <Data-conn ack>
01 00 05 01 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 00 01 0F 00 00 00;
30 SCTP.SEND <Data-disconn>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 45 08 02 83
90 00 00 00;
10000 SCTP.RECV <Data-rel>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 00 01 4D 08 02 83
90 ?? ?? ??;
10 SCTP.SEND <Data-rel comp>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 5A 08 02 83
90 00 00 00;

View File

@@ -0,0 +1,36 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10000 SCTP.RECV <Data-setup>
01 00 05 01 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 25
08 02 00 01 05 a1 04 03
80 90 a3 18 03 a1 83 XX
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00 00;
20 SCTP.SEND <Data-status>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 10
08 02 80 01 7D 08 02 83
E5 14 01 00;

View File

@@ -0,0 +1,89 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10000 SCTP.RECV <Data-setup>
01 00 05 01 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 25
08 02 00 01 05 a1 04 03
80 90 a3 18 03 a1 83 XX
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00 00;
20 SCTP.SEND <Data-alert <20><>>
01 00 05 02 00 00 00 20
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 07
08 00 01 00;
20 SCTP.SEND <Data-call proc>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0E
08 02 80 01 02 18 03 A9
83 XX 00 00;
10 SCTP.SEND <Data-alert>
01 00 05 02 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 12
08 02 80 01 01 18 03 A1
83 XX 1E 02 83 88 00 00;
20 SCTP.SEND <Data-conn>
01 00 05 02 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 80 01 07 00 00 00;
10000 SCTP.RECV <Data-conn ack>
01 00 05 01 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 00 01 0F 00 00 00;
30 SCTP.SEND <Data-disconn>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 45 08 02 83
90 00 00 00;
10000 SCTP.RECV <Data-rel>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 00 01 4D 08 02 83
90 ?? ?? ??;
10 SCTP.SEND <Data-rel comp>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 5A 08 02 83
90 00 00 00;

View File

@@ -0,0 +1,97 @@
Test 0
3 SCTP.SET <> "remote_ip=172.18.99.1";
3 SCTP.SET <> "remote_port=0";
3 SCTP.SET <> "local_port=9900";
3 SCTP.SET <> "STREAM_ID=0";
3 SCTP.SET <> "server";
1000 SCTP.SET <> "wait_connect";
200 SCTP.RECV <asp up> 01 00 03 01 00 00 00 10 00 11 00 08 ?? ?? ?? ??;
10 SCTP.SEND <asp up ack> 01 00 03 04 00 00 00 08;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 02;
3 SCTP.SET <> "STREAM_ID=1";
1000 SCTP.RECV <asp active> 01 00 04 01 00 00 00 18 00 0B 00 08 00 00 00 01 00 01 00 08 00 00 00 00;
10 SCTP.SEND <asp active ack> 01 00 04 03 00 00 00 10 00 0B 00 08 00 00 00 01;
10 SCTP.SEND <Notify> 01 00 00 01 00 00 00 10 00 0D 00 08 00 01 00 03;
1000 SCTP.RECV <Establish> 01 00 05 05 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10 SCTP.SEND <Establish cnf> 01 00 05 06 00 00 00 18 00 01 00 08 00 00 00 00 00 05 00 08 00 00 00 00;
10000 SCTP.RECV <Data-setup>
01 00 05 01 00 00 00 40
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 25
08 02 00 01 05 a1 04 03
80 90 a3 18 03 a1 83 XX
6c 07 00 80 35 31 30 30
31 70 06 81 35 32 30 30
31 00 00 00;
20 SCTP.SEND <Data-call proc>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0E
08 02 80 01 02 18 03 A9
83 XX 00 00;
20 SCTP.SEND <Data-alert ȫ<><C8AB>>
01 00 05 02 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 12
08 02 00 00 01 18 03 A1
83 XX 1E 02 83 88 00 00;
10000 SCTP.RECV <Data-status>
01 00 05 01 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 10
08 02 00 00 7D 08 02 83
D1 14 01 ??;
10 SCTP.SEND <Data-alert>
01 00 05 02 00 00 00 2C
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 12
08 02 80 01 01 18 03 A1
83 XX 1E 02 83 88 00 00;
20 SCTP.SEND <Data-conn>
01 00 05 02 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 80 01 07 00 00 00;
10000 SCTP.RECV <Data-conn ack>
01 00 05 01 00 00 00 24
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 09
08 02 00 01 0F 00 00 00;
30 SCTP.SEND <Data-disconn>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 45 08 02 83
90 00 00 00;
10000 SCTP.RECV <Data-rel>
01 00 05 01 00 00 00 ??
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 ??
08 02 00 01 4D 08 02 83
90 ?? ?? ??;
10 SCTP.SEND <Data-rel comp>
01 00 05 02 00 00 00 28
00 01 00 08 00 00 00 00
00 05 00 08 00 00 00 00
00 0E 00 0D
08 02 80 01 5A 08 02 83
90 00 00 00;

323
plat/isdn/ut/isdn_main.c Normal file
View File

@@ -0,0 +1,323 @@
/***********************************************************
Copyright (C), LGC Wireless.
File Name: isdn_main.c
Description: For isdn module test
Version: v9.0.0
Author: Gengxin Chen
Create Date: 2008-2-19
History:
<author> <date> <version> <desc>
************************************************************/
#include <stdio.h>
#include <sys/time.h>
#include <unistd.h>
#include <signal.h>
#include <assert.h>
#include <string.h>
#include "../src/include/isdn_rm.h"
#include "../src/include/isdn_ext.h"
#include "../src/include/isdn_inc.h"
#include "../../snmp/src/include/snmp.h"
#include "../../mtp3/src/include/mtp3.h"
#include "../../public/src/include/license_id.h"
#include "../../tcap/src/include/tcap_public.h"
#define SYS_IT_INTERVAL_SEC 0
#define SYS_IT_INTERVAL_USEC (20*1000)
static char serialNumber[18]="";
xua_up_msg_t iua_msg_src;
static int systemID=0,systemInited=0;
static int sys_timer10ms=0;
u8 ptemp[] = {0};
extern int test_len;
extern void test_isdn_msg_encode(u8 type);
extern void test_isdn_msg_decode(u8 type);
extern void m2ua_init(BYTE system_id);
extern void msc_isdn_init(int *sap_id);
extern void cc_timer();
static void isdn_param_init(void)
{
// ISDN_Sap_Attrib_ sap;
Cg_Attrib_struct cg;
Circuit_Attrib_struct trunk;
int sap_id,cg_id,trunk_id_0, trunk_id_1, trunk_id_2;
// memset(&sap,0,sizeof(ISDN_Sap_Attrib_));
memset(&cg,0,sizeof(Cg_Attrib_struct));
memset(&trunk,0,sizeof(Circuit_Attrib_struct));
/* if((sap_id = isdn_bind_sap(&sap)) == -1)
{
printf("add sap error!\r\n");
return;
}*/
msc_isdn_init(&sap_id);
cg.network_id = 0;
cg.priority = 0; // 0:Reattempt ind / 1:Discard
cg.tg_id = 0;
if((cg_id = isdn_add_cg(sap_id, &cg)) == -1)
{
printf("Failed to create isup trunk group socket\r\n");
return;
}
trunk.cic_range = 32;
trunk.head_cic = 0;
trunk.plat_id = CTRL_PLAT_0;
if((trunk_id_0 = isdn_add_circuit(cg_id, &trunk)) == -1)
{
printf("Failed to create isup trunk socket\r\n");
return;
}
if((trunk_id_1 = isdn_add_circuit(cg_id, &trunk)) == -1)
{
printf("Failed to create isup trunk socket\r\n");
return;
}
if((trunk_id_2 = isdn_add_circuit(cg_id, &trunk)) == -1)
{
printf("Failed to create isup trunk socket\r\n");
return;
}
isdn_rs.cg_pond[cg_id].attrib.nfas_flag = 1;
isdn_rs.cg_pond[cg_id].attrib.variant_type = VARIANT_ANSI;
isdn_rs.cg_pond[cg_id].attrib.ds_ch[0] = trunk_id_0;
isdn_rs.cg_pond[cg_id].attrib.ds_ch[1] = trunk_id_1;
isdn_rs.circuit_pond[trunk_id_0].attrib.d_chnl = 16;
isdn_rs.circuit_pond[trunk_id_0].attrib.head_cic = 0;
isdn_rs.circuit_pond[trunk_id_0].attrib.cic_range =32;
isdn_rs.circuit_pond[trunk_id_0].attrib.plat_id = 0;
isdn_rs.circuit_pond[trunk_id_0].attrib.iua_id = 0;
isdn_rs.circuit_pond[trunk_id_0].user_network_if = USER_SIDE; //nt or lt
isdn_rs.circuit_pond[trunk_id_1].attrib.d_chnl = 16;
isdn_rs.circuit_pond[trunk_id_1].attrib.head_cic = 32;
isdn_rs.circuit_pond[trunk_id_1].attrib.cic_range =32;
isdn_rs.circuit_pond[trunk_id_1].attrib.plat_id = 0;
isdn_rs.circuit_pond[trunk_id_1].attrib.iua_id = 1;
isdn_rs.circuit_pond[trunk_id_1].user_network_if = USER_SIDE; //nt or lt
isdn_rs.circuit_pond[trunk_id_2].attrib.d_chnl = 16;
isdn_rs.circuit_pond[trunk_id_2].attrib.head_cic = 64;
isdn_rs.circuit_pond[trunk_id_2].attrib.cic_range =32;
isdn_rs.circuit_pond[trunk_id_2].attrib.plat_id = 0;
isdn_rs.circuit_pond[trunk_id_2].attrib.iua_id = 2;
isdn_rs.circuit_pond[trunk_id_2].user_network_if = USER_SIDE; //nt or lt
printf("isdn init ok.\r\n");
}
int wxc2_get_license(int functionID)
{
return 1;
}
static void sysTimer_IRQ()
{
sys_timer10ms = 1; //test
}
static void SigactionSystem()
{
struct sigaction action;//,actsegv;
action.sa_handler = sysTimer_IRQ;
sigemptyset(&action.sa_mask);
action.sa_flags = SA_RESTART;
if(sigaction(SIGALRM, &action, NULL)<0)
{
printf("sigactin sigalarm failed\n");
}
}
static void sysDaemonInit()
{
int i;
pid_t pid;
if ( (pid = fork()) < 0) /* parent terminates */
printf("%s: %s: fork (%d)",
__FILE__, __FUNCTION__, __LINE__);
else if (pid != 0)
exit(0); /* parent goes bye-bye */
setsid(); // become session leader
for (i = 0; i<3; i++)
close(i);
}
static void moduleInit()
{
printf("\n\n<EFBFBD><EFBFBD>R9 Platform Init<69><74>\n\n");
debug_init();
heartbeat_init(0x0400);
iptrMainInit();
snmp_init(4957);
m2ua_init(0);
mtp_shm_init(0x0400);
mtp3_init_serial(serialNumber);
isdn_init(systemID,10);
printf("\n\n<EFBFBD><EFBFBD>R9 Platform Init completed<65><64>\n\n");
}
static void SetFSMTimer()
{
struct itimerval *ptv, tv;
ptv = (struct itimerval *) &tv;
ptv->it_interval.tv_sec = SYS_IT_INTERVAL_SEC;
ptv->it_interval.tv_usec = SYS_IT_INTERVAL_USEC;
ptv->it_value. tv_sec = SYS_IT_INTERVAL_SEC;
ptv->it_value.tv_usec = SYS_IT_INTERVAL_USEC;
setitimer(ITIMER_REAL, ptv, NULL);
}
static void moduleProc()
{
static int wait_sccp_normal_count = 0;
iptrans_timer();
snmp_timer();
if(systemInited)
{
wait_sccp_normal_count=6001;
heartbeat_timer();
m2ua_timer();
mtp3_proc();
isdn_timer();
cc_timer();
/* test_isdn_msg_decode(MSG_SETUP);
test_isdn_msg_encode(MSG_SETUP);
test_isdn_msg_decode(MSG_SETUP_ACK);
test_isdn_msg_encode(MSG_SETUP_ACK);
test_isdn_msg_decode(MSG_CALL_PROC);
test_isdn_msg_encode(MSG_CALL_PROC);
test_isdn_msg_decode(MSG_ALERT);
test_isdn_msg_encode(MSG_ALERT);
test_isdn_msg_decode(MSG_CONN);
test_isdn_msg_encode(MSG_CONN);
test_isdn_msg_decode(MSG_CONNACK);
test_isdn_msg_encode(MSG_CONNACK);
test_isdn_msg_decode(MSG_DISC);
test_isdn_msg_encode(MSG_DISC);
test_isdn_msg_decode(MSG_REL);
test_isdn_msg_encode(MSG_REL);
test_isdn_msg_decode(MSG_REL_COMP);
test_isdn_msg_encode(MSG_REL_COMP);*/
}
debug_rt();
}
int CStrToHex(u8 dst[], u8 *src)
{
int i, len, offset=0;
len = strlen(src);
while((len--) != 0)
{
if(*src >= '0' && *src <= '9')
ptemp[offset++] = *src - 0x30;
else if(*src >= 'A' && *src <= 'F')
ptemp[offset++] = *src - 'A' + 10; //*src - 0x37;
else if(*src >= 'a' && *src <= 'f')
ptemp[offset++] = *src - 'a' + 10; //*src - 0x57;
else
{
src++;
continue;
}
// printf("src=%x,ptemp=%x\n",*src,*(ptemp+offset-1));
src++;
}
test_len = offset/2;
for(i = 0; i < test_len; i++)
{
dst[i] = ((ptemp[2*i]) << 4) | (ptemp[2*i+1]);
// printf("set[%d]=0x%2x\n",i,dst[i]);
}
// printf("sizeof=%d,strlen=%d\n",sizeof(dst),strlen(dst));
return 1;
}
static void isdn_set_val()
{
iua_msg_src.msg_class = IUA_QPTM_MSG;
iua_msg_src.msg.iua.link = 0x10;
iua_msg_src.msg.iua.len = test_len;
}
int main(int argc, char **argv)
{
int retval, err_flag=0, daemon_flag=0, no_sync=0;
while ((retval = getopt(argc, argv, "dt")) != -1)
{
switch (retval) {
case 'd':
daemon_flag = 1;
break;
case 't':
no_sync = 1;
break;
case '?':
err_flag = 1;
break;
}
}
if (err_flag) {
printf("Usage: %s [-d] \n", argv[0]);
printf(" -d with daemon mode\n");
exit(1);
}
if(daemon_flag)
sysDaemonInit();
moduleInit();
SigactionSystem();
SetFSMTimer();
isdn_param_init();
// isdn_set_val();
sys_timer10ms = 1;
while(1)
{
if(sys_timer10ms)
{
sys_timer10ms = 0;
moduleProc();
systemInited = 1;
}
if (sys_timer10ms == 0)
usleep(1);
}
return 1;
}

325
plat/isdn/ut/isdn_test.c Normal file
View File

@@ -0,0 +1,325 @@
/***********************************************************
Copyright (C), LGC Wireless.
File Name: isdn_test.c
Description: For isdn module test
Version: v9.0.0
Author: Gengxin Chen
Create Date: 2008-2-19
History:
<author> <date> <version> <desc>
************************************************************/
#include "../src/include/isdn_rm.h"
#include "../src/include/isdn_ext.h"
#include "../src/include/isdn_inc.h"
#define CODE_SETUP "a1 04 03 80 90 a3 18 03 a1 83 81 6c 07 00 80 35 31 30 30 31 70 06 81 35 32 30 30 31"
#define CODE_CALL_PROC "18 03 A9 83 81"
#define CODE_ALERT "1E 02 83 88"
#define CODE_DISCONN "08 02 83 90"
int test_len;
static int cc_state[8192] = {0};
extern int CStrToHex(u8 dst[], u8 *src);
extern int q931_msg_encode(u8 *dst, IsdnMsgStr *src);
extern int isdn_msg_decode(IsdnMsgStr *dst, u8 *src, u8 msgtype, u8 len);
extern void isdn_set_cause(CauseStr *cause_ptr, u8 val);
void test_isdn_msg_encode(u8 type)
{
int ret;
int i;
memset(&iua_sd_msg, 0, sizeof(IuaMsgStr));
IuaMsgStr *dst = &iua_sd_msg;
u8 *flw_ptr = dst->msgcontent.isdn_msg.ie_content; //message flow pointer
memcpy(&isdn_sd_msg, &isdn_rv_msg, sizeof(IsdnMsgStr));
isdn_sd_msg.msg_m.msg_type = type;
ret = q931_msg_encode(flw_ptr, &isdn_sd_msg);
printf("ret=%d\n",ret);
for(i=0; i<ret; i++)
{
printf("%2x ",flw_ptr[i]);
}
printf("\n");
}
void test_isdn_msg_decode(u8 type)
{
u8 *ptr = "";
memset(&isdn_rv_msg, 0, sizeof(IsdnMsgStr));
memset(&iua_rv_msg, 0, sizeof(IuaMsgStr));
switch(type)
{
case MSG_SETUP:
ptr = CODE_SETUP;
break;
case MSG_SETUP_ACK:
case MSG_CALL_PROC:
ptr = CODE_CALL_PROC;
break;
case MSG_ALERT:
ptr = CODE_ALERT;
break;
case MSG_DISC:
case MSG_REL:
case MSG_REL_COMP:
ptr = CODE_DISCONN;
break;
default:
break;
}
CStrToHex(iua_rv_msg.msgcontent.isdn_msg.ie_content, ptr);
isdn_msg_decode(&isdn_rv_msg, iua_rv_msg.msgcontent.isdn_msg.ie_content, type, test_len);
}
int isdn_setup_ind(Pst *pst, IsdnSetup *ptr)
{
cc_state[pst->sp_proc_id] = 1;
return 1;
}
int isdn_alert_ind(Pst *pst, IsdnAlert *ptr)
{
return 1;
}
int isdn_setup_cnf(Pst *pst, IsdnConn *ptr)
{
return 1;
}
int isdn_disc_ind(Pst *pst, IsdnDisc *ptr)
{
IsdnRel src;
memset(&src, 0, sizeof(IsdnRel));
isdn_rel_req(pst, &src);
return 1;
}
int isdn_rel_ind(Pst *pst, IsdnRel *ptr)
{
return 1;
}
int isdn_rel_cnf(Pst *pst, IsdnRelComp *ptr)
{
return 1;
}
int isdn_stat_ind(Pst *pst, IsdnStatus *ptr)
{
return 1;
}
void msc_isdn_init(int *sap_id)
{
ISDN_Sap_Attrib_ sap;
memset(&sap,0,sizeof(ISDN_Sap_Attrib_));
sap.event_handle.h_isdn_setup_ind = (f_isdn_setup_ind *)isdn_setup_ind;
sap.event_handle.h_isdn_alert_ind = (f_isdn_alert_ind *)isdn_alert_ind;
sap.event_handle.h_isdn_setup_cnf = (f_isdn_setup_cnf *)isdn_setup_cnf;
sap.event_handle.h_isdn_disc_ind = (f_isdn_disc_ind *)isdn_disc_ind;
sap.event_handle.h_isdn_rel_ind = (f_isdn_rel_ind *)isdn_rel_ind;
sap.event_handle.h_isdn_rel_cnf = (f_isdn_rel_cnf *)isdn_rel_cnf;
sap.event_handle.h_isdn_stat_ind = (f_isdn_stat_ind *)isdn_stat_ind;
if((*sap_id = isdn_bind_sap(&sap)) == -1)
{
printf("add sap error!\r\n");
return;
}
}
void isdn_cc_fsm(u32 pid)
{
int offset, circuit_id;
static int i = 0;
Pst pst;
IsdnMsgStr isdn_msg;
memset(&isdn_msg, 0, sizeof(IsdnMsgStr));
pst.sp_proc_id = pid;
pst.su_proc_id = isdn_rs.port_pond[pid].su_proc_id;
circuit_id = pid / ISDN_CIRCUIT_CIC;
offset = pid % ISDN_CIRCUIT_CIC;
pst.cic = isdn_rs.circuit_pond[circuit_id].attrib.head_cic + offset;
pst.cg_id = isdn_rs.circuit_pond[circuit_id].cg_id;
pst.circuit_id = circuit_id;
if((isdn_rs.port_pond[pid].cic_state.call_state == CALLOUT_FLAG && isdn_rs.circuit_pond[circuit_id].user_network_if == NETWORK_SIDE) ||
(isdn_rs.port_pond[pid].cic_state.call_state == CALLIN_FLAG && isdn_rs.circuit_pond[circuit_id].user_network_if == USER_SIDE))
{
switch(cc_state[pid])
{
case 1:
cc_state[pid] = 2;
break;
case 2:
memcpy(&isdn_msg.msg_list.callProc.chnl_id, &isdn_rv_msg.msg_list.setup.chnl_id, sizeof(ChnlId));
/* isdn_msg.msg_list.alert.prg_ind.pres = 1;
isdn_msg.msg_list.alert.prg_ind.code_stan = 0;
isdn_msg.msg_list.alert.prg_ind.loc = 3;
isdn_msg.msg_list.alert.prg_ind.prg_descr = 8;
isdn_alert_req(&pst, &isdn_msg.msg_list.alert);*/
isdn_msg.msg_list.callProc.chnl_id.b3.pref_excl = 1;
isdn_call_proc_req(&pst, &isdn_msg.msg_list.callProc);
cc_state[pid] = 3;
break;
case 3:
cc_state[pid] = 4;
break;
case 4:
isdn_setup_resp(&pst, &isdn_msg.msg_list.conn);
cc_state[pid] = 5;
break;
case 5:
i++;
if(i % 150 == 0)
{
i = 0;
cc_state[pid] = 6;
}
break;
case 6:
// isdn_set_cause(&isdn_msg.msg_list.disc.cause, CAUSE_NORMAL);
// isdn_disc_req(&pst, &isdn_msg.msg_list.disc);
cc_state[pid] = 0;
break;
default:
break;
}
}
else if((isdn_rs.port_pond[pid].cic_state.call_state == CALLIN_FLAG && isdn_rs.circuit_pond[circuit_id].user_network_if == NETWORK_SIDE) ||
(isdn_rs.port_pond[pid].cic_state.call_state == CALLOUT_FLAG && isdn_rs.circuit_pond[circuit_id].user_network_if == USER_SIDE))
{
switch(cc_state[pid])
{
case 1:
i++;
if(i % 400 == 0)
{
i = 0;
// cc_state[pid] = 2;
}
break;
case 2:
// isdn_set_cause(&isdn_msg.msg_list.disc.cause, CAUSE_NORMAL);
// isdn_disc_req(&pst, &isdn_msg.msg_list.disc);
memcpy(&isdn_msg.msg_list.restart.chnl_id, &isdn_sd_msg.msg_list.setup.chnl_id, sizeof(ChnlId));
isdn_msg.msg_list.restart.restart_ind.pres = 1;
isdn_msg.msg_list.restart.restart_ind.clas = 0;
isdn_m_restart_req(&pst, &isdn_msg.msg_list.restart);
cc_state[pid] = 0;
break;
default:
break;
}
}
}
static int flag[256] = {0};
void isdn_cc_setup_fsm(u16 circuit_id)
{
static int i = 0;
Pst pst;
IsdnSetup setup;
u8 cg_digit[] = {5,1,0,0,1};
u8 cd_digit[] = {5,2,0,0,1};
memset(&setup, 0, sizeof(IsdnSetup));
if(!flag[circuit_id])
{
flag[circuit_id] = 1;
pst.circuit_id = circuit_id;
pst.cg_id = isdn_rs.circuit_pond[circuit_id].cg_id;
pst.su_proc_id = 0;
setup.sd_comp.pres = 1;
setup.br_cap.pres = 1;
setup.br_cap.ext_flag = 1;
setup.br_cap.code_stan = 0;
setup.br_cap.tran_cap = 0;
setup.br_cap.b4.tran_mode = 0;
setup.br_cap.b4.tran_rate = 0x10;
setup.br_cap.b5.usr_layer1 = 3;
setup.br_cap.b5.has_ext_a = 1;
setup.chnl_id.pres = 1;
setup.chnl_id.b3.int_id_pre = 0;
setup.chnl_id.b3.int_type = 1;
setup.chnl_id.b3.pref_excl = 0;
setup.chnl_id.b3.chnl_ind = 0;
setup.chnl_id.b3.info_chnl_sel = 1;
setup.chnl_id.b3.code_stan = 0;
setup.chnl_id.b3.num_map = 0;
setup.chnl_id.b3.chnl_type = 3;
setup.chnl_id.b3.chnl_num = 2; //CIC
setup.cg_pty_num.pres = 1;
setup.cg_pty_num.b3.num_type = 0;
setup.cg_pty_num.b3.num_plan_id = 0;
setup.cg_pty_num.b3.has_ext_a = 0;
setup.cg_pty_num.b3.pres_ind = 0;
setup.cg_pty_num.b3.screen_ind = 0;
setup.cg_pty_num.ext_flag = 1;
setup.cg_pty_num.num_digit_len = sizeof(cg_digit);
memcpy(&setup.cg_pty_num.num_digit, cg_digit, setup.cg_pty_num.num_digit_len);
setup.cd_pty_num.pres = 1;
setup.cd_pty_num.num_type = 0;
setup.cd_pty_num.num_plan_id = 1;
setup.cd_pty_num.num_digit_len = sizeof(cd_digit);
memcpy(&setup.cd_pty_num.num_digit, cd_digit, setup.cd_pty_num.num_digit_len);
setup.rpt_ind.pres = 1;
setup.prg_ind.pres = 1;
setup.prg_ind.loc = 3;
setup.prg_ind.prg_descr = 8;
setup.nt_sp_fac.pres = 1;
setup.nt_sp_fac.b3.len_net_id = 2;
setup.nt_sp_fac.b3.net_id_type = 2;
setup.nt_sp_fac.b3.net_id_plan = 1;
setup.nt_sp_fac.b3.net_id = 2; //?? {2,0,5}
setup.nt_sp_fac.spec = 2;
// setup.disp.pres = 1;
// setup.disp.disp_info_len =
pst.cic = isdn_rs.circuit_pond[circuit_id].attrib.head_cic + setup.chnl_id.b3.chnl_num;
// isdn_setup_req(&pst, &setup);
// cc_state[pst.sp_proc_id] = 1;
}
if(++i == 700) //more calls
{
i = 0;
flag[circuit_id] = 0;
}
}
void cc_timer()
{
u16 i, j;
u32 offset, pid;
for(i = 0; i < ISDN_MAX_CIRCUIT; i++) //for timer
{
if(isdn_rs.circuit_pond[i].enable == 0)
continue;
if((isdn_rs.attrib.isdn_run_mode == 1) &&
(isdn_rs.circuit_pond[i].attrib.plat_id != isdn_rs.attrib.systemID))
continue;
offset = ISDN_CIRCUIT_CIC * i;
for(j = 0; j < ISDN_CIRCUIT_CIC; j++)
{
pid = offset + j;
if(isdn_rs.port_pond[pid].enable == 1)
isdn_cc_fsm(pid);
}
if(isdn_rs.circuit_pond[i].lk3_status == LK_IS)
isdn_cc_setup_fsm(i);
}
}

BIN
plat/isdn/ut/test_main Normal file

Binary file not shown.

BIN
plat/isdn/ut/test_main_0526 Normal file

Binary file not shown.