nas_messages_types.h 3.93 KB
Newer Older
Cedric Roux's avatar
 
Cedric Roux committed
1 2 3 4 5
#include "as_message.h"

#ifndef NAS_MESSAGES_TYPES_H_
#define NAS_MESSAGES_TYPES_H_

Cedric Roux's avatar
Cedric Roux committed
6 7 8 9 10 11 12 13
#define NAS_UL_DATA_IND(mSGpTR)                 (mSGpTR)->ittiMsg.nas_ul_data_ind
#define NAS_DL_DATA_REQ(mSGpTR)                 (mSGpTR)->ittiMsg.nas_dl_data_req
#define NAS_DL_DATA_CNF(mSGpTR)                 (mSGpTR)->ittiMsg.nas_dl_data_cnf
#define NAS_CONN_EST_IND(mSGpTR)                (mSGpTR)->ittiMsg.nas_conn_est_ind
#define NAS_CONN_EST_CNF(mSGpTR)                (mSGpTR)->ittiMsg.nas_conn_est_cnf
#define NAS_BEARER_PARAM(mSGpTR)                (mSGpTR)->ittiMsg.nas_bearer_param
#define NAS_AUTHENTICATION_REQ(mSGpTR)          (mSGpTR)->ittiMsg.nas_auth_req
#define NAS_AUTHENTICATION_PARAM_REQ(mSGpTR)    (mSGpTR)->ittiMsg.nas_auth_param_req
14 15
#define NAS_AUTHENTICATION_PARAM_RSP(mSGpTR)    (mSGpTR)->ittiMsg.nas_auth_param_rsp
#define NAS_AUTHENTICATION_PARAM_FAIL(mSGpTR)   (mSGpTR)->ittiMsg.nas_auth_param_fail
16

winckel's avatar
winckel committed
17
typedef struct nas_paging_ind_s {
Cedric Roux's avatar
 
Cedric Roux committed
18 19 20
    
} nas_paging_ind_t;

winckel's avatar
winckel committed
21
typedef struct nas_conn_est_ind_s {
Cedric Roux's avatar
 
Cedric Roux committed
22 23 24 25 26 27 28 29
    nas_establish_ind_t nas;

    /* Transparent message from s1ap to be forwarded to MME_APP or
     * to S1AP if connection establishment is rejected by NAS.
     */
    s1ap_initial_ue_message_t transparent;
} nas_conn_est_ind_t;

30 31
typedef nas_establish_rsp_t nas_conn_est_rej_t;

32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
typedef struct nas_conn_est_cnf_s {
    uint32_t ue_id;

    nas_establish_cnf_t nas_establish_cnf;
    /* Transparent message from MME_APP to S1AP */
    s1ap_initial_ctxt_setup_req_t transparent;
} nas_conn_est_cnf_t;

typedef struct nas_bearer_param_s {
    unsigned eNB_ue_s1ap_id:24;
    uint32_t mme_ue_s1ap_id;

    /* Key eNB */
    uint8_t keNB[32];

    ambr_t   ambr;
    ambr_t   apn_ambr;

    /* EPS bearer ID */
    unsigned ebi:4;

    /* QoS */
    qci_t                   qci;
    priority_level_t        prio_level;
    pre_emp_vulnerability_t pre_emp_vulnerability;
    pre_emp_capability_t    pre_emp_capability;

    /* S-GW TEID for user-plane */
    uint32_t teid;
    /* S-GW IP address for User-Plane */
    ip_address_t s_gw_address;
} nas_bearer_param_t;
Cedric Roux's avatar
 
Cedric Roux committed
64

winckel's avatar
winckel committed
65
typedef struct nas_conn_rel_ind_s {
Cedric Roux's avatar
 
Cedric Roux committed
66 67 68
    
} nas_conn_rel_ind_t;

69
typedef ul_info_transfer_ind_t nas_ul_data_ind_t;
Cedric Roux's avatar
 
Cedric Roux committed
70

71 72
typedef dl_info_transfer_req_t nas_dl_data_req_t;
typedef dl_info_transfer_cnf_t nas_dl_data_cnf_t;
Cedric Roux's avatar
 
Cedric Roux committed
73

winckel's avatar
winckel committed
74
typedef struct nas_non_del_ind_s {
Cedric Roux's avatar
 
Cedric Roux committed
75 76 77
    
} nas_non_del_ind_t;

winckel's avatar
winckel committed
78
typedef struct nas_rab_est_req_s {
Cedric Roux's avatar
 
Cedric Roux committed
79 80 81
    
} nas_rab_est_req_t;

winckel's avatar
winckel committed
82
typedef struct nas_rab_est_rsp_s {
Cedric Roux's avatar
 
Cedric Roux committed
83 84 85
    
} nas_rab_est_rsp_t;

winckel's avatar
winckel committed
86
typedef struct nas_rab_rel_req_s {
Cedric Roux's avatar
 
Cedric Roux committed
87 88 89
    
} nas_rab_rel_req_t;

winckel's avatar
winckel committed
90
typedef struct nas_attach_req_s {
Cedric Roux's avatar
 
Cedric Roux committed
91 92 93 94 95 96 97 98
    /* TODO: Set the correct size */
    char apn[100];
    char imsi[16];
#define INITIAL_REQUEST (0x1)
    unsigned initial:1;
    s1ap_initial_ue_message_t transparent;
} nas_attach_req_t;

winckel's avatar
winckel committed
99
typedef struct nas_auth_req_s {
Cedric Roux's avatar
Cedric Roux committed
100
    /* UE imsi */
Cedric Roux's avatar
 
Cedric Roux committed
101 102 103 104 105 106 107 108
    char imsi[16];

#define NAS_FAILURE_OK  0x0
#define NAS_FAILURE_IND 0x1
    unsigned failure:1;
    int cause;
} nas_auth_req_t;

winckel's avatar
winckel committed
109
typedef struct nas_auth_resp_s {
Cedric Roux's avatar
 
Cedric Roux committed
110 111 112
    char imsi[16];
} nas_auth_resp_t;

Cedric Roux's avatar
Cedric Roux committed
113
typedef struct nas_auth_param_req_s {
114 115 116 117 118 119
    /* UE identifier */
    uint32_t ue_id;

    /* Imsi of the UE (In case of initial request) */
    char     imsi[16];
    uint8_t  imsi_length;
Cedric Roux's avatar
Cedric Roux committed
120

121 122
    /* Indicates whether the procedure corresponds to a new connection or not */
    uint8_t  initial_req:1;
123 124 125

    uint8_t re_synchronization:1;
    uint8_t auts[14];
Cedric Roux's avatar
Cedric Roux committed
126 127
} nas_auth_param_req_t;

128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
typedef struct nas_auth_param_rsp_s {
    /* UE identifier */
    uint32_t ue_id;

    /* For future use: nb of vectors provided */
    uint8_t nb_vectors;

    /* Consider only one E-UTRAN vector for the moment... */
    eutran_vector_t vector;
} nas_auth_param_rsp_t;

typedef struct nas_auth_param_fail_s {
    /* UE identifier */
    uint32_t    ue_id;

    /* S6A mapped to NAS cause */
    nas_cause_t cause;
} nas_auth_param_fail_t;

147
#if defined(DISABLE_USE_NAS)
Cedric Roux's avatar
Cedric Roux committed
148
typedef struct nas_attach_accept_s {
149
    s1ap_initial_ctxt_setup_req_t transparent;
Cedric Roux's avatar
Cedric Roux committed
150
} nas_attach_accept_t;
151
#endif
Cedric Roux's avatar
Cedric Roux committed
152

Cedric Roux's avatar
 
Cedric Roux committed
153
#endif /* NAS_MESSAGES_TYPES_H_ */