blob: 5f1f3a77a05d3e62a8e9690d0cd5890777c56498 [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;
Jacob Erlbeck4211d792013-10-24 12:48:23 +020020extern struct cmd_element delete_gb_bvci_cmd;
21extern struct cmd_element delete_gb_nsei_cmd;
Harald Welteb77c6972010-05-01 11:28:43 +020022
23/* gb_proxy_vty .c */
24
25int gbproxy_vty_init(void);
26int gbproxy_parse_config(const char *config_file, struct gbproxy_config *cfg);
27
28
29/* gb_proxy.c */
30
31/* Main input function for Gb proxy */
Jacob Erlbecke75fec62013-10-15 12:00:27 +020032int gbprox_rcvmsg(struct msgb *msg, uint16_t nsei, uint16_t ns_bvci, uint16_t nsvci);
Harald Welteb77c6972010-05-01 11:28:43 +020033
Harald Weltec1c1dd22010-05-11 06:34:24 +020034int gbprox_signal(unsigned int subsys, unsigned int signal,
35 void *handler_data, void *signal_data);
Harald Welte1ccbf442010-05-14 11:53:08 +000036
37/* Reset all persistent NS-VC's */
38int gbprox_reset_persistent_nsvcs(struct gprs_ns_inst *nsi);
39
Jacob Erlbeckb32d3c02014-07-07 10:45:59 +020040int gbprox_dump_global(FILE *stream, int indent);
41int gbprox_dump_peers(FILE *stream, int indent);
Jacob Erlbeck72b401f2013-10-24 12:48:55 +020042void gbprox_reset();
Harald Welteb77c6972010-05-01 11:28:43 +020043#endif