2012-08-02 08:06:29 +04:00
|
|
|
#ifndef __CR_NET_H__
|
|
|
|
#define __CR_NET_H__
|
2012-09-02 01:07:32 +04:00
|
|
|
|
|
|
|
#include "list.h"
|
|
|
|
|
2012-08-02 08:06:29 +04:00
|
|
|
struct cr_fdset;
|
2013-11-15 14:04:48 +04:00
|
|
|
extern int dump_net_ns(int pid, int ns_id);
|
|
|
|
extern int prepare_net_ns(int pid);
|
|
|
|
extern int netns_pre_create(void);
|
2012-09-02 01:07:32 +04:00
|
|
|
|
|
|
|
struct veth_pair {
|
|
|
|
struct list_head node;
|
|
|
|
char *inside;
|
|
|
|
char *outside;
|
|
|
|
};
|
2012-09-17 20:05:55 +04:00
|
|
|
|
|
|
|
extern int network_lock(void);
|
|
|
|
extern void network_unlock(void);
|
2012-12-25 22:40:24 +04:00
|
|
|
|
2013-01-15 23:24:01 +04:00
|
|
|
extern struct ns_desc net_ns_desc;
|
|
|
|
|
2013-08-17 01:10:15 +04:00
|
|
|
#include "protobuf/netdev.pb-c.h"
|
2013-11-15 14:04:48 +04:00
|
|
|
extern int write_netdev_img(NetDeviceEntry *nde, struct cr_fdset *fds);
|
|
|
|
extern int read_ns_sys_file(char *path, char *buf, int len);
|
|
|
|
extern int restore_link_parms(NetDeviceEntry *nde, int nlsk);
|
2013-08-17 01:10:15 +04:00
|
|
|
|
2014-02-11 23:53:40 +04:00
|
|
|
extern int veth_pair_add(char *in, char *out);
|
|
|
|
|
2012-12-25 22:40:24 +04:00
|
|
|
#endif /* __CR_NET_H__ */
|