blob: db236b5d03794957d053106f57a3828fa4eef696 [file] [log] [blame]
Harald Welte323e4f62010-05-01 11:28:43 +02001#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 Welteb34e2c12010-05-11 05:49:43 +02009#include <vty/command.h>
Harald Welte323e4f62010-05-01 11:28:43 +020010
11struct 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 Weltef01709d2010-05-03 18:54:58 +020026extern struct gbproxy_config gbcfg;
Harald Welteb34e2c12010-05-11 05:49:43 +020027extern struct cmd_element show_gbproxy_cmd;
Harald Welte323e4f62010-05-01 11:28:43 +020028
29/* gb_proxy_vty .c */
30
31int gbproxy_vty_init(void);
32int 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 */
38int gbprox_rcvmsg(struct msgb *msg, struct gprs_nsvc *nsvc, uint16_t ns_bvci);
39
Harald Welte5bb0d362010-05-11 06:34:24 +020040int gbprox_signal(unsigned int subsys, unsigned int signal,
41 void *handler_data, void *signal_data);
Harald Welte323e4f62010-05-01 11:28:43 +020042#endif