Commit fd51a5bd authored by MaheshK1995's avatar MaheshK1995

PARAM message exchange DONE

parent 776a7440
......@@ -459,7 +459,7 @@ int pnf_stop_request(nfapi_pnf_config_t *config, nfapi_pnf_stop_request_t *req)
int param_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfapi_nr_param_request_scf_t *req) {
printf("[PNF] Received NFAPI_PARAM_REQUEST phy_id:%d\n", req->header.phy_id);
//pnf_info* pnf = (pnf_info*)(config->user_data);
nfapi_param_response_t nfapi_resp;
nfapi_nr_param_response_scf_t nfapi_resp;
pnf_info *pnf = (pnf_info *)(config->user_data);
memset(&nfapi_resp, 0, sizeof(nfapi_resp));
nfapi_resp.header.message_id = NFAPI_PARAM_RESPONSE;
......@@ -475,7 +475,7 @@ int param_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfapi
nfapi_resp.nfapi_config.p7_pnf_port.value = pnf->phys[0].local_port; // 32123; // DJP - hard code alert!!!! FIXME TODO
nfapi_resp.num_tlv++;
nfapi_pnf_param_resp(config, &nfapi_resp);
printf("[PNF] Sent NFAPI_PARAM_RESPONSE phy_id:%d number_of_tlvs:%u\n", req->header.phy_id, nfapi_resp.num_tlv);
printf("[PNF] Sent NFAPI_PNF_PARAM_RESPONSE phy_id:%d number_of_tlvs:%u\n", req->header.phy_id, nfapi_resp.num_tlv);
printf("[PNF] param request .. exit\n");
return 0;
}
......@@ -676,7 +676,7 @@ int config_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfap
nfapi_resp.header.phy_id = phy_info->id;
nfapi_resp.error_code = 0; // DJP - some value resp->error_code;
nfapi_pnf_config_resp(config, &nfapi_resp);
printf("[PNF] Sent NFAPI_CONFIG_RESPONSE phy_id:%d\n", phy_info->id);
printf("[PNF] Sent NFAPI_PNF_CONFIG_RESPONSE phy_id:%d\n", phy_info->id);
if(NFAPI_MODE==NFAPI_UE_STUB_PNF)
free(fp);
......
......@@ -981,7 +981,7 @@ void *vnf_p7_thread_start(void *ptr) {
p7_vnf->config->codec_config.deallocate = &vnf_deallocate;
p7_vnf->config->allocate_p7_vendor_ext = &phy_allocate_p7_vendor_ext;
p7_vnf->config->deallocate_p7_vendor_ext = &phy_deallocate_p7_vendor_ext;
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] Creating VNF NFAPI start thread %s\n", __FUNCTION__);
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] Creating VNF NFAPI P7 start thread %s\n", __FUNCTION__);
pthread_create(&vnf_p7_start_pthread, NULL, &vnf_p7_start_thread, p7_vnf->config);
return 0;
}
......@@ -1002,7 +1002,7 @@ int pnf_start_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_pnf_start_re
}
// start all the phys in the pnf.
printf("[VNF] Sending NFAPI_PARAM_REQUEST phy_id:%d\n", pnf->phys[0].id);
printf("[VNF] Sending NFAPI_VNF_PARAM_REQUEST phy_id:%d\n", pnf->phys[0].id);
memset(&req, 0, sizeof(req));
req.header.message_id = NFAPI_PARAM_REQUEST;
req.header.phy_id = pnf->phys[0].id;
......@@ -1019,7 +1019,7 @@ int param_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_nr_param_respons
pnf_info *pnf = vnf->pnfs;
phy_info *phy = pnf->phys;
struct sockaddr_in pnf_p7_sockaddr;
nfapi_nr_config_request_t *req = &RC.nrmac[0]->config[0];
nfapi_nr_config_request_scf_t *req = &RC.nrmac[0]->config[0];
phy->remote_port = resp->nfapi_config.p7_pnf_port.value;
memcpy(&pnf_p7_sockaddr.sin_addr.s_addr, &(resp->nfapi_config.p7_pnf_address_ipv4.address[0]), 4);
phy->remote_addr = inet_ntoa(pnf_p7_sockaddr.sin_addr);
......@@ -1062,7 +1062,7 @@ int param_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_nr_param_respons
ve2.dummy = 2016;
req->vendor_extension = &ve2.tl;
nfapi_vnf_config_req(config, p5_idx, req);
printf("[VNF] Sent NFAPI_CONFIG_REQ num_tlv:%u\n",req->num_tlv);
printf("[VNF] Sent NFAPI_VNF_CONFIG_REQ num_tlv:%u\n",req->num_tlv);
return 0;
}
......@@ -1075,7 +1075,7 @@ int config_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_config_response
req.header.message_id = NFAPI_START_REQUEST;
req.header.phy_id = resp->header.phy_id;
nfapi_vnf_start_req(config, p5_idx, &req);
printf("[VNF] Send NFAPI_START_REQUEST idx:%d phy_id:%d\n", p5_idx, resp->header.phy_id);
printf("[VNF] Send NFAPI_VNF_START_REQUEST idx:%d phy_id:%d\n", p5_idx, resp->header.phy_id);
return 0;
}
......
......@@ -459,7 +459,7 @@ typedef struct {
nfapi_p4_p5_message_header_t header;
nfapi_nr_param_errors_e error_code;
uint8_t number_of_tlvs;
uint8_t num_tlv;
nfapi_vendor_extension_tlv_t vendor_extension;
nfapi_nr_cell_param_t cell_param;
......
This diff is collapsed.
......@@ -405,7 +405,7 @@ int nfapi_pnf_pnf_stop_resp(nfapi_pnf_config_t* config, nfapi_pnf_stop_response_
* \return 0 for success, -1 for failure
*
*/
int nfapi_pnf_param_resp(nfapi_pnf_config_t* config, nfapi_param_response_t* resp);
int nfapi_pnf_param_resp(nfapi_pnf_config_t* config, nfapi_nr_param_response_scf_t* resp);
/*! Send the CONFIG.response
* \param config A pointer to a pnf configuraiton
......
......@@ -169,7 +169,7 @@ int nfapi_pnf_pnf_stop_resp(nfapi_pnf_config_t* config, nfapi_pnf_stop_response_
return pnf_pack_and_send_p5_message(_this, &(resp->header), sizeof(nfapi_pnf_stop_response_t));
}
int nfapi_pnf_param_resp(nfapi_pnf_config_t* config, nfapi_param_response_t* resp)
int nfapi_pnf_param_resp(nfapi_pnf_config_t* config, nfapi_nr_param_response_scf_t* resp)
{
if (config == NULL || resp == NULL)
{
......@@ -179,7 +179,7 @@ int nfapi_pnf_param_resp(nfapi_pnf_config_t* config, nfapi_param_response_t* res
pnf_t* _this = (pnf_t*)(config);
return pnf_pack_and_send_p5_message(_this, &(resp->header), sizeof(nfapi_param_response_t));
return pnf_pack_and_send_p5_message(_this, &(resp->header), sizeof(nfapi_nr_param_response_scf_t));
}
int nfapi_pnf_config_resp(nfapi_pnf_config_t* config, nfapi_config_response_t* resp)
......
......@@ -541,7 +541,7 @@ int nfapi_vnf_param_req(nfapi_vnf_config_t* config, int p5_idx, nfapi_param_requ
* \param req A pointer to a CONFIG.request message structure
* \return 0 means success, -1 failure
*/
int nfapi_vnf_config_req(nfapi_vnf_config_t* config, int p5_idx, nfapi_config_request_t* req);
int nfapi_vnf_config_req(nfapi_vnf_config_t* config, int p5_idx, nfapi_nr_config_request_scf_t* req);
/*! Send the START.request
* \param config A pointer to a vnf config
......
......@@ -246,7 +246,7 @@ void vnf_handle_param_response(void *pRecvMsg, int recvMsgLen, nfapi_vnf_config_
{
NFAPI_TRACE(NFAPI_TRACE_INFO, "Received PARAM_RESPONSE\n");
nfapi_param_response_t msg;
nfapi_nr_param_response_scf_t msg;
// unpack the message
if (nfapi_p5_message_unpack(pRecvMsg, recvMsgLen, &msg, sizeof(msg), &config->codec_config) >= 0)
......
......@@ -487,7 +487,7 @@ int nfapi_vnf_stop(nfapi_vnf_config_t* config)
}
int nfapi_vnf_pnf_param_req(nfapi_vnf_config_t* config, int p5_idx, nfapi_pnf_param_request_t* req)
{
{ printf("nfapi_vnf_pnf_param_req\n");
if(config == 0 || req == 0)
return -1;
......@@ -535,7 +535,7 @@ int nfapi_vnf_param_req(nfapi_vnf_config_t* config, int p5_idx, nfapi_param_requ
return vnf_pack_and_send_p5_message(_this, p5_idx, &req->header, sizeof(nfapi_param_request_t));
}
int nfapi_vnf_config_req(nfapi_vnf_config_t* config, int p5_idx, nfapi_config_request_t* req)
int nfapi_vnf_config_req(nfapi_vnf_config_t* config, int p5_idx, nfapi_nr_config_request_scf_t* req)
{
if(config == 0 || req == 0)
return -1;
......@@ -551,19 +551,19 @@ int nfapi_vnf_config_req(nfapi_vnf_config_t* config, int p5_idx, nfapi_config_re
}
// set the timing parameters
req->nfapi_config.timing_window.tl.tag = NFAPI_NFAPI_TIMING_WINDOW_TAG;
req->nfapi_config.timing_window.tl.tag = NFAPI_NR_NFAPI_TIMING_WINDOW_TAG;
req->nfapi_config.timing_window.value = phy->timing_window;
req->num_tlv++;
req->nfapi_config.timing_info_mode.tl.tag = NFAPI_NFAPI_TIMING_INFO_MODE_TAG;
req->nfapi_config.timing_info_mode.tl.tag = NFAPI_NR_NFAPI_TIMING_INFO_MODE_TAG;
req->nfapi_config.timing_info_mode.value = phy->timing_info_mode;
req->num_tlv++;
req->nfapi_config.timing_info_period.tl.tag = NFAPI_NFAPI_TIMING_INFO_PERIOD_TAG;
req->nfapi_config.timing_info_period.tl.tag = NFAPI_NR_NFAPI_TIMING_INFO_PERIOD_TAG;
req->nfapi_config.timing_info_period.value = phy->timing_info_period;
req->num_tlv++;
return vnf_pack_and_send_p5_message(_this, p5_idx, &req->header, sizeof(nfapi_config_request_t));
return vnf_pack_and_send_p5_message(_this, p5_idx, &req->header, sizeof(nfapi_nr_config_request_scf_t));
}
int nfapi_vnf_start_req(nfapi_vnf_config_t* config, int p5_idx, nfapi_start_request_t* req)
{
......
......@@ -25,9 +25,9 @@ L1s = (
remote_n_address = "127.0.0.1"; // vnf addr
local_n_address = "127.0.0.1"; // pnf addr
local_n_portc = 50000; // pnf p5 port [!]
remote_n_portc = 50000; // vnf p5 port
local_n_portd = 50001; // pnf p7 port
remote_n_portd = 50001; // vnf p7 port
remote_n_portc = 50001; // vnf p5 port
local_n_portd = 50002; // pnf p7 port
remote_n_portd = 50003; // vnf p7 port
}
);
......
......@@ -240,10 +240,10 @@ MACRLCs = (
local_s_if_name = "lo:";
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.1"; // vnf addr
local_s_portc = 50000; // vnf p5 port
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50001; // vnf p7 port [!]
remote_s_portd = 50001; // pnf p7 port [!]
local_s_portd = 50003; // vnf p7 port [!]
remote_s_portd = 50002; // pnf p7 port [!]
tr_s_preference = "nfapi";
tr_n_preference = "local_RRC";
}
......
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