libosmogsm 1.9.0.195-dafd
Osmocom GSM library
3GPP TS 29.205

Files

file  gsm29205.h
 
file  gsm29205.c
 Functions related to 3GPP TS 29.205, primarily message generation/encoding.
 

Data Structures

struct  osmo_gcr_parsed
 Parsed representation of Global Call Reference, 3GPP TS 29.205 Table B 2.1.9.1. More...
 

Macros

#define OSMO_GCR_MIN_LEN   13
 

Functions

uint8_t osmo_enc_gcr (struct msgb *msg, const struct osmo_gcr_parsed *g)
 Create Global Call Reference. More...
 
int osmo_dec_gcr (struct osmo_gcr_parsed *gcr, const uint8_t *elem, uint8_t len)
 Decode Global Call Reference, 3GPP TS 29.205 Table B 2.1.9.1. More...
 
bool osmo_gcr_eq (const struct osmo_gcr_parsed *gcr1, const struct osmo_gcr_parsed *gcr2)
 Compare two GCR structs. More...
 

Variables

uint8_t osmo_gcr_parsed::net [5]
 
uint8_t osmo_gcr_parsed::net_len
 Network ID, ITU-T Q.1902.3. More...
 
uint16_t osmo_gcr_parsed::node
 length (3-5 octets) of gsm29205_gcr::net More...
 
uint8_t osmo_gcr_parsed::cr [5]
 Node ID. More...
 

Detailed Description

Macro Definition Documentation

◆ OSMO_GCR_MIN_LEN

#define OSMO_GCR_MIN_LEN   13

Function Documentation

◆ osmo_dec_gcr()

int osmo_dec_gcr ( struct osmo_gcr_parsed gcr,
const uint8_t *  elem,
uint8_t  len 
)

Decode Global Call Reference, 3GPP TS 29.205 Table B 2.1.9.1.

Parameters
[out]gcrCaller-provided memory to store Global Call Reference
[in]elemIE value to be decoded
[in]lenLength of elem in bytes
Returns
number of bytes parsed; negative on error

References osmo_gcr_parsed::cr, len, osmo_gcr_parsed::net, osmo_gcr_parsed::net_len, and osmo_gcr_parsed::node.

Referenced by gsm0808_dec_gcr().

◆ osmo_enc_gcr()

uint8_t osmo_enc_gcr ( struct msgb msg,
const struct osmo_gcr_parsed g 
)

Create Global Call Reference.

Parameters
[out]msgMessage Buffer for appending IE
[in]gGlobal Call Reference, 3GPP TS 29.205 Table B 2.1.9.1
Returns
number of bytes added to msg

References g, msg, and msgb_lv_put().

Referenced by gsm0808_enc_gcr().

◆ osmo_gcr_eq()

bool osmo_gcr_eq ( const struct osmo_gcr_parsed gcr1,
const struct osmo_gcr_parsed gcr2 
)

Compare two GCR structs.

Parameters
[in]gcr1pointer to the GCR struct
[in]gcr2pointer to the GCR struct
Returns
true if GCRs are equal, false otherwise

References osmo_gcr_parsed::cr, osmo_gcr_parsed::net, osmo_gcr_parsed::net_len, and osmo_gcr_parsed::node.

Variable Documentation

◆ cr

uint8_t osmo_gcr_parsed::cr[5]

Node ID.

Referenced by osmo_dec_gcr(), osmo_gcr_dump_buf(), and osmo_gcr_eq().

◆ net

uint8_t osmo_gcr_parsed::net[5]

◆ net_len

uint8_t osmo_gcr_parsed::net_len

Network ID, ITU-T Q.1902.3.

Referenced by osmo_dec_gcr(), osmo_gcr_dump_buf(), and osmo_gcr_eq().

◆ node

uint16_t osmo_gcr_parsed::node

length (3-5 octets) of gsm29205_gcr::net

Referenced by osmo_dec_gcr(), osmo_gcr_dump_buf(), and osmo_gcr_eq().