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; |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 20 | |
| 21 | /* gb_proxy_vty .c */ |
| 22 | |
| 23 | int gbproxy_vty_init(void); |
| 24 | int 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 */ |
| 30 | int gbprox_rcvmsg(struct msgb *msg, struct gprs_nsvc *nsvc, uint16_t ns_bvci); |
| 31 | |
Harald Welte | c1c1dd2 | 2010-05-11 06:34:24 +0200 | [diff] [blame] | 32 | int gbprox_signal(unsigned int subsys, unsigned int signal, |
| 33 | void *handler_data, void *signal_data); |
Harald Welte | 1ccbf44 | 2010-05-14 11:53:08 +0000 | [diff] [blame] | 34 | |
| 35 | /* Reset all persistent NS-VC's */ |
| 36 | int gbprox_reset_persistent_nsvcs(struct gprs_ns_inst *nsi); |
| 37 | |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 38 | #endif |