summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libabis
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-04-07 23:31:58 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-04-07 23:31:58 +0200
commit5d7b65b407902298b194daf9034c12d94de90d35 (patch)
treee34f68b1e008fefc32201701f911564f6685caec /openbsc/src/libabis
parent755f7442dd754db7a6b534fe764012a87ce0575f (diff)
ipaccess: Add a function to prepend the osmocom ext header
* include/openbsc/ipaccess.h: Reserve a protocol number for control commands * input/ipaccess.c: New function ipaccess_prepend_header_ext prepends the extension header
Diffstat (limited to 'openbsc/src/libabis')
-rw-r--r--openbsc/src/libabis/input/ipaccess.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/openbsc/src/libabis/input/ipaccess.c b/openbsc/src/libabis/input/ipaccess.c
index ecf70388d..e1e314b9b 100644
--- a/openbsc/src/libabis/input/ipaccess.c
+++ b/openbsc/src/libabis/input/ipaccess.c
@@ -551,6 +551,15 @@ static int handle_ts1_read(struct bsc_fd *bfd)
return ret;
}
+void ipaccess_prepend_header_ext(struct msgb *msg, int proto)
+{
+ struct ipaccess_head_ext *hh_ext;
+
+ /* prepend the osmo ip.access header extension */
+ hh_ext = (struct ipaccess_head_ext *) msgb_push(msg, sizeof(*hh_ext));
+ hh_ext->proto = proto;
+}
+
void ipaccess_prepend_header(struct msgb *msg, int proto)
{
struct ipaccess_head *hh;