Adding correct payload protocol ID (70)
Signed-off-by: czichy <thoralf.czichy@nokia.com>
Change-Id: I9277bb94647f9e9c23d16be7d43ba9ae1b593fb1
diff --git a/RIC-E2-TERMINATION/sctpThread.cpp b/RIC-E2-TERMINATION/sctpThread.cpp
index 423d51e..13d99e7 100644
--- a/RIC-E2-TERMINATION/sctpThread.cpp
+++ b/RIC-E2-TERMINATION/sctpThread.cpp
@@ -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 @@
// 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 @@
}
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;
}