2014-02-20 17:43:15 +00:00
|
|
|
#ifndef _LIBGTPNL_H_
|
|
|
|
#define _LIBGTPNL_H_
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
struct mnl_socket;
|
|
|
|
struct nlmsghdr;
|
|
|
|
|
|
|
|
struct mnl_socket *genl_socket_open(void);
|
2017-11-08 07:04:00 +00:00
|
|
|
void genl_socket_close(struct mnl_socket *nl);
|
2014-02-20 17:43:15 +00:00
|
|
|
struct nlmsghdr *genl_nlmsg_build_hdr(char *buf, uint16_t type, uint16_t flags,
|
|
|
|
uint32_t seq, uint8_t cmd);
|
|
|
|
int genl_socket_talk(struct mnl_socket *nl, struct nlmsghdr *nlh, uint32_t seq,
|
|
|
|
int (*cb)(const struct nlmsghdr *nlh, void *data),
|
|
|
|
void *data);
|
|
|
|
int genl_lookup_family(struct mnl_socket *nl, const char *family);
|
|
|
|
|
2014-03-20 15:23:18 +00:00
|
|
|
struct in_addr;
|
|
|
|
|
2016-04-11 14:10:02 +00:00
|
|
|
int gtp_dev_create(int dest_ns, const char *gtp_ifname, int fd0, int fd1);
|
2017-03-15 17:03:42 +00:00
|
|
|
int gtp_dev_create_sgsn(int dest_ns, const char *gtp_ifname, int fd0, int fd1);
|
2014-03-20 15:23:18 +00:00
|
|
|
int gtp_dev_config(const char *iface, struct in_addr *net, uint32_t prefix);
|
2014-02-24 10:38:52 +00:00
|
|
|
int gtp_dev_destroy(const char *gtp_ifname);
|
2014-02-20 17:43:15 +00:00
|
|
|
|
2014-02-22 21:09:59 +00:00
|
|
|
struct gtp_tunnel;
|
|
|
|
|
|
|
|
int gtp_add_tunnel(int genl_id, struct mnl_socket *nl, struct gtp_tunnel *t);
|
|
|
|
int gtp_del_tunnel(int genl_id, struct mnl_socket *nl, struct gtp_tunnel *t);
|
2014-02-20 17:43:15 +00:00
|
|
|
int gtp_list_tunnel(int genl_id, struct mnl_socket *nl);
|
|
|
|
|
|
|
|
#endif
|