blob: b3b29e3fd7e0bfa24997a55baef50d05a3f79a96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#ifndef _GTP_KERNEL_H_
#define _GTP_KERNEL_H_
struct gengetopt_args_info;
extern int debug;
extern char *ipup;
#ifdef GTP_KERNEL
int gtp_kernel_init(struct gsn_t *gsn, struct in_addr *net,
size_t prefixlen,
struct gengetopt_args_info *args_info);
void gtp_kernel_stop(void);
int gtp_kernel_tunnel_add(struct pdp_t *pdp);
int gtp_kernel_tunnel_del(struct pdp_t *pdp);
int gtp_kernel_enabled(void);
#else
static inline int gtp_kernel_init(struct gsn_t *gsn, struct in_addr *net,
size_t prefixlen,
struct gengetopt_args_info *args_info)
{
if (args_info->gtp_linux_given) {
SYS_ERR(DGGSN, LOGL_ERROR, 0,
"ggsn compiled without GTP kernel support!\n");
return -1;
}
return 0;
}
static inline void gtp_kernel_stop(void) {}
static inline int gtp_kernel_tunnel_add(struct pdp_t *pdp)
{
return 0;
}
static inline int gtp_kernel_tunnel_del(struct pdp_t *pdp)
{
return 0;
}
static inline int gtp_kernel_enabled(void)
{
return 0;
}
#endif
#endif /* _GTP_KERNEL_H_ */
|