libosmocore  0.9.3
Osmocom core library
GSMTAP

Files

file  gsmtap_util.h
file  gsmtap_util.c

Data Structures

struct  gsmtap_inst
 one gsmtap instance More...

Functions

uint8_t chantype_rsl2gsmtap (uint8_t rsl_chantype, uint8_t link_id)
 convert RSL channel number to GSMTAP channel type
struct msgbgsmtap_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, uint8_t snr, const uint8_t *data, unsigned int len)
 create an arbitrary type GSMTAP message
struct msgbgsmtap_makemsg (uint16_t arfcn, uint8_t ts, uint8_t chan_type, uint8_t ss, uint32_t fn, int8_t signal_dbm, uint8_t snr, const uint8_t *data, unsigned int len)
 create L1/L2 data and put it into GSMTAP
static int gsmtap_inst_fd (struct gsmtap_inst *gti)
 obtain the file descriptor associated with a gsmtap instance
int gsmtap_source_init_fd (const char *host, uint16_t port)
int gsmtap_source_add_sink_fd (int gsmtap_fd)
struct gsmtap_instgsmtap_source_init (const char *host, uint16_t port, int ofd_wq_mode)
int gsmtap_source_add_sink (struct gsmtap_inst *gti)
int gsmtap_sendmsg (struct gsmtap_inst *gti, struct msgb *msg)
int gsmtap_send_ex (struct gsmtap_inst *gti, uint8_t type, uint16_t arfcn, uint8_t ts, uint8_t chan_type, uint8_t ss, uint32_t fn, int8_t signal_dbm, uint8_t snr, const uint8_t *data, unsigned int len)
int gsmtap_send (struct gsmtap_inst *gti, uint16_t arfcn, uint8_t ts, uint8_t chan_type, uint8_t ss, uint32_t fn, int8_t signal_dbm, uint8_t snr, const uint8_t *data, unsigned int len)

Variables

struct gsmtap_inst __attribute__

Detailed Description

Function Documentation

uint8_t chantype_rsl2gsmtap ( uint8_t  rsl_chantype,
uint8_t  link_id 
)

convert RSL channel number to GSMTAP channel type

Parameters
[in]rsl_chantypeRSL channel type
[in]link_idRSL link identifier
Returns
GSMTAP channel type
struct msgb * gsmtap_makemsg ( uint16_t  arfcn,
uint8_t  ts,
uint8_t  chan_type,
uint8_t  ss,
uint32_t  fn,
int8_t  signal_dbm,
uint8_t  snr,
const uint8_t *  data,
unsigned int  len 
)
read

create L1/L2 data and put it into GSMTAP

Parameters
[in]arfcnGSM ARFCN (Channel Number)
[in]tsGSM time slot
[in]chan_typeChannel Type
[in]ssSub-slot
[in]fnGSM Frame Number
[in]signal_dbmSignal Strength (dBm)
[in]snrSignal/Noise Ratio (SNR)
[in]dataPointer to data buffer
[in]lenLength of data

This function will allocate a new msgb and fill it with a GSMTAP header containing the information

References gsmtap_makemsg_ex().

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,
uint8_t  snr,
const uint8_t *  data,
unsigned int  len 
)
read

create an arbitrary type GSMTAP message

Parameters
[in]typeThe GSMTAP_TYPE_xxx constant of the message to create
[in]arfcnGSM ARFCN (Channel Number)
[in]tsGSM time slot
[in]chan_typeChannel Type
[in]ssSub-slot
[in]fnGSM Frame Number
[in]signal_dbmSignal Strength (dBm)
[in]snrSignal/Noise Ratio (SNR)
[in]dataPointer to data buffer
[in]lenLength of data

This function will allocate a new msgb and fill it with a GSMTAP header containing the information

References msgb_alloc(), and msgb_put().

Referenced by gsmtap_makemsg().