Harald Welte | 323e4f6 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 1 | #ifndef _GB_PROXY_H |
| 2 | #define _GB_PROXY_H |
| 3 | |
| 4 | #include <sys/types.h> |
| 5 | |
| 6 | #include <osmocore/msgb.h> |
| 7 | |
| 8 | #include <openbsc/gprs_ns.h> |
Harald Welte | b34e2c1 | 2010-05-11 05:49:43 +0200 | [diff] [blame] | 9 | #include <vty/command.h> |
Harald Welte | 323e4f6 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 10 | |
| 11 | struct gbproxy_config { |
| 12 | /* parsed from config file */ |
| 13 | u_int32_t nsip_listen_ip; |
| 14 | u_int16_t nsip_listen_port; |
| 15 | |
| 16 | u_int32_t nsip_sgsn_ip; |
| 17 | u_int16_t nsip_sgsn_port; |
| 18 | |
| 19 | u_int16_t nsip_sgsn_nsei; |
| 20 | u_int16_t nsip_sgsn_nsvci; |
| 21 | |
| 22 | /* misc */ |
| 23 | struct gprs_ns_inst *nsi; |
| 24 | }; |
| 25 | |
Harald Welte | f01709d | 2010-05-03 18:54:58 +0200 | [diff] [blame] | 26 | extern struct gbproxy_config gbcfg; |
Harald Welte | b34e2c1 | 2010-05-11 05:49:43 +0200 | [diff] [blame] | 27 | extern struct cmd_element show_gbproxy_cmd; |
Harald Welte | 323e4f6 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 28 | |
| 29 | /* gb_proxy_vty .c */ |
| 30 | |
| 31 | int gbproxy_vty_init(void); |
| 32 | int gbproxy_parse_config(const char *config_file, struct gbproxy_config *cfg); |
| 33 | |
| 34 | |
| 35 | /* gb_proxy.c */ |
| 36 | |
| 37 | /* Main input function for Gb proxy */ |
| 38 | int gbprox_rcvmsg(struct msgb *msg, struct gprs_nsvc *nsvc, uint16_t ns_bvci); |
| 39 | |
Harald Welte | 5bb0d36 | 2010-05-11 06:34:24 +0200 | [diff] [blame^] | 40 | int gbprox_signal(unsigned int subsys, unsigned int signal, |
| 41 | void *handler_data, void *signal_data); |
Harald Welte | 323e4f6 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 42 | #endif |