blob: 26c1f6a9cd2144e08c4f92887303d98f954775cf [file] [log] [blame]
Harald Welteb77c6972010-05-01 11:28:43 +02001#ifndef _GB_PROXY_H
2#define _GB_PROXY_H
3
Harald Welteb77c6972010-05-01 11:28:43 +02004
Pablo Neira Ayuso136f4532011-03-22 16:47:59 +01005#include <osmocom/core/msgb.h>
Harald Welteb77c6972010-05-01 11:28:43 +02006
Harald Welteea34a4e2012-06-16 14:59:56 +08007#include <osmocom/gprs/gprs_ns.h>
Harald Welte4b037e42010-05-19 19:45:32 +02008#include <osmocom/vty/command.h>
Harald Welteb77c6972010-05-01 11:28:43 +02009
10struct gbproxy_config {
11 /* parsed from config file */
Holger Hans Peter Freytherc42ad8b2011-04-18 17:04:00 +020012 uint16_t nsip_sgsn_nsei;
Harald Welteb77c6972010-05-01 11:28:43 +020013
14 /* misc */
15 struct gprs_ns_inst *nsi;
16};
17
Harald Welte672f5c42010-05-03 18:54:58 +020018extern struct gbproxy_config gbcfg;
Harald Welte85801d02010-05-11 05:49:43 +020019extern struct cmd_element show_gbproxy_cmd;
Harald Welteb77c6972010-05-01 11:28:43 +020020
21/* gb_proxy_vty .c */
22
23int gbproxy_vty_init(void);
24int gbproxy_parse_config(const char *config_file, struct gbproxy_config *cfg);
25
26
27/* gb_proxy.c */
28
29/* Main input function for Gb proxy */
Jacob Erlbecke75fec62013-10-15 12:00:27 +020030int gbprox_rcvmsg(struct msgb *msg, uint16_t nsei, uint16_t ns_bvci, uint16_t nsvci);
Harald Welteb77c6972010-05-01 11:28:43 +020031
Harald Weltec1c1dd22010-05-11 06:34:24 +020032int gbprox_signal(unsigned int subsys, unsigned int signal,
33 void *handler_data, void *signal_data);
Harald Welte1ccbf442010-05-14 11:53:08 +000034
35/* Reset all persistent NS-VC's */
36int gbprox_reset_persistent_nsvcs(struct gprs_ns_inst *nsi);
37
Jacob Erlbeck51a869c2013-10-15 12:00:26 +020038int gbprox_dump_peers(FILE *stream, int indent);
Harald Welteb77c6972010-05-01 11:28:43 +020039#endif