Harald Welte | bda26c0 | 2016-05-11 09:13:08 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | #include <stdint.h> |
| 3 | |
| 4 | /* 23.003 Chapter 12.1 */ |
| 5 | struct osmo_plmn_id { |
| 6 | uint16_t mcc; |
| 7 | uint16_t mnc; |
| 8 | }; |
| 9 | |
| 10 | /* 4.1 */ |
| 11 | struct osmo_location_area_id { |
| 12 | struct osmo_plmn_id plmn; |
| 13 | uint16_t lac; |
| 14 | }; |
| 15 | |
| 16 | /* 4.2 */ |
| 17 | struct osmo_routing_area_id { |
| 18 | struct osmo_location_area_id lac; |
| 19 | uint8_t rac; |
| 20 | }; |
| 21 | |
| 22 | /* 4.3.1 */ |
| 23 | struct osmo_cell_global_id { |
| 24 | struct osmo_location_area_id lai; |
| 25 | uint16_t cell_identity; |
| 26 | }; |
| 27 | |
| 28 | /* 12.5 */ |
| 29 | struct osmo_service_area_id { |
| 30 | struct osmo_location_area_id lai; |
| 31 | uint16_t sac; |
| 32 | }; |
| 33 | |
| 34 | /* 12.6 */ |
| 35 | struct osmo_shared_network_area_id { |
| 36 | struct osmo_plmn_id plmn; |
| 37 | uint32_t snac; |
| 38 | }; |
| 39 | |
| 40 | /* 5.1 */ |
| 41 | enum osmo_gsn_addr_type { |
| 42 | GSN_ADDR_TYPE_IPV4 = 0, |
| 43 | GSN_ADDR_TYPE_IPV6 = 1, |
| 44 | }; |
| 45 | |
| 46 | /* 5.1 */ |
| 47 | struct osmo_gsn_address { |
| 48 | enum osmo_gsn_addr_type type; |
| 49 | uint8_t length; |
| 50 | uint8_t addr[16]; |
| 51 | }; |
| 52 | |
| 53 | /* 19.4.2.3 */ |
| 54 | struct osmo_tracking_area_id { |
| 55 | struct osmo_plmn_id plmn; |
| 56 | uint16_t tac; |
| 57 | }; |
| 58 | |
| 59 | struct osmo_eutran_cell_global_id { |
| 60 | struct osmo_plmn_id plmn; |
| 61 | uint32_t eci; /* FIXME */ |
| 62 | }; |
| 63 | |
| 64 | /* 2.8.1 */ |
| 65 | struct osmo_mme_id { |
| 66 | uint16_t group_id; |
| 67 | uint8_t code; |
| 68 | }; |
| 69 | |
| 70 | /* 2.8.1 */ |
| 71 | struct osmo_gummei { |
| 72 | struct osmo_plmn_id plmn; |
| 73 | struct osmo_mme_id mme; |
| 74 | }; |
| 75 | |
| 76 | /* 2.8.1 */ |
| 77 | struct osmo_guti { |
| 78 | struct osmo_gummei gummei; |
| 79 | uint32_t mtmsi; |
| 80 | }; |