From 5b93ddeaae3ff5f9615c3bd5331b5b3c25e875f2 Mon Sep 17 00:00:00 2001 From: nickvsnetworking Date: Sun, 4 Oct 2020 15:50:36 +1100 Subject: [PATCH 1/4] Updated Readme to include more complete instructions --- README.md | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7d094c8..1a9a1c8 100644 --- a/README.md +++ b/README.md @@ -53,18 +53,55 @@ S1APTester binary can be generated by executing below compilation steps: $ cd TestCntlrApp/build $ make cleanall $ make +$ sudo cp ../lib/libtfw.so /usr/lib +$ cd ../../ ``` On successful compilation, the “libtfw.so” library gets generated under -TestCntlrApp/lib folder. +TestCntlrApp/lib folder which is copied to ``/usr/lib``. ## Compile Traffic Generator ``` $ cd Trfgen/build $ make clean $ make +$ sudo cp ../lib/libtrfgen.so /usr/lib +$ cd ../../ ``` On successful compilation, the “libtrfgen.so” library gets generated under -Trfgen/lib folder. +Trfgen/lib folder which is copied to ``/usr/lib``. + +## Compile Test Controller Stub +``` +$ cd TestCntlrStub/build +$ make clean +$ make +$ cd ../bin/ +``` +Upon successful compilation, an executable binary ``testCntrlr`` is created in the ``bin`` directory. + + +## Configure eNodeB Parameters +Example eNodeB configuration file can be found in ``TestCntlrApp/cfg/nbAppCfg.txt``, + +In this file you will need to put in the parameters for your EPC, such as Cell ID, TAC, MCC/MNC, IP Addresses, etc. + +## Configure UE Parameters +Example UE parameter file can be found in ``TestCntlrApp/cfg/ueCfg.txt``, + +In this file you will need to put in the crypto parameters for your HSS, such as OP key and K Keys. + +Each IMSI you want to test will need to be defined in ``TestCntlrApp/cfg/imsi.txt`` + +## Running S1AP Test +After configuring your eNodeB & UE parameters, you can run the ``TestCntlrStub`` with one of the example test cases, +``` +$ cd TestCntlrStub/bin +$ sudo ./testCntrlr -f testCaseList_1.txt +``` + +Log messages will be shown on screen and in the text file ``log`` created in the same directory. + + # Testing with Magma Following points should be considered when using S1APTester with From 0aa56366a2917b1c4ec780eca344826d88c8f95d Mon Sep 17 00:00:00 2001 From: nickvsnetworking Date: Sun, 4 Oct 2020 16:04:20 +1100 Subject: [PATCH 2/4] Reanmed ueIdLst to ueS1apIdPairList --- TestCntlrStub/src/ts_utls.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TestCntlrStub/src/ts_utls.c b/TestCntlrStub/src/ts_utls.c index 8265b45..2e48add 100644 --- a/TestCntlrStub/src/ts_utls.c +++ b/TestCntlrStub/src/ts_utls.c @@ -1765,11 +1765,11 @@ int tsSendResetReq(unsigned int resetType, int numOfUes, unsigned char *ueLst) ((ResetReq*)msgptr)->cause.causeVal = 1; ((ResetReq*)msgptr)->r.partialRst.numOfConn = numOfUes; - ((ResetReq*)msgptr)->r.partialRst.ueIdLst = malloc(numOfUes); - memcpy(((ResetReq*)msgptr)->r.partialRst.ueIdLst, ueLst, numOfUes); + ((ResetReq*)msgptr)->r.partialRst.ueS1apIdPairList = malloc(numOfUes); + memcpy(((ResetReq*)msgptr)->r.partialRst.ueS1apIdPairList, ueLst, numOfUes); tfwApi(RESET_REQ, msgptr); - free(((ResetReq*)msgptr)->r.partialRst.ueIdLst); + free(((ResetReq*)msgptr)->r.partialRst.ueS1apIdPairList); free(msgptr); } @@ -2088,4 +2088,4 @@ void SyncFailureWithDelta(unsigned char ueId) printf("\n[Stub] Sending Attach Complete\n"); tfwApi(UE_ATTACH_COMPLETE, msgptr); free(msgptr); -} +} \ No newline at end of file From 31869b2774fc0baefcb0708e0e9db9eea66f2a92 Mon Sep 17 00:00:00 2001 From: nickvsnetworking Date: Sun, 4 Oct 2020 16:09:05 +1100 Subject: [PATCH 3/4] Added NL at end of C file --- TestCntlrStub/src/ts_utls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestCntlrStub/src/ts_utls.c b/TestCntlrStub/src/ts_utls.c index 2e48add..6f3e368 100644 --- a/TestCntlrStub/src/ts_utls.c +++ b/TestCntlrStub/src/ts_utls.c @@ -2088,4 +2088,4 @@ void SyncFailureWithDelta(unsigned char ueId) printf("\n[Stub] Sending Attach Complete\n"); tfwApi(UE_ATTACH_COMPLETE, msgptr); free(msgptr); -} \ No newline at end of file +} From 5a7b5bc270d63f20ce75978ec27c058610f86e4d Mon Sep 17 00:00:00 2001 From: nickvsnetworking Date: Sun, 4 Oct 2020 16:09:48 +1100 Subject: [PATCH 4/4] Revert "Updated Readme to include more complete instructions" This reverts commit 5b93ddeaae3ff5f9615c3bd5331b5b3c25e875f2. --- README.md | 41 ++--------------------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 1a9a1c8..7d094c8 100644 --- a/README.md +++ b/README.md @@ -53,55 +53,18 @@ S1APTester binary can be generated by executing below compilation steps: $ cd TestCntlrApp/build $ make cleanall $ make -$ sudo cp ../lib/libtfw.so /usr/lib -$ cd ../../ ``` On successful compilation, the “libtfw.so” library gets generated under -TestCntlrApp/lib folder which is copied to ``/usr/lib``. +TestCntlrApp/lib folder. ## Compile Traffic Generator ``` $ cd Trfgen/build $ make clean $ make -$ sudo cp ../lib/libtrfgen.so /usr/lib -$ cd ../../ ``` On successful compilation, the “libtrfgen.so” library gets generated under -Trfgen/lib folder which is copied to ``/usr/lib``. - -## Compile Test Controller Stub -``` -$ cd TestCntlrStub/build -$ make clean -$ make -$ cd ../bin/ -``` -Upon successful compilation, an executable binary ``testCntrlr`` is created in the ``bin`` directory. - - -## Configure eNodeB Parameters -Example eNodeB configuration file can be found in ``TestCntlrApp/cfg/nbAppCfg.txt``, - -In this file you will need to put in the parameters for your EPC, such as Cell ID, TAC, MCC/MNC, IP Addresses, etc. - -## Configure UE Parameters -Example UE parameter file can be found in ``TestCntlrApp/cfg/ueCfg.txt``, - -In this file you will need to put in the crypto parameters for your HSS, such as OP key and K Keys. - -Each IMSI you want to test will need to be defined in ``TestCntlrApp/cfg/imsi.txt`` - -## Running S1AP Test -After configuring your eNodeB & UE parameters, you can run the ``TestCntlrStub`` with one of the example test cases, -``` -$ cd TestCntlrStub/bin -$ sudo ./testCntrlr -f testCaseList_1.txt -``` - -Log messages will be shown on screen and in the text file ``log`` created in the same directory. - - +Trfgen/lib folder. # Testing with Magma Following points should be considered when using S1APTester with