2010-05-01 09:28:43 +00:00
|
|
|
#ifndef _GB_PROXY_H
|
|
|
|
#define _GB_PROXY_H
|
|
|
|
|
|
|
|
|
2011-03-22 15:47:59 +00:00
|
|
|
#include <osmocom/core/msgb.h>
|
2010-05-01 09:28:43 +00:00
|
|
|
|
2012-06-16 06:59:56 +00:00
|
|
|
#include <osmocom/gprs/gprs_ns.h>
|
2010-05-19 17:45:32 +00:00
|
|
|
#include <osmocom/vty/command.h>
|
2010-05-01 09:28:43 +00:00
|
|
|
|
|
|
|
struct gbproxy_config {
|
|
|
|
/* parsed from config file */
|
2011-04-18 15:04:00 +00:00
|
|
|
uint16_t nsip_sgsn_nsei;
|
2010-05-01 09:28:43 +00:00
|
|
|
|
|
|
|
/* misc */
|
|
|
|
struct gprs_ns_inst *nsi;
|
2014-05-19 08:14:58 +00:00
|
|
|
|
|
|
|
/* force mcc/mnc */
|
|
|
|
int core_mnc;
|
|
|
|
int core_mcc;
|
2010-05-01 09:28:43 +00:00
|
|
|
};
|
|
|
|
|
2010-05-03 16:54:58 +00:00
|
|
|
extern struct gbproxy_config gbcfg;
|
2010-05-11 03:49:43 +00:00
|
|
|
extern struct cmd_element show_gbproxy_cmd;
|
2013-10-24 10:48:23 +00:00
|
|
|
extern struct cmd_element delete_gb_bvci_cmd;
|
|
|
|
extern struct cmd_element delete_gb_nsei_cmd;
|
2010-05-01 09:28:43 +00:00
|
|
|
|
|
|
|
/* gb_proxy_vty .c */
|
|
|
|
|
|
|
|
int gbproxy_vty_init(void);
|
|
|
|
int gbproxy_parse_config(const char *config_file, struct gbproxy_config *cfg);
|
|
|
|
|
|
|
|
|
|
|
|
/* gb_proxy.c */
|
|
|
|
|
|
|
|
/* Main input function for Gb proxy */
|
2013-10-15 10:00:27 +00:00
|
|
|
int gbprox_rcvmsg(struct msgb *msg, uint16_t nsei, uint16_t ns_bvci, uint16_t nsvci);
|
2010-05-01 09:28:43 +00:00
|
|
|
|
2010-05-11 04:34:24 +00:00
|
|
|
int gbprox_signal(unsigned int subsys, unsigned int signal,
|
|
|
|
void *handler_data, void *signal_data);
|
2010-05-14 11:53:08 +00:00
|
|
|
|
|
|
|
/* Reset all persistent NS-VC's */
|
|
|
|
int gbprox_reset_persistent_nsvcs(struct gprs_ns_inst *nsi);
|
|
|
|
|
2014-07-07 08:45:59 +00:00
|
|
|
int gbprox_dump_global(FILE *stream, int indent);
|
|
|
|
int gbprox_dump_peers(FILE *stream, int indent);
|
2013-10-24 10:48:55 +00:00
|
|
|
void gbprox_reset();
|
2010-05-01 09:28:43 +00:00
|
|
|
#endif
|