GSMTAP: add function to create a 'sink' for gsmtap packets
[osmocom-bb.git] / include / osmocom / core / gsmtap_util.h
1 #ifndef _GSMTAP_UTIL_H
2 #define _GSMTAP_UTIL_H
3
4 #include <stdint.h>
5
6 /* convert RSL channel number to GSMTAP channel type */
7 uint8_t chantype_rsl2gsmtap(uint8_t rsl_chantype, uint8_t rsl_link_id);
8
9 /* receive a message from L1/L2 and put it in GSMTAP */
10 struct msgb *gsmtap_makemsg(uint16_t arfcn, uint8_t ts, uint8_t chan_type,
11                             uint8_t ss, uint32_t fn, int8_t signal_dbm,
12                             uint8_t snr, const uint8_t *data, unsigned int len);
13
14 /* receive a message from L1/L2 and put it in GSMTAP */
15 int gsmtap_sendmsg(uint16_t arfcn, uint8_t ts, uint8_t chan_type, uint8_t ss,
16                    uint32_t fn, int8_t signal_dbm, uint8_t snr,
17                    const uint8_t *data, unsigned int len);
18
19 int gsmtap_init(uint32_t dst_ip);
20
21 /* Create a local 'gsmtap sink' avoiding the UDP packets being rejected
22  * with ICMP reject messages */
23 int gsmtap_sink_init(uint32_t bind_ip);
24
25 #endif /* _GSMTAP_UTIL_H */