blob: b4ece3a2306d7c01049cd254dc5dd7dbbf6af298 [file] [log] [blame]
Harald Welte908085c2014-10-01 16:18:11 +08001#pragma once
2
3#include <stdint.h>
4
5/* 23.003 Section 9.1.1, excluding any terminating zero byte */
6#define APN_NI_MAXLEN 63
7
8/* 23.003 Section 9.1, excluding any terminating zero byte */
9#define APN_MAXLEN 100
10
11char *osmo_apn_qualify(unsigned int mcc, unsigned int mnc, const char *ni);
Neels Hofmeyr9e57a5a2015-12-21 11:20:14 +010012
13/* Compose a string of the form '<ni>.mnc001.mcc002.gprs\0', returned in a
14 * static buffer. */
Harald Welte908085c2014-10-01 16:18:11 +080015char *osmo_apn_qualify_from_imsi(const char *imsi,
16 const char *ni, int have_3dig_mnc);
Jacob Erlbeck81142942015-11-17 08:42:05 +010017
18int osmo_apn_from_str(uint8_t *apn_enc, size_t max_apn_enc_len, const char *str);
19char * osmo_apn_to_str(char *out_str, const uint8_t *apn_enc, size_t apn_enc_len);