Loading...
Searching...
No Matches
gsmtap_util.c File Reference
GSMTAP

GSMTAP support code in libosmocore. More...

`#include "config.h"`
`#include <osmocom/core/gsmtap_util.h>`
`#include <osmocom/core/logging.h>`
`#include <osmocom/core/gsmtap.h>`
`#include <osmocom/core/msgb.h>`
`#include <osmocom/core/talloc.h>`
`#include <osmocom/core/select.h>`
`#include <osmocom/core/socket.h>`
`#include <osmocom/core/byteswap.h>`
`#include <osmocom/core/utils.h>`
`#include <osmocom/gsm/protocol/gsm_04_08.h>`
`#include <osmocom/gsm/rsl.h>`
`#include <sys/types.h>`
`#include <stdio.h>`
`#include <unistd.h>`
`#include <stdint.h>`
`#include <string.h>`
`#include <errno.h>`

## Data Structures

struct | gsmtap_inst

one gsmtap instance Until gsmtap_inst_fd() is removed from the API at some point in the future, we have to keep the first member as 'int' and the second as 'struct osmo_wqueue' (this effectively makes sure that the struct member wq.bfd.fd maintains the same memory offset from the start of the struct) to ensure that inlined static 'instances' of gsmtap_inst_fd() in old binaries keep working the way they used to even with gsmtap_inst objects obtained from newer versions of libosmocore More...

struct | _gsmtap_inst_legacy

## Functions

| osmo_static_assert (offsetof(struct gsmtap_inst, wq)==offsetof(struct _gsmtap_inst_legacy, wq), gsmtap_inst_new_wq_offset_equals_legacy_wq_offset)
int | gsmtap_inst_fd (struct gsmtap_inst *gti)
| Deprecated, use gsmtap_inst_fd2() instead.
int | gsmtap_inst_fd2 (const struct gsmtap_inst *gti)
| obtain the file descriptor associated with a gsmtap instance
uint8_t | chantype_rsl2gsmtap2 (uint8_t rsl_chantype, uint8_t link_id, bool user_plane)
| convert RSL channel number to GSMTAP channel type
uint8_t | chantype_rsl2gsmtap (uint8_t rsl_chantype, uint8_t link_id)
| convert RSL channel number to GSMTAP channel type
void | chantype_gsmtap2rsl (uint8_t gsmtap_chantype, uint8_t *rsl_chantype, uint8_t *link_id)
| convert GSMTAP channel type to RSL channel number + Link ID
struct msgb * | gsmtap_makemsg_ex (uint8_t type, uint16_t arfcn, uint8_t ts, uint8_t chan_type, uint8_t ss, uint32_t fn, int8_t signal_dbm, int8_t snr, const uint8_t *data, unsigned int len)
| create an arbitrary type GSMTAP message
struct msgb * | gsmtap_makemsg (uint16_t arfcn, uint8_t ts, uint8_t chan_type, uint8_t ss, uint32_t fn, int8_t signal_dbm, int8_t snr, const uint8_t *data, unsigned int len)
| create L1/L2 data and put it into GSMTAP

## Variables

const struct value_string | gsmtap_gsm_channel_names []
const struct value_string | gsmtap_type_names []

## Detailed Description

GSMTAP support code in libosmocore.