update it

This commit is contained in:
Sukchan Lee 2017-02-28 22:18:18 +09:00
parent fd78a265df
commit 0ddd1224b0
3 changed files with 53 additions and 8 deletions

View File

@ -3,7 +3,7 @@
noinst_LTLIBRARIES = libcellwire.la
libcellwire_la_SOURCES = \
cellwire.h event.h context.h \
cellwire.h common.h event.h context.h \
s1ap_build.h s1ap_conv.h s1ap_path.h \
s6_path.h \
sm.h

View File

@ -5,6 +5,7 @@
#include "core_errno.h"
#include "core_net.h"
#include "common.h"
#include "sm.h"
#ifdef __cplusplus
@ -25,12 +26,6 @@ extern "C" {
typedef list_t rab_list_t;
typedef struct _plmn_id_t {
c_uint16_t mcc;
c_uint16_t mnc;
c_uint16_t mnc_len;
} plmn_id_t;
typedef struct _served_gummei {
c_uint32_t num_of_plmn_id;
plmn_id_t plmn_id[MAX_PLMN_ID];

View File

@ -3,11 +3,61 @@
#include "core_errno.h"
#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
CORE_DECLARE(int) s6_send_auth_req();
#define MAX_IMSI_BCD_DIGITS_LEN 15
#define MAX_EPS_AUTH_VECTORS 1
#define AUTS_LENGTH 14
#define RAND_LENGTH_BITS (128)
#define RAND_LENGTH_OCTETS (RAND_LENGTH_BITS/8)
#define XRES_LENGTH_MIN (4)
#define XRES_LENGTH_MAX (16)
#define KASME_LENGTH_BITS (256)
#define KASME_LENGTH_OCTETS (KASME_LENGTH_BITS/8)
#define AUTN_LENGTH_BITS (128)
#define AUTN_LENGTH_OCTETS (AUTN_LENGTH_BITS/8)
typedef struct {
c_uint8_t size;
c_uint8_t data[XRES_LENGTH_MAX];
} res_t;
typedef struct eutran_vector_s {
c_uint8_t rand[RAND_LENGTH_OCTETS];
res_t xres;
c_uint8_t autn[AUTN_LENGTH_OCTETS];
c_uint8_t kasme[KASME_LENGTH_OCTETS];
} eutran_vector_t;
typedef struct _authentication_info_s {
c_uint8_t nb_of_vectors;
eutran_vector_t eutran_vector[MAX_EPS_AUTH_VECTORS];
} authentication_info_t;
typedef struct _s6a_auth_info_req_s {
char imsi[MAX_IMSI_BCD_DIGITS_LEN + 1];
c_uint8_t imsi_len;
plmn_id_t visited_plmn_id;
c_uint8_t num_of_vectors;
unsigned re_synchronization:1;
c_uint8_t auts[AUTS_LENGTH];
} s6a_auth_info_req_t;
typedef struct _s6a_auth_info_ans_s {
char imsi[MAX_IMSI_BCD_DIGITS_LEN + 1];
c_uint8_t imsi_len;
authentication_info_t auth_info;
} s6a_auth_info_ans_t;
CORE_DECLARE(int) s6_send_auth_info_req();
#ifdef __cplusplus
}