Compare commits
5 Commits
ns-o-ran-x
...
ns-o-ran
Author | SHA1 | Date | |
---|---|---|---|
|
e3161c1f4c | ||
|
54fee7c1d0 | ||
|
4f46bbf4b1 | ||
|
b65e2a4a1f | ||
|
edf7fe9e8d |
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user