Adding correct payload protocol ID (70) 52/10652/1
authorczichy <thoralf.czichy@nokia.com>
Fri, 3 Mar 2023 13:43:29 +0000 (15:43 +0200)
committerczichy <thoralf.czichy@nokia.com>
Fri, 3 Mar 2023 13:43:29 +0000 (15:43 +0200)
Signed-off-by: czichy <thoralf.czichy@nokia.com>
Change-Id: I9277bb94647f9e9c23d16be7d43ba9ae1b593fb1

RIC-E2-TERMINATION/sctpThread.cpp

index 423d51e..13d99e7 100644 (file)
@@ -32,6 +32,7 @@
 #include <sys/inotify.h>
 #include <errno.h>
 #include <sys/stat.h>
+#include <arpa/inet.h>
 
 using namespace std;
 //using namespace std::placeholders;
@@ -47,6 +48,7 @@ using namespace prometheus;
 // need to expose without the include of gcov
 extern "C" void __gcov_flush(void);
 #define LOG_FILE_CONFIG_MAP "CONFIG_MAP_NAME"
+#define E2AP_PPID 70 // as per E2GAP chapter 6.1
 
 static void catch_function(int signal) {
     __gcov_flush();
@@ -1309,7 +1311,7 @@ int sendSctpMsg(ConnectedCU_t *peerInfo, ReportingMessages_t &message, Sctp_Map_
     }
 
     while (true) {
-        if (sctp_sendmsg(fd,message.message.asndata, message.message.asnLength,(struct sockaddr *) NULL, 0, 0, 0,streamId,0,0) < 0) {
+        if (sctp_sendmsg(fd,message.message.asndata, message.message.asnLength,(struct sockaddr *) NULL, 0, htonl(E2AP_PPID), 0,streamId,0,0) < 0) {
             if (errno == EINTR) {
                 continue;
             }