Loading...
Searching...
No Matches
frame_relay.c File Reference

Implement frame relay/PVC by Q.933. More...

`#include <stdint.h>`
`#include <stdbool.h>`
`#include <unistd.h>`
`#include <errno.h>`
`#include <osmocom/gprs/frame_relay.h>`
`#include <osmocom/core/endian.h>`
`#include <osmocom/core/utils.h>`
`#include <osmocom/core/logging.h>`
`#include <osmocom/core/linuxlist.h>`
`#include <osmocom/core/tdef.h>`
`#include <osmocom/core/timer.h>`
`#include <osmocom/core/msgb.h>`
`#include <osmocom/gsm/tlv.h>`
`#include <osmocom/vty/vty.h>`
`#include <osmocom/vty/tdef_vty.h>`

## Data Structures

struct | q933_a_hdr
struct | q933_a_pvc_sts

## Macros

#define | LOGPFRL(frl, lvl, fmt, args ...) LOGP(DFR, lvl, "%s: " fmt, (frl)->name, ## args)
#define | DFR DLNS
#define | LAPF_UI 0x03 /* UI control word */
#define | Q931_PDISC_CC 0x08 /* protocol discriminator */
#define | LMI_Q933A_CALLREF 0x00 /* NULL call-ref */
#define | LMI_Q933A_DLCI 0 /* Q.933A DLCI */
#define | LMI_CISCO_DLCI 1023 /* Cisco DLCI */
#define | MAX_SUPPORTED_PVC 10

## Enumerations

enum

q931_msgtype {
Q931_MSGT_ALERTING = 0x01 ,
Q931_MSGT_CALL_PROCEEDING = 0x02 ,
Q931_MSGT_CONNECT = 0x07 ,
Q931_MSGT_CONNECT_ACK = 0x0f ,
Q931_MSGT_PROGRESS = 0x03 ,
Q931_MSGT_SETUP = 0x05 ,
Q931_MSGT_SETUP_ACK = 0x0d ,
Q931_MSGT_RESUME = 0x26 ,
Q931_MSGT_RESUME_ACK = 0x2e ,
Q931_MSGT_RESUME_REJ = 0x22 ,
Q931_MSGT_SUSPEND = 0x25 ,
Q931_MSGT_SUSPEND_ACK = 0x2d ,
Q931_MSGT_USER_INFO = 0x20 ,
Q931_MSGT_DISCONNECT = 0x45 ,
Q931_MSGT_RELEASE = 0x4d ,
Q931_MSGT_RELEASE_COMPLETE = 0x5a ,
Q931_MSGT_RESTART = 0x46 ,
Q931_MSGT_RESTART_ACK = 0x4e ,
Q931_MSGT_SEGMENT = 0x60 ,
Q931_MSGT_CONGESTION_CONTROL = 0x79 ,
Q931_MSGT_IFORMATION = 0x7b ,
Q931_MSGT_NOTIFY = 0x6e ,
Q931_MSGT_STATUS = 0x7d ,
Q931_MSGT_STATUS_ENQUIRY = 0x75
}

enum | q933_type_of_report { Q933_REPT_FULL_STATUS = 0x00 , Q933_REPT_LINK_INTEGRITY_VERIF = 0x01 , Q933_REPT_SINGLE_PVC_ASYNC_STS = 0x02 }
enum | q933_iei { Q933_IEI_REPORT_TYPE = 0x51 , Q933_IEI_LINK_INT_VERIF = 0x53 , Q933_IEI_PVC_STATUS = 0x57 }
enum | q933_pvc_status { Q933_PVC_STATUS_DLC_ACTIVE = 0x02 , Q933_PVC_STATUS_DLC_DELETE = 0x04 , Q933_PVC_STATUS_DLC_NEW = 0x08 }

## Functions

struct q933_a_hdr | __attribute__ ((packed))
static void | check_link_state (struct osmo_fr_link *link, bool valid)
static uint16_t | q922_to_dlci (const uint8_t *hdr)
static void | dlci_to_q922 (uint8_t *hdr, uint16_t dlci)
static void | dlc_set_active (struct osmo_fr_dlc *dlc, bool active)
static struct msgb * | q933_msgb_alloc (uint16_t dlci, uint8_t prot_disc, uint8_t msg_type)
static uint8_t | link_get_tx_seq (struct osmo_fr_link *link)
static void | msgb_put_link_int_verif (struct msgb *msg, struct osmo_fr_link *link)
static void | dlc_destroy (struct osmo_fr_dlc *dlc)
static void | msgb_put_pvc_status (struct msgb *msg, struct osmo_fr_dlc *dlc)
static int | tx_lmi_q933_status_enq (struct osmo_fr_link *link, uint8_t rep_type)
static int | tx_lmi_q933_status (struct osmo_fr_link *link, uint8_t rep_type)
static void | link_set_failed (struct osmo_fr_link *link)
static int | rx_lmi_q933_status_enq (struct msgb *msg, struct tlv_parsed *tp)
static int | validate_pvc_status (struct tlv_parsed *tp, size_t tp_len)
static int | parse_full_pvc_status (struct osmo_fr_link *link, struct tlv_parsed *tp, size_t tp_len)
static int | parse_link_pvc_status (struct osmo_fr_link *link, struct tlv_parsed *tp, size_t tp_len)
static size_t | count_pvc_status (struct tlv_parsed *tp, size_t tp_len)
static int | rx_lmi_q933_status (struct msgb *msg, struct tlv_parsed *tp)
static int | rx_lmi_q922 (struct msgb *msg)
int | osmo_fr_rx (struct msgb *msg)
int | osmo_fr_tx_dlc (struct msgb *msg)
static void | fr_t391_cb (void *data)
static void | fr_t392_cb (void *data)
struct osmo_fr_network * | osmo_fr_network_alloc (void *ctx)
void | osmo_fr_network_free (struct osmo_fr_network *net)
struct osmo_fr_link * | osmo_fr_link_alloc (struct osmo_fr_network *net, enum osmo_fr_role role, const char *name)
void | osmo_fr_link_free (struct osmo_fr_link *link)
struct osmo_fr_dlc * | osmo_fr_dlc_alloc (struct osmo_fr_link *link, uint16_t dlci)
void | osmo_fr_dlc_free (struct osmo_fr_dlc *dlc)
struct osmo_fr_dlc * | osmo_fr_dlc_by_dlci (struct osmo_fr_link *link, uint16_t dlci)
static void | fr_dlc_dump_vty (struct vty *vty, const struct osmo_fr_dlc *dlc)
static void | fr_link_dump_vty (struct vty *vty, const struct osmo_fr_link *link)
void | osmo_fr_network_dump_vty (struct vty *vty, const struct osmo_fr_network *net)

## Variables

uint8_t | prot_disc
uint8_t | call_ref
uint8_t | msg_type
const struct value_string | osmo_fr_role_names []
struct osmo_tdef | fr_tdefs []
static const struct tlv_definition | q933_att_tlvdef

## Detailed Description

Implement frame relay/PVC by Q.933.

## Macro Definition Documentation

## DFR

#define DFR DLNS

## LAPF_UI

#define LAPF_UI 0x03 /* UI control word */

## LMI_CISCO_DLCI

#define LMI_CISCO_DLCI 1023 /* Cisco DLCI */

## LMI_Q933A_CALLREF

#define LMI_Q933A_CALLREF 0x00 /* NULL call-ref */

## LMI_Q933A_DLCI

#define LMI_Q933A_DLCI 0 /* Q.933A DLCI */

## LOGPFRL

#define LOGPFRL | ( |  | frl,
|  |  | lvl,
|  |  | fmt,
|  |  | args ...
| ) |  | LOGP(DFR, lvl, "%s: " fmt, (frl)->name, ## args)

## MAX_SUPPORTED_PVC

#define MAX_SUPPORTED_PVC 10

## Q931_PDISC_CC

#define Q931_PDISC_CC 0x08 /* protocol discriminator */

## Enumeration Type Documentation

## q931_msgtype

enum q931_msgtype

Enumerator
Q931_MSGT_ALERTING |
Q931_MSGT_CALL_PROCEEDING |
Q931_MSGT_CONNECT |
Q931_MSGT_CONNECT_ACK |
Q931_MSGT_PROGRESS |
Q931_MSGT_SETUP |
Q931_MSGT_SETUP_ACK |
Q931_MSGT_RESUME |
Q931_MSGT_RESUME_ACK |
Q931_MSGT_RESUME_REJ |
Q931_MSGT_SUSPEND |
Q931_MSGT_SUSPEND_ACK |
Q931_MSGT_USER_INFO |
Q931_MSGT_DISCONNECT |
Q931_MSGT_RELEASE |
Q931_MSGT_RELEASE_COMPLETE |
Q931_MSGT_RESTART |
Q931_MSGT_RESTART_ACK |
Q931_MSGT_SEGMENT |
Q931_MSGT_CONGESTION_CONTROL |
Q931_MSGT_IFORMATION |
Q931_MSGT_NOTIFY |
Q931_MSGT_STATUS |
Q931_MSGT_STATUS_ENQUIRY |

## q933_iei

enum q933_iei

Enumerator
Q933_IEI_REPORT_TYPE |
Q933_IEI_LINK_INT_VERIF |
Q933_IEI_PVC_STATUS |

## q933_pvc_status

enum q933_pvc_status

Enumerator
Q933_PVC_STATUS_DLC_ACTIVE |
Q933_PVC_STATUS_DLC_DELETE |
Q933_PVC_STATUS_DLC_NEW |

## q933_type_of_report

enum q933_type_of_report

Enumerator
Q933_REPT_FULL_STATUS |
Q933_REPT_LINK_INTEGRITY_VERIF |
Q933_REPT_SINGLE_PVC_ASYNC_STS |

## Function Documentation

## check_link_state()

static void check_link_state | ( | struct osmo_fr_link * | link,
|  | bool | valid
| ) |  |

static

References osmo_fr_dlc::add, osmo_fr_link::cb_data, osmo_fr_dlc::del, osmo_fr_link::dlc_list, dlc_set_active(), FR_ROLE_USER_EQUIPMENT, osmo_fr_dlc::link, link_set_failed(), osmo_fr_dlc::list, llist_for_each_entry, LOGL_NOTICE, LOGPFRL, osmo_fr_network::n392, osmo_fr_network::n393, osmo_fr_link::net, osmo_fr_link::polling_count, osmo_fr_link::role, osmo_fr_link::state, osmo_fr_link::status_cb, and osmo_fr_link::succeed.

Referenced by fr_t392_cb(), rx_lmi_q933_status(), and rx_lmi_q933_status_enq().

## count_pvc_status()

static size_t count_pvc_status | ( | struct tlv_parsed * | tp,
|  | size_t | tp_len
| ) |  |

static

References Q933_IEI_PVC_STATUS, and TLVP_PRESENT.

Referenced by rx_lmi_q933_status().

## dlc_destroy()

static void dlc_destroy | ( | struct osmo_fr_dlc * | dlc | ) |

static

References osmo_fr_dlc::list.

Referenced by msgb_put_pvc_status().

## dlc_set_active()

static void dlc_set_active | ( | struct osmo_fr_dlc * | dlc,
|  | bool | active
| ) |  |

static

References osmo_fr_dlc::active, osmo_fr_dlc::cb_data, osmo_fr_dlc::dlci, osmo_fr_dlc::link, LOGL_NOTICE, LOGPFRL, and osmo_fr_dlc::status_cb.

Referenced by check_link_state(), link_set_failed(), parse_full_pvc_status(), parse_link_pvc_status(), and rx_lmi_q933_status_enq().

## dlci_to_q922()

static void dlci_to_q922 | ( | uint8_t * | hdr,
|  | uint16_t | dlci
| ) |  |

inline static

References hdr.

Referenced by osmo_fr_tx_dlc(), and q933_msgb_alloc().

## fr_dlc_dump_vty()

static void fr_dlc_dump_vty | ( | struct vty * | vty,
|  | const struct osmo_fr_dlc * | dlc
| ) |  |

static

References osmo_fr_dlc::active, osmo_fr_dlc::add, osmo_fr_dlc::del, osmo_fr_dlc::dlci, VTY_NEWLINE, and vty_out().

Referenced by fr_link_dump_vty().

## fr_link_dump_vty()

static void fr_link_dump_vty | ( | struct vty * | vty,
|  | const struct osmo_fr_link * | link
| ) |  |

static

References osmo_fr_link::dlc_list, fr_dlc_dump_vty(), FR_ROLE_USER_EQUIPMENT, osmo_fr_link::last_rx_seq, osmo_fr_link::last_tx_seq, osmo_fr_dlc::link, osmo_fr_dlc::list, llist_for_each_entry, osmo_fr_link::name, osmo_fr_link::role, VTY_NEWLINE, and vty_out().

Referenced by osmo_fr_network_dump_vty().

## fr_t391_cb()

static void fr_t391_cb | ( | void * | data | ) |

static

References data, osmo_fr_network::n391, osmo_fr_link::net, OSMO_ASSERT, osmo_tdef_get(), OSMO_TDEF_S, osmo_timer_schedule(), osmo_fr_link::polling_count, Q933_REPT_FULL_STATUS, Q933_REPT_LINK_INTEGRITY_VERIF, osmo_fr_link::t391, osmo_fr_network::T_defs, and tx_lmi_q933_status_enq().

Referenced by osmo_fr_link_alloc().

## fr_t392_cb()

static void fr_t392_cb | ( | void * | data | ) |

static

References check_link_state(), data, osmo_fr_link::err_count, osmo_fr_link::net, OSMO_ASSERT, osmo_tdef_get(), OSMO_TDEF_S, osmo_timer_schedule(), osmo_fr_link::t392, and osmo_fr_network::T_defs.

Referenced by osmo_fr_link_alloc().

## link_get_tx_seq()

static uint8_t link_get_tx_seq | ( | struct osmo_fr_link * | link | ) |

static

References osmo_fr_link::last_tx_seq.

Referenced by msgb_put_link_int_verif().

## link_set_failed()

static void link_set_failed | ( | struct osmo_fr_link * | link | ) |

static

References osmo_fr_link::cb_data, osmo_fr_link::dlc_list, dlc_set_active(), osmo_fr_dlc::link, osmo_fr_dlc::list, llist_for_each_entry, LOGL_NOTICE, LOGPFRL, osmo_fr_link::state, and osmo_fr_link::status_cb.

Referenced by check_link_state(), and rx_lmi_q933_status_enq().

## msgb_put_link_int_verif()

static void msgb_put_link_int_verif | ( | struct msgb * | msg,
|  | struct osmo_fr_link * | link
| ) |  |

static

References osmo_fr_link::last_rx_seq, link_get_tx_seq(), msg, and Q933_IEI_LINK_INT_VERIF.

Referenced by tx_lmi_q933_status(), and tx_lmi_q933_status_enq().

## msgb_put_pvc_status()

static void msgb_put_pvc_status | ( | struct msgb * | msg,
|  | struct osmo_fr_dlc * | dlc
| ) |  |

static

References osmo_fr_dlc::active, osmo_fr_dlc::add, osmo_fr_dlc::del, dlc_destroy(), osmo_fr_dlc::dlci, msg, Q933_IEI_PVC_STATUS, Q933_PVC_STATUS_DLC_ACTIVE, Q933_PVC_STATUS_DLC_DELETE, and Q933_PVC_STATUS_DLC_NEW.

Referenced by tx_lmi_q933_status().

## osmo_fr_dlc_alloc()

struct osmo_fr_dlc * osmo_fr_dlc_alloc | ( | struct osmo_fr_link * | link,
|  | uint16_t | dlci
| ) |  |

References osmo_fr_dlc::active, osmo_fr_dlc::add, osmo_fr_link::dlc_list, osmo_fr_dlc::dlci, osmo_fr_dlc::link, osmo_fr_dlc::list, Q933_REPT_SINGLE_PVC_ASYNC_STS, and tx_lmi_q933_status().

Referenced by fr_alloc_vc(), parse_full_pvc_status(), and parse_link_pvc_status().

## osmo_fr_dlc_by_dlci()

struct osmo_fr_dlc * osmo_fr_dlc_by_dlci | ( | struct osmo_fr_link * | link,
|  | uint16_t | dlci
| ) |  |

References osmo_fr_link::dlc_list, osmo_fr_dlc::dlci, osmo_fr_dlc::link, osmo_fr_dlc::list, and llist_for_each_entry.

Referenced by osmo_fr_rx(), parse_full_pvc_status(), and parse_link_pvc_status().

## osmo_fr_dlc_free()

void osmo_fr_dlc_free | ( | struct osmo_fr_dlc * | dlc | ) |

References osmo_fr_dlc::list.

Referenced by osmo_fr_link_free().

## osmo_fr_link_alloc()

struct osmo_fr_link * osmo_fr_link_alloc | ( | struct osmo_fr_network * | net,
|  | enum osmo_fr_role | role,
|  | const char * | name
| ) |  |

References osmo_fr_link::dlc_list, FR_ROLE_NETWORK_EQUIPMENT, FR_ROLE_USER_EQUIPMENT, fr_t391_cb(), fr_t392_cb(), INIT_LLIST_HEAD, osmo_fr_network::links, osmo_fr_link::list, LOGL_INFO, LOGPFRL, osmo_fr_link::name, osmo_fr_link::net, osmo_fr_role_str(), osmo_tdef_get(), OSMO_TDEF_S, osmo_timer_schedule(), osmo_timer_setup(), osmo_fr_link::role, osmo_fr_link::t391, osmo_fr_link::t392, and osmo_fr_network::T_defs.

Referenced by gprs_ns2_fr_bind().

## osmo_fr_link_free()

void osmo_fr_link_free | ( | struct osmo_fr_link * | link | ) |

References osmo_fr_link::dlc_list, osmo_fr_dlc::link, osmo_fr_link::list, osmo_fr_dlc::list, llist_for_each_entry_safe, osmo_fr_dlc_free(), osmo_timer_del(), osmo_fr_link::t391, and osmo_fr_link::t392.

Referenced by free_bind(), gprs_ns2_fr_bind(), and osmo_fr_network_free().

## osmo_fr_network_alloc()

struct osmo_fr_network * osmo_fr_network_alloc | ( | void * | ctx | ) |

References fr_tdefs, INIT_LLIST_HEAD, osmo_fr_network::links, osmo_fr_network::n391, osmo_fr_network::n392, osmo_fr_network::n393, osmo_tdefs_reset(), and osmo_fr_network::T_defs.

Referenced by gprs_ns2_vty_init_reduced().

## osmo_fr_network_dump_vty()

void osmo_fr_network_dump_vty | ( | struct vty * | vty,
|  | const struct osmo_fr_network * | net
| ) |  |

References fr_link_dump_vty(), osmo_fr_network::links, osmo_fr_link::list, llist_for_each_entry, osmo_fr_network::n391, osmo_fr_network::n392, osmo_fr_network::n393, osmo_fr_link::net, osmo_tdef_vty_out_all(), osmo_fr_network::T_defs, VTY_NEWLINE, and vty_out().

Referenced by DEFUN_HIDDEN().

## osmo_fr_network_free()

void osmo_fr_network_free | ( | struct osmo_fr_network * | net | ) |

References osmo_fr_network::links, osmo_fr_link::list, llist_for_each_entry_safe, osmo_fr_link::net, and osmo_fr_link_free().

## osmo_fr_rx()

int osmo_fr_rx | ( | struct msgb * | msg | ) |

References osmo_fr_dlc::active, osmo_fr_dlc::cb_data, LMI_CISCO_DLCI, LMI_Q933A_DLCI, LOGL_ERROR, LOGL_NOTICE, LOGPFRL, msg, msgb_data(), msgb_free(), msgb_length(), OSMO_ASSERT, osmo_fr_dlc_by_dlci(), q922_to_dlci(), osmo_fr_dlc::rx_cb, rx_lmi_q922(), osmo_fr_link::state, osmo_fr_link::unknown_dlc_rx_cb, and osmo_fr_link::unknown_dlc_rx_cb_data.

Referenced by fr_netif_ofd_cb().

## osmo_fr_tx_dlc()

int osmo_fr_tx_dlc | ( | struct msgb * | msg | ) |

References osmo_fr_dlc::active, osmo_fr_link::cb_data, osmo_fr_dlc::dlci, dlci_to_q922(), osmo_fr_dlc::link, LOGL_DEBUG, LOGL_NOTICE, LOGPFRL, msg, msgb_free(), OSMO_ASSERT, osmo_fr_link::state, and osmo_fr_link::tx_cb.

Referenced by fr_vc_sendmsg().

## parse_full_pvc_status()

static int parse_full_pvc_status | ( | struct osmo_fr_link * | link,
|  | struct tlv_parsed * | tp,
|  | size_t | tp_len
| ) |  |

static

References osmo_fr_dlc::add, osmo_fr_dlc::del, osmo_fr_link::dlc_list, dlc_set_active(), osmo_fr_dlc::dlci, llist_for_each_entry_safe, LOGL_ERROR, LOGPFRL, osmo_fr_dlc_alloc(), osmo_fr_dlc_by_dlci(), Q933_IEI_PVC_STATUS, TLVP_PRESENT, TLVP_VAL_MINLEN, and validate_pvc_status().

Referenced by rx_lmi_q933_status().

## parse_link_pvc_status()

static int parse_link_pvc_status | ( | struct osmo_fr_link * | link,
|  | struct tlv_parsed * | tp,
|  | size_t | tp_len
| ) |  |

static

References osmo_fr_dlc::add, osmo_fr_dlc::del, dlc_set_active(), osmo_fr_dlc::dlci, LOGL_ERROR, LOGPFRL, osmo_fr_dlc_alloc(), osmo_fr_dlc_by_dlci(), Q933_IEI_PVC_STATUS, TLVP_PRESENT, TLVP_VAL_MINLEN, and validate_pvc_status().

Referenced by rx_lmi_q933_status().

## q922_to_dlci()

static uint16_t q922_to_dlci | ( | const uint8_t * | hdr | ) |

inline static

References hdr.

Referenced by osmo_fr_rx().

## q933_msgb_alloc()

static struct msgb * q933_msgb_alloc | ( | uint16_t | dlci,
|  | uint8_t | prot_disc,
|  | uint8_t | msg_type
| ) |  |

static

References q933_a_hdr::call_ref, dlci_to_q922(), LAPF_UI, LMI_Q933A_CALLREF, msg, msg_type, q933_a_hdr::msg_type, prot_disc, and q933_a_hdr::prot_disc.

Referenced by tx_lmi_q933_status(), and tx_lmi_q933_status_enq().

## rx_lmi_q922()

static int rx_lmi_q922 | ( | struct msgb * | msg | ) |

static

References LAPF_UI, LOGL_NOTICE, LOGPFRL, MAX_SUPPORTED_PVC, msg, q933_a_hdr::msg_type, msgb_free(), msgb_l2, msgb_l3, OSMO_ASSERT, q933_a_hdr::prot_disc, Q931_MSGT_STATUS, Q931_MSGT_STATUS_ENQUIRY, Q931_PDISC_CC, q933_att_tlvdef, rx_lmi_q933_status(), rx_lmi_q933_status_enq(), and tlv_parse2().

Referenced by osmo_fr_rx().

## rx_lmi_q933_status()

static int rx_lmi_q933_status | ( | struct msgb * | msg,
|  | struct tlv_parsed * | tp
| ) |  |

static

References check_link_state(), count_pvc_status(), osmo_fr_link::expected_rep, FR_ROLE_NETWORK_EQUIPMENT, osmo_fr_link::last_rx_seq, osmo_fr_link::last_tx_seq, LOGL_ERROR, LOGL_NOTICE, LOGPFRL, MAX_SUPPORTED_PVC, msg, osmo_fr_link::net, OSMO_ASSERT, osmo_tdef_get(), OSMO_TDEF_S, osmo_timer_schedule(), parse_full_pvc_status(), parse_link_pvc_status(), Q933_IEI_LINK_INT_VERIF, Q933_IEI_REPORT_TYPE, Q933_REPT_FULL_STATUS, Q933_REPT_LINK_INTEGRITY_VERIF, Q933_REPT_SINGLE_PVC_ASYNC_STS, osmo_fr_link::role, osmo_fr_link::t392, osmo_fr_network::T_defs, TLVP_PRES_LEN, and TLVP_VAL.

Referenced by rx_lmi_q922().

## rx_lmi_q933_status_enq()

static int rx_lmi_q933_status_enq | ( | struct msgb * | msg,
|  | struct tlv_parsed * | tp
| ) |  |

static

References osmo_fr_dlc::add, check_link_state(), osmo_fr_dlc::del, osmo_fr_link::dlc_list, dlc_set_active(), osmo_fr_link::err_count, FR_ROLE_USER_EQUIPMENT, osmo_fr_link::last_rx_seq, osmo_fr_link::last_tx_seq, osmo_fr_dlc::link, link_set_failed(), osmo_fr_dlc::list, llist_for_each_entry, LOGL_ERROR, LOGPFRL, msg, osmo_fr_link::net, OSMO_ASSERT, osmo_tdef_get(), OSMO_TDEF_S, osmo_timer_schedule(), Q933_IEI_LINK_INT_VERIF, Q933_IEI_REPORT_TYPE, osmo_fr_link::role, osmo_fr_link::state, osmo_fr_dlc::state_send, osmo_fr_link::t392, osmo_fr_network::T_defs, TLVP_PRES_LEN, TLVP_VAL, and tx_lmi_q933_status().

Referenced by rx_lmi_q922().

## tx_lmi_q933_status()

static int tx_lmi_q933_status | ( | struct osmo_fr_link * | link,
|  | uint8_t | rep_type
| ) |  |

static

References osmo_fr_dlc::add, osmo_fr_link::cb_data, osmo_fr_dlc::del, osmo_fr_link::dlc_list, msgb::dst, msgb::list, llist_for_each_entry, msgb_put_link_int_verif(), msgb_put_pvc_status(), Q931_MSGT_STATUS, Q931_PDISC_CC, Q933_IEI_REPORT_TYPE, q933_msgb_alloc(), Q933_REPT_FULL_STATUS, Q933_REPT_LINK_INTEGRITY_VERIF, Q933_REPT_SINGLE_PVC_ASYNC_STS, osmo_fr_dlc::state_send, and osmo_fr_link::tx_cb.

Referenced by osmo_fr_dlc_alloc(), and rx_lmi_q933_status_enq().

## tx_lmi_q933_status_enq()

static int tx_lmi_q933_status_enq | ( | struct osmo_fr_link * | link,
|  | uint8_t | rep_type
| ) |  |

static

References osmo_fr_link::cb_data, msgb::dst, osmo_fr_link::expected_rep, msgb_put_link_int_verif(), Q931_MSGT_STATUS_ENQUIRY, Q931_PDISC_CC, Q933_IEI_REPORT_TYPE, q933_msgb_alloc(), and osmo_fr_link::tx_cb.

Referenced by fr_t391_cb().

## validate_pvc_status()

static int validate_pvc_status | ( | struct tlv_parsed * | tp,
|  | size_t | tp_len
| ) |  |

static

References len, Q933_IEI_PVC_STATUS, TLVP_LEN, and TLVP_PRESENT.

Referenced by parse_full_pvc_status(), and parse_link_pvc_status().

## Variable Documentation

## call_ref

uint8_t call_ref

## fr_tdefs

struct osmo_tdef fr_tdefs[]

Initial value:
= {
{
.T=391,
.default_val = 10,
.min_val = 5,
.max_val = 30,
.desc = "Link integrity verification polling timer",
.unit = OSMO_TDEF_S,
}, {
.T=392,
.default_val = 15,
.min_val = 5,
.max_val = 30,
.desc = "Polling verification timer",
.unit = OSMO_TDEF_S,
},
{}
}
OSMO_TDEF_S
OSMO_TDEF_S

Referenced by osmo_fr_network_alloc().

## msg_type

uint8_t msg_type

Referenced by q933_msgb_alloc().

## osmo_fr_role_names

const struct value_string osmo_fr_role_names[]

Initial value:
= {
{ FR_ROLE_USER_EQUIPMENT, "USER" },
{ FR_ROLE_NETWORK_EQUIPMENT, "NETWORK" },
{ 0, NULL }
}
FR_ROLE_NETWORK_EQUIPMENT
@ FR_ROLE_NETWORK_EQUIPMENT
Definition frame_relay.h:40
FR_ROLE_USER_EQUIPMENT
@ FR_ROLE_USER_EQUIPMENT
Definition frame_relay.h:39

Referenced by osmo_fr_role_str().

## prot_disc

uint8_t prot_disc

Referenced by q933_msgb_alloc().

## q933_att_tlvdef

const struct tlv_definition q933_att_tlvdef

static

Initial value:
= {
.def = {
[Q933_IEI_REPORT_TYPE] = { TLV_TYPE_TLV },
[Q933_IEI_LINK_INT_VERIF] = { TLV_TYPE_TLV },
[Q933_IEI_PVC_STATUS] = { TLV_TYPE_TLV },
},
}
Q933_IEI_REPORT_TYPE
@ Q933_IEI_REPORT_TYPE
Definition frame_relay.c:90
Q933_IEI_LINK_INT_VERIF
@ Q933_IEI_LINK_INT_VERIF
Definition frame_relay.c:91
Q933_IEI_PVC_STATUS
@ Q933_IEI_PVC_STATUS
Definition frame_relay.c:92
TLV_TYPE_TLV
TLV_TYPE_TLV

Referenced by rx_lmi_q922().