aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/ipaccess.h
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/include/openbsc/ipaccess.h')
-rw-r--r--openbsc/include/openbsc/ipaccess.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/ipaccess.h b/openbsc/include/openbsc/ipaccess.h
index 9335bfab7..904a9627b 100644
--- a/openbsc/include/openbsc/ipaccess.h
+++ b/openbsc/include/openbsc/ipaccess.h
@@ -2,6 +2,10 @@
#define _IPACCESS_H
#include "e1_input.h"
+#include <osmocore/linuxlist.h>
+
+#define IPA_TCP_PORT_OML 3002
+#define IPA_TCP_PORT_RSL 3003
struct ipaccess_head {
u_int16_t len; /* network byte order */
@@ -49,4 +53,55 @@ int ipaccess_send_id_req(int fd);
int ipaccess_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len);
+
+/*
+ * Firmware specific header
+ */
+struct sdp_firmware {
+ char magic[4];
+ char more_magic[2];
+ u_int16_t more_more_magic;
+ u_int32_t header_length;
+ u_int32_t file_length;
+ char sw_part[20];
+ char text1[64];
+ char time[12];
+ char date[14];
+ char text2[10];
+ char version[20];
+ u_int8_t dummy[2];
+ u_int16_t part_length;
+ /* stuff i don't know */
+} __attribute__((packed));
+
+struct sdp_header_entry {
+ u_int16_t something1;
+ char text1[64];
+ char time[12];
+ char date[14];
+ char text2[10];
+ char version[20];
+ u_int32_t length;
+ u_int32_t addr1;
+ u_int32_t addr2;
+ u_int32_t start;
+} __attribute__((packed));
+
+struct sdp_header_item {
+ struct sdp_header_entry header_entry;
+ struct llist_head entry;
+};
+
+struct sdp_header {
+ struct sdp_firmware firmware_info;
+
+ /* for more_magic a list of sdp_header_entry_list */
+ struct llist_head header_list;
+
+ /* the entry of the sdp_header */
+ struct llist_head entry;
+};
+
+int ipaccess_analyze_file(int fd, const unsigned int st_size, const unsigned base_offset, struct llist_head *list);
+
#endif /* _IPACCESS_H */