libosmogsm
0.11.0-dirty
Osmocom GSM library
|
00001 00003 #pragma once 00004 00005 #include <stdint.h> 00006 00007 #define IPA_TCP_PORT_OML 3002 00008 #define IPA_TCP_PORT_RSL 3003 00009 00010 struct ipaccess_head { 00011 uint16_t len; /* network byte order */ 00012 uint8_t proto; 00013 uint8_t data[0]; 00014 } __attribute__ ((packed)); 00015 00016 struct ipaccess_head_ext { 00017 uint8_t proto; 00018 uint8_t data[0]; 00019 } __attribute__ ((packed)); 00020 00021 enum ipaccess_proto { 00022 IPAC_PROTO_RSL = 0x00, 00023 IPAC_PROTO_IPACCESS = 0xfe, 00024 IPAC_PROTO_SCCP = 0xfd, 00025 IPAC_PROTO_OML = 0xff, 00026 00027 00028 /* OpenBSC extensions */ 00029 IPAC_PROTO_OSMO = 0xee, 00030 IPAC_PROTO_MGCP_OLD = 0xfc, 00031 }; 00032 00033 enum ipaccess_proto_ext { 00034 IPAC_PROTO_EXT_CTRL = 0x00, 00035 IPAC_PROTO_EXT_MGCP = 0x01, 00036 IPAC_PROTO_EXT_LAC = 0x02, 00037 IPAC_PROTO_EXT_SMSC = 0x03, 00038 IPAC_PROTO_EXT_ORC = 0x04, /* OML Router Control */ 00039 IPAC_PROTO_EXT_GSUP = 0x05, /* GSUP GPRS extension */ 00040 IPAC_PROTO_EXT_OAP = 0x06, /* Osmocom Authn Protocol */ 00041 }; 00042 00043 enum ipaccess_msgtype { 00044 IPAC_MSGT_PING = 0x00, 00045 IPAC_MSGT_PONG = 0x01, 00046 IPAC_MSGT_ID_GET = 0x04, 00047 IPAC_MSGT_ID_RESP = 0x05, 00048 IPAC_MSGT_ID_ACK = 0x06, 00049 00050 /* OpenBSC extension */ 00051 IPAC_MSGT_SCCP_OLD = 0xff, 00052 }; 00053 00054 enum ipaccess_id_tags { 00055 IPAC_IDTAG_SERNR = 0x00, 00056 IPAC_IDTAG_UNITNAME = 0x01, 00057 IPAC_IDTAG_LOCATION1 = 0x02, 00058 IPAC_IDTAG_LOCATION2 = 0x03, 00059 IPAC_IDTAG_EQUIPVERS = 0x04, 00060 IPAC_IDTAG_SWVERSION = 0x05, 00061 IPAC_IDTAG_IPADDR = 0x06, 00062 IPAC_IDTAG_MACADDR = 0x07, 00063 IPAC_IDTAG_UNIT = 0x08, 00064 }; 00065 00066 /* 00067 * Firmware specific header 00068 */ 00069 struct sdp_firmware { 00070 char magic[4]; 00071 char more_magic[2]; 00072 uint16_t more_more_magic; 00073 uint32_t header_length; 00074 uint32_t file_length; 00075 char sw_part[20]; 00076 char text1[64]; 00077 char time[12]; 00078 char date[14]; 00079 char text2[10]; 00080 char version[20]; 00081 uint16_t table_offset; 00082 /* stuff i don't know */ 00083 } __attribute__((packed)); 00084 00085 struct sdp_header_entry { 00086 uint16_t something1; 00087 char text1[64]; 00088 char time[12]; 00089 char date[14]; 00090 char text2[10]; 00091 char version[20]; 00092 uint32_t length; 00093 uint32_t addr1; 00094 uint32_t addr2; 00095 uint32_t start; 00096 } __attribute__((packed));