File: network_cmd.h

package info (click to toggle)
util-vserver 0.30.216-pre2864-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,576 kB
  • ctags: 4,462
  • sloc: ansic: 23,615; sh: 15,550; xml: 1,893; makefile: 402; python: 301; perl: 85; awk: 4
file content (109 lines) | stat: -rw-r--r-- 1,985 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#ifndef _VX_NETWORK_CMD_H
#define _VX_NETWORK_CMD_H


/* vinfo commands */

#define VCMD_task_nid		VC_CMD(VINFO, 2, 0)


#define VCMD_nx_info		VC_CMD(VINFO, 6, 0)

struct	vcmd_nx_info_v0 {
	uint32_t nid;
	/* more to come */
};


#define VCMD_net_create_v0	VC_CMD(VNET, 1, 0)
#define VCMD_net_create		VC_CMD(VNET, 1, 1)

struct  vcmd_net_create {
	uint64_t flagword;
};

#define VCMD_net_migrate	VC_CMD(NETMIG, 1, 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;
	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;
};

#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;
};




/* flag commands */

#define VCMD_get_nflags		VC_CMD(FLAGS, 5, 0)
#define VCMD_set_nflags		VC_CMD(FLAGS, 6, 0)

struct	vcmd_net_flags_v0 {
	uint64_t flagword;
	uint64_t mask;
};



/* network caps commands */

#define VCMD_get_ncaps		VC_CMD(FLAGS, 7, 0)
#define VCMD_set_ncaps		VC_CMD(FLAGS, 8, 0)

struct	vcmd_net_caps_v0 {
	uint64_t ncaps;
	uint64_t cmask;
};

#endif	/* _VX_CONTEXT_CMD_H */