ipaccess.h
Go to the documentation of this file.
#pragma once
#include <stdint.h>
#define IPA_TCP_PORT_OML 3002
#define IPA_TCP_PORT_RSL 3003
struct ipaccess_head {
uint16_t len; /* network byte order */
uint8_t proto;
uint8_t data[0];
} __attribute__ ((packed));
struct ipaccess_head_ext {
uint8_t proto;
uint8_t data[0];
} __attribute__ ((packed));
enum ipaccess_proto {
IPAC_PROTO_RSL = 0x00,
IPAC_PROTO_IPACCESS = 0xfe,
IPAC_PROTO_SCCP = 0xfd,
IPAC_PROTO_OML = 0xff,
/* OpenBSC extensions */
IPAC_PROTO_OSMO = 0xee,
IPAC_PROTO_MGCP_OLD = 0xfc,
};
enum ipaccess_proto_ext {
IPAC_PROTO_EXT_CTRL = 0x00,
IPAC_PROTO_EXT_MGCP = 0x01,
IPAC_PROTO_EXT_LAC = 0x02,
IPAC_PROTO_EXT_SMSC = 0x03,
IPAC_PROTO_EXT_ORC = 0x04, /* OML Router Control */
IPAC_PROTO_EXT_GSUP = 0x05, /* GSUP GPRS extension */
IPAC_PROTO_EXT_OAP = 0x06, /* Osmocom Authn Protocol */
};
enum ipaccess_msgtype {
IPAC_MSGT_PING = 0x00,
IPAC_MSGT_PONG = 0x01,
IPAC_MSGT_ID_GET = 0x04,
IPAC_MSGT_ID_RESP = 0x05,
IPAC_MSGT_ID_ACK = 0x06,
/* OpenBSC extension */
IPAC_MSGT_SCCP_OLD = 0xff,
};
enum ipaccess_id_tags {
IPAC_IDTAG_SERNR = 0x00,
IPAC_IDTAG_UNITNAME = 0x01,
IPAC_IDTAG_LOCATION1 = 0x02,
IPAC_IDTAG_LOCATION2 = 0x03,
IPAC_IDTAG_EQUIPVERS = 0x04,
IPAC_IDTAG_SWVERSION = 0x05,
IPAC_IDTAG_IPADDR = 0x06,
IPAC_IDTAG_MACADDR = 0x07,
IPAC_IDTAG_UNIT = 0x08,
};
/*
* Firmware specific header
*/
struct sdp_firmware {
char magic[4];
char more_magic[2];
uint16_t more_more_magic;
uint32_t header_length;
uint32_t file_length;
char sw_part[20];
char text1[64];
char time[12];
char date[14];
char text2[10];
char version[20];
uint16_t table_offset;
/* stuff i don't know */
} __attribute__((packed));
struct sdp_header_entry {
uint16_t something1;
char text1[64];
char time[12];
char date[14];
char text2[10];
char version[20];
uint32_t length;
uint32_t addr1;
uint32_t addr2;
uint32_t start;
} __attribute__((packed));
sdp_firmware
Definition: ipaccess.h:69
IPAC_PROTO_MGCP_OLD
@ IPAC_PROTO_MGCP_OLD
Definition: ipaccess.h:30
sdp_firmware::text2
char text2[10]
Definition: ipaccess.h:79
__attribute__
enum ipaccess_proto __attribute__
sdp_firmware::more_more_magic
uint16_t more_more_magic
Definition: ipaccess.h:72
sdp_firmware::file_length
uint32_t file_length
Definition: ipaccess.h:74
IPAC_IDTAG_SWVERSION
@ IPAC_IDTAG_SWVERSION
Definition: ipaccess.h:60
sdp_header_entry::addr1
uint32_t addr1
Definition: ipaccess.h:93
ipaccess_head::proto
uint8_t proto
Definition: ipaccess.h:12
IPAC_PROTO_OML
@ IPAC_PROTO_OML
Definition: ipaccess.h:25
sdp_firmware::time
char time[12]
Definition: ipaccess.h:77
ipaccess_head_ext
Definition: ipaccess.h:16
IPAC_PROTO_IPACCESS
@ IPAC_PROTO_IPACCESS
Definition: ipaccess.h:23
IPAC_MSGT_PING
@ IPAC_MSGT_PING
Definition: ipaccess.h:44
IPAC_MSGT_ID_ACK
@ IPAC_MSGT_ID_ACK
Definition: ipaccess.h:48
sdp_header_entry::version
char version[20]
Definition: ipaccess.h:91
IPAC_IDTAG_EQUIPVERS
@ IPAC_IDTAG_EQUIPVERS
Definition: ipaccess.h:59
sdp_header_entry::something1
uint16_t something1
Definition: ipaccess.h:86
IPAC_PROTO_OSMO
@ IPAC_PROTO_OSMO
Definition: ipaccess.h:29
IPAC_PROTO_EXT_ORC
@ IPAC_PROTO_EXT_ORC
Definition: ipaccess.h:38
IPAC_PROTO_EXT_OAP
@ IPAC_PROTO_EXT_OAP
Definition: ipaccess.h:40
sdp_firmware::magic
char magic[4]
Definition: ipaccess.h:70
ipaccess_proto_ext
ipaccess_proto_ext
Definition: ipaccess.h:33
IPAC_PROTO_EXT_CTRL
@ IPAC_PROTO_EXT_CTRL
Definition: ipaccess.h:34
sdp_firmware::table_offset
uint16_t table_offset
Definition: ipaccess.h:81
sdp_header_entry::start
uint32_t start
Definition: ipaccess.h:95
IPAC_IDTAG_SERNR
@ IPAC_IDTAG_SERNR
Definition: ipaccess.h:55
IPAC_PROTO_EXT_SMSC
@ IPAC_PROTO_EXT_SMSC
Definition: ipaccess.h:37
ipaccess_head
Definition: ipaccess.h:10
ipaccess_id_tags
ipaccess_id_tags
Definition: ipaccess.h:54
IPAC_MSGT_ID_RESP
@ IPAC_MSGT_ID_RESP
Definition: ipaccess.h:47
IPAC_IDTAG_IPADDR
@ IPAC_IDTAG_IPADDR
Definition: ipaccess.h:61
sdp_firmware::date
char date[14]
Definition: ipaccess.h:78
ipaccess_msgtype
ipaccess_msgtype
Definition: ipaccess.h:43
sdp_firmware::version
char version[20]
Definition: ipaccess.h:80
ipaccess_head_ext::proto
uint8_t proto
Definition: ipaccess.h:17
sdp_header_entry::addr2
uint32_t addr2
Definition: ipaccess.h:94
sdp_header_entry::date
char date[14]
Definition: ipaccess.h:89
sdp_firmware::more_magic
char more_magic[2]
Definition: ipaccess.h:71
IPAC_PROTO_EXT_GSUP
@ IPAC_PROTO_EXT_GSUP
Definition: ipaccess.h:39
ipaccess_head::data
uint8_t data[0]
Definition: ipaccess.h:13
sdp_firmware::text1
char text1[64]
Definition: ipaccess.h:76
sdp_header_entry
Definition: ipaccess.h:85
IPAC_PROTO_RSL
@ IPAC_PROTO_RSL
Definition: ipaccess.h:22
sdp_header_entry::time
char time[12]
Definition: ipaccess.h:88
IPAC_PROTO_EXT_MGCP
@ IPAC_PROTO_EXT_MGCP
Definition: ipaccess.h:35
ipaccess_head_ext::data
uint8_t data[0]
Definition: ipaccess.h:18
sdp_firmware::header_length
uint32_t header_length
Definition: ipaccess.h:73
ipaccess_proto
ipaccess_proto
Definition: ipaccess.h:21
IPAC_IDTAG_LOCATION2
@ IPAC_IDTAG_LOCATION2
Definition: ipaccess.h:58
IPAC_PROTO_EXT_LAC
@ IPAC_PROTO_EXT_LAC
Definition: ipaccess.h:36
IPAC_MSGT_SCCP_OLD
@ IPAC_MSGT_SCCP_OLD
Definition: ipaccess.h:51
IPAC_IDTAG_UNITNAME
@ IPAC_IDTAG_UNITNAME
Definition: ipaccess.h:56
sdp_header_entry::text2
char text2[10]
Definition: ipaccess.h:90
sdp_firmware::sw_part
char sw_part[20]
Definition: ipaccess.h:75
IPAC_PROTO_SCCP
@ IPAC_PROTO_SCCP
Definition: ipaccess.h:24
IPAC_IDTAG_MACADDR
@ IPAC_IDTAG_MACADDR
Definition: ipaccess.h:62
IPAC_IDTAG_LOCATION1
@ IPAC_IDTAG_LOCATION1
Definition: ipaccess.h:57
ipaccess_head::len
uint16_t len
Definition: ipaccess.h:11
IPAC_IDTAG_UNIT
@ IPAC_IDTAG_UNIT
Definition: ipaccess.h:63
sdp_header_entry::length
uint32_t length
Definition: ipaccess.h:92
IPAC_MSGT_ID_GET
@ IPAC_MSGT_ID_GET
Definition: ipaccess.h:46
IPAC_MSGT_PONG
@ IPAC_MSGT_PONG
Definition: ipaccess.h:45
sdp_header_entry::text1
char text1[64]
Definition: ipaccess.h:87