Commit a2bb236b authored by Chenyu's avatar Chenyu

signal is ok pdu session response is ok

parent 65d86435
......@@ -972,6 +972,7 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
ue_context_p->ue_context.pdusession[i].param = NGAP_PDUSESSION_SETUP_REQ(msg_p).pdusession_setup_params[pdu_sessions_done];
create_tunnel_req.pdusession_id[pdu_sessions_done] = NGAP_PDUSESSION_SETUP_REQ(msg_p).pdusession_setup_params[pdu_sessions_done].pdusession_id;
create_tunnel_req.upf_NGu_teid[pdu_sessions_done] = NGAP_PDUSESSION_SETUP_REQ(msg_p).pdusession_setup_params[pdu_sessions_done].gtp_teid;
printf("----------------liuyu--------------teid from amf %x\n----------",NGAP_PDUSESSION_SETUP_REQ(msg_p).pdusession_setup_params[pdu_sessions_done].gtp_teid);
memcpy(create_tunnel_req.upf_addr[pdu_sessions_done].buffer,
NGAP_PDUSESSION_SETUP_REQ(msg_p).pdusession_setup_params[i].upf_addr.buffer,
sizeof(uint8_t)*20);
......@@ -994,10 +995,11 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
create_tunnel_req.rnti = ue_context_p->ue_context.rnti;
create_tunnel_req.num_tunnels = pdu_sessions_done;
ret = gtpv1u_create_ngu_tunnel(
instance,
&create_tunnel_req,
&create_tunnel_resp);
//ret = gtpv1u_create_ngu_tunnel(
// instance,
// &create_tunnel_req,
// &create_tunnel_resp);
ret = 0;
if (ret != 0) {
LOG_E(NR_RRC,"rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ : gtpv1u_create_ngu_tunnel failed,start to release UE %x\n",ue_context_p->ue_context.rnti);
ue_context_p->ue_context.ue_release_timer_ng = 1;
......@@ -1009,10 +1011,10 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
ue_context_p->ue_context.ul_failure_timer = 0;
return (0);
}
nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
&ctxt,
&create_tunnel_resp,
&inde_list[0]);
//nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
// &ctxt,
// &create_tunnel_resp,
// &inde_list[0]);
ue_context_p->ue_context.setup_pdu_sessions += nb_pdusessions_tosetup;
// TEST
......
......@@ -319,6 +319,7 @@ void *gtpv1u_gNB_task(void *args) {
return NULL;
}
int nr_gtpv1u_gNB_init(void) {
NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
NwGtpv1uUlpEntityT ulp;
......
......@@ -543,7 +543,7 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
//pTunnelEndPoint = RB_FIND(NwGtpv1uTunnelEndPointIdentifierMap,
// &(thiz->teidMap), &tunnelEndPointKey);
pTunnelEndPoint=(char*)malloc(1024);
pTunnelEndPoint->teid=0x01;
pTunnelEndPoint->teid=0x02;
pTunnelEndPoint->peerAddr=peerIp;
pTunnelEndPoint->hUlpSession = 0x12;
//pTunnelEndPoint->pStack->ulp.hUlp = 0x34;
......@@ -868,8 +868,8 @@ nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
#endif
thiz = (NwGtpv1uStackT *) hGtpuStackHandle;
NW_ASSERT(thiz);
msgType = *((uint8_t *)(udpData + 1));
switch(msgType) {
......
......@@ -118,7 +118,7 @@ nwGtpSessionSendMsgApiToUlpEntity(NwGtpv1uTunnelEndPointT *thiz,
api.apiType = NW_GTPV1U_ULP_API_RECV_TPDU;
api.apiInfo.recvMsgInfo.hUlpSession = thiz->hUlpSession;
api.apiInfo.recvMsgInfo.teid = 0x01;
api.apiInfo.recvMsgInfo.teid = 0x02;
//api.apiInfo.recvMsgInfo.teid = thiz->teid;
api.apiInfo.recvMsgInfo.hMsg = (NwGtpv1uMsgHandleT)pMsg;
......
......@@ -73,7 +73,7 @@ int ngap_gNB_encode_pdu(NGAP_NGAP_PDU_t *pdu, uint8_t **buffer, uint32_t *len) {
return -1;
}
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, pdu);
//ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, pdu);
return ret;
}
......
......@@ -1369,6 +1369,7 @@ int ngap_gNB_handle_pdusession_setup_request(uint32_t assoc_id,
gTPTunnel_p->transportLayerAddress.size * 8 - gTPTunnel_p->transportLayerAddress.bits_unused;
memcpy(NGAP_PDUSESSION_SETUP_REQ(message_p).pdusession_setup_params[i].upf_addr.buffer ,
gTPTunnel_p->transportLayerAddress.buf, gTPTunnel_p->transportLayerAddress.size);
printf("---liuyu-reveive teid ====%x\n ",NGAP_PDUSESSION_SETUP_REQ(message_p).pdusession_setup_params[i].gtp_teid);
}
break;
......
......@@ -1176,16 +1176,17 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance,
/* Encode procedure has failed... */
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_NGAP_GNB,
MSC_NGAP_AMF,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" PduSession Setup successfulOutcome gNB_ue_ngap_id %u amf_ue_ngap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
pdusession_setup_resp_p->gNB_ue_ngap_id,
ue_context_p->amf_ue_ngap_id);
printf("----liuyu-----assoc_id-----------%d\n",ue_context_p->amf_ref->assoc_id);
// MSC_LOG_TX_MESSAGE(
// MSC_NGAP_GNB,
// MSC_NGAP_AMF,
// (const char *)buffer,
// length,
// MSC_AS_TIME_FMT" PduSession Setup successfulOutcome gNB_ue_ngap_id %u amf_ue_ngap_id %u",
// 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
// pdusession_setup_resp_p->gNB_ue_ngap_id,
// ue_context_p->amf_ue_ngap_id);
/* UE associated signalling -> use the allocated stream */
ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
ue_context_p->amf_ref->assoc_id, buffer,
......
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