aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/abis_nm.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-11-22 14:59:46 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-12-19 16:37:55 +0100
commitbce5675e5fa1eb4bcbe0dd24d503456eaeb58a0d (patch)
tree338b2407a776d4112de78486892b281407e06a3e /openbsc/include/openbsc/abis_nm.h
parentc751cf92cbc25a5cfca8041ef3fdcc16ed5865ad (diff)
abis: Create a routine that can parse all SW Descriptions of a SW Config
Be able to parse the entire SW Config IE. Parse the SW Descruption into a struct provided by the caller.
Diffstat (limited to 'openbsc/include/openbsc/abis_nm.h')
-rw-r--r--openbsc/include/openbsc/abis_nm.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/abis_nm.h b/openbsc/include/openbsc/abis_nm.h
index 9c4cc330..51f11e97 100644
--- a/openbsc/include/openbsc/abis_nm.h
+++ b/openbsc/include/openbsc/abis_nm.h
@@ -66,6 +66,18 @@ struct abis_nm_cfg {
int (*sw_act_req)(struct msgb *);
};
+struct abis_nm_sw_descr {
+ /* where does it start? how long is it? */
+ const uint8_t *start;
+ size_t len;
+
+ /* the parsed data */
+ const uint8_t *file_id;
+ uint16_t file_id_len;
+ const uint8_t *file_ver;
+ uint16_t file_ver_len;
+};
+
extern int abis_nm_rcvmsg(struct msgb *msg);
int abis_nm_tlv_parse(struct tlv_parsed *tp, struct gsm_bts *bts, const uint8_t *buf, int len);
@@ -167,4 +179,7 @@ int _abis_nm_sendmsg(struct msgb *msg);
void abis_nm_queue_send_next(struct gsm_bts *bts); /* for bs11_config. */
+int abis_nm_parse_sw_config(const uint8_t *data, const size_t len,
+ struct abis_nm_sw_descr *res, const int res_len);
+
#endif /* _NM_H */