libosmogb 1.10.0.65-d581
Osmocom Gb library
|
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 <arpa/inet.h>
#include <osmocom/core/select.h>
#include <osmocom/core/byteswap.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/socket.h>
#include <osmocom/gprs/gprs_ns.h>
#include "common_vty.h"
Data Structures | |
struct | gre_hdr |
Macros | |
#define | GRE_PTYPE_FR 0x6559 |
#define | GRE_PTYPE_IPv4 0x0800 |
#define | GRE_PTYPE_KAR 0x0000 /* keepalive response */ |
#define | IPPROTO_GRE 47 |
Functions | |
struct gre_hdr | __attribute__ ((packed)) |
static int | handle_rx_gre_ipv4 (struct osmo_fd *bfd, struct msgb *msg, struct iphdr *iph, struct gre_hdr *greh) |
static struct msgb * | read_nsfrgre_msg (struct osmo_fd *bfd, int *error, struct sockaddr_in *saddr) |
int | gprs_ns_rcvmsg (struct gprs_ns_inst *nsi, struct msgb *msg, struct sockaddr_in *saddr, enum gprs_ns_ll ll) |
Receive incoming NS message from underlying transport layer. More... | |
static int | handle_nsfrgre_read (struct osmo_fd *bfd) |
static int | handle_nsfrgre_write (struct osmo_fd *bfd) |
int | gprs_ns_frgre_sendmsg (struct gprs_nsvc *nsvc, struct msgb *msg) |
static int | nsfrgre_fd_cb (struct osmo_fd *bfd, unsigned int what) |
int | gprs_ns_frgre_listen (struct gprs_ns_inst *nsi) |
Variables | |
uint16_t | flags |
uint16_t | ptype |
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).
#define GRE_PTYPE_FR 0x6559 |
#define GRE_PTYPE_IPv4 0x0800 |
#define GRE_PTYPE_KAR 0x0000 /* keepalive response */ |
#define IPPROTO_GRE 47 |
int gprs_ns_frgre_listen | ( | struct gprs_ns_inst * | nsi | ) |
References gprs_nsvc::bts_addr, osmo_fd::fd, gprs_ns_inst::fd, gre_hdr::flags, gprs_ns_inst::frgre, gprs_nsvc::frgre, GRE_PTYPE_FR, IPPROTO_GRE, msg, msgb_free(), msgb_push(), gprs_nsvc::nsi, osmo_htons, osmo_ntohs, and gre_hdr::ptype.
Referenced by gprs_ns_tx().
|
static |
References osmo_fd::data, DNS, GPRS_NS_LL_FR_GRE, gprs_ns_rcvmsg(), LOGL_INFO, LOGP, msg, msgb_free(), osmo_ntohs, and read_nsfrgre_msg().
Referenced by nsfrgre_fd_cb().
|
static |
Referenced by nsfrgre_fd_cb().
|
static |
References osmo_fd::data, DNS, osmo_fd::fd, gprs_ns_inst::fd, gprs_ns_inst::frgre, GRE_PTYPE_KAR, IPPROTO_GRE, LOGL_DEBUG, LOGL_ERROR, LOGP, msg, osmo_htons, and gre_hdr::ptype.
Referenced by read_nsfrgre_msg().
|
static |
References handle_nsfrgre_read(), handle_nsfrgre_write(), OSMO_FD_READ, and OSMO_FD_WRITE.
Referenced by gprs_ns_frgre_listen().
|
static |
References DNS, osmo_fd::fd, gre_hdr::flags, GRE_PTYPE_FR, GRE_PTYPE_IPv4, handle_rx_gre_ipv4(), if(), LOGL_ERROR, LOGL_NOTICE, LOGP, msg, msgb_alloc(), msgb_free(), msgb_put(), NS_ALLOC_SIZE, osmo_htons, osmo_ntohs, and gre_hdr::ptype.
Referenced by handle_nsfrgre_read().
uint16_t flags |
uint16_t ptype |