Harald Welte | 288be16 | 2010-05-01 16:48:27 +0200 | [diff] [blame] | 1 | #ifndef _SGSN_H |
| 2 | #define _SGSN_H |
| 3 | |
| 4 | #include <sys/types.h> |
| 5 | |
| 6 | #include <osmocore/msgb.h> |
| 7 | |
| 8 | #include <openbsc/gprs_ns.h> |
| 9 | |
| 10 | struct sgsn_config { |
| 11 | /* parsed from config file */ |
| 12 | u_int32_t nsip_listen_ip; |
| 13 | u_int16_t nsip_listen_port; |
| 14 | |
Harald Welte | 2720e73 | 2010-05-17 00:44:57 +0200 | [diff] [blame^] | 15 | char *gtp_statedir; |
| 16 | struct sockaddr_in gtp_listenaddr; |
| 17 | |
Harald Welte | 288be16 | 2010-05-01 16:48:27 +0200 | [diff] [blame] | 18 | /* misc */ |
| 19 | struct gprs_ns_inst *nsi; |
| 20 | }; |
| 21 | |
Harald Welte | 2720e73 | 2010-05-17 00:44:57 +0200 | [diff] [blame^] | 22 | struct sgsn_instance { |
| 23 | char *config_file; |
| 24 | struct sgsn_config cfg; |
| 25 | /* File descriptor wrappers for LibGTP */ |
| 26 | struct bsc_fd gtp_fd0; |
| 27 | struct bsc_fd gtp_fd1c; |
| 28 | struct bsc_fd gtp_fd1u; |
| 29 | /* Timer for libGTP */ |
| 30 | struct timer_list gtp_timer; |
| 31 | /* GSN instance for libgtp */ |
| 32 | struct gsn_t *gsn; |
| 33 | }; |
| 34 | |
Harald Welte | 288be16 | 2010-05-01 16:48:27 +0200 | [diff] [blame] | 35 | |
| 36 | /* sgsn_vty.c */ |
| 37 | |
| 38 | int sgsn_vty_init(void); |
| 39 | int sgsn_parse_config(const char *config_file, struct sgsn_config *cfg); |
| 40 | |
| 41 | /* sgsn.c */ |
| 42 | |
| 43 | /* Main input function for Gb proxy */ |
| 44 | int sgsn_rcvmsg(struct msgb *msg, struct gprs_nsvc *nsvc, uint16_t ns_bvci); |
| 45 | |
| 46 | #endif |