pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27729 )


Change subject: DIAMETER_Emulation: Rename association table
......................................................................

DIAMETER_Emulation: Rename association table

The table has no direct relation to SGSAP, it tracks IMSI connections in
a generic way.

Change-Id: I12399465549739fb99af193e7071fff8bc452b0b
---
M library/DIAMETER_Emulation.ttcn
1 file changed, 23 insertions(+), 23 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/29/27729/1

diff --git a/library/DIAMETER_Emulation.ttcn b/library/DIAMETER_Emulation.ttcn
index 73fc87c..e53f4e5 100644
--- a/library/DIAMETER_Emulation.ttcn
+++ b/library/DIAMETER_Emulation.ttcn
@@ -78,7 +78,7 @@
         * 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 @@
 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 @@
 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 @@
 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 @@
 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 @@
 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 @@
 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 @@

 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;
        }
 }


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27729
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I12399465549739fb99af193e7071fff8bc452b0b
Gerrit-Change-Number: 27729
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to