ready for tagging
[util-vserver.git] / kernel / network_cmd.h
1 #ifndef _VX_NETWORK_CMD_H
2 #define _VX_NETWORK_CMD_H
3
4
5 /* vinfo commands */
6
7 #define VCMD_task_nid           VC_CMD(VINFO, 2, 0)
8
9
10 #define VCMD_nx_info            VC_CMD(VINFO, 6, 0)
11
12 struct  vcmd_nx_info_v0 {
13         uint32_t nid;
14         /* more to come */
15 };
16
17
18 #define VCMD_net_create_v0      VC_CMD(VNET, 1, 0)
19 #define VCMD_net_create         VC_CMD(VNET, 1, 1)
20
21 struct  vcmd_net_create {
22         uint64_t flagword;
23 };
24
25 #define VCMD_net_migrate        VC_CMD(NETMIG, 1, 0)
26
27 #define VCMD_net_add_v0         VC_CMD(NETALT, 1, 0)
28 #define VCMD_net_remove_v0      VC_CMD(NETALT, 2, 0)
29
30 struct  vcmd_net_addr_v0 {
31         uint16_t type;
32         uint16_t count;
33         struct in_addr ip[4];
34         struct in_addr mask[4];
35 };
36
37 #define VCMD_net_add_ipv4       VC_CMD(NETALT, 1, 1)
38 #define VCMD_net_remove_ipv4    VC_CMD(NETALT, 2, 1)
39
40 struct  vcmd_net_addr_ipv4_v1 {
41         uint16_t type;
42         uint16_t flags;
43         struct in_addr ip;
44         struct in_addr mask;
45 };
46
47 #define VCMD_net_add_ipv6       VC_CMD(NETALT, 3, 1)
48 #define VCMD_net_remove_ipv6    VC_CMD(NETALT, 4, 1)
49
50 struct  vcmd_net_addr_ipv6_v1 {
51         uint16_t type;
52         uint16_t flags;
53         uint32_t prefix;
54         struct in6_addr ip;
55         struct in6_addr mask;
56 };
57
58 #define VCMD_add_match_ipv4     VC_CMD(NETALT, 5, 0)
59 #define VCMD_get_match_ipv4     VC_CMD(NETALT, 6, 0)
60
61 struct  vcmd_match_ipv4_v0 {
62         uint16_t type;
63         uint16_t flags;
64         uint16_t parent;
65         uint16_t prefix;
66         struct in_addr ip;
67         struct in_addr ip2;
68         struct in_addr mask;
69 };
70
71 #define VCMD_add_match_ipv6     VC_CMD(NETALT, 7, 0)
72 #define VCMD_get_match_ipv6     VC_CMD(NETALT, 8, 0)
73
74 struct  vcmd_match_ipv6_v0 {
75         uint16_t type;
76         uint16_t flags;
77         uint16_t parent;
78         uint16_t prefix;
79         struct in6_addr ip;
80         struct in6_addr ip2;
81         struct in6_addr mask;
82 };
83
84
85
86
87 /* flag commands */
88
89 #define VCMD_get_nflags         VC_CMD(FLAGS, 5, 0)
90 #define VCMD_set_nflags         VC_CMD(FLAGS, 6, 0)
91
92 struct  vcmd_net_flags_v0 {
93         uint64_t flagword;
94         uint64_t mask;
95 };
96
97
98
99 /* network caps commands */
100
101 #define VCMD_get_ncaps          VC_CMD(FLAGS, 7, 0)
102 #define VCMD_set_ncaps          VC_CMD(FLAGS, 8, 0)
103
104 struct  vcmd_net_caps_v0 {
105         uint64_t ncaps;
106         uint64_t cmask;
107 };
108
109 #endif  /* _VX_CONTEXT_CMD_H */