Update examples, tests and testdata after binapi-generator update.
[govpp.git] / examples / bin_api / af_packet / af_packet.go
1 // Code generated by govpp binapi-generator DO NOT EDIT.
2 // Package af_packet represents the VPP binary API of the 'af_packet' VPP module.
3 // Generated from '../../bin_api/af_packet.api.json'
4 package af_packet
5
6 import "git.fd.io/govpp.git/api"
7
8 // VlApiVersion contains version of the API.
9 const VlAPIVersion = 0x8957ca8b
10
11 // AfPacketCreate represents the VPP binary API message 'af_packet_create'.
12 // Generated from '../../bin_api/af_packet.api.json', line 23:
13 //
14 //            "af_packet_create",
15 //            [
16 //                "u16",
17 //                "_vl_msg_id"
18 //            ],
19 //            [
20 //                "u32",
21 //                "client_index"
22 //            ],
23 //            [
24 //                "u32",
25 //                "context"
26 //            ],
27 //            [
28 //                "u8",
29 //                "host_if_name",
30 //                64
31 //            ],
32 //            [
33 //                "u8",
34 //                "hw_addr",
35 //                6
36 //            ],
37 //            [
38 //                "u8",
39 //                "use_random_hw_addr"
40 //            ],
41 //            {
42 //                "crc": "0x6d5d30d6"
43 //            }
44 //
45 type AfPacketCreate struct {
46         HostIfName      []byte `struc:"[64]byte"`
47         HwAddr          []byte `struc:"[6]byte"`
48         UseRandomHwAddr uint8
49 }
50
51 func (*AfPacketCreate) GetMessageName() string {
52         return "af_packet_create"
53 }
54 func (*AfPacketCreate) GetMessageType() api.MessageType {
55         return api.RequestMessage
56 }
57 func (*AfPacketCreate) GetCrcString() string {
58         return "6d5d30d6"
59 }
60 func NewAfPacketCreate() api.Message {
61         return &AfPacketCreate{}
62 }
63
64 // AfPacketCreateReply represents the VPP binary API message 'af_packet_create_reply'.
65 // Generated from '../../bin_api/af_packet.api.json', line 55:
66 //
67 //            "af_packet_create_reply",
68 //            [
69 //                "u16",
70 //                "_vl_msg_id"
71 //            ],
72 //            [
73 //                "u32",
74 //                "context"
75 //            ],
76 //            [
77 //                "i32",
78 //                "retval"
79 //            ],
80 //            [
81 //                "u32",
82 //                "sw_if_index"
83 //            ],
84 //            {
85 //                "crc": "0xfda5941f"
86 //            }
87 //
88 type AfPacketCreateReply struct {
89         Retval    int32
90         SwIfIndex uint32
91 }
92
93 func (*AfPacketCreateReply) GetMessageName() string {
94         return "af_packet_create_reply"
95 }
96 func (*AfPacketCreateReply) GetMessageType() api.MessageType {
97         return api.ReplyMessage
98 }
99 func (*AfPacketCreateReply) GetCrcString() string {
100         return "fda5941f"
101 }
102 func NewAfPacketCreateReply() api.Message {
103         return &AfPacketCreateReply{}
104 }
105
106 // AfPacketDelete represents the VPP binary API message 'af_packet_delete'.
107 // Generated from '../../bin_api/af_packet.api.json', line 77:
108 //
109 //            "af_packet_delete",
110 //            [
111 //                "u16",
112 //                "_vl_msg_id"
113 //            ],
114 //            [
115 //                "u32",
116 //                "client_index"
117 //            ],
118 //            [
119 //                "u32",
120 //                "context"
121 //            ],
122 //            [
123 //                "u8",
124 //                "host_if_name",
125 //                64
126 //            ],
127 //            {
128 //                "crc": "0x3efceda3"
129 //            }
130 //
131 type AfPacketDelete struct {
132         HostIfName []byte `struc:"[64]byte"`
133 }
134
135 func (*AfPacketDelete) GetMessageName() string {
136         return "af_packet_delete"
137 }
138 func (*AfPacketDelete) GetMessageType() api.MessageType {
139         return api.RequestMessage
140 }
141 func (*AfPacketDelete) GetCrcString() string {
142         return "3efceda3"
143 }
144 func NewAfPacketDelete() api.Message {
145         return &AfPacketDelete{}
146 }
147
148 // AfPacketDeleteReply represents the VPP binary API message 'af_packet_delete_reply'.
149 // Generated from '../../bin_api/af_packet.api.json', line 100:
150 //
151 //            "af_packet_delete_reply",
152 //            [
153 //                "u16",
154 //                "_vl_msg_id"
155 //            ],
156 //            [
157 //                "u32",
158 //                "context"
159 //            ],
160 //            [
161 //                "i32",
162 //                "retval"
163 //            ],
164 //            {
165 //                "crc": "0xe8d4e804"
166 //            }
167 //
168 type AfPacketDeleteReply struct {
169         Retval int32
170 }
171
172 func (*AfPacketDeleteReply) GetMessageName() string {
173         return "af_packet_delete_reply"
174 }
175 func (*AfPacketDeleteReply) GetMessageType() api.MessageType {
176         return api.ReplyMessage
177 }
178 func (*AfPacketDeleteReply) GetCrcString() string {
179         return "e8d4e804"
180 }
181 func NewAfPacketDeleteReply() api.Message {
182         return &AfPacketDeleteReply{}
183 }
184
185 // AfPacketSetL4CksumOffload represents the VPP binary API message 'af_packet_set_l4_cksum_offload'.
186 // Generated from '../../bin_api/af_packet.api.json', line 118:
187 //
188 //            "af_packet_set_l4_cksum_offload",
189 //            [
190 //                "u16",
191 //                "_vl_msg_id"
192 //            ],
193 //            [
194 //                "u32",
195 //                "client_index"
196 //            ],
197 //            [
198 //                "u32",
199 //                "context"
200 //            ],
201 //            [
202 //                "u8",
203 //                "sw_if_index"
204 //            ],
205 //            [
206 //                "u8",
207 //                "set"
208 //            ],
209 //            {
210 //                "crc": "0x86538585"
211 //            }
212 //
213 type AfPacketSetL4CksumOffload struct {
214         SwIfIndex uint8
215         Set       uint8
216 }
217
218 func (*AfPacketSetL4CksumOffload) GetMessageName() string {
219         return "af_packet_set_l4_cksum_offload"
220 }
221 func (*AfPacketSetL4CksumOffload) GetMessageType() api.MessageType {
222         return api.RequestMessage
223 }
224 func (*AfPacketSetL4CksumOffload) GetCrcString() string {
225         return "86538585"
226 }
227 func NewAfPacketSetL4CksumOffload() api.Message {
228         return &AfPacketSetL4CksumOffload{}
229 }
230
231 // AfPacketSetL4CksumOffloadReply represents the VPP binary API message 'af_packet_set_l4_cksum_offload_reply'.
232 // Generated from '../../bin_api/af_packet.api.json', line 144:
233 //
234 //            "af_packet_set_l4_cksum_offload_reply",
235 //            [
236 //                "u16",
237 //                "_vl_msg_id"
238 //            ],
239 //            [
240 //                "u32",
241 //                "context"
242 //            ],
243 //            [
244 //                "i32",
245 //                "retval"
246 //            ],
247 //            {
248 //                "crc": "0xe8d4e804"
249 //            }
250 //
251 type AfPacketSetL4CksumOffloadReply struct {
252         Retval int32
253 }
254
255 func (*AfPacketSetL4CksumOffloadReply) GetMessageName() string {
256         return "af_packet_set_l4_cksum_offload_reply"
257 }
258 func (*AfPacketSetL4CksumOffloadReply) GetMessageType() api.MessageType {
259         return api.ReplyMessage
260 }
261 func (*AfPacketSetL4CksumOffloadReply) GetCrcString() string {
262         return "e8d4e804"
263 }
264 func NewAfPacketSetL4CksumOffloadReply() api.Message {
265         return &AfPacketSetL4CksumOffloadReply{}
266 }