diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-04-11 11:59:40 +0200 |
---|---|---|
committer | pespin <pespin@sysmocom.de> | 2022-04-11 12:04:55 +0000 |
commit | e4361705c135d6fd1d056ad9219059a1668f5124 (patch) | |
tree | 9079088528bb320fdd64c124447ac8d365661fac | |
parent | 77fdd0b5aa968e5826ef1ccf329589348bb1920e (diff) |
DIAMETER_Emulation: Rename association table
The table has no direct relation to SGSAP, it tracks IMSI connections in
a generic way.
Change-Id: I12399465549739fb99af193e7071fff8bc452b0b
-rw-r--r-- | library/DIAMETER_Emulation.ttcn | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/library/DIAMETER_Emulation.ttcn b/library/DIAMETER_Emulation.ttcn index 73fc87c5..e53f4e58 100644 --- a/library/DIAMETER_Emulation.ttcn +++ b/library/DIAMETER_Emulation.ttcn @@ -78,7 +78,7 @@ type component DIAMETER_Emulation_CT { * to send where with CLIENT.send() to vc_conn */ port DIAMETER_Conn_PT DIAMETER_CLIENT; /* currently tracked connections */ - var AssociationData SgsapAssociationTable[16]; + var AssociationData DiameterAssocTable[16]; /* pending expected CRCX */ var ExpectData DiameterExpectTable[8]; /* procedure based port to register for incoming connections */ @@ -131,8 +131,8 @@ runs on DIAMETER_Emulation_CT return template DIAMETER_RecvFrom { private function f_imsi_known(hexstring imsi) runs on DIAMETER_Emulation_CT return boolean { var integer i; - for (i := 0; i < sizeof(SgsapAssociationTable); i := i+1) { - if (SgsapAssociationTable[i].imsi == imsi) { + for (i := 0; i < sizeof(DiameterAssocTable); i := i+1) { + if (DiameterAssocTable[i].imsi == imsi) { return true; } } @@ -142,8 +142,8 @@ runs on DIAMETER_Emulation_CT return boolean { private function f_comp_known(DIAMETER_ConnHdlr client) runs on DIAMETER_Emulation_CT return boolean { var integer i; - for (i := 0; i < sizeof(SgsapAssociationTable); i := i+1) { - if (SgsapAssociationTable[i].comp_ref == client) { + for (i := 0; i < sizeof(DiameterAssocTable); i := i+1) { + if (DiameterAssocTable[i].comp_ref == client) { return true; } } @@ -153,9 +153,9 @@ runs on DIAMETER_Emulation_CT return boolean { private function f_comp_by_imsi(hexstring imsi) runs on DIAMETER_Emulation_CT return DIAMETER_ConnHdlr { var integer i; - for (i := 0; i < sizeof(SgsapAssociationTable); i := i+1) { - if (SgsapAssociationTable[i].imsi == imsi) { - return SgsapAssociationTable[i].comp_ref; + for (i := 0; i < sizeof(DiameterAssocTable); i := i+1) { + if (DiameterAssocTable[i].imsi == imsi) { + return DiameterAssocTable[i].comp_ref; } } setverdict(fail, "DIAMETER Association Table not found by IMSI", imsi); @@ -165,9 +165,9 @@ runs on DIAMETER_Emulation_CT return DIAMETER_ConnHdlr { private function f_imsi_by_comp(DIAMETER_ConnHdlr client) runs on DIAMETER_Emulation_CT return hexstring { var integer i; - for (i := 0; i < sizeof(SgsapAssociationTable); i := i+1) { - if (SgsapAssociationTable[i].comp_ref == client) { - return SgsapAssociationTable[i].imsi; + for (i := 0; i < sizeof(DiameterAssocTable); i := i+1) { + if (DiameterAssocTable[i].comp_ref == client) { + return DiameterAssocTable[i].imsi; } } setverdict(fail, "DIAMETER Association Table not found by component ", client); @@ -177,10 +177,10 @@ runs on DIAMETER_Emulation_CT return hexstring { private function f_imsi_table_add(DIAMETER_ConnHdlr comp_ref, hexstring imsi) runs on DIAMETER_Emulation_CT { var integer i; - for (i := 0; i < sizeof(SgsapAssociationTable); i := i+1) { - if (not isvalue(SgsapAssociationTable[i].imsi)) { - SgsapAssociationTable[i].imsi := imsi; - SgsapAssociationTable[i].comp_ref := comp_ref; + for (i := 0; i < sizeof(DiameterAssocTable); i := i+1) { + if (not isvalue(DiameterAssocTable[i].imsi)) { + DiameterAssocTable[i].imsi := imsi; + DiameterAssocTable[i].comp_ref := comp_ref; return; } } @@ -190,11 +190,11 @@ runs on DIAMETER_Emulation_CT { private function f_imsi_table_del(DIAMETER_ConnHdlr comp_ref, hexstring imsi) runs on DIAMETER_Emulation_CT { var integer i; - for (i := 0; i < sizeof(SgsapAssociationTable); i := i+1) { - if (SgsapAssociationTable[i].comp_ref == comp_ref and - SgsapAssociationTable[i].imsi == imsi) { - SgsapAssociationTable[i].imsi := omit; - SgsapAssociationTable[i].comp_ref := null; + for (i := 0; i < sizeof(DiameterAssocTable); i := i+1) { + if (DiameterAssocTable[i].comp_ref == comp_ref and + DiameterAssocTable[i].imsi == imsi) { + DiameterAssocTable[i].imsi := omit; + DiameterAssocTable[i].comp_ref := null; return; } } @@ -205,9 +205,9 @@ runs on DIAMETER_Emulation_CT { private function f_imsi_table_init() runs on DIAMETER_Emulation_CT { - for (var integer i := 0; i < sizeof(SgsapAssociationTable); i := i+1) { - SgsapAssociationTable[i].comp_ref := null; - SgsapAssociationTable[i].imsi := omit; + for (var integer i := 0; i < sizeof(DiameterAssocTable); i := i+1) { + DiameterAssocTable[i].comp_ref := null; + DiameterAssocTable[i].imsi := omit; } } |