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

NS-over-FR-over-GRE implementation. More...

`#include <errno.h>`
`#include <string.h>`
`#include <unistd.h>`
`#include <sys/socket.h>`
`#include <netinet/in.h>`
`#include <netinet/ip.h>`
`#include <netinet/ip6.h>`
`#include <arpa/inet.h>`
`#include <linux/if.h>`
`#include <sys/ioctl.h>`
`#include <netpacket/packet.h>`
`#include <linux/if_ether.h>`
`#include <linux/hdlc.h>`
`#include <linux/hdlc/ioctl.h>`
`#include <linux/sockios.h>`
`#include <osmocom/gprs/frame_relay.h>`
`#include <osmocom/core/byteswap.h>`
`#include <osmocom/core/stat_item.h>`
`#include <osmocom/core/logging.h>`
`#include <osmocom/core/msgb.h>`
`#include <osmocom/core/select.h>`
`#include <osmocom/core/socket.h>`
`#include <osmocom/core/timer.h>`
`#include <osmocom/core/talloc.h>`
`#include <osmocom/gprs/gprs_ns2.h>`
`#include <osmocom/core/netdev.h>`
`#include <osmocom/gprs/protocol/gsm_08_16.h>`
`#include <osmocom/gprs/protocol/gsm_08_18.h>`
`#include "config.h"`
`#include "common_vty.h"`
`#include "gprs_ns2_internal.h"`

## Data Structures

struct | priv_bind
struct | priv_vc

## Macros

#define | GRE_PTYPE_FR 0x6559
#define | GRE_PTYPE_IPv4 0x0800
#define | GRE_PTYPE_IPv6 0x86dd
#define | GRE_PTYPE_KAR 0x0000 /* keepalive response */
#define | IPPROTO_GRE 47
#define | E1_LINERATE 2048000
#define | E1_SLOTS_TOTAL 32
#define | E1_SLOTS_USED 31
#define | SUPERCHANNEL_LINERATE (E1_LINERATE*E1_SLOTS_USED)/E1_SLOTS_TOTAL
#define | BIT_DURATION_NS (1000000000 / SUPERCHANNEL_LINERATE)
#define | LMI_Q933A_DLCI 0

## Functions

static void | free_bind (struct gprs_ns2_vc_bind *bind)
| clean up all private driver state.
static int | fr_dlci_rx_cb (void *cb_data, struct msgb *msg)
static void | free_vc (struct gprs_ns2_vc *nsvc)
static void | dump_vty (const struct gprs_ns2_vc_bind *bind, struct vty *vty, bool stats)
static void | fr_dlci_status_cb (struct osmo_fr_dlc *dlc, void *cb_data, bool active)
static struct priv_vc * | fr_alloc_vc (struct gprs_ns2_vc_bind *bind, struct gprs_ns2_vc *nsvc, uint16_t dlci)
int | gprs_ns2_find_vc_by_dlci (struct gprs_ns2_vc_bind *bind, uint16_t dlci, struct gprs_ns2_vc **result)
static int | fr_netif_ofd_cb (struct osmo_fd *bfd, uint32_t what)
static int | fr_netif_write_one (struct gprs_ns2_vc_bind *bind, struct msgb *msg)
int | gprs_ns2_is_fr_bind (struct gprs_ns2_vc_bind *bind)
| determine if given bind is for FR-GRE encapsulation.
static int | fr_vc_sendmsg (struct gprs_ns2_vc *nsvc, struct msgb *msg)
static void | enqueue_at_head (struct gprs_ns2_vc_bind *bind, struct msgb *msg)
static void | enqueue_at_tail (struct gprs_ns2_vc_bind *bind, struct msgb *msg)
static int | backlog_enqueue_or_free (struct gprs_ns2_vc_bind *bind, struct msgb *msg)
static void | fr_backlog_timer_cb (void *data)
int | fr_tx_cb (void *data, struct msgb *msg)
static int | devname2ifindex (const char *ifname)
static int | open_socket (int ifindex, const struct gprs_ns2_vc_bind *nsbind)
static int | gprs_n2_fr_ifupdown_ind_cb (struct osmo_netdev *netdev, bool if_running)
static int | gprs_n2_fr_mtu_chg_cb (struct osmo_netdev *netdev, uint32_t new_mtu)
static int | set_ifupdown (const char *netif, bool up)
static int | setup_device (const char *netif, const struct gprs_ns2_vc_bind *bind)
int | gprs_ns2_fr_bind (struct gprs_ns2_inst *nsi, const char *name, const char *netif, struct osmo_fr_network *fr_network, enum osmo_fr_role fr_role, struct gprs_ns2_vc_bind **result)
| Create a new bind for NS over FR.
enum osmo_fr_role | gprs_ns2_fr_bind_role (struct gprs_ns2_vc_bind *bind)
| Return the frame relay role of a bind.
const char * | gprs_ns2_fr_bind_netif (struct gprs_ns2_vc_bind *bind)
| Return the network interface of the bind.
struct gprs_ns2_vc_bind * | gprs_ns2_fr_bind_by_netif (struct gprs_ns2_inst *nsi, const char *netif)
| Find NS bind for a given network interface.
struct gprs_ns2_vc * | gprs_ns2_fr_connect (struct gprs_ns2_vc_bind *bind, struct gprs_ns2_nse *nse, uint16_t nsvci, uint16_t dlci)
| Create, connect and activate a new FR-based NS-VC.
struct gprs_ns2_vc * | gprs_ns2_fr_connect2 (struct gprs_ns2_vc_bind *bind, uint16_t nsei, uint16_t nsvci, uint16_t dlci)
| Create, connect and activate a new FR-based NS-VC.
struct gprs_ns2_vc * | gprs_ns2_fr_nsvc_by_dlci (struct gprs_ns2_vc_bind *bind, uint16_t dlci)
| Return the nsvc by dlci.
uint16_t | gprs_ns2_fr_nsvc_dlci (const struct gprs_ns2_vc *nsvc)
| Return the dlci of the nsvc.

## Variables

struct gprs_ns2_vc_driver | vc_driver_fr

## Detailed Description

NS-over-FR-over-GRE implementation.

GPRS Networks Service (NS) messages on the Gb interface. 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05) as well as its successor 3GPP TS 48.016

## Macro Definition Documentation

## BIT_DURATION_NS

#define BIT_DURATION_NS (1000000000 / SUPERCHANNEL_LINERATE)

## E1_LINERATE

#define E1_LINERATE 2048000

## E1_SLOTS_TOTAL

#define E1_SLOTS_TOTAL 32

## E1_SLOTS_USED

#define E1_SLOTS_USED 31

## GRE_PTYPE_FR

#define GRE_PTYPE_FR 0x6559

## GRE_PTYPE_IPv4

#define GRE_PTYPE_IPv4 0x0800

## GRE_PTYPE_IPv6

#define GRE_PTYPE_IPv6 0x86dd

## GRE_PTYPE_KAR

#define GRE_PTYPE_KAR 0x0000 /* keepalive response */

## IPPROTO_GRE

#define IPPROTO_GRE 47

## LMI_Q933A_DLCI

#define LMI_Q933A_DLCI 0

## SUPERCHANNEL_LINERATE

#define SUPERCHANNEL_LINERATE (E1_LINERATE*E1_SLOTS_USED)/E1_SLOTS_TOTAL

## Function Documentation

## backlog_enqueue_or_free()

static int backlog_enqueue_or_free | ( | struct gprs_ns2_vc_bind * | bind,
|  | struct msgb * | msg
| ) |  |

static

References priv_bind::backlog, bvci, BVCI_SIGNALLING, priv_bind::dlci, enqueue_at_head(), enqueue_at_tail(), priv_bind::if_running, priv_bind::lmi_msg, LMI_Q933A_DLCI, msg, msgb_free(), msgb_length(), NS_PDUT_UNITDATA, and gprs_ns2_vc_bind::priv.

Referenced by fr_tx_cb().

## devname2ifindex()

static int devname2ifindex | ( | const char * | ifname | ) |

static

References OSMO_STRLCPY_ARRAY.

Referenced by gprs_ns2_fr_bind().

## dump_vty()

static void dump_vty | ( | const struct gprs_ns2_vc_bind * | bind,
|  | struct vty * | vty,
|  | bool | stats
| ) |  |

static

References priv_bind::if_running, priv_bind::link, llist_for_each_entry, priv_bind::netif, ns2_vty_dump_nsvc(), gprs_ns2_vc_bind::nsvc, osmo_fr_role_str(), gprs_ns2_vc_bind::priv, osmo_fr_link::role, VTY_NEWLINE, and vty_out().

Referenced by gprs_ns2_fr_bind().

## enqueue_at_head()

static void enqueue_at_head | ( | struct gprs_ns2_vc_bind * | bind,
|  | struct msgb * | msg
| ) |  |

static

References priv_bind::backlog, priv_bind::list, msg, NS2_BIND_STAT_BACKLOG_LEN, osmo_stat_item_group_get_item(), osmo_stat_item_inc(), osmo_timer_schedule(), gprs_ns2_vc_bind::priv, priv_bind::retry_us, gprs_ns2_vc_bind::statg, and priv_bind::timer.

Referenced by backlog_enqueue_or_free().

## enqueue_at_tail()

static void enqueue_at_tail | ( | struct gprs_ns2_vc_bind * | bind,
|  | struct msgb * | msg
| ) |  |

static

References priv_bind::backlog, priv_bind::list, msg, NS2_BIND_STAT_BACKLOG_LEN, osmo_stat_item_group_get_item(), osmo_stat_item_inc(), osmo_timer_schedule(), gprs_ns2_vc_bind::priv, priv_bind::retry_us, gprs_ns2_vc_bind::statg, and priv_bind::timer.

Referenced by backlog_enqueue_or_free().

## fr_alloc_vc()

static struct priv_vc * fr_alloc_vc | ( | struct gprs_ns2_vc_bind * | bind,
|  | struct gprs_ns2_vc * | nsvc,
|  | uint16_t | dlci
| ) |  |

static

References osmo_fr_dlc::cb_data, priv_vc::dlc, priv_vc::dlci, fr_dlci_rx_cb(), fr_dlci_status_cb(), gprs_ns2_is_fr_bind(), priv_bind::link, OSMO_ASSERT, osmo_fr_dlc_alloc(), gprs_ns2_vc::priv, gprs_ns2_vc_bind::priv, osmo_fr_dlc::rx_cb, and osmo_fr_dlc::status_cb.

Referenced by gprs_ns2_fr_connect().

## fr_backlog_timer_cb()

static void fr_backlog_timer_cb | ( | void * | data | ) |

static

References priv_bind::backlog, data, fr_netif_write_one(), msgb::len, priv_bind::list, priv_bind::lmi_msg, msg, msgb_dequeue(), NS2_BIND_STAT_BACKLOG_LEN, osmo_stat_item_dec(), osmo_stat_item_group_get_item(), osmo_timer_schedule(), gprs_ns2_vc_bind::priv, priv_bind::retry_us, gprs_ns2_vc_bind::statg, and priv_bind::timer.

Referenced by gprs_ns2_fr_bind().

## fr_dlci_rx_cb()

static int fr_dlci_rx_cb | ( | void * | cb_data,
|  | struct msgb * | msg
| ) |  |

static

References msg, and ns2_recv_vc().

Referenced by fr_alloc_vc().

## fr_dlci_status_cb()

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

static

References ns2_vc_force_unconfigured(), and ns2_vc_fsm_start().

Referenced by fr_alloc_vc().

## fr_netif_ofd_cb()

static int fr_netif_ofd_cb | ( | struct osmo_fd * | bfd,
|  | uint32_t | what
| ) |  |

static

References osmo_fd::data, osmo_fd::fd, priv_bind::ifindex, priv_bind::link, LOGBIND, LOGL_ERROR, msg, msgb_alloc(), msgb_free(), NS_ALLOC_SIZE, OSMO_FD_READ, osmo_fr_rx(), and gprs_ns2_vc_bind::priv.

Referenced by gprs_ns2_fr_bind().

## fr_netif_write_one()

static int fr_netif_write_one | ( | struct gprs_ns2_vc_bind * | bind,
|  | struct msgb * | msg
| ) |  |

static

References priv_bind::backlog, BIT_DURATION_NS, osmo_fd::fd, len, LOGBIND, LOGL_ERROR, msg, msgb_data(), msgb_free(), msgb_length(), priv_bind::ofd, gprs_ns2_vc_bind::priv, and priv_bind::retry_us.

Referenced by fr_backlog_timer_cb(), and fr_tx_cb().

## fr_tx_cb()

int fr_tx_cb | ( | void * | data,
|  | struct msgb * | msg
| ) |  |

References priv_bind::backlog, backlog_enqueue_or_free(), data, fr_netif_write_one(), priv_bind::list, msg, and gprs_ns2_vc_bind::priv.

Referenced by gprs_ns2_fr_bind().

## fr_vc_sendmsg()

static int fr_vc_sendmsg | ( | struct gprs_ns2_vc * | nsvc,
|  | struct msgb * | msg
| ) |  |

static

References priv_vc::dlc, msg, msgb_length(), NS_CTR_BYTES_OUT, NS_CTR_BYTES_OUT_DROP, NS_CTR_PKTS_OUT, NS_CTR_PKTS_OUT_DROP, osmo_fr_tx_dlc(), OSMO_LIKELY, gprs_ns2_vc::priv, RATE_CTR_ADD_NS, and RATE_CTR_INC_NS.

Referenced by gprs_ns2_fr_bind().

## free_bind()

static void free_bind | ( | struct gprs_ns2_vc_bind * | bind | ) |

static

clean up all private driver state.

Should be only called by gprs_ns2_free_bind()

References priv_bind::backlog, gprs_ns2_is_fr_bind(), msgb::len, priv_bind::link, msgb::list, priv_bind::list, llist_for_each_entry_safe, priv_bind::lmi_msg, msg, msgb_free(), priv_bind::netdev, gprs_ns2_vc_bind::nsvc, priv_bind::ofd, OSMO_ASSERT, osmo_fd_close(), osmo_fr_link_free(), osmo_netdev_free(), osmo_timer_del(), gprs_ns2_vc_bind::priv, and priv_bind::timer.

## free_vc()

static void free_vc | ( | struct gprs_ns2_vc * | nsvc | ) |

static

References gprs_ns2_vc::bind, gprs_ns2_is_fr_bind(), OSMO_ASSERT, and gprs_ns2_vc::priv.

Referenced by gprs_ns2_fr_bind().

## gprs_n2_fr_ifupdown_ind_cb()

static int gprs_n2_fr_ifupdown_ind_cb | ( | struct osmo_netdev * | netdev,
|  | bool | if_running
| ) |  |

static

References msgb::len, msgb::list, llist_for_each_entry_safe, LOGBIND, LOGL_NOTICE, msg, msgb_free(), osmo_netdev_get_priv_data(), osmo_timer_del(), osmo_timer_schedule(), and gprs_ns2_vc_bind::priv.

Referenced by gprs_ns2_fr_bind().

## gprs_n2_fr_mtu_chg_cb()

static int gprs_n2_fr_mtu_chg_cb | ( | struct osmo_netdev * | netdev,
|  | uint32_t | new_mtu
| ) |  |

static

References priv_bind::if_running, gprs_ns2_nse::list, llist_for_each_entry, LOGBIND, LOGL_INFO, gprs_ns2_vc_bind::mtu, ns2_nse_update_mtu(), gprs_ns2_inst::nse, gprs_ns2_vc_bind::nsi, osmo_netdev_get_priv_data(), and gprs_ns2_vc_bind::priv.

Referenced by gprs_ns2_fr_bind().

## gprs_ns2_find_vc_by_dlci()

int gprs_ns2_find_vc_by_dlci | ( | struct gprs_ns2_vc_bind * | bind,
|  | uint16_t | dlci,
|  | struct gprs_ns2_vc ** | result
| ) |  |

References priv_vc::dlci, gprs_ns2_is_fr_bind(), llist_for_each_entry, gprs_ns2_vc_bind::nsvc, OSMO_ASSERT, and gprs_ns2_vc::priv.

## gprs_ns2_fr_bind()

int gprs_ns2_fr_bind | ( | struct gprs_ns2_inst * | nsi,
|  | const char * | name,
|  | const char * | netif,
|  | struct osmo_fr_network * | fr_network,
|  | enum osmo_fr_role | fr_role,
|  | struct gprs_ns2_vc_bind ** | result
| ) |  |

Create a new bind for NS over FR.

Parameters

  [in] | nsi | NS instance in which to create the bind
  [in] | netif | Network interface to bind to
  [in] | fr_network |
  [in] | fr_role |
  [out] | result | pointer to the created bind or if a bind with the name exists return the bind.

Returns
  0 on success; negative on error. -EALREADY returned in case a bind with the name exists

References priv_bind::backlog, osmo_fr_link::cb_data, devname2ifindex(), gprs_ns2_vc_bind::driver, dump_vty(), gprs_ns2_vc_bind::dump_vty, osmo_fd::fd, fr_backlog_timer_cb(), fr_netif_ofd_cb(), fr_tx_cb(), fr_vc_sendmsg(), FRAME_RELAY_SDU, free_vc(), gprs_ns2_vc_bind::free_vc, gprs_n2_fr_ifupdown_ind_cb(), gprs_n2_fr_mtu_chg_cb(), gprs_ns2_bind_by_name(), gprs_ns2_free_bind(), GPRS_NS2_LL_FR, priv_bind::ifindex, INIT_LLIST_HEAD, priv_bind::link, priv_bind::list, gprs_ns2_vc_bind::ll, LOGBIND, LOGL_ERROR, gprs_ns2_vc_bind::mtu, osmo_fr_link::name, priv_bind::netdev, priv_bind::netif, ns2_bind_alloc(), priv_bind::ofd, open_socket(), OSMO_FD_READ, osmo_fd_register(), osmo_fd_setup(), osmo_fr_link_alloc(), osmo_fr_link_free(), osmo_netdev_alloc(), osmo_netdev_free(), osmo_netdev_register(), osmo_netdev_set_ifindex(), osmo_netdev_set_ifupdown_ind_cb(), osmo_netdev_set_mtu_chg_cb(), osmo_netdev_set_priv_data(), OSMO_STRLCPY_ARRAY, osmo_timer_setup(), gprs_ns2_vc_bind::priv, priv_bind::retry_us, gprs_ns2_vc_bind::send_vc, setup_device(), priv_bind::timer, gprs_ns2_vc_bind::transfer_capability, osmo_fr_link::tx_cb, and vc_driver_fr.

Referenced by DEFUN().

## gprs_ns2_fr_bind_by_netif()

struct gprs_ns2_vc_bind * gprs_ns2_fr_bind_by_netif | ( | struct gprs_ns2_inst * | nsi,
|  | const char * | netif
| ) |  |

Find NS bind for a given network interface.

Parameters

  [in] | nsi | NS instance
  [in] | netif | the network interface to search for

Returns
  the bind or NULL if not found

References gprs_ns2_inst::binding, gprs_ns2_fr_bind_netif(), gprs_ns2_is_fr_bind(), gprs_ns2_vc_bind::list, llist_for_each_entry, gprs_ns2_vc_bind::nsi, and OSMO_ASSERT.

Referenced by DEFUN(), DEFUN(), DEFUN(), and DEFUN().

## gprs_ns2_fr_bind_netif()

const char * gprs_ns2_fr_bind_netif | ( | struct gprs_ns2_vc_bind * | bind | ) |

Return the network interface of the bind.

Parameters

  [in] | bind | The bind

Returns
  the network interface

References gprs_ns2_vc_bind::driver, priv_bind::netif, gprs_ns2_vc_bind::priv, and vc_driver_fr.

Referenced by config_write_nsvc(), config_write_vbind(), gprs_ns2_fr_bind_by_netif(), and gprs_ns2_ll_str_buf().

## gprs_ns2_fr_bind_role()

enum osmo_fr_role gprs_ns2_fr_bind_role | ( | struct gprs_ns2_vc_bind * | bind | ) |

Return the frame relay role of a bind.

Parameters

  [in] | bind | The bind

Returns
  the frame relay role or -EINVAL if bind is not frame relay

References gprs_ns2_vc_bind::driver, priv_bind::link, gprs_ns2_vc_bind::priv, osmo_fr_link::role, and vc_driver_fr.

Referenced by config_write_vbind().

## gprs_ns2_fr_connect()

struct gprs_ns2_vc * gprs_ns2_fr_connect | ( | struct gprs_ns2_vc_bind * | bind,
|  | struct gprs_ns2_nse * | nse,
|  | uint16_t | nsvci,
|  | uint16_t | dlci
| ) |  |

Create, connect and activate a new FR-based NS-VC.

Parameters

  [in] | bind | bind in which the new NS-VC is to be created
  [in] | nsei | NSEI of the NS Entity in which the NS-VC is to be created
  [in] | dlci | Data Link connection identifier

Returns
  pointer to newly-allocated, connected and activated NS-VC; NULL on error

References priv_bind::dlci, fr_alloc_vc(), gprs_ns2_fr_nsvc_by_dlci(), gprs_ns2_free_nsvc(), gprs_ns2_is_fr_bind(), gprs_ns2_lltype_str(), GPRS_NS2_VC_MODE_BLOCKRESET, gprs_ns2_nse::ll, priv_bind::netif, ns2_vc_alloc(), gprs_ns2_nse::nsei, gprs_ns2_vc::nsvci, gprs_ns2_vc::nsvci_is_valid, OSMO_ASSERT, osmo_identifier_sanitize_buf(), gprs_ns2_vc::priv, and gprs_ns2_vc_bind::priv.

Referenced by DEFUN(), and gprs_ns2_fr_connect2().

## gprs_ns2_fr_connect2()

struct gprs_ns2_vc * gprs_ns2_fr_connect2 | ( | struct gprs_ns2_vc_bind * | bind,
|  | uint16_t | nsei,
|  | uint16_t | nsvci,
|  | uint16_t | dlci
| ) |  |

Create, connect and activate a new FR-based NS-VC.

Parameters

  [in] | bind | bind in which the new NS-VC is to be created
  [in] | nsei | NSEI of the NS Entity in which the NS-VC is to be created
  [in] | dlci | Data Link connection identifier

Returns
  pointer to newly-allocated, connected and activated NS-VC; NULL on error

References gprs_ns2_create_nse(), GPRS_NS2_DIALECT_STATIC_RESETBLOCK, gprs_ns2_fr_connect(), gprs_ns2_free_nse(), gprs_ns2_is_fr_bind(), GPRS_NS2_LL_FR, gprs_ns2_nse_by_nsei(), nsei, gprs_ns2_vc_bind::nsi, gprs_ns2_nse::nsvc, and OSMO_ASSERT.

## gprs_ns2_fr_nsvc_by_dlci()

struct gprs_ns2_vc * gprs_ns2_fr_nsvc_by_dlci | ( | struct gprs_ns2_vc_bind * | bind,
|  | uint16_t | dlci
| ) |  |

Return the nsvc by dlci.

Parameters

  [in] | bind |
  [in] | dlci | Data Link connection identifier

Returns
  the nsvc or NULL if not found

References priv_vc::dlci, gprs_ns2_is_fr_bind(), llist_for_each_entry, gprs_ns2_vc_bind::nsvc, OSMO_ASSERT, and gprs_ns2_vc::priv.

Referenced by DEFUN(), DEFUN(), and gprs_ns2_fr_connect().

## gprs_ns2_fr_nsvc_dlci()

uint16_t gprs_ns2_fr_nsvc_dlci | ( | const struct gprs_ns2_vc * | nsvc | ) |

Return the dlci of the nsvc.

Parameters

  [in] | nsvc |

Returns
  the dlci or 0 on error. 0 is not a valid dlci.

References gprs_ns2_vc::bind, priv_vc::dlci, gprs_ns2_vc_bind::driver, gprs_ns2_vc::priv, and vc_driver_fr.

Referenced by config_write_nsvc(), and gprs_ns2_ll_str_buf().

## gprs_ns2_is_fr_bind()

int gprs_ns2_is_fr_bind | ( | struct gprs_ns2_vc_bind * | bind | ) |

determine if given bind is for FR-GRE encapsulation.

References gprs_ns2_vc_bind::driver, and vc_driver_fr.

Referenced by fr_alloc_vc(), free_bind(), free_vc(), gprs_ns2_find_vc_by_dlci(), gprs_ns2_fr_bind_by_netif(), gprs_ns2_fr_connect(), gprs_ns2_fr_connect2(), and gprs_ns2_fr_nsvc_by_dlci().

## open_socket()

static int open_socket | ( | int | ifindex,
|  | const struct gprs_ns2_vc_bind * | nsbind
| ) |  |

static

References LOGBIND, and LOGL_ERROR.

Referenced by gprs_ns2_fr_bind().

## set_ifupdown()

static int set_ifupdown | ( | const char * | netif,
|  | bool | up
| ) |  |

static

References OSMO_STRLCPY_ARRAY.

Referenced by setup_device().

## setup_device()

static int setup_device | ( | const char * | netif,
|  | const struct gprs_ns2_vc_bind * | bind
| ) |  |

static

References LOGBIND, LOGL_ERROR, LOGL_INFO, LOGL_NOTICE, OSMO_STRLCPY_ARRAY, set_ifupdown(), and buffer::size.

Referenced by gprs_ns2_fr_bind().

## Variable Documentation

## vc_driver_fr

struct gprs_ns2_vc_driver vc_driver_fr

Initial value:
= {
.name = "GB frame relay",
.free_bind = free_bind,
}
free_bind
static void free_bind(struct gprs_ns2_vc_bind *bind)
clean up all private driver state.
Definition gprs_ns2_fr.c:154

Referenced by gprs_ns2_fr_bind(), gprs_ns2_fr_bind_netif(), gprs_ns2_fr_bind_role(), gprs_ns2_fr_nsvc_dlci(), and gprs_ns2_is_fr_bind().