summaryrefslogtreecommitdiffstats
path: root/lib/PROTOCOL
blob: 97a6b7c3781b0b7650a0f729f40c342b9fbc451b (plain)
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
PROTOCOL 6:

req:	msg:	IPSET_CMD_PROTOCOL
	attr:	IPSET_ATTR_PROTOCOL

resp:	attr:	IPSET_ATTR_PROTOCOL	(protocol max)
		IPSET_ATTR_PROTOCOL_MIN	(protocol min, optional)

req:	msg:	IPSET_CMD_CREATE
	attr:	IPSET_ATTR_PROTOCOL
		IPSET_ATTR_SETNAME
		IPSET_ATTR_TYPENAME
		IPSET_ATTR_REVISION
		IPSET_ATTR_FAMILY
		IPSET_ATTR_FLAGS
		IPSET_ATTR_DATA
			create-specific-data

resp:	success/error

req:	msg:	IPSET_CMD_DESTROY|IPSET_CMD_FLUSH
	attr:	IPSET_ATTR_PROTOCOL
		IPSET_ATTR_SETNAME	(optional)

resp:	success/error

req:	msg:	IPSET_CMD_SWAP|IPSET_CMD_RENAME
	attr:	IPSET_ATTR_PROTOCOL
		IPSET_ATTR_SETNAME
		IPSET_ATTR_SETNAME2

resp:	success/error

req:	msg:	IPSET_CMD_LIST|SAVE
	attr:	IPSET_ATTR_PROTOCOL
		IPSET_ATTR_SETNAME	(optional)

resp:	attr:	IPSET_ATTR_SETNAME
		IPSET_ATTR_TYPENAME
		IPSET_ATTR_REVISION
		IPSET_ATTR_FAMILY
		IPSET_ATTR_DATA
			create-specific-data
		IPSET_ATTR_ADT
			IPSET_ATTR_DATA
				adt-specific-data
			...

req:	msg:	IPSET_CMD_ADD|DEL
	attr:	IPSET_ATTR_PROTOCOL
		IPSET_ATTR_SETNAME
		IPSET_ATTR_FLAGS
		IPSET_ATTR_LINENO	(for reporting error line back too)
		IPSET_ATTR_DATA
			adt-specific-data

		or

		IPSET_ATTR_ADT
			IPSET_ATTR_DATA
				adt-specific-data
			...

resp:	success/error

req:	msg:	IPSET_CMD_TEST
	attr:	IPSET_ATTR_PROTOCOL
		IPSET_ATTR_SETNAME
		IPSET_ATTR_FLAGS
		IPSET_ATTR_DATA
			adt-specific-data

resp:	success/error

req:	msg:	IPSET_CMD_HEADER
	attr:	IPSET_ATTR_PROTOCOL
		IPSET_ATTR_SETNAME

resp:	attr:	IPSET_ATTR_SETNAME
		IPSET_ATTR_TYPENAME
		IPSET_ATTR_REVISION
		IPSET_ATTR_FAMILY

req:	msg:	IPSET_CMD_TYPE
	attr:	IPSET_ATTR_PROTOCOL
		IPSET_ATTR_TYPENAME
		IPSET_ATTR_FAMILY

resp:	attr:	IPSET_ATTR_TYPENAME
		IPSET_ATTR_FAMILY
		IPSET_ATTR_REVISION	(version max)
		IPSET_ATTR_REVISION_MIN	(version min, optional)

PROTOCOL 7: PROTOCOL 6 +

req:	msg:	IPSET_CMD_GET_BYNAME
	attr:	IPSET_ATTR_PROTOCOL
		IPSET_ATTR_SETNAME

resp:	attr:	IPSET_ATTR_INDEX
		IPSET_ATTR_FAMILY

req:	msg:	IPSET_CMD_GET_BYINDEX
	attr:	IPSET_ATTR_PROTOCOL
		IPSET_ATTR_INDEX

resp:	attr:	IPSET_ATTR_SETNAME