4 #define MAX_N_CONTEXT 65535 /* Arbitrary limit */
6 #define IP_DYNAMIC_ID ((uint32_t)-1) /* id for dynamic context */
12 #include <linux/list.h>
13 #include <linux/spinlock.h>
14 #include <linux/utsname.h>
15 #include <asm/resource.h>
16 #include <asm/atomic.h>
20 struct list_head nx_list; /* linked list of nxinfos */
21 nid_t nx_id; /* vnet id */
24 uint64_t nx_flags; /* network flag word */
25 uint64_t nx_ncaps; /* network capabilities */
28 __u32 ipv4[NB_IPV4ROOT]; /* Process can only bind to these IPs */
29 /* The first one is used to connect */
30 /* and for bind any service */
31 /* The other must be used explicity */
32 __u32 mask[NB_IPV4ROOT]; /* Netmask for each ipv4 */
33 /* Used to select the proper source */
34 /* address for sockets */
35 __u32 v4_bcast; /* Broadcast address to receive UDP */
37 char nx_name[65]; /* network context name */
41 extern spinlock_t iplist_lock;
42 extern struct list_head nx_infos;
45 void free_nx_info(struct nx_info *);
46 struct nx_info *create_nx_info(void);
48 extern struct nx_info *find_nx_info(int);
49 extern int nx_info_id_valid(int);
51 #endif /* __KERNEL__ */
57 #define VCMD_task_nid VC_CMD(VINFO, 2, 0)
60 extern int vc_task_nid(uint32_t, void __user *);
62 #endif /* __KERNEL__ */
64 #define VCMD_nx_info VC_CMD(VINFO, 6, 0)
66 struct vcmd_nx_info_v0 {
72 extern int vc_nx_info(uint32_t, void __user *);
74 #endif /* __KERNEL__ */
76 #define VCMD_net_create VC_CMD(VNET, 1, 0)
77 #define VCMD_net_migrate VC_CMD(NETMIG, 1, 0)
79 #define VCMD_net_add VC_CMD(NETALT, 1, 0)
80 #define VCMD_net_remove VC_CMD(NETALT, 2, 0)
82 struct vcmd_net_nx_v0 {
94 extern int vc_net_create(uint32_t, void __user *);
95 extern int vc_net_migrate(uint32_t, void __user *);
97 #endif /* __KERNEL__ */
99 #define VCMD_get_nflags VC_CMD(FLAGS, 5, 0)
100 #define VCMD_set_nflags VC_CMD(FLAGS, 6, 0)
102 struct vcmd_net_flags_v0 {
108 extern int vc_get_nflags(uint32_t, void __user *);
109 extern int vc_set_nflags(uint32_t, void __user *);
111 #endif /* __KERNEL__ */
113 #define IPF_STATE_SETUP (1ULL<<32)
116 #define IPF_ONE_TIME (0x0001ULL<<32)
118 #define VCMD_get_ncaps VC_CMD(FLAGS, 7, 0)
119 #define VCMD_set_ncaps VC_CMD(FLAGS, 8, 0)
121 struct vcmd_net_caps_v0 {
127 extern int vc_get_ncaps(uint32_t, void __user *);
128 extern int vc_set_ncaps(uint32_t, void __user *);
130 #endif /* __KERNEL__ */
132 #define IPC_WOSSNAME 0x00000001
135 #endif /* _VX_NETWORK_H */