From bce5675e5fa1eb4bcbe0dd24d503456eaeb58a0d Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 22 Nov 2012 14:59:46 +0100 Subject: 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. --- openbsc/include/openbsc/abis_nm.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'openbsc/include/openbsc/abis_nm.h') diff --git a/openbsc/include/openbsc/abis_nm.h b/openbsc/include/openbsc/abis_nm.h index 9c4cc3309..51f11e975 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 */ -- cgit v1.2.3