Neels Hofmeyr | 17518fe | 2017-06-20 04:35:06 +0200 | [diff] [blame] | 1 | /*! \file apn.h */ |
| 2 | |
Harald Welte | 908085c | 2014-10-01 16:18:11 +0800 | [diff] [blame] | 3 | #pragma once |
| 4 | |
| 5 | #include <stdint.h> |
| 6 | |
| 7 | /* 23.003 Section 9.1.1, excluding any terminating zero byte */ |
| 8 | #define APN_NI_MAXLEN 63 |
| 9 | |
| 10 | /* 23.003 Section 9.1, excluding any terminating zero byte */ |
| 11 | #define APN_MAXLEN 100 |
| 12 | |
| 13 | char *osmo_apn_qualify(unsigned int mcc, unsigned int mnc, const char *ni); |
Neels Hofmeyr | 9e57a5a | 2015-12-21 11:20:14 +0100 | [diff] [blame] | 14 | |
| 15 | /* Compose a string of the form '<ni>.mnc001.mcc002.gprs\0', returned in a |
| 16 | * static buffer. */ |
Harald Welte | 908085c | 2014-10-01 16:18:11 +0800 | [diff] [blame] | 17 | char *osmo_apn_qualify_from_imsi(const char *imsi, |
| 18 | const char *ni, int have_3dig_mnc); |
Jacob Erlbeck | 8114294 | 2015-11-17 08:42:05 +0100 | [diff] [blame] | 19 | |
| 20 | int osmo_apn_from_str(uint8_t *apn_enc, size_t max_apn_enc_len, const char *str); |
Philipp Maier | 8a942d2 | 2018-12-07 11:00:59 +0100 | [diff] [blame] | 21 | char *osmo_apn_to_str(char *out_str, const uint8_t *apn_enc, size_t apn_enc_len); |