Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 1 | #ifndef _GB_PROXY_H |
| 2 | #define _GB_PROXY_H |
| 3 | |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 4 | |
Pablo Neira Ayuso | 136f453 | 2011-03-22 16:47:59 +0100 | [diff] [blame] | 5 | #include <osmocom/core/msgb.h> |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 6 | |
Harald Welte | ea34a4e | 2012-06-16 14:59:56 +0800 | [diff] [blame] | 7 | #include <osmocom/gprs/gprs_ns.h> |
Harald Welte | 4b037e4 | 2010-05-19 19:45:32 +0200 | [diff] [blame] | 8 | #include <osmocom/vty/command.h> |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 9 | |
| 10 | struct gbproxy_config { |
| 11 | /* parsed from config file */ |
Holger Hans Peter Freyther | c42ad8b | 2011-04-18 17:04:00 +0200 | [diff] [blame] | 12 | uint16_t nsip_sgsn_nsei; |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 13 | |
| 14 | /* misc */ |
| 15 | struct gprs_ns_inst *nsi; |
| 16 | }; |
| 17 | |
Harald Welte | 672f5c4 | 2010-05-03 18:54:58 +0200 | [diff] [blame] | 18 | extern struct gbproxy_config gbcfg; |
Harald Welte | 85801d0 | 2010-05-11 05:49:43 +0200 | [diff] [blame] | 19 | extern struct cmd_element show_gbproxy_cmd; |
Jacob Erlbeck | 4211d79 | 2013-10-24 12:48:23 +0200 | [diff] [blame] | 20 | extern struct cmd_element delete_gb_bvci_cmd; |
| 21 | extern struct cmd_element delete_gb_nsei_cmd; |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 22 | |
| 23 | /* gb_proxy_vty .c */ |
| 24 | |
| 25 | int gbproxy_vty_init(void); |
| 26 | int 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 Erlbeck | e75fec6 | 2013-10-15 12:00:27 +0200 | [diff] [blame] | 32 | int gbprox_rcvmsg(struct msgb *msg, uint16_t nsei, uint16_t ns_bvci, uint16_t nsvci); |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 33 | |
Harald Welte | c1c1dd2 | 2010-05-11 06:34:24 +0200 | [diff] [blame] | 34 | int gbprox_signal(unsigned int subsys, unsigned int signal, |
| 35 | void *handler_data, void *signal_data); |
Harald Welte | 1ccbf44 | 2010-05-14 11:53:08 +0000 | [diff] [blame] | 36 | |
| 37 | /* Reset all persistent NS-VC's */ |
| 38 | int gbprox_reset_persistent_nsvcs(struct gprs_ns_inst *nsi); |
| 39 | |
Jacob Erlbeck | b32d3c0 | 2014-07-07 10:45:59 +0200 | [diff] [blame^] | 40 | int gbprox_dump_global(FILE *stream, int indent); |
| 41 | int gbprox_dump_peers(FILE *stream, int indent); |
Jacob Erlbeck | 72b401f | 2013-10-24 12:48:55 +0200 | [diff] [blame] | 42 | void gbprox_reset(); |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 43 | #endif |