aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/ipaccess.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-12-30 05:56:49 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2009-12-30 06:42:16 +0100
commit4a98cad85e196ee3e23c527862d8c524e150366a (patch)
treeee8bd84b9511f9a54189c4807e2cb65eb3b76b04 /openbsc/include/openbsc/ipaccess.h
parent8f99562474acbc05e97fca26e9ce0d5fc17c1dd3 (diff)
[ipaccess] Turn firmware parsing into a routine so it can be used
* text3 seems to be a version as the text content starts with a 'v' * move the sdp_firmware into the ipaccess.h and declare the function. The headers are returned through a list.
Diffstat (limited to 'openbsc/include/openbsc/ipaccess.h')
-rw-r--r--openbsc/include/openbsc/ipaccess.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/ipaccess.h b/openbsc/include/openbsc/ipaccess.h
index 21a5c1759..5040de02f 100644
--- a/openbsc/include/openbsc/ipaccess.h
+++ b/openbsc/include/openbsc/ipaccess.h
@@ -2,6 +2,7 @@
#define _IPACCESS_H
#include "e1_input.h"
+#include "linuxlist.h"
#define IPA_TCP_PORT_OML 3002
#define IPA_TCP_PORT_RSL 3003
@@ -48,4 +49,31 @@ int ipaccess_rcvmsg_base(struct msgb *msg, struct bsc_fd *bfd);
struct msgb *ipaccess_read_msg(struct bsc_fd *bfd, int *error);
void ipaccess_prepend_header(struct msgb *msg, int proto);
+/*
+ * 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 {
+ struct sdp_firmware firmware_info;
+ struct llist_head list;
+};
+
+int ipaccess_analyze_file(int fd, const unsigned int st_size, const unsigned base_offset, struct llist_head *list);
+
#endif /* _IPACCESS_H */