Commit 0293dac6 authored by liuyu's avatar liuyu

index

parent 4a131e5c
......@@ -427,7 +427,8 @@ void amf_n2::handle_itti_message(
aggregation["encoded"] = encoded;
aggregation["message_type_id"] = "0";
aggregation["assoc_id"] = itti_msg->assoc_id;
aggregation["stream"] = itti_msg->stream;
aggregation["stream"] = 0;
aggregation["index"] = itti_msg->stream;
UdpSend_downlink(aggregation, "10.103.239.31",20004);
}
......@@ -499,7 +500,8 @@ void amf_n2::handle_itti_message(
aggregation["encoded"] = encoded;
aggregation["message_type_id"] = "0";
aggregation["assoc_id"] = (itti_msg->assoc_id);
aggregation["stream"] = (itti_msg->stream);
aggregation["stream"] = 0;
aggregation["index"] = itti_msg->stream;
UdpSend_downlink(aggregation, "10.103.239.31",20004);
}
......@@ -602,7 +604,8 @@ void amf_n2::handle_itti_message(itti_ng_reset& itti_msg) {
aggregation["encoded"] = encoded_size;
aggregation["message_type_id"] = "0";
aggregation["assoc_id"] = (gc->sctp_assoc_id);
aggregation["stream"] = (itti_msg.stream);
aggregation["stream"] = 0;
aggregation["index"] = itti_msg.stream;
UdpSend_downlink(aggregation, "10.103.239.31",20004);
}
bdestroy_wrapper(&b);
......@@ -899,7 +902,8 @@ void amf_n2::handle_itti_message(itti_dl_nas_transport& dl_nas_transport) {
aggregation["encoded"] = encoded_size;
aggregation["message_type_id"] = "0";
aggregation["assoc_id"] = (gc->sctp_assoc_id);
aggregation["stream"] = (unc->sctp_stream_send);
aggregation["stream"] = 0;
aggregation["index"] = (unc->sctp_stream_send);
UdpSend_downlink(aggregation, "10.103.239.31",20004);
}
// sctp_s_38412.curl_http_client_Plugin(gc->sctp_assoc_id, unc->sctp_stream_send, b);
......@@ -1085,7 +1089,8 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) {
aggregation["encoded"] = encoded_size;
aggregation["message_type_id"] = "0";
aggregation["assoc_id"] = (gc->sctp_assoc_id);
aggregation["stream"] = (unc->sctp_stream_send);
aggregation["stream"] = 0;
aggregation["index"] = (unc->sctp_stream_send);
UdpSend_downlink(aggregation, "10.103.239.31",20004);
}
// sctp_s_38412.curl_http_client_Plugin(gc->sctp_assoc_id, unc->sctp_stream_send, b);
......@@ -1203,7 +1208,8 @@ void amf_n2::handle_itti_message(
aggregation["imsi"] = nc->imsi;
aggregation["assoc_id"] = (gc->sctp_assoc_id);
aggregation["stream"] = (unc->sctp_stream_send);
aggregation["stream"] = 0;
aggregation["index"] = (unc->sctp_stream_send);
UdpSend_downlink(aggregation, "10.103.239.31",20004);
}
// sctp_s_38412.curl_http_client_Plugin(gc->sctp_assoc_id, unc->sctp_stream_send, b);
......@@ -1283,7 +1289,8 @@ void amf_n2::handle_itti_message(
aggregation["encoded"] = encoded_size;
aggregation["message_type_id"] = "0";
aggregation["assoc_id"] = (gc->sctp_assoc_id);
aggregation["stream"] = (unc->sctp_stream_send);
aggregation["stream"] = 0;
aggregation["index"] = (unc->sctp_stream_send);
UdpSend_downlink(aggregation, "10.103.239.31",20004);
}
// sctp_s_38412.curl_http_client_Plugin(gc->sctp_assoc_id, unc->sctp_stream_send, b);
......@@ -1529,7 +1536,8 @@ void amf_n2::handle_itti_message(
aggregation["encoded"] = encoded_size;
aggregation["message_type_id"] = "0";
aggregation["assoc_id"] = (unc->gnb_assoc_id);
aggregation["stream"] = (unc->sctp_stream_send);
aggregation["stream"] = 0;
aggregation["index"] = (unc->sctp_stream_send);
UdpSend_downlink(aggregation, "10.103.239.31",20004);
}
}
......@@ -1602,7 +1610,8 @@ void amf_n2::handle_itti_message(
aggregation["encoded"] = encoded_size;
aggregation["message_type_id"] = "0";
aggregation["assoc_id"] = (gc->sctp_assoc_id);
aggregation["stream"] = (unc->sctp_stream_send);
aggregation["stream"] = 0;
aggregation["index"] = (unc->sctp_stream_send);
UdpSend_downlink(aggregation, "10.103.239.31",20004);
}
// sctp_s_38412.curl_http_client_Plugin(gc->sctp_assoc_id, unc->sctp_stream_send, b);
......@@ -1646,7 +1655,8 @@ void amf_n2::handle_itti_message(itti_ue_context_release_request& itti_msg) {
aggregation["encoded"] = encoded_size;
aggregation["message_type_id"] = "0";
aggregation["assoc_id"] = (itti_msg.assoc_id);
aggregation["stream"] = (itti_msg.stream);
aggregation["stream"] = 0;
aggregation["index"] = (itti_msg.stream);
UdpSend_downlink(aggregation, "10.103.239.31",20004);
}
// sctp_s_38412.curl_http_client_Plugin(itti_msg.assoc_id, itti_msg.stream, b);
......@@ -1713,7 +1723,8 @@ void amf_n2::handle_itti_message(itti_ue_context_release_command& itti_msg) {
aggregation["encoded"] = encoded_size;
aggregation["message_type_id"] = "0";
aggregation["assoc_id"] = (gc->sctp_assoc_id);
aggregation["stream"] = (unc->sctp_stream_send);
aggregation["stream"] = 0;
aggregation["index"] = (unc->sctp_stream_send);
UdpSend_downlink(aggregation, "10.103.239.31",20004);
}
// sctp_s_38412.curl_http_client_Plugin(gc->sctp_assoc_id, unc->sctp_stream_send, b);
......
......@@ -118,6 +118,7 @@ void UdpSend_downlink(nlohmann::json aggregation,string ip,int port){
ngap_app::~ngap_app() {}
//------------------------------------------------------------------------------
int sendindex = 0;
void ngap_app::handle_receive(
bstring payload, sctp_assoc_id_t assoc_id, sctp_stream_id_t stream,
sctp_stream_id_t instreams, sctp_stream_id_t outstreams, uint8_t buffer[], int n) {
......@@ -164,7 +165,8 @@ void ngap_app::handle_receive(
// std::cout<<std::endl;
buffer[n] = assoc_id;
buffer[n+1] = stream;
UdpSend_uplink(buffer,n+2,"10.103.239.31",20001);
buffer[n+2] = sendindex;
UdpSend_uplink(buffer,n+3,"10.103.239.31",20001);
}
else{
//Handle the message
......
......@@ -261,12 +261,12 @@ void udp_server::handle_receive_udp(int r,uint8_t udp_recv[]){
sctp_assoc_id_t assoc_id;
vector<string> MsgVec;
uint8_t buffer[2048];
for(int i=0;i<r-2;i++){
for(int i=0;i<r-3;i++){
buffer[i] = udp_recv[i];
}
int _assoc_id = udp_recv[r-2];
int _stream = udp_recv[r-1];
int _assoc_id = udp_recv[r-3];
int _stream = udp_recv[r-2];
stream = udp_recv[r-1];
assoc_id = _assoc_id;
bstring payload=blk2bstr(buffer,r-2);
// bstring udp_recv_bstr=bfromcstr(content.c_str());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment