X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=kernel%2Fnetwork_cmd.h;h=332777773da392ea114d791e724594ea34eb70e8;hb=95e2774070e989fe9cf9f48dae5fa054e55e2a3e;hp=d9802fe11b8904395e551cfd9684730a0c19e957;hpb=2822ba293eb308225c50d346930c47bf98d9927b;p=util-vserver.git diff --git a/kernel/network_cmd.h b/kernel/network_cmd.h index d9802fe..3327777 100644 --- a/kernel/network_cmd.h +++ b/kernel/network_cmd.h @@ -6,10 +6,6 @@ #define VCMD_task_nid VC_CMD(VINFO, 2, 0) -#ifdef __KERNEL__ -extern int vc_task_nid(uint32_t, void __user *); - -#endif /* __KERNEL__ */ #define VCMD_nx_info VC_CMD(VINFO, 6, 0) @@ -18,10 +14,6 @@ struct vcmd_nx_info_v0 { /* more to come */ }; -#ifdef __KERNEL__ -extern int vc_nx_info(uint32_t, void __user *); - -#endif /* __KERNEL__ */ #define VCMD_net_create_v0 VC_CMD(VNET, 1, 0) #define VCMD_net_create VC_CMD(VNET, 1, 1) @@ -32,26 +24,64 @@ struct vcmd_net_create { #define VCMD_net_migrate VC_CMD(NETMIG, 1, 0) -#define VCMD_net_add VC_CMD(NETALT, 1, 0) -#define VCMD_net_remove VC_CMD(NETALT, 2, 0) +#define VCMD_net_add_v0 VC_CMD(NETALT, 1, 0) +#define VCMD_net_remove_v0 VC_CMD(NETALT, 2, 0) struct vcmd_net_addr_v0 { uint16_t type; uint16_t count; - uint32_t ip[4]; - uint32_t mask[4]; - /* more to come */ + struct in_addr ip[4]; + struct in_addr mask[4]; }; +#define VCMD_net_add_ipv4 VC_CMD(NETALT, 1, 1) +#define VCMD_net_remove_ipv4 VC_CMD(NETALT, 2, 1) + +struct vcmd_net_addr_ipv4_v1 { + uint16_t type; + uint16_t flags; + struct in_addr ip; + struct in_addr mask; +}; -#ifdef __KERNEL__ -extern int vc_net_create(uint32_t, void __user *); -extern int vc_net_migrate(uint32_t, void __user *); +#define VCMD_net_add_ipv6 VC_CMD(NETALT, 3, 1) +#define VCMD_net_remove_ipv6 VC_CMD(NETALT, 4, 1) + +struct vcmd_net_addr_ipv6_v1 { + uint16_t type; + uint16_t flags; + uint32_t prefix; + struct in6_addr ip; + struct in6_addr mask; +}; + +#define VCMD_add_match_ipv4 VC_CMD(NETALT, 5, 0) +#define VCMD_get_match_ipv4 VC_CMD(NETALT, 6, 0) + +struct vcmd_match_ipv4_v0 { + uint16_t type; + uint16_t flags; + uint16_t parent; + uint16_t prefix; + struct in_addr ip; + struct in_addr ip2; + struct in_addr mask; +}; + +#define VCMD_add_match_ipv6 VC_CMD(NETALT, 7, 0) +#define VCMD_get_match_ipv6 VC_CMD(NETALT, 8, 0) + +struct vcmd_match_ipv6_v0 { + uint16_t type; + uint16_t flags; + uint16_t parent; + uint16_t prefix; + struct in6_addr ip; + struct in6_addr ip2; + struct in6_addr mask; +}; -extern int vc_net_add(uint32_t, void __user *); -extern int vc_net_remove(uint32_t, void __user *); -#endif /* __KERNEL__ */ /* flag commands */ @@ -64,11 +94,6 @@ struct vcmd_net_flags_v0 { uint64_t mask; }; -#ifdef __KERNEL__ -extern int vc_get_nflags(uint32_t, void __user *); -extern int vc_set_nflags(uint32_t, void __user *); - -#endif /* __KERNEL__ */ /* network caps commands */ @@ -81,9 +106,4 @@ struct vcmd_net_caps_v0 { uint64_t cmask; }; -#ifdef __KERNEL__ -extern int vc_get_ncaps(uint32_t, void __user *); -extern int vc_set_ncaps(uint32_t, void __user *); - -#endif /* __KERNEL__ */ #endif /* _VX_CONTEXT_CMD_H */