5 Commits

Author SHA1 Message Date
Andrea Lacava
e3161c1f4c Fix delivery of indication message - merge pull request #11 from JaykobJ/ns-o-ran
xapp-sm-connector now sends entire indication message to the connected xApp. Previously only first Byte of the message was sent.

Thanks @JaykobJ
2023-12-01 11:32:54 -05:00
JaykobJ
54fee7c1d0 Update setup/xapp-sm-connector/src/agent_connector.cc
Co-authored-by: Andrea Lacava <thecave003@gmail.com>
2023-12-01 08:50:22 +02:00
Andrea Lacava
4f46bbf4b1 Merge pull request #8 from wineslab/e2term_crash
Remove of RIC_INTERFACE lines in ns-O-RAN copy
2023-11-30 19:37:18 -05:00
JaykobJ
b65e2a4a1f Fix delivery of indication message
xApp can now receive entire indication message.
2023-11-30 10:46:49 +00:00
Andrea Lacava
edf7fe9e8d Remove of RIC_INTERFACE lines that may be the cause of unexpected crash in e2term 2023-01-09 20:07:57 +01:00
4 changed files with 5 additions and 20 deletions

View File

@@ -14,17 +14,6 @@ do
esac
done
# get RIC interface from cli arguments
if [ $# -eq 0 ] || [ "$import" = false ] ; then
RIC_INTERFACE="col0"
else
if [ "$arena" = true ]; then
RIC_INTERFACE="brric"
else
RIC_INTERFACE=$1
fi
fi
export SRC=`dirname $0`
. $SRC/setup-lib.sh
@@ -175,9 +164,6 @@ EOF
fi
E2TERM_CONFIG_BIND="--mount type=bind,source=$E2TERMCONFFILE,destination=/opt/e2/config/config.conf,ro"
export RIC_IP=`ifconfig ${RIC_INTERFACE} | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*'`
if [ "$arena" = true ]; then
echo 'Starting local setup'
# if both RIC and DU are executed on the same machine, do not set Docker NAT rules

View File

@@ -104,7 +104,7 @@ std::string find_agent_ip_from_gnb(unsigned char* gnb_id_trans) {
// send through socket
int send_socket(char* buf, std::string dest_ip) {
int send_socket(char* buf, size_t payload_size, std::string dest_ip) {
int control_sckfd = -1;
@@ -126,8 +126,7 @@ int send_socket(char* buf, std::string dest_ip) {
// const size_t max_size = 512;
// char buf[max_size] = "Hello, Server!"; // store the data in a buffer
size_t data_size = strlen(buf);
int sent_size = send(control_sckfd ,buf, data_size, 0);
int sent_size = send(control_sckfd, buf, payload_size, 0);
if(sent_size < 0) { // the send returns a size of -1 in case of errors
std::cout << "ERROR: SEND to agent " << dest_ip << std::endl;

View File

@@ -27,6 +27,6 @@ extern std::map<std::string, std::string> agentIp_gnbId;
int open_control_socket_agent(const char* dest_ip, const int dest_port);
void close_control_socket_agent(void);
std::string find_agent_ip_from_gnb(unsigned char* gnb_id);
int send_socket(char* buf, std::string dest_ip);
int send_socket(char* buf, size_t payload_size, std::string dest_ip);
#endif

View File

@@ -271,7 +271,7 @@ uint8_t procRicIndication(E2AP_PDU_t *e2apMsg, transaction_identifier gnb_id)
}
case 26: // RIC indication message
{
int payload_size = ricIndication->protocolIEs.list.array[idx]-> \
size_t payload_size = ricIndication->protocolIEs.list.array[idx]-> \
value.choice.RICindicationMessage.size;
@@ -283,7 +283,7 @@ uint8_t procRicIndication(E2AP_PDU_t *e2apMsg, transaction_identifier gnb_id)
// send payload to agent
std::string agent_ip = find_agent_ip_from_gnb(gnb_id);
send_socket(payload, agent_ip);
send_socket(payload, payload_size, agent_ip);
break;
}