FreeCalypso > hg > themwi-system-sw
annotate include/number_db_v2.h @ 255:b0bf167bb846
themwi-update-outrt: add route-to-e911 option
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 15 Aug 2023 00:23:03 -0800 |
parents | 28441920fb35 |
children |
rev | line source |
---|---|
226
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * This header file defines version 2 of ThemWi number database |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * binary file format. |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 */ |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 struct numdb_file_hdr { |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 uint32_t owned_number_count; |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 uint32_t short_number_count; |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 }; |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 struct owned_number_rec { |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 uint16_t number[3]; /* NPA-exchange-suffix breakdown */ |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 uint8_t number_flags; /* properties of outside number */ |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 uint8_t usage; /* usage inside ThemWi */ |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 uint16_t remap[3]; /* secondary remap number */ |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 }; |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 #define NUMBER_FLAG_SMSPROV 0x01 /* provisioned for outside SMS */ |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 #define NUMBER_FLAG_E911PROV 0x02 /* provisioned for E911 */ |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 #define NUMBER_USAGE_MASK 0x0F |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 #define NUMBER_USAGE_TYPE_RSVD 0x00 |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 #define NUMBER_USAGE_TYPE_GSM_SUB 0x01 |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 #define NUMBER_USAGE_TYPE_ALIAS 0x02 |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 #define NUMBER_USAGE_FLAG_E911_VIA 0x10 |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 struct short_number_rec { |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 uint16_t short_num; |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 uint8_t short_num_type; |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 uint8_t fullnum_flags; |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 uint16_t fullnum_prefix[2]; |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 }; |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 #define SHORT_NUM_TYPE_ABBREV 0x01 |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 #define SHORT_NUM_TYPE_ITN 0x02 |
28441920fb35
beginning of number database version 2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 #define SHORT_NUM_TYPE_TEST_SINK 0x03 |