- Add config file name for itti in EPC
- Add rrc ue identifier in downlink NAS transport message git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4466 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -74,7 +74,9 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Calling each layer init function */
|
/* Calling each layer init function */
|
||||||
CHECK_INIT_RETURN(log_init(&mme_config, oai_epc_log_specific));
|
CHECK_INIT_RETURN(log_init(&mme_config, oai_epc_log_specific));
|
||||||
CHECK_INIT_RETURN(itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL));
|
CHECK_INIT_RETURN(itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX,
|
||||||
|
tasks_info, messages_info, messages_definition_xml,
|
||||||
|
mme_config.itti_config.log_file));
|
||||||
|
|
||||||
CHECK_INIT_RETURN(nas_init(&mme_config));
|
CHECK_INIT_RETURN(nas_init(&mme_config));
|
||||||
CHECK_INIT_RETURN(sctp_init(&mme_config));
|
CHECK_INIT_RETURN(sctp_init(&mme_config));
|
||||||
|
|||||||
@@ -20,7 +20,10 @@ void s1ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uin
|
|||||||
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
|
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void s1ap_eNB_itti_send_nas_downlink_ind(instance_t instance, uint8_t *nas_pdu,
|
void s1ap_eNB_itti_send_nas_downlink_ind(instance_t instance,
|
||||||
|
uint16_t ue_initial_id,
|
||||||
|
uint32_t eNB_ue_s1ap_id,
|
||||||
|
uint8_t *nas_pdu,
|
||||||
uint32_t nas_pdu_length)
|
uint32_t nas_pdu_length)
|
||||||
{
|
{
|
||||||
MessageDef *message_p;
|
MessageDef *message_p;
|
||||||
@@ -30,6 +33,8 @@ void s1ap_eNB_itti_send_nas_downlink_ind(instance_t instance, uint8_t *nas_pdu,
|
|||||||
|
|
||||||
s1ap_downlink_nas = &message_p->msg.s1ap_downlink_nas;
|
s1ap_downlink_nas = &message_p->msg.s1ap_downlink_nas;
|
||||||
|
|
||||||
|
s1ap_downlink_nas->ue_initial_id = ue_initial_id;
|
||||||
|
s1ap_downlink_nas->eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||||
s1ap_downlink_nas->nas_pdu.buffer = nas_pdu;
|
s1ap_downlink_nas->nas_pdu.buffer = nas_pdu;
|
||||||
s1ap_downlink_nas->nas_pdu.length = nas_pdu_length;
|
s1ap_downlink_nas->nas_pdu.length = nas_pdu_length;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,10 @@
|
|||||||
void s1ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,
|
void s1ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,
|
||||||
uint32_t buffer_length, uint16_t stream);
|
uint32_t buffer_length, uint16_t stream);
|
||||||
|
|
||||||
void s1ap_eNB_itti_send_nas_downlink_ind(instance_t instance, uint8_t *nas_pdu,
|
void s1ap_eNB_itti_send_nas_downlink_ind(instance_t instance,
|
||||||
|
uint16_t ue_initial_id,
|
||||||
|
uint32_t eNB_ue_s1ap_id,
|
||||||
|
uint8_t *nas_pdu,
|
||||||
uint32_t nas_pdu_length);
|
uint32_t nas_pdu_length);
|
||||||
|
|
||||||
#endif /* S1AP_ENB_ITTI_MESSAGING_H_ */
|
#endif /* S1AP_ENB_ITTI_MESSAGING_H_ */
|
||||||
|
|||||||
@@ -258,6 +258,8 @@ int s1ap_eNB_handle_nas_downlink(uint32_t assoc_id,
|
|||||||
|
|
||||||
/* Forward the NAS PDU to RRC */
|
/* Forward the NAS PDU to RRC */
|
||||||
s1ap_eNB_itti_send_nas_downlink_ind(s1ap_eNB_instance->instance,
|
s1ap_eNB_itti_send_nas_downlink_ind(s1ap_eNB_instance->instance,
|
||||||
|
ue_desc_p->ue_initial_id,
|
||||||
|
ue_desc_p->eNB_ue_s1ap_id,
|
||||||
downlink_NAS_transport_p->nas_pdu.buf,
|
downlink_NAS_transport_p->nas_pdu.buf,
|
||||||
downlink_NAS_transport_p->nas_pdu.size);
|
downlink_NAS_transport_p->nas_pdu.size);
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,9 @@ void config_init(mme_config_t *mme_config_p)
|
|||||||
mme_config_p->ipv4.sgw_ip_netmask_for_S11 = DEFAULT_SGW_IP_NETMASK_FOR_S11;
|
mme_config_p->ipv4.sgw_ip_netmask_for_S11 = DEFAULT_SGW_IP_NETMASK_FOR_S11;
|
||||||
|
|
||||||
mme_config_p->s6a_config.conf_file = S6A_CONF_FILE;
|
mme_config_p->s6a_config.conf_file = S6A_CONF_FILE;
|
||||||
|
|
||||||
mme_config_p->itti_config.queue_size = ITTI_QUEUE_SIZE_MAX;
|
mme_config_p->itti_config.queue_size = ITTI_QUEUE_SIZE_MAX;
|
||||||
|
mme_config_p->itti_config.log_file = NULL;
|
||||||
|
|
||||||
mme_config_p->sctp_config.in_streams = SCTP_IN_STREAMS;
|
mme_config_p->sctp_config.in_streams = SCTP_IN_STREAMS;
|
||||||
mme_config_p->sctp_config.out_streams = SCTP_OUT_STREAMS;
|
mme_config_p->sctp_config.out_streams = SCTP_OUT_STREAMS;
|
||||||
@@ -199,6 +201,7 @@ static void config_display(mme_config_t *mme_config_p)
|
|||||||
mme_config_p->ipv4.mme_ip_netmask_for_S11);
|
mme_config_p->ipv4.mme_ip_netmask_for_S11);
|
||||||
fprintf(stdout, "- ITTI:\n");
|
fprintf(stdout, "- ITTI:\n");
|
||||||
fprintf(stdout, " queue size .....: %u (bytes)\n", mme_config_p->itti_config.queue_size);
|
fprintf(stdout, " queue size .....: %u (bytes)\n", mme_config_p->itti_config.queue_size);
|
||||||
|
fprintf(stdout, " log file .......: %s\n", mme_config_p->itti_config.log_file);
|
||||||
fprintf(stdout, "- SCTP:\n");
|
fprintf(stdout, "- SCTP:\n");
|
||||||
fprintf(stdout, " in streams .....: %u\n", mme_config_p->sctp_config.in_streams);
|
fprintf(stdout, " in streams .....: %u\n", mme_config_p->sctp_config.in_streams);
|
||||||
fprintf(stdout, " out streams ....: %u\n", mme_config_p->sctp_config.out_streams);
|
fprintf(stdout, " out streams ....: %u\n", mme_config_p->sctp_config.out_streams);
|
||||||
@@ -227,6 +230,8 @@ static void usage(void)
|
|||||||
fprintf(stdout, "-c<path>\n");
|
fprintf(stdout, "-c<path>\n");
|
||||||
fprintf(stdout, " Set the configuration file for mme\n");
|
fprintf(stdout, " Set the configuration file for mme\n");
|
||||||
fprintf(stdout, " See template in UTILS/CONF\n");
|
fprintf(stdout, " See template in UTILS/CONF\n");
|
||||||
|
fprintf(stdout, "-K<file>\n");
|
||||||
|
fprintf(stdout, " Output intertask messages to provided file\n");
|
||||||
fprintf(stdout, "-V Print %s version and return\n", PACKAGE_NAME);
|
fprintf(stdout, "-V Print %s version and return\n", PACKAGE_NAME);
|
||||||
fprintf(stdout, "-v[1-2] Debug level:\n");
|
fprintf(stdout, "-v[1-2] Debug level:\n");
|
||||||
fprintf(stdout, " 1 -> ASN1 XER printf on and ASN1 debug off\n");
|
fprintf(stdout, " 1 -> ASN1 XER printf on and ASN1 debug off\n");
|
||||||
@@ -241,7 +246,7 @@ int config_parse_opt_line(int argc, char *argv[], mme_config_t *mme_config_p)
|
|||||||
int c;
|
int c;
|
||||||
config_init(mme_config_p);
|
config_init(mme_config_p);
|
||||||
/* Parsing command line */
|
/* Parsing command line */
|
||||||
while ((c = getopt (argc, argv, "c:hi:v:V")) != -1) {
|
while ((c = getopt (argc, argv, "c:hi:K:v:V")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'c': {
|
case 'c': {
|
||||||
/* Store the given configuration file. If no file is given,
|
/* Store the given configuration file. If no file is given,
|
||||||
@@ -272,6 +277,9 @@ int config_parse_opt_line(int argc, char *argv[], mme_config_t *mme_config_p)
|
|||||||
exit(0);
|
exit(0);
|
||||||
nwGtpv1uDisplayBanner();
|
nwGtpv1uDisplayBanner();
|
||||||
} break;
|
} break;
|
||||||
|
case 'K':
|
||||||
|
mme_config_p->itti_config.log_file = strdup(optarg);
|
||||||
|
break;
|
||||||
case 'h': /* Fall through */
|
case 'h': /* Fall through */
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ typedef struct mme_config_s {
|
|||||||
} s6a_config;
|
} s6a_config;
|
||||||
struct {
|
struct {
|
||||||
uint32_t queue_size;
|
uint32_t queue_size;
|
||||||
|
char *log_file;
|
||||||
} itti_config;
|
} itti_config;
|
||||||
} mme_config_t;
|
} mme_config_t;
|
||||||
|
|
||||||
|
|||||||
@@ -245,7 +245,16 @@ typedef struct s1ap_uplink_nas_s {
|
|||||||
nas_pdu_t nas_pdu;
|
nas_pdu_t nas_pdu;
|
||||||
} s1ap_uplink_nas_t;
|
} s1ap_uplink_nas_t;
|
||||||
|
|
||||||
typedef s1ap_uplink_nas_t s1ap_downlink_nas_t;
|
typedef struct s1ap_downlink_nas_s {
|
||||||
|
/* UE id for initial connection to S1AP */
|
||||||
|
uint16_t ue_initial_id;
|
||||||
|
|
||||||
|
/* Unique UE identifier within an eNB */
|
||||||
|
unsigned eNB_ue_s1ap_id:24;
|
||||||
|
|
||||||
|
/* NAS pdu */
|
||||||
|
nas_pdu_t nas_pdu;
|
||||||
|
} s1ap_downlink_nas_t;
|
||||||
|
|
||||||
typedef struct s1ap_initial_context_setup_req_s {
|
typedef struct s1ap_initial_context_setup_req_s {
|
||||||
/* UE id for initial connection to S1AP */
|
/* UE id for initial connection to S1AP */
|
||||||
|
|||||||
Reference in New Issue
Block a user