diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-07-01 08:19:51 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-07-01 08:19:51 +0200 |
commit | 8ee53ed9ec5e5f045778ab8b30f10cb86ec55c4a (patch) | |
tree | 93034ab4d9e3657b9148ce3f17dc342a13ffb923 /openbsc/include/openbsc/bsc_nat.h | |
parent | 57ee78078905c7499bd4e6857f8981d22badfcac (diff) | |
parent | 694d98042f1adfad0e54f97d0e4c8787c5fccbac (diff) |
Merge branch 'zecke/features/auth'
Introduce another authentication scheme using MILENAGE. In the
future reading from /dev/urandom will be replaced with libcrypto.
Diffstat (limited to 'openbsc/include/openbsc/bsc_nat.h')
-rw-r--r-- | openbsc/include/openbsc/bsc_nat.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h index ae940b390..72773a981 100644 --- a/openbsc/include/openbsc/bsc_nat.h +++ b/openbsc/include/openbsc/bsc_nat.h @@ -84,6 +84,7 @@ struct bsc_connection { /* do we know anything about this BSC? */ int authenticated; + uint8_t last_rand[16]; /* the fd we use to communicate */ struct osmo_wqueue write_queue; @@ -147,6 +148,8 @@ enum bsc_cfg_ctr { struct bsc_config { struct llist_head entry; + uint8_t key[16]; + uint8_t key_present; char *token; int nr; @@ -304,6 +307,9 @@ struct bsc_nat { /* control interface */ struct ctrl_handle *ctrl; + + /* for random values */ + int random_fd; }; struct bsc_nat_ussd_con { @@ -319,6 +325,7 @@ struct bsc_nat_ussd_con { /* create and init the structures */ struct bsc_config *bsc_config_alloc(struct bsc_nat *nat, const char *token); struct bsc_config *bsc_config_num(struct bsc_nat *nat, int num); +struct bsc_config *bsc_config_by_token(struct bsc_nat *nat, const char *token, int len); void bsc_config_free(struct bsc_config *); void bsc_config_add_lac(struct bsc_config *cfg, int lac); void bsc_config_del_lac(struct bsc_config *cfg, int lac); |