binapigen: fix union size
[govpp.git] / binapi / dhcp / dhcp.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5 // source: /usr/share/vpp/api/plugins/dhcp.api.json
6
7 // Package dhcp contains generated bindings for API file dhcp.api.
8 //
9 // Contents:
10 //   3 enums
11 //   6 structs
12 //  29 messages
13 //
14 package dhcp
15
16 import (
17         "strconv"
18
19         api "git.fd.io/govpp.git/api"
20         ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
21         interface_types "git.fd.io/govpp.git/binapi/interface_types"
22         ip_types "git.fd.io/govpp.git/binapi/ip_types"
23         codec "git.fd.io/govpp.git/codec"
24 )
25
26 // This is a compile-time assertion to ensure that this generated file
27 // is compatible with the GoVPP api package it is being compiled against.
28 // A compilation error at this line likely means your copy of the
29 // GoVPP api package needs to be updated.
30 const _ = api.GoVppAPIPackageIsVersion2
31
32 const (
33         APIFile    = "dhcp"
34         APIVersion = "3.0.1"
35         VersionCrc = 0x96274cae
36 )
37
38 // DHCPClientState defines enum 'dhcp_client_state'.
39 type DHCPClientState uint32
40
41 const (
42         DHCP_CLIENT_STATE_API_DISCOVER DHCPClientState = 1
43         DHCP_CLIENT_STATE_API_REQUEST  DHCPClientState = 2
44         DHCP_CLIENT_STATE_API_BOUND    DHCPClientState = 3
45 )
46
47 var (
48         DHCPClientState_name = map[uint32]string{
49                 1: "DHCP_CLIENT_STATE_API_DISCOVER",
50                 2: "DHCP_CLIENT_STATE_API_REQUEST",
51                 3: "DHCP_CLIENT_STATE_API_BOUND",
52         }
53         DHCPClientState_value = map[string]uint32{
54                 "DHCP_CLIENT_STATE_API_DISCOVER": 1,
55                 "DHCP_CLIENT_STATE_API_REQUEST":  2,
56                 "DHCP_CLIENT_STATE_API_BOUND":    3,
57         }
58 )
59
60 func (x DHCPClientState) String() string {
61         s, ok := DHCPClientState_name[uint32(x)]
62         if ok {
63                 return s
64         }
65         return "DHCPClientState(" + strconv.Itoa(int(x)) + ")"
66 }
67
68 // Dhcpv6MsgType defines enum 'dhcpv6_msg_type'.
69 type Dhcpv6MsgType uint32
70
71 const (
72         DHCPV6_MSG_API_SOLICIT             Dhcpv6MsgType = 1
73         DHCPV6_MSG_API_ADVERTISE           Dhcpv6MsgType = 2
74         DHCPV6_MSG_API_REQUEST             Dhcpv6MsgType = 3
75         DHCPV6_MSG_API_CONFIRM             Dhcpv6MsgType = 4
76         DHCPV6_MSG_API_RENEW               Dhcpv6MsgType = 5
77         DHCPV6_MSG_API_REBIND              Dhcpv6MsgType = 6
78         DHCPV6_MSG_API_REPLY               Dhcpv6MsgType = 7
79         DHCPV6_MSG_API_RELEASE             Dhcpv6MsgType = 8
80         DHCPV6_MSG_API_DECLINE             Dhcpv6MsgType = 9
81         DHCPV6_MSG_API_RECONFIGURE         Dhcpv6MsgType = 10
82         DHCPV6_MSG_API_INFORMATION_REQUEST Dhcpv6MsgType = 11
83         DHCPV6_MSG_API_RELAY_FORW          Dhcpv6MsgType = 12
84         DHCPV6_MSG_API_RELAY_REPL          Dhcpv6MsgType = 13
85 )
86
87 var (
88         Dhcpv6MsgType_name = map[uint32]string{
89                 1:  "DHCPV6_MSG_API_SOLICIT",
90                 2:  "DHCPV6_MSG_API_ADVERTISE",
91                 3:  "DHCPV6_MSG_API_REQUEST",
92                 4:  "DHCPV6_MSG_API_CONFIRM",
93                 5:  "DHCPV6_MSG_API_RENEW",
94                 6:  "DHCPV6_MSG_API_REBIND",
95                 7:  "DHCPV6_MSG_API_REPLY",
96                 8:  "DHCPV6_MSG_API_RELEASE",
97                 9:  "DHCPV6_MSG_API_DECLINE",
98                 10: "DHCPV6_MSG_API_RECONFIGURE",
99                 11: "DHCPV6_MSG_API_INFORMATION_REQUEST",
100                 12: "DHCPV6_MSG_API_RELAY_FORW",
101                 13: "DHCPV6_MSG_API_RELAY_REPL",
102         }
103         Dhcpv6MsgType_value = map[string]uint32{
104                 "DHCPV6_MSG_API_SOLICIT":             1,
105                 "DHCPV6_MSG_API_ADVERTISE":           2,
106                 "DHCPV6_MSG_API_REQUEST":             3,
107                 "DHCPV6_MSG_API_CONFIRM":             4,
108                 "DHCPV6_MSG_API_RENEW":               5,
109                 "DHCPV6_MSG_API_REBIND":              6,
110                 "DHCPV6_MSG_API_REPLY":               7,
111                 "DHCPV6_MSG_API_RELEASE":             8,
112                 "DHCPV6_MSG_API_DECLINE":             9,
113                 "DHCPV6_MSG_API_RECONFIGURE":         10,
114                 "DHCPV6_MSG_API_INFORMATION_REQUEST": 11,
115                 "DHCPV6_MSG_API_RELAY_FORW":          12,
116                 "DHCPV6_MSG_API_RELAY_REPL":          13,
117         }
118 )
119
120 func (x Dhcpv6MsgType) String() string {
121         s, ok := Dhcpv6MsgType_name[uint32(x)]
122         if ok {
123                 return s
124         }
125         return "Dhcpv6MsgType(" + strconv.Itoa(int(x)) + ")"
126 }
127
128 // VssType defines enum 'vss_type'.
129 type VssType uint32
130
131 const (
132         VSS_TYPE_API_ASCII   VssType = 0
133         VSS_TYPE_API_VPN_ID  VssType = 1
134         VSS_TYPE_API_INVALID VssType = 123
135         VSS_TYPE_API_DEFAULT VssType = 255
136 )
137
138 var (
139         VssType_name = map[uint32]string{
140                 0:   "VSS_TYPE_API_ASCII",
141                 1:   "VSS_TYPE_API_VPN_ID",
142                 123: "VSS_TYPE_API_INVALID",
143                 255: "VSS_TYPE_API_DEFAULT",
144         }
145         VssType_value = map[string]uint32{
146                 "VSS_TYPE_API_ASCII":   0,
147                 "VSS_TYPE_API_VPN_ID":  1,
148                 "VSS_TYPE_API_INVALID": 123,
149                 "VSS_TYPE_API_DEFAULT": 255,
150         }
151 )
152
153 func (x VssType) String() string {
154         s, ok := VssType_name[uint32(x)]
155         if ok {
156                 return s
157         }
158         return "VssType(" + strconv.Itoa(int(x)) + ")"
159 }
160
161 // DHCP6AddressInfo defines type 'dhcp6_address_info'.
162 type DHCP6AddressInfo struct {
163         Address       ip_types.IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
164         ValidTime     uint32              `binapi:"u32,name=valid_time" json:"valid_time,omitempty"`
165         PreferredTime uint32              `binapi:"u32,name=preferred_time" json:"preferred_time,omitempty"`
166 }
167
168 // DHCP6PdPrefixInfo defines type 'dhcp6_pd_prefix_info'.
169 type DHCP6PdPrefixInfo struct {
170         Prefix        ip_types.IP6Prefix `binapi:"ip6_prefix,name=prefix" json:"prefix,omitempty"`
171         ValidTime     uint32             `binapi:"u32,name=valid_time" json:"valid_time,omitempty"`
172         PreferredTime uint32             `binapi:"u32,name=preferred_time" json:"preferred_time,omitempty"`
173 }
174
175 // DHCPClient defines type 'dhcp_client'.
176 type DHCPClient struct {
177         SwIfIndex        interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
178         Hostname         string                         `binapi:"string[64],name=hostname" json:"hostname,omitempty"`
179         ID               []byte                         `binapi:"u8[64],name=id" json:"id,omitempty"`
180         WantDHCPEvent    bool                           `binapi:"bool,name=want_dhcp_event" json:"want_dhcp_event,omitempty"`
181         SetBroadcastFlag bool                           `binapi:"bool,name=set_broadcast_flag" json:"set_broadcast_flag,omitempty"`
182         Dscp             ip_types.IPDscp                `binapi:"ip_dscp,name=dscp" json:"dscp,omitempty"`
183         PID              uint32                         `binapi:"u32,name=pid" json:"pid,omitempty"`
184 }
185
186 // DHCPLease defines type 'dhcp_lease'.
187 type DHCPLease struct {
188         SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
189         State         DHCPClientState                `binapi:"dhcp_client_state,name=state" json:"state,omitempty"`
190         IsIPv6        bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
191         Hostname      string                         `binapi:"string[64],name=hostname" json:"hostname,omitempty"`
192         MaskWidth     uint8                          `binapi:"u8,name=mask_width" json:"mask_width,omitempty"`
193         HostAddress   ip_types.Address               `binapi:"address,name=host_address" json:"host_address,omitempty"`
194         RouterAddress ip_types.Address               `binapi:"address,name=router_address" json:"router_address,omitempty"`
195         HostMac       ethernet_types.MacAddress      `binapi:"mac_address,name=host_mac" json:"host_mac,omitempty"`
196         Count         uint8                          `binapi:"u8,name=count" json:"-"`
197         DomainServer  []DomainServer                 `binapi:"domain_server[count],name=domain_server" json:"domain_server,omitempty"`
198 }
199
200 // DHCPServer defines type 'dhcp_server'.
201 type DHCPServer struct {
202         ServerVrfID uint32           `binapi:"u32,name=server_vrf_id" json:"server_vrf_id,omitempty"`
203         DHCPServer  ip_types.Address `binapi:"address,name=dhcp_server" json:"dhcp_server,omitempty"`
204 }
205
206 // DomainServer defines type 'domain_server'.
207 type DomainServer struct {
208         Address ip_types.Address `binapi:"address,name=address" json:"address,omitempty"`
209 }
210
211 // DHCP6ClientsEnableDisable defines message 'dhcp6_clients_enable_disable'.
212 type DHCP6ClientsEnableDisable struct {
213         Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
214 }
215
216 func (m *DHCP6ClientsEnableDisable) Reset()               { *m = DHCP6ClientsEnableDisable{} }
217 func (*DHCP6ClientsEnableDisable) GetMessageName() string { return "dhcp6_clients_enable_disable" }
218 func (*DHCP6ClientsEnableDisable) GetCrcString() string   { return "b3e225d2" }
219 func (*DHCP6ClientsEnableDisable) GetMessageType() api.MessageType {
220         return api.RequestMessage
221 }
222
223 func (m *DHCP6ClientsEnableDisable) Size() (size int) {
224         if m == nil {
225                 return 0
226         }
227         size += 1 // m.Enable
228         return size
229 }
230 func (m *DHCP6ClientsEnableDisable) Marshal(b []byte) ([]byte, error) {
231         if b == nil {
232                 b = make([]byte, m.Size())
233         }
234         buf := codec.NewBuffer(b)
235         buf.EncodeBool(m.Enable)
236         return buf.Bytes(), nil
237 }
238 func (m *DHCP6ClientsEnableDisable) Unmarshal(b []byte) error {
239         buf := codec.NewBuffer(b)
240         m.Enable = buf.DecodeBool()
241         return nil
242 }
243
244 // DHCP6ClientsEnableDisableReply defines message 'dhcp6_clients_enable_disable_reply'.
245 type DHCP6ClientsEnableDisableReply struct {
246         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
247 }
248
249 func (m *DHCP6ClientsEnableDisableReply) Reset() { *m = DHCP6ClientsEnableDisableReply{} }
250 func (*DHCP6ClientsEnableDisableReply) GetMessageName() string {
251         return "dhcp6_clients_enable_disable_reply"
252 }
253 func (*DHCP6ClientsEnableDisableReply) GetCrcString() string { return "e8d4e804" }
254 func (*DHCP6ClientsEnableDisableReply) GetMessageType() api.MessageType {
255         return api.ReplyMessage
256 }
257
258 func (m *DHCP6ClientsEnableDisableReply) Size() (size int) {
259         if m == nil {
260                 return 0
261         }
262         size += 4 // m.Retval
263         return size
264 }
265 func (m *DHCP6ClientsEnableDisableReply) Marshal(b []byte) ([]byte, error) {
266         if b == nil {
267                 b = make([]byte, m.Size())
268         }
269         buf := codec.NewBuffer(b)
270         buf.EncodeInt32(m.Retval)
271         return buf.Bytes(), nil
272 }
273 func (m *DHCP6ClientsEnableDisableReply) Unmarshal(b []byte) error {
274         buf := codec.NewBuffer(b)
275         m.Retval = buf.DecodeInt32()
276         return nil
277 }
278
279 // DHCP6DuidLlSet defines message 'dhcp6_duid_ll_set'.
280 type DHCP6DuidLlSet struct {
281         DuidLl []byte `binapi:"u8[10],name=duid_ll" json:"duid_ll,omitempty"`
282 }
283
284 func (m *DHCP6DuidLlSet) Reset()               { *m = DHCP6DuidLlSet{} }
285 func (*DHCP6DuidLlSet) GetMessageName() string { return "dhcp6_duid_ll_set" }
286 func (*DHCP6DuidLlSet) GetCrcString() string   { return "0f6ca323" }
287 func (*DHCP6DuidLlSet) GetMessageType() api.MessageType {
288         return api.RequestMessage
289 }
290
291 func (m *DHCP6DuidLlSet) Size() (size int) {
292         if m == nil {
293                 return 0
294         }
295         size += 1 * 10 // m.DuidLl
296         return size
297 }
298 func (m *DHCP6DuidLlSet) Marshal(b []byte) ([]byte, error) {
299         if b == nil {
300                 b = make([]byte, m.Size())
301         }
302         buf := codec.NewBuffer(b)
303         buf.EncodeBytes(m.DuidLl, 10)
304         return buf.Bytes(), nil
305 }
306 func (m *DHCP6DuidLlSet) Unmarshal(b []byte) error {
307         buf := codec.NewBuffer(b)
308         m.DuidLl = make([]byte, 10)
309         copy(m.DuidLl, buf.DecodeBytes(len(m.DuidLl)))
310         return nil
311 }
312
313 // DHCP6DuidLlSetReply defines message 'dhcp6_duid_ll_set_reply'.
314 type DHCP6DuidLlSetReply struct {
315         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
316 }
317
318 func (m *DHCP6DuidLlSetReply) Reset()               { *m = DHCP6DuidLlSetReply{} }
319 func (*DHCP6DuidLlSetReply) GetMessageName() string { return "dhcp6_duid_ll_set_reply" }
320 func (*DHCP6DuidLlSetReply) GetCrcString() string   { return "e8d4e804" }
321 func (*DHCP6DuidLlSetReply) GetMessageType() api.MessageType {
322         return api.ReplyMessage
323 }
324
325 func (m *DHCP6DuidLlSetReply) Size() (size int) {
326         if m == nil {
327                 return 0
328         }
329         size += 4 // m.Retval
330         return size
331 }
332 func (m *DHCP6DuidLlSetReply) Marshal(b []byte) ([]byte, error) {
333         if b == nil {
334                 b = make([]byte, m.Size())
335         }
336         buf := codec.NewBuffer(b)
337         buf.EncodeInt32(m.Retval)
338         return buf.Bytes(), nil
339 }
340 func (m *DHCP6DuidLlSetReply) Unmarshal(b []byte) error {
341         buf := codec.NewBuffer(b)
342         m.Retval = buf.DecodeInt32()
343         return nil
344 }
345
346 // DHCP6PdReplyEvent defines message 'dhcp6_pd_reply_event'.
347 type DHCP6PdReplyEvent struct {
348         PID             uint32                         `binapi:"u32,name=pid" json:"pid,omitempty"`
349         SwIfIndex       interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
350         ServerIndex     uint32                         `binapi:"u32,name=server_index" json:"server_index,omitempty"`
351         MsgType         Dhcpv6MsgType                  `binapi:"dhcpv6_msg_type,name=msg_type" json:"msg_type,omitempty"`
352         T1              uint32                         `binapi:"u32,name=T1" json:"T1,omitempty"`
353         T2              uint32                         `binapi:"u32,name=T2" json:"T2,omitempty"`
354         InnerStatusCode uint16                         `binapi:"u16,name=inner_status_code" json:"inner_status_code,omitempty"`
355         StatusCode      uint16                         `binapi:"u16,name=status_code" json:"status_code,omitempty"`
356         Preference      uint8                          `binapi:"u8,name=preference" json:"preference,omitempty"`
357         NPrefixes       uint32                         `binapi:"u32,name=n_prefixes" json:"-"`
358         Prefixes        []DHCP6PdPrefixInfo            `binapi:"dhcp6_pd_prefix_info[n_prefixes],name=prefixes" json:"prefixes,omitempty"`
359 }
360
361 func (m *DHCP6PdReplyEvent) Reset()               { *m = DHCP6PdReplyEvent{} }
362 func (*DHCP6PdReplyEvent) GetMessageName() string { return "dhcp6_pd_reply_event" }
363 func (*DHCP6PdReplyEvent) GetCrcString() string   { return "cb3e462b" }
364 func (*DHCP6PdReplyEvent) GetMessageType() api.MessageType {
365         return api.EventMessage
366 }
367
368 func (m *DHCP6PdReplyEvent) Size() (size int) {
369         if m == nil {
370                 return 0
371         }
372         size += 4 // m.PID
373         size += 4 // m.SwIfIndex
374         size += 4 // m.ServerIndex
375         size += 4 // m.MsgType
376         size += 4 // m.T1
377         size += 4 // m.T2
378         size += 2 // m.InnerStatusCode
379         size += 2 // m.StatusCode
380         size += 1 // m.Preference
381         size += 4 // m.NPrefixes
382         for j1 := 0; j1 < len(m.Prefixes); j1++ {
383                 var s1 DHCP6PdPrefixInfo
384                 _ = s1
385                 if j1 < len(m.Prefixes) {
386                         s1 = m.Prefixes[j1]
387                 }
388                 size += 1 * 16 // s1.Prefix.Address
389                 size += 1      // s1.Prefix.Len
390                 size += 4      // s1.ValidTime
391                 size += 4      // s1.PreferredTime
392         }
393         return size
394 }
395 func (m *DHCP6PdReplyEvent) Marshal(b []byte) ([]byte, error) {
396         if b == nil {
397                 b = make([]byte, m.Size())
398         }
399         buf := codec.NewBuffer(b)
400         buf.EncodeUint32(m.PID)
401         buf.EncodeUint32(uint32(m.SwIfIndex))
402         buf.EncodeUint32(m.ServerIndex)
403         buf.EncodeUint32(uint32(m.MsgType))
404         buf.EncodeUint32(m.T1)
405         buf.EncodeUint32(m.T2)
406         buf.EncodeUint16(m.InnerStatusCode)
407         buf.EncodeUint16(m.StatusCode)
408         buf.EncodeUint8(m.Preference)
409         buf.EncodeUint32(uint32(len(m.Prefixes)))
410         for j0 := 0; j0 < len(m.Prefixes); j0++ {
411                 var v0 DHCP6PdPrefixInfo // Prefixes
412                 if j0 < len(m.Prefixes) {
413                         v0 = m.Prefixes[j0]
414                 }
415                 buf.EncodeBytes(v0.Prefix.Address[:], 16)
416                 buf.EncodeUint8(v0.Prefix.Len)
417                 buf.EncodeUint32(v0.ValidTime)
418                 buf.EncodeUint32(v0.PreferredTime)
419         }
420         return buf.Bytes(), nil
421 }
422 func (m *DHCP6PdReplyEvent) Unmarshal(b []byte) error {
423         buf := codec.NewBuffer(b)
424         m.PID = buf.DecodeUint32()
425         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
426         m.ServerIndex = buf.DecodeUint32()
427         m.MsgType = Dhcpv6MsgType(buf.DecodeUint32())
428         m.T1 = buf.DecodeUint32()
429         m.T2 = buf.DecodeUint32()
430         m.InnerStatusCode = buf.DecodeUint16()
431         m.StatusCode = buf.DecodeUint16()
432         m.Preference = buf.DecodeUint8()
433         m.NPrefixes = buf.DecodeUint32()
434         m.Prefixes = make([]DHCP6PdPrefixInfo, m.NPrefixes)
435         for j0 := 0; j0 < len(m.Prefixes); j0++ {
436                 copy(m.Prefixes[j0].Prefix.Address[:], buf.DecodeBytes(16))
437                 m.Prefixes[j0].Prefix.Len = buf.DecodeUint8()
438                 m.Prefixes[j0].ValidTime = buf.DecodeUint32()
439                 m.Prefixes[j0].PreferredTime = buf.DecodeUint32()
440         }
441         return nil
442 }
443
444 // DHCP6PdSendClientMessage defines message 'dhcp6_pd_send_client_message'.
445 type DHCP6PdSendClientMessage struct {
446         SwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
447         ServerIndex uint32                         `binapi:"u32,name=server_index" json:"server_index,omitempty"`
448         Irt         uint32                         `binapi:"u32,name=irt" json:"irt,omitempty"`
449         Mrt         uint32                         `binapi:"u32,name=mrt" json:"mrt,omitempty"`
450         Mrc         uint32                         `binapi:"u32,name=mrc" json:"mrc,omitempty"`
451         Mrd         uint32                         `binapi:"u32,name=mrd" json:"mrd,omitempty"`
452         Stop        bool                           `binapi:"bool,name=stop" json:"stop,omitempty"`
453         MsgType     Dhcpv6MsgType                  `binapi:"dhcpv6_msg_type,name=msg_type" json:"msg_type,omitempty"`
454         T1          uint32                         `binapi:"u32,name=T1" json:"T1,omitempty"`
455         T2          uint32                         `binapi:"u32,name=T2" json:"T2,omitempty"`
456         NPrefixes   uint32                         `binapi:"u32,name=n_prefixes" json:"-"`
457         Prefixes    []DHCP6PdPrefixInfo            `binapi:"dhcp6_pd_prefix_info[n_prefixes],name=prefixes" json:"prefixes,omitempty"`
458 }
459
460 func (m *DHCP6PdSendClientMessage) Reset()               { *m = DHCP6PdSendClientMessage{} }
461 func (*DHCP6PdSendClientMessage) GetMessageName() string { return "dhcp6_pd_send_client_message" }
462 func (*DHCP6PdSendClientMessage) GetCrcString() string   { return "064badb8" }
463 func (*DHCP6PdSendClientMessage) GetMessageType() api.MessageType {
464         return api.RequestMessage
465 }
466
467 func (m *DHCP6PdSendClientMessage) Size() (size int) {
468         if m == nil {
469                 return 0
470         }
471         size += 4 // m.SwIfIndex
472         size += 4 // m.ServerIndex
473         size += 4 // m.Irt
474         size += 4 // m.Mrt
475         size += 4 // m.Mrc
476         size += 4 // m.Mrd
477         size += 1 // m.Stop
478         size += 4 // m.MsgType
479         size += 4 // m.T1
480         size += 4 // m.T2
481         size += 4 // m.NPrefixes
482         for j1 := 0; j1 < len(m.Prefixes); j1++ {
483                 var s1 DHCP6PdPrefixInfo
484                 _ = s1
485                 if j1 < len(m.Prefixes) {
486                         s1 = m.Prefixes[j1]
487                 }
488                 size += 1 * 16 // s1.Prefix.Address
489                 size += 1      // s1.Prefix.Len
490                 size += 4      // s1.ValidTime
491                 size += 4      // s1.PreferredTime
492         }
493         return size
494 }
495 func (m *DHCP6PdSendClientMessage) Marshal(b []byte) ([]byte, error) {
496         if b == nil {
497                 b = make([]byte, m.Size())
498         }
499         buf := codec.NewBuffer(b)
500         buf.EncodeUint32(uint32(m.SwIfIndex))
501         buf.EncodeUint32(m.ServerIndex)
502         buf.EncodeUint32(m.Irt)
503         buf.EncodeUint32(m.Mrt)
504         buf.EncodeUint32(m.Mrc)
505         buf.EncodeUint32(m.Mrd)
506         buf.EncodeBool(m.Stop)
507         buf.EncodeUint32(uint32(m.MsgType))
508         buf.EncodeUint32(m.T1)
509         buf.EncodeUint32(m.T2)
510         buf.EncodeUint32(uint32(len(m.Prefixes)))
511         for j0 := 0; j0 < len(m.Prefixes); j0++ {
512                 var v0 DHCP6PdPrefixInfo // Prefixes
513                 if j0 < len(m.Prefixes) {
514                         v0 = m.Prefixes[j0]
515                 }
516                 buf.EncodeBytes(v0.Prefix.Address[:], 16)
517                 buf.EncodeUint8(v0.Prefix.Len)
518                 buf.EncodeUint32(v0.ValidTime)
519                 buf.EncodeUint32(v0.PreferredTime)
520         }
521         return buf.Bytes(), nil
522 }
523 func (m *DHCP6PdSendClientMessage) Unmarshal(b []byte) error {
524         buf := codec.NewBuffer(b)
525         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
526         m.ServerIndex = buf.DecodeUint32()
527         m.Irt = buf.DecodeUint32()
528         m.Mrt = buf.DecodeUint32()
529         m.Mrc = buf.DecodeUint32()
530         m.Mrd = buf.DecodeUint32()
531         m.Stop = buf.DecodeBool()
532         m.MsgType = Dhcpv6MsgType(buf.DecodeUint32())
533         m.T1 = buf.DecodeUint32()
534         m.T2 = buf.DecodeUint32()
535         m.NPrefixes = buf.DecodeUint32()
536         m.Prefixes = make([]DHCP6PdPrefixInfo, m.NPrefixes)
537         for j0 := 0; j0 < len(m.Prefixes); j0++ {
538                 copy(m.Prefixes[j0].Prefix.Address[:], buf.DecodeBytes(16))
539                 m.Prefixes[j0].Prefix.Len = buf.DecodeUint8()
540                 m.Prefixes[j0].ValidTime = buf.DecodeUint32()
541                 m.Prefixes[j0].PreferredTime = buf.DecodeUint32()
542         }
543         return nil
544 }
545
546 // DHCP6PdSendClientMessageReply defines message 'dhcp6_pd_send_client_message_reply'.
547 type DHCP6PdSendClientMessageReply struct {
548         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
549 }
550
551 func (m *DHCP6PdSendClientMessageReply) Reset() { *m = DHCP6PdSendClientMessageReply{} }
552 func (*DHCP6PdSendClientMessageReply) GetMessageName() string {
553         return "dhcp6_pd_send_client_message_reply"
554 }
555 func (*DHCP6PdSendClientMessageReply) GetCrcString() string { return "e8d4e804" }
556 func (*DHCP6PdSendClientMessageReply) GetMessageType() api.MessageType {
557         return api.ReplyMessage
558 }
559
560 func (m *DHCP6PdSendClientMessageReply) Size() (size int) {
561         if m == nil {
562                 return 0
563         }
564         size += 4 // m.Retval
565         return size
566 }
567 func (m *DHCP6PdSendClientMessageReply) Marshal(b []byte) ([]byte, error) {
568         if b == nil {
569                 b = make([]byte, m.Size())
570         }
571         buf := codec.NewBuffer(b)
572         buf.EncodeInt32(m.Retval)
573         return buf.Bytes(), nil
574 }
575 func (m *DHCP6PdSendClientMessageReply) Unmarshal(b []byte) error {
576         buf := codec.NewBuffer(b)
577         m.Retval = buf.DecodeInt32()
578         return nil
579 }
580
581 // DHCP6ReplyEvent defines message 'dhcp6_reply_event'.
582 type DHCP6ReplyEvent struct {
583         PID             uint32                         `binapi:"u32,name=pid" json:"pid,omitempty"`
584         SwIfIndex       interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
585         ServerIndex     uint32                         `binapi:"u32,name=server_index" json:"server_index,omitempty"`
586         MsgType         Dhcpv6MsgType                  `binapi:"dhcpv6_msg_type,name=msg_type" json:"msg_type,omitempty"`
587         T1              uint32                         `binapi:"u32,name=T1" json:"T1,omitempty"`
588         T2              uint32                         `binapi:"u32,name=T2" json:"T2,omitempty"`
589         InnerStatusCode uint16                         `binapi:"u16,name=inner_status_code" json:"inner_status_code,omitempty"`
590         StatusCode      uint16                         `binapi:"u16,name=status_code" json:"status_code,omitempty"`
591         Preference      uint8                          `binapi:"u8,name=preference" json:"preference,omitempty"`
592         NAddresses      uint32                         `binapi:"u32,name=n_addresses" json:"-"`
593         Addresses       []DHCP6AddressInfo             `binapi:"dhcp6_address_info[n_addresses],name=addresses" json:"addresses,omitempty"`
594 }
595
596 func (m *DHCP6ReplyEvent) Reset()               { *m = DHCP6ReplyEvent{} }
597 func (*DHCP6ReplyEvent) GetMessageName() string { return "dhcp6_reply_event" }
598 func (*DHCP6ReplyEvent) GetCrcString() string   { return "9f3af9e5" }
599 func (*DHCP6ReplyEvent) GetMessageType() api.MessageType {
600         return api.EventMessage
601 }
602
603 func (m *DHCP6ReplyEvent) Size() (size int) {
604         if m == nil {
605                 return 0
606         }
607         size += 4 // m.PID
608         size += 4 // m.SwIfIndex
609         size += 4 // m.ServerIndex
610         size += 4 // m.MsgType
611         size += 4 // m.T1
612         size += 4 // m.T2
613         size += 2 // m.InnerStatusCode
614         size += 2 // m.StatusCode
615         size += 1 // m.Preference
616         size += 4 // m.NAddresses
617         for j1 := 0; j1 < len(m.Addresses); j1++ {
618                 var s1 DHCP6AddressInfo
619                 _ = s1
620                 if j1 < len(m.Addresses) {
621                         s1 = m.Addresses[j1]
622                 }
623                 size += 1 * 16 // s1.Address
624                 size += 4      // s1.ValidTime
625                 size += 4      // s1.PreferredTime
626         }
627         return size
628 }
629 func (m *DHCP6ReplyEvent) Marshal(b []byte) ([]byte, error) {
630         if b == nil {
631                 b = make([]byte, m.Size())
632         }
633         buf := codec.NewBuffer(b)
634         buf.EncodeUint32(m.PID)
635         buf.EncodeUint32(uint32(m.SwIfIndex))
636         buf.EncodeUint32(m.ServerIndex)
637         buf.EncodeUint32(uint32(m.MsgType))
638         buf.EncodeUint32(m.T1)
639         buf.EncodeUint32(m.T2)
640         buf.EncodeUint16(m.InnerStatusCode)
641         buf.EncodeUint16(m.StatusCode)
642         buf.EncodeUint8(m.Preference)
643         buf.EncodeUint32(uint32(len(m.Addresses)))
644         for j0 := 0; j0 < len(m.Addresses); j0++ {
645                 var v0 DHCP6AddressInfo // Addresses
646                 if j0 < len(m.Addresses) {
647                         v0 = m.Addresses[j0]
648                 }
649                 buf.EncodeBytes(v0.Address[:], 16)
650                 buf.EncodeUint32(v0.ValidTime)
651                 buf.EncodeUint32(v0.PreferredTime)
652         }
653         return buf.Bytes(), nil
654 }
655 func (m *DHCP6ReplyEvent) Unmarshal(b []byte) error {
656         buf := codec.NewBuffer(b)
657         m.PID = buf.DecodeUint32()
658         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
659         m.ServerIndex = buf.DecodeUint32()
660         m.MsgType = Dhcpv6MsgType(buf.DecodeUint32())
661         m.T1 = buf.DecodeUint32()
662         m.T2 = buf.DecodeUint32()
663         m.InnerStatusCode = buf.DecodeUint16()
664         m.StatusCode = buf.DecodeUint16()
665         m.Preference = buf.DecodeUint8()
666         m.NAddresses = buf.DecodeUint32()
667         m.Addresses = make([]DHCP6AddressInfo, m.NAddresses)
668         for j0 := 0; j0 < len(m.Addresses); j0++ {
669                 copy(m.Addresses[j0].Address[:], buf.DecodeBytes(16))
670                 m.Addresses[j0].ValidTime = buf.DecodeUint32()
671                 m.Addresses[j0].PreferredTime = buf.DecodeUint32()
672         }
673         return nil
674 }
675
676 // DHCP6SendClientMessage defines message 'dhcp6_send_client_message'.
677 type DHCP6SendClientMessage struct {
678         SwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
679         ServerIndex uint32                         `binapi:"u32,name=server_index" json:"server_index,omitempty"`
680         Irt         uint32                         `binapi:"u32,name=irt" json:"irt,omitempty"`
681         Mrt         uint32                         `binapi:"u32,name=mrt" json:"mrt,omitempty"`
682         Mrc         uint32                         `binapi:"u32,name=mrc" json:"mrc,omitempty"`
683         Mrd         uint32                         `binapi:"u32,name=mrd" json:"mrd,omitempty"`
684         Stop        bool                           `binapi:"bool,name=stop" json:"stop,omitempty"`
685         MsgType     Dhcpv6MsgType                  `binapi:"dhcpv6_msg_type,name=msg_type" json:"msg_type,omitempty"`
686         T1          uint32                         `binapi:"u32,name=T1" json:"T1,omitempty"`
687         T2          uint32                         `binapi:"u32,name=T2" json:"T2,omitempty"`
688         NAddresses  uint32                         `binapi:"u32,name=n_addresses" json:"-"`
689         Addresses   []DHCP6AddressInfo             `binapi:"dhcp6_address_info[n_addresses],name=addresses" json:"addresses,omitempty"`
690 }
691
692 func (m *DHCP6SendClientMessage) Reset()               { *m = DHCP6SendClientMessage{} }
693 func (*DHCP6SendClientMessage) GetMessageName() string { return "dhcp6_send_client_message" }
694 func (*DHCP6SendClientMessage) GetCrcString() string   { return "f6f14ef0" }
695 func (*DHCP6SendClientMessage) GetMessageType() api.MessageType {
696         return api.RequestMessage
697 }
698
699 func (m *DHCP6SendClientMessage) Size() (size int) {
700         if m == nil {
701                 return 0
702         }
703         size += 4 // m.SwIfIndex
704         size += 4 // m.ServerIndex
705         size += 4 // m.Irt
706         size += 4 // m.Mrt
707         size += 4 // m.Mrc
708         size += 4 // m.Mrd
709         size += 1 // m.Stop
710         size += 4 // m.MsgType
711         size += 4 // m.T1
712         size += 4 // m.T2
713         size += 4 // m.NAddresses
714         for j1 := 0; j1 < len(m.Addresses); j1++ {
715                 var s1 DHCP6AddressInfo
716                 _ = s1
717                 if j1 < len(m.Addresses) {
718                         s1 = m.Addresses[j1]
719                 }
720                 size += 1 * 16 // s1.Address
721                 size += 4      // s1.ValidTime
722                 size += 4      // s1.PreferredTime
723         }
724         return size
725 }
726 func (m *DHCP6SendClientMessage) Marshal(b []byte) ([]byte, error) {
727         if b == nil {
728                 b = make([]byte, m.Size())
729         }
730         buf := codec.NewBuffer(b)
731         buf.EncodeUint32(uint32(m.SwIfIndex))
732         buf.EncodeUint32(m.ServerIndex)
733         buf.EncodeUint32(m.Irt)
734         buf.EncodeUint32(m.Mrt)
735         buf.EncodeUint32(m.Mrc)
736         buf.EncodeUint32(m.Mrd)
737         buf.EncodeBool(m.Stop)
738         buf.EncodeUint32(uint32(m.MsgType))
739         buf.EncodeUint32(m.T1)
740         buf.EncodeUint32(m.T2)
741         buf.EncodeUint32(uint32(len(m.Addresses)))
742         for j0 := 0; j0 < len(m.Addresses); j0++ {
743                 var v0 DHCP6AddressInfo // Addresses
744                 if j0 < len(m.Addresses) {
745                         v0 = m.Addresses[j0]
746                 }
747                 buf.EncodeBytes(v0.Address[:], 16)
748                 buf.EncodeUint32(v0.ValidTime)
749                 buf.EncodeUint32(v0.PreferredTime)
750         }
751         return buf.Bytes(), nil
752 }
753 func (m *DHCP6SendClientMessage) Unmarshal(b []byte) error {
754         buf := codec.NewBuffer(b)
755         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
756         m.ServerIndex = buf.DecodeUint32()
757         m.Irt = buf.DecodeUint32()
758         m.Mrt = buf.DecodeUint32()
759         m.Mrc = buf.DecodeUint32()
760         m.Mrd = buf.DecodeUint32()
761         m.Stop = buf.DecodeBool()
762         m.MsgType = Dhcpv6MsgType(buf.DecodeUint32())
763         m.T1 = buf.DecodeUint32()
764         m.T2 = buf.DecodeUint32()
765         m.NAddresses = buf.DecodeUint32()
766         m.Addresses = make([]DHCP6AddressInfo, m.NAddresses)
767         for j0 := 0; j0 < len(m.Addresses); j0++ {
768                 copy(m.Addresses[j0].Address[:], buf.DecodeBytes(16))
769                 m.Addresses[j0].ValidTime = buf.DecodeUint32()
770                 m.Addresses[j0].PreferredTime = buf.DecodeUint32()
771         }
772         return nil
773 }
774
775 // DHCP6SendClientMessageReply defines message 'dhcp6_send_client_message_reply'.
776 type DHCP6SendClientMessageReply struct {
777         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
778 }
779
780 func (m *DHCP6SendClientMessageReply) Reset()               { *m = DHCP6SendClientMessageReply{} }
781 func (*DHCP6SendClientMessageReply) GetMessageName() string { return "dhcp6_send_client_message_reply" }
782 func (*DHCP6SendClientMessageReply) GetCrcString() string   { return "e8d4e804" }
783 func (*DHCP6SendClientMessageReply) GetMessageType() api.MessageType {
784         return api.ReplyMessage
785 }
786
787 func (m *DHCP6SendClientMessageReply) Size() (size int) {
788         if m == nil {
789                 return 0
790         }
791         size += 4 // m.Retval
792         return size
793 }
794 func (m *DHCP6SendClientMessageReply) Marshal(b []byte) ([]byte, error) {
795         if b == nil {
796                 b = make([]byte, m.Size())
797         }
798         buf := codec.NewBuffer(b)
799         buf.EncodeInt32(m.Retval)
800         return buf.Bytes(), nil
801 }
802 func (m *DHCP6SendClientMessageReply) Unmarshal(b []byte) error {
803         buf := codec.NewBuffer(b)
804         m.Retval = buf.DecodeInt32()
805         return nil
806 }
807
808 // DHCPClientConfig defines message 'dhcp_client_config'.
809 type DHCPClientConfig struct {
810         IsAdd  bool       `binapi:"bool,name=is_add" json:"is_add,omitempty"`
811         Client DHCPClient `binapi:"dhcp_client,name=client" json:"client,omitempty"`
812 }
813
814 func (m *DHCPClientConfig) Reset()               { *m = DHCPClientConfig{} }
815 func (*DHCPClientConfig) GetMessageName() string { return "dhcp_client_config" }
816 func (*DHCPClientConfig) GetCrcString() string   { return "959b80a3" }
817 func (*DHCPClientConfig) GetMessageType() api.MessageType {
818         return api.RequestMessage
819 }
820
821 func (m *DHCPClientConfig) Size() (size int) {
822         if m == nil {
823                 return 0
824         }
825         size += 1      // m.IsAdd
826         size += 4      // m.Client.SwIfIndex
827         size += 64     // m.Client.Hostname
828         size += 1 * 64 // m.Client.ID
829         size += 1      // m.Client.WantDHCPEvent
830         size += 1      // m.Client.SetBroadcastFlag
831         size += 1      // m.Client.Dscp
832         size += 4      // m.Client.PID
833         return size
834 }
835 func (m *DHCPClientConfig) Marshal(b []byte) ([]byte, error) {
836         if b == nil {
837                 b = make([]byte, m.Size())
838         }
839         buf := codec.NewBuffer(b)
840         buf.EncodeBool(m.IsAdd)
841         buf.EncodeUint32(uint32(m.Client.SwIfIndex))
842         buf.EncodeString(m.Client.Hostname, 64)
843         buf.EncodeBytes(m.Client.ID, 64)
844         buf.EncodeBool(m.Client.WantDHCPEvent)
845         buf.EncodeBool(m.Client.SetBroadcastFlag)
846         buf.EncodeUint8(uint8(m.Client.Dscp))
847         buf.EncodeUint32(m.Client.PID)
848         return buf.Bytes(), nil
849 }
850 func (m *DHCPClientConfig) Unmarshal(b []byte) error {
851         buf := codec.NewBuffer(b)
852         m.IsAdd = buf.DecodeBool()
853         m.Client.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
854         m.Client.Hostname = buf.DecodeString(64)
855         m.Client.ID = make([]byte, 64)
856         copy(m.Client.ID, buf.DecodeBytes(len(m.Client.ID)))
857         m.Client.WantDHCPEvent = buf.DecodeBool()
858         m.Client.SetBroadcastFlag = buf.DecodeBool()
859         m.Client.Dscp = ip_types.IPDscp(buf.DecodeUint8())
860         m.Client.PID = buf.DecodeUint32()
861         return nil
862 }
863
864 // DHCPClientConfigReply defines message 'dhcp_client_config_reply'.
865 type DHCPClientConfigReply struct {
866         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
867 }
868
869 func (m *DHCPClientConfigReply) Reset()               { *m = DHCPClientConfigReply{} }
870 func (*DHCPClientConfigReply) GetMessageName() string { return "dhcp_client_config_reply" }
871 func (*DHCPClientConfigReply) GetCrcString() string   { return "e8d4e804" }
872 func (*DHCPClientConfigReply) GetMessageType() api.MessageType {
873         return api.ReplyMessage
874 }
875
876 func (m *DHCPClientConfigReply) Size() (size int) {
877         if m == nil {
878                 return 0
879         }
880         size += 4 // m.Retval
881         return size
882 }
883 func (m *DHCPClientConfigReply) Marshal(b []byte) ([]byte, error) {
884         if b == nil {
885                 b = make([]byte, m.Size())
886         }
887         buf := codec.NewBuffer(b)
888         buf.EncodeInt32(m.Retval)
889         return buf.Bytes(), nil
890 }
891 func (m *DHCPClientConfigReply) Unmarshal(b []byte) error {
892         buf := codec.NewBuffer(b)
893         m.Retval = buf.DecodeInt32()
894         return nil
895 }
896
897 // DHCPClientDetails defines message 'dhcp_client_details'.
898 type DHCPClientDetails struct {
899         Client DHCPClient `binapi:"dhcp_client,name=client" json:"client,omitempty"`
900         Lease  DHCPLease  `binapi:"dhcp_lease,name=lease" json:"lease,omitempty"`
901 }
902
903 func (m *DHCPClientDetails) Reset()               { *m = DHCPClientDetails{} }
904 func (*DHCPClientDetails) GetMessageName() string { return "dhcp_client_details" }
905 func (*DHCPClientDetails) GetCrcString() string   { return "acd82f5a" }
906 func (*DHCPClientDetails) GetMessageType() api.MessageType {
907         return api.ReplyMessage
908 }
909
910 func (m *DHCPClientDetails) Size() (size int) {
911         if m == nil {
912                 return 0
913         }
914         size += 4      // m.Client.SwIfIndex
915         size += 64     // m.Client.Hostname
916         size += 1 * 64 // m.Client.ID
917         size += 1      // m.Client.WantDHCPEvent
918         size += 1      // m.Client.SetBroadcastFlag
919         size += 1      // m.Client.Dscp
920         size += 4      // m.Client.PID
921         size += 4      // m.Lease.SwIfIndex
922         size += 4      // m.Lease.State
923         size += 1      // m.Lease.IsIPv6
924         size += 64     // m.Lease.Hostname
925         size += 1      // m.Lease.MaskWidth
926         size += 1      // m.Lease.HostAddress.Af
927         size += 1 * 16 // m.Lease.HostAddress.Un
928         size += 1      // m.Lease.RouterAddress.Af
929         size += 1 * 16 // m.Lease.RouterAddress.Un
930         size += 1 * 6  // m.Lease.HostMac
931         size += 1      // m.Lease.Count
932         for j2 := 0; j2 < len(m.Lease.DomainServer); j2++ {
933                 var s2 DomainServer
934                 _ = s2
935                 if j2 < len(m.Lease.DomainServer) {
936                         s2 = m.Lease.DomainServer[j2]
937                 }
938                 size += 1      // s2.Address.Af
939                 size += 1 * 16 // s2.Address.Un
940         }
941         return size
942 }
943 func (m *DHCPClientDetails) Marshal(b []byte) ([]byte, error) {
944         if b == nil {
945                 b = make([]byte, m.Size())
946         }
947         buf := codec.NewBuffer(b)
948         buf.EncodeUint32(uint32(m.Client.SwIfIndex))
949         buf.EncodeString(m.Client.Hostname, 64)
950         buf.EncodeBytes(m.Client.ID, 64)
951         buf.EncodeBool(m.Client.WantDHCPEvent)
952         buf.EncodeBool(m.Client.SetBroadcastFlag)
953         buf.EncodeUint8(uint8(m.Client.Dscp))
954         buf.EncodeUint32(m.Client.PID)
955         buf.EncodeUint32(uint32(m.Lease.SwIfIndex))
956         buf.EncodeUint32(uint32(m.Lease.State))
957         buf.EncodeBool(m.Lease.IsIPv6)
958         buf.EncodeString(m.Lease.Hostname, 64)
959         buf.EncodeUint8(m.Lease.MaskWidth)
960         buf.EncodeUint8(uint8(m.Lease.HostAddress.Af))
961         buf.EncodeBytes(m.Lease.HostAddress.Un.XXX_UnionData[:], 16)
962         buf.EncodeUint8(uint8(m.Lease.RouterAddress.Af))
963         buf.EncodeBytes(m.Lease.RouterAddress.Un.XXX_UnionData[:], 16)
964         buf.EncodeBytes(m.Lease.HostMac[:], 6)
965         buf.EncodeUint8(uint8(len(m.Lease.DomainServer)))
966         for j1 := 0; j1 < len(m.Lease.DomainServer); j1++ {
967                 var v1 DomainServer // DomainServer
968                 if j1 < len(m.Lease.DomainServer) {
969                         v1 = m.Lease.DomainServer[j1]
970                 }
971                 buf.EncodeUint8(uint8(v1.Address.Af))
972                 buf.EncodeBytes(v1.Address.Un.XXX_UnionData[:], 16)
973         }
974         return buf.Bytes(), nil
975 }
976 func (m *DHCPClientDetails) Unmarshal(b []byte) error {
977         buf := codec.NewBuffer(b)
978         m.Client.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
979         m.Client.Hostname = buf.DecodeString(64)
980         m.Client.ID = make([]byte, 64)
981         copy(m.Client.ID, buf.DecodeBytes(len(m.Client.ID)))
982         m.Client.WantDHCPEvent = buf.DecodeBool()
983         m.Client.SetBroadcastFlag = buf.DecodeBool()
984         m.Client.Dscp = ip_types.IPDscp(buf.DecodeUint8())
985         m.Client.PID = buf.DecodeUint32()
986         m.Lease.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
987         m.Lease.State = DHCPClientState(buf.DecodeUint32())
988         m.Lease.IsIPv6 = buf.DecodeBool()
989         m.Lease.Hostname = buf.DecodeString(64)
990         m.Lease.MaskWidth = buf.DecodeUint8()
991         m.Lease.HostAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
992         copy(m.Lease.HostAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
993         m.Lease.RouterAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
994         copy(m.Lease.RouterAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
995         copy(m.Lease.HostMac[:], buf.DecodeBytes(6))
996         m.Lease.Count = buf.DecodeUint8()
997         m.Lease.DomainServer = make([]DomainServer, m.Lease.Count)
998         for j1 := 0; j1 < len(m.Lease.DomainServer); j1++ {
999                 m.Lease.DomainServer[j1].Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1000                 copy(m.Lease.DomainServer[j1].Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1001         }
1002         return nil
1003 }
1004
1005 // DHCPClientDump defines message 'dhcp_client_dump'.
1006 type DHCPClientDump struct{}
1007
1008 func (m *DHCPClientDump) Reset()               { *m = DHCPClientDump{} }
1009 func (*DHCPClientDump) GetMessageName() string { return "dhcp_client_dump" }
1010 func (*DHCPClientDump) GetCrcString() string   { return "51077d14" }
1011 func (*DHCPClientDump) GetMessageType() api.MessageType {
1012         return api.RequestMessage
1013 }
1014
1015 func (m *DHCPClientDump) Size() (size int) {
1016         if m == nil {
1017                 return 0
1018         }
1019         return size
1020 }
1021 func (m *DHCPClientDump) Marshal(b []byte) ([]byte, error) {
1022         if b == nil {
1023                 b = make([]byte, m.Size())
1024         }
1025         buf := codec.NewBuffer(b)
1026         return buf.Bytes(), nil
1027 }
1028 func (m *DHCPClientDump) Unmarshal(b []byte) error {
1029         return nil
1030 }
1031
1032 // DHCPComplEvent defines message 'dhcp_compl_event'.
1033 type DHCPComplEvent struct {
1034         PID   uint32    `binapi:"u32,name=pid" json:"pid,omitempty"`
1035         Lease DHCPLease `binapi:"dhcp_lease,name=lease" json:"lease,omitempty"`
1036 }
1037
1038 func (m *DHCPComplEvent) Reset()               { *m = DHCPComplEvent{} }
1039 func (*DHCPComplEvent) GetMessageName() string { return "dhcp_compl_event" }
1040 func (*DHCPComplEvent) GetCrcString() string   { return "e908fd1d" }
1041 func (*DHCPComplEvent) GetMessageType() api.MessageType {
1042         return api.EventMessage
1043 }
1044
1045 func (m *DHCPComplEvent) Size() (size int) {
1046         if m == nil {
1047                 return 0
1048         }
1049         size += 4      // m.PID
1050         size += 4      // m.Lease.SwIfIndex
1051         size += 4      // m.Lease.State
1052         size += 1      // m.Lease.IsIPv6
1053         size += 64     // m.Lease.Hostname
1054         size += 1      // m.Lease.MaskWidth
1055         size += 1      // m.Lease.HostAddress.Af
1056         size += 1 * 16 // m.Lease.HostAddress.Un
1057         size += 1      // m.Lease.RouterAddress.Af
1058         size += 1 * 16 // m.Lease.RouterAddress.Un
1059         size += 1 * 6  // m.Lease.HostMac
1060         size += 1      // m.Lease.Count
1061         for j2 := 0; j2 < len(m.Lease.DomainServer); j2++ {
1062                 var s2 DomainServer
1063                 _ = s2
1064                 if j2 < len(m.Lease.DomainServer) {
1065                         s2 = m.Lease.DomainServer[j2]
1066                 }
1067                 size += 1      // s2.Address.Af
1068                 size += 1 * 16 // s2.Address.Un
1069         }
1070         return size
1071 }
1072 func (m *DHCPComplEvent) Marshal(b []byte) ([]byte, error) {
1073         if b == nil {
1074                 b = make([]byte, m.Size())
1075         }
1076         buf := codec.NewBuffer(b)
1077         buf.EncodeUint32(m.PID)
1078         buf.EncodeUint32(uint32(m.Lease.SwIfIndex))
1079         buf.EncodeUint32(uint32(m.Lease.State))
1080         buf.EncodeBool(m.Lease.IsIPv6)
1081         buf.EncodeString(m.Lease.Hostname, 64)
1082         buf.EncodeUint8(m.Lease.MaskWidth)
1083         buf.EncodeUint8(uint8(m.Lease.HostAddress.Af))
1084         buf.EncodeBytes(m.Lease.HostAddress.Un.XXX_UnionData[:], 16)
1085         buf.EncodeUint8(uint8(m.Lease.RouterAddress.Af))
1086         buf.EncodeBytes(m.Lease.RouterAddress.Un.XXX_UnionData[:], 16)
1087         buf.EncodeBytes(m.Lease.HostMac[:], 6)
1088         buf.EncodeUint8(uint8(len(m.Lease.DomainServer)))
1089         for j1 := 0; j1 < len(m.Lease.DomainServer); j1++ {
1090                 var v1 DomainServer // DomainServer
1091                 if j1 < len(m.Lease.DomainServer) {
1092                         v1 = m.Lease.DomainServer[j1]
1093                 }
1094                 buf.EncodeUint8(uint8(v1.Address.Af))
1095                 buf.EncodeBytes(v1.Address.Un.XXX_UnionData[:], 16)
1096         }
1097         return buf.Bytes(), nil
1098 }
1099 func (m *DHCPComplEvent) Unmarshal(b []byte) error {
1100         buf := codec.NewBuffer(b)
1101         m.PID = buf.DecodeUint32()
1102         m.Lease.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1103         m.Lease.State = DHCPClientState(buf.DecodeUint32())
1104         m.Lease.IsIPv6 = buf.DecodeBool()
1105         m.Lease.Hostname = buf.DecodeString(64)
1106         m.Lease.MaskWidth = buf.DecodeUint8()
1107         m.Lease.HostAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
1108         copy(m.Lease.HostAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1109         m.Lease.RouterAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
1110         copy(m.Lease.RouterAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1111         copy(m.Lease.HostMac[:], buf.DecodeBytes(6))
1112         m.Lease.Count = buf.DecodeUint8()
1113         m.Lease.DomainServer = make([]DomainServer, m.Lease.Count)
1114         for j1 := 0; j1 < len(m.Lease.DomainServer); j1++ {
1115                 m.Lease.DomainServer[j1].Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1116                 copy(m.Lease.DomainServer[j1].Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1117         }
1118         return nil
1119 }
1120
1121 // DHCPPluginControlPing defines message 'dhcp_plugin_control_ping'.
1122 type DHCPPluginControlPing struct{}
1123
1124 func (m *DHCPPluginControlPing) Reset()               { *m = DHCPPluginControlPing{} }
1125 func (*DHCPPluginControlPing) GetMessageName() string { return "dhcp_plugin_control_ping" }
1126 func (*DHCPPluginControlPing) GetCrcString() string   { return "51077d14" }
1127 func (*DHCPPluginControlPing) GetMessageType() api.MessageType {
1128         return api.RequestMessage
1129 }
1130
1131 func (m *DHCPPluginControlPing) Size() (size int) {
1132         if m == nil {
1133                 return 0
1134         }
1135         return size
1136 }
1137 func (m *DHCPPluginControlPing) Marshal(b []byte) ([]byte, error) {
1138         if b == nil {
1139                 b = make([]byte, m.Size())
1140         }
1141         buf := codec.NewBuffer(b)
1142         return buf.Bytes(), nil
1143 }
1144 func (m *DHCPPluginControlPing) Unmarshal(b []byte) error {
1145         return nil
1146 }
1147
1148 // DHCPPluginControlPingReply defines message 'dhcp_plugin_control_ping_reply'.
1149 type DHCPPluginControlPingReply struct {
1150         Retval      int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
1151         ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
1152         VpePID      uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
1153 }
1154
1155 func (m *DHCPPluginControlPingReply) Reset()               { *m = DHCPPluginControlPingReply{} }
1156 func (*DHCPPluginControlPingReply) GetMessageName() string { return "dhcp_plugin_control_ping_reply" }
1157 func (*DHCPPluginControlPingReply) GetCrcString() string   { return "f6b0b8ca" }
1158 func (*DHCPPluginControlPingReply) GetMessageType() api.MessageType {
1159         return api.ReplyMessage
1160 }
1161
1162 func (m *DHCPPluginControlPingReply) Size() (size int) {
1163         if m == nil {
1164                 return 0
1165         }
1166         size += 4 // m.Retval
1167         size += 4 // m.ClientIndex
1168         size += 4 // m.VpePID
1169         return size
1170 }
1171 func (m *DHCPPluginControlPingReply) Marshal(b []byte) ([]byte, error) {
1172         if b == nil {
1173                 b = make([]byte, m.Size())
1174         }
1175         buf := codec.NewBuffer(b)
1176         buf.EncodeInt32(m.Retval)
1177         buf.EncodeUint32(m.ClientIndex)
1178         buf.EncodeUint32(m.VpePID)
1179         return buf.Bytes(), nil
1180 }
1181 func (m *DHCPPluginControlPingReply) Unmarshal(b []byte) error {
1182         buf := codec.NewBuffer(b)
1183         m.Retval = buf.DecodeInt32()
1184         m.ClientIndex = buf.DecodeUint32()
1185         m.VpePID = buf.DecodeUint32()
1186         return nil
1187 }
1188
1189 // DHCPPluginGetVersion defines message 'dhcp_plugin_get_version'.
1190 type DHCPPluginGetVersion struct{}
1191
1192 func (m *DHCPPluginGetVersion) Reset()               { *m = DHCPPluginGetVersion{} }
1193 func (*DHCPPluginGetVersion) GetMessageName() string { return "dhcp_plugin_get_version" }
1194 func (*DHCPPluginGetVersion) GetCrcString() string   { return "51077d14" }
1195 func (*DHCPPluginGetVersion) GetMessageType() api.MessageType {
1196         return api.RequestMessage
1197 }
1198
1199 func (m *DHCPPluginGetVersion) Size() (size int) {
1200         if m == nil {
1201                 return 0
1202         }
1203         return size
1204 }
1205 func (m *DHCPPluginGetVersion) Marshal(b []byte) ([]byte, error) {
1206         if b == nil {
1207                 b = make([]byte, m.Size())
1208         }
1209         buf := codec.NewBuffer(b)
1210         return buf.Bytes(), nil
1211 }
1212 func (m *DHCPPluginGetVersion) Unmarshal(b []byte) error {
1213         return nil
1214 }
1215
1216 // DHCPPluginGetVersionReply defines message 'dhcp_plugin_get_version_reply'.
1217 type DHCPPluginGetVersionReply struct {
1218         Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
1219         Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
1220 }
1221
1222 func (m *DHCPPluginGetVersionReply) Reset()               { *m = DHCPPluginGetVersionReply{} }
1223 func (*DHCPPluginGetVersionReply) GetMessageName() string { return "dhcp_plugin_get_version_reply" }
1224 func (*DHCPPluginGetVersionReply) GetCrcString() string   { return "9b32cf86" }
1225 func (*DHCPPluginGetVersionReply) GetMessageType() api.MessageType {
1226         return api.ReplyMessage
1227 }
1228
1229 func (m *DHCPPluginGetVersionReply) Size() (size int) {
1230         if m == nil {
1231                 return 0
1232         }
1233         size += 4 // m.Major
1234         size += 4 // m.Minor
1235         return size
1236 }
1237 func (m *DHCPPluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
1238         if b == nil {
1239                 b = make([]byte, m.Size())
1240         }
1241         buf := codec.NewBuffer(b)
1242         buf.EncodeUint32(m.Major)
1243         buf.EncodeUint32(m.Minor)
1244         return buf.Bytes(), nil
1245 }
1246 func (m *DHCPPluginGetVersionReply) Unmarshal(b []byte) error {
1247         buf := codec.NewBuffer(b)
1248         m.Major = buf.DecodeUint32()
1249         m.Minor = buf.DecodeUint32()
1250         return nil
1251 }
1252
1253 // DHCPProxyConfig defines message 'dhcp_proxy_config'.
1254 type DHCPProxyConfig struct {
1255         RxVrfID        uint32           `binapi:"u32,name=rx_vrf_id" json:"rx_vrf_id,omitempty"`
1256         ServerVrfID    uint32           `binapi:"u32,name=server_vrf_id" json:"server_vrf_id,omitempty"`
1257         IsAdd          bool             `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1258         DHCPServer     ip_types.Address `binapi:"address,name=dhcp_server" json:"dhcp_server,omitempty"`
1259         DHCPSrcAddress ip_types.Address `binapi:"address,name=dhcp_src_address" json:"dhcp_src_address,omitempty"`
1260 }
1261
1262 func (m *DHCPProxyConfig) Reset()               { *m = DHCPProxyConfig{} }
1263 func (*DHCPProxyConfig) GetMessageName() string { return "dhcp_proxy_config" }
1264 func (*DHCPProxyConfig) GetCrcString() string   { return "6767230e" }
1265 func (*DHCPProxyConfig) GetMessageType() api.MessageType {
1266         return api.RequestMessage
1267 }
1268
1269 func (m *DHCPProxyConfig) Size() (size int) {
1270         if m == nil {
1271                 return 0
1272         }
1273         size += 4      // m.RxVrfID
1274         size += 4      // m.ServerVrfID
1275         size += 1      // m.IsAdd
1276         size += 1      // m.DHCPServer.Af
1277         size += 1 * 16 // m.DHCPServer.Un
1278         size += 1      // m.DHCPSrcAddress.Af
1279         size += 1 * 16 // m.DHCPSrcAddress.Un
1280         return size
1281 }
1282 func (m *DHCPProxyConfig) Marshal(b []byte) ([]byte, error) {
1283         if b == nil {
1284                 b = make([]byte, m.Size())
1285         }
1286         buf := codec.NewBuffer(b)
1287         buf.EncodeUint32(m.RxVrfID)
1288         buf.EncodeUint32(m.ServerVrfID)
1289         buf.EncodeBool(m.IsAdd)
1290         buf.EncodeUint8(uint8(m.DHCPServer.Af))
1291         buf.EncodeBytes(m.DHCPServer.Un.XXX_UnionData[:], 16)
1292         buf.EncodeUint8(uint8(m.DHCPSrcAddress.Af))
1293         buf.EncodeBytes(m.DHCPSrcAddress.Un.XXX_UnionData[:], 16)
1294         return buf.Bytes(), nil
1295 }
1296 func (m *DHCPProxyConfig) Unmarshal(b []byte) error {
1297         buf := codec.NewBuffer(b)
1298         m.RxVrfID = buf.DecodeUint32()
1299         m.ServerVrfID = buf.DecodeUint32()
1300         m.IsAdd = buf.DecodeBool()
1301         m.DHCPServer.Af = ip_types.AddressFamily(buf.DecodeUint8())
1302         copy(m.DHCPServer.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1303         m.DHCPSrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
1304         copy(m.DHCPSrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1305         return nil
1306 }
1307
1308 // DHCPProxyConfigReply defines message 'dhcp_proxy_config_reply'.
1309 type DHCPProxyConfigReply struct {
1310         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1311 }
1312
1313 func (m *DHCPProxyConfigReply) Reset()               { *m = DHCPProxyConfigReply{} }
1314 func (*DHCPProxyConfigReply) GetMessageName() string { return "dhcp_proxy_config_reply" }
1315 func (*DHCPProxyConfigReply) GetCrcString() string   { return "e8d4e804" }
1316 func (*DHCPProxyConfigReply) GetMessageType() api.MessageType {
1317         return api.ReplyMessage
1318 }
1319
1320 func (m *DHCPProxyConfigReply) Size() (size int) {
1321         if m == nil {
1322                 return 0
1323         }
1324         size += 4 // m.Retval
1325         return size
1326 }
1327 func (m *DHCPProxyConfigReply) Marshal(b []byte) ([]byte, error) {
1328         if b == nil {
1329                 b = make([]byte, m.Size())
1330         }
1331         buf := codec.NewBuffer(b)
1332         buf.EncodeInt32(m.Retval)
1333         return buf.Bytes(), nil
1334 }
1335 func (m *DHCPProxyConfigReply) Unmarshal(b []byte) error {
1336         buf := codec.NewBuffer(b)
1337         m.Retval = buf.DecodeInt32()
1338         return nil
1339 }
1340
1341 // DHCPProxyDetails defines message 'dhcp_proxy_details'.
1342 type DHCPProxyDetails struct {
1343         RxVrfID        uint32           `binapi:"u32,name=rx_vrf_id" json:"rx_vrf_id,omitempty"`
1344         VssOui         uint32           `binapi:"u32,name=vss_oui" json:"vss_oui,omitempty"`
1345         VssFibID       uint32           `binapi:"u32,name=vss_fib_id" json:"vss_fib_id,omitempty"`
1346         VssType        VssType          `binapi:"vss_type,name=vss_type" json:"vss_type,omitempty"`
1347         IsIPv6         bool             `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
1348         VssVPNAsciiID  string           `binapi:"string[129],name=vss_vpn_ascii_id" json:"vss_vpn_ascii_id,omitempty"`
1349         DHCPSrcAddress ip_types.Address `binapi:"address,name=dhcp_src_address" json:"dhcp_src_address,omitempty"`
1350         Count          uint8            `binapi:"u8,name=count" json:"-"`
1351         Servers        []DHCPServer     `binapi:"dhcp_server[count],name=servers" json:"servers,omitempty"`
1352 }
1353
1354 func (m *DHCPProxyDetails) Reset()               { *m = DHCPProxyDetails{} }
1355 func (*DHCPProxyDetails) GetMessageName() string { return "dhcp_proxy_details" }
1356 func (*DHCPProxyDetails) GetCrcString() string   { return "ce16f044" }
1357 func (*DHCPProxyDetails) GetMessageType() api.MessageType {
1358         return api.ReplyMessage
1359 }
1360
1361 func (m *DHCPProxyDetails) Size() (size int) {
1362         if m == nil {
1363                 return 0
1364         }
1365         size += 4      // m.RxVrfID
1366         size += 4      // m.VssOui
1367         size += 4      // m.VssFibID
1368         size += 4      // m.VssType
1369         size += 1      // m.IsIPv6
1370         size += 129    // m.VssVPNAsciiID
1371         size += 1      // m.DHCPSrcAddress.Af
1372         size += 1 * 16 // m.DHCPSrcAddress.Un
1373         size += 1      // m.Count
1374         for j1 := 0; j1 < len(m.Servers); j1++ {
1375                 var s1 DHCPServer
1376                 _ = s1
1377                 if j1 < len(m.Servers) {
1378                         s1 = m.Servers[j1]
1379                 }
1380                 size += 4      // s1.ServerVrfID
1381                 size += 1      // s1.DHCPServer.Af
1382                 size += 1 * 16 // s1.DHCPServer.Un
1383         }
1384         return size
1385 }
1386 func (m *DHCPProxyDetails) Marshal(b []byte) ([]byte, error) {
1387         if b == nil {
1388                 b = make([]byte, m.Size())
1389         }
1390         buf := codec.NewBuffer(b)
1391         buf.EncodeUint32(m.RxVrfID)
1392         buf.EncodeUint32(m.VssOui)
1393         buf.EncodeUint32(m.VssFibID)
1394         buf.EncodeUint32(uint32(m.VssType))
1395         buf.EncodeBool(m.IsIPv6)
1396         buf.EncodeString(m.VssVPNAsciiID, 129)
1397         buf.EncodeUint8(uint8(m.DHCPSrcAddress.Af))
1398         buf.EncodeBytes(m.DHCPSrcAddress.Un.XXX_UnionData[:], 16)
1399         buf.EncodeUint8(uint8(len(m.Servers)))
1400         for j0 := 0; j0 < len(m.Servers); j0++ {
1401                 var v0 DHCPServer // Servers
1402                 if j0 < len(m.Servers) {
1403                         v0 = m.Servers[j0]
1404                 }
1405                 buf.EncodeUint32(v0.ServerVrfID)
1406                 buf.EncodeUint8(uint8(v0.DHCPServer.Af))
1407                 buf.EncodeBytes(v0.DHCPServer.Un.XXX_UnionData[:], 16)
1408         }
1409         return buf.Bytes(), nil
1410 }
1411 func (m *DHCPProxyDetails) Unmarshal(b []byte) error {
1412         buf := codec.NewBuffer(b)
1413         m.RxVrfID = buf.DecodeUint32()
1414         m.VssOui = buf.DecodeUint32()
1415         m.VssFibID = buf.DecodeUint32()
1416         m.VssType = VssType(buf.DecodeUint32())
1417         m.IsIPv6 = buf.DecodeBool()
1418         m.VssVPNAsciiID = buf.DecodeString(129)
1419         m.DHCPSrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
1420         copy(m.DHCPSrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1421         m.Count = buf.DecodeUint8()
1422         m.Servers = make([]DHCPServer, m.Count)
1423         for j0 := 0; j0 < len(m.Servers); j0++ {
1424                 m.Servers[j0].ServerVrfID = buf.DecodeUint32()
1425                 m.Servers[j0].DHCPServer.Af = ip_types.AddressFamily(buf.DecodeUint8())
1426                 copy(m.Servers[j0].DHCPServer.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1427         }
1428         return nil
1429 }
1430
1431 // DHCPProxyDump defines message 'dhcp_proxy_dump'.
1432 type DHCPProxyDump struct {
1433         IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1434 }
1435
1436 func (m *DHCPProxyDump) Reset()               { *m = DHCPProxyDump{} }
1437 func (*DHCPProxyDump) GetMessageName() string { return "dhcp_proxy_dump" }
1438 func (*DHCPProxyDump) GetCrcString() string   { return "5c5b063f" }
1439 func (*DHCPProxyDump) GetMessageType() api.MessageType {
1440         return api.RequestMessage
1441 }
1442
1443 func (m *DHCPProxyDump) Size() (size int) {
1444         if m == nil {
1445                 return 0
1446         }
1447         size += 1 // m.IsIP6
1448         return size
1449 }
1450 func (m *DHCPProxyDump) Marshal(b []byte) ([]byte, error) {
1451         if b == nil {
1452                 b = make([]byte, m.Size())
1453         }
1454         buf := codec.NewBuffer(b)
1455         buf.EncodeBool(m.IsIP6)
1456         return buf.Bytes(), nil
1457 }
1458 func (m *DHCPProxyDump) Unmarshal(b []byte) error {
1459         buf := codec.NewBuffer(b)
1460         m.IsIP6 = buf.DecodeBool()
1461         return nil
1462 }
1463
1464 // DHCPProxySetVss defines message 'dhcp_proxy_set_vss'.
1465 type DHCPProxySetVss struct {
1466         TblID      uint32  `binapi:"u32,name=tbl_id" json:"tbl_id,omitempty"`
1467         VssType    VssType `binapi:"vss_type,name=vss_type" json:"vss_type,omitempty"`
1468         VPNAsciiID string  `binapi:"string[129],name=vpn_ascii_id" json:"vpn_ascii_id,omitempty"`
1469         Oui        uint32  `binapi:"u32,name=oui" json:"oui,omitempty"`
1470         VPNIndex   uint32  `binapi:"u32,name=vpn_index" json:"vpn_index,omitempty"`
1471         IsIPv6     bool    `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
1472         IsAdd      bool    `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1473 }
1474
1475 func (m *DHCPProxySetVss) Reset()               { *m = DHCPProxySetVss{} }
1476 func (*DHCPProxySetVss) GetMessageName() string { return "dhcp_proxy_set_vss" }
1477 func (*DHCPProxySetVss) GetCrcString() string   { return "50537301" }
1478 func (*DHCPProxySetVss) GetMessageType() api.MessageType {
1479         return api.RequestMessage
1480 }
1481
1482 func (m *DHCPProxySetVss) Size() (size int) {
1483         if m == nil {
1484                 return 0
1485         }
1486         size += 4   // m.TblID
1487         size += 4   // m.VssType
1488         size += 129 // m.VPNAsciiID
1489         size += 4   // m.Oui
1490         size += 4   // m.VPNIndex
1491         size += 1   // m.IsIPv6
1492         size += 1   // m.IsAdd
1493         return size
1494 }
1495 func (m *DHCPProxySetVss) Marshal(b []byte) ([]byte, error) {
1496         if b == nil {
1497                 b = make([]byte, m.Size())
1498         }
1499         buf := codec.NewBuffer(b)
1500         buf.EncodeUint32(m.TblID)
1501         buf.EncodeUint32(uint32(m.VssType))
1502         buf.EncodeString(m.VPNAsciiID, 129)
1503         buf.EncodeUint32(m.Oui)
1504         buf.EncodeUint32(m.VPNIndex)
1505         buf.EncodeBool(m.IsIPv6)
1506         buf.EncodeBool(m.IsAdd)
1507         return buf.Bytes(), nil
1508 }
1509 func (m *DHCPProxySetVss) Unmarshal(b []byte) error {
1510         buf := codec.NewBuffer(b)
1511         m.TblID = buf.DecodeUint32()
1512         m.VssType = VssType(buf.DecodeUint32())
1513         m.VPNAsciiID = buf.DecodeString(129)
1514         m.Oui = buf.DecodeUint32()
1515         m.VPNIndex = buf.DecodeUint32()
1516         m.IsIPv6 = buf.DecodeBool()
1517         m.IsAdd = buf.DecodeBool()
1518         return nil
1519 }
1520
1521 // DHCPProxySetVssReply defines message 'dhcp_proxy_set_vss_reply'.
1522 type DHCPProxySetVssReply struct {
1523         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1524 }
1525
1526 func (m *DHCPProxySetVssReply) Reset()               { *m = DHCPProxySetVssReply{} }
1527 func (*DHCPProxySetVssReply) GetMessageName() string { return "dhcp_proxy_set_vss_reply" }
1528 func (*DHCPProxySetVssReply) GetCrcString() string   { return "e8d4e804" }
1529 func (*DHCPProxySetVssReply) GetMessageType() api.MessageType {
1530         return api.ReplyMessage
1531 }
1532
1533 func (m *DHCPProxySetVssReply) Size() (size int) {
1534         if m == nil {
1535                 return 0
1536         }
1537         size += 4 // m.Retval
1538         return size
1539 }
1540 func (m *DHCPProxySetVssReply) Marshal(b []byte) ([]byte, error) {
1541         if b == nil {
1542                 b = make([]byte, m.Size())
1543         }
1544         buf := codec.NewBuffer(b)
1545         buf.EncodeInt32(m.Retval)
1546         return buf.Bytes(), nil
1547 }
1548 func (m *DHCPProxySetVssReply) Unmarshal(b []byte) error {
1549         buf := codec.NewBuffer(b)
1550         m.Retval = buf.DecodeInt32()
1551         return nil
1552 }
1553
1554 // WantDHCP6PdReplyEvents defines message 'want_dhcp6_pd_reply_events'.
1555 type WantDHCP6PdReplyEvents struct {
1556         EnableDisable bool   `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
1557         PID           uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
1558 }
1559
1560 func (m *WantDHCP6PdReplyEvents) Reset()               { *m = WantDHCP6PdReplyEvents{} }
1561 func (*WantDHCP6PdReplyEvents) GetMessageName() string { return "want_dhcp6_pd_reply_events" }
1562 func (*WantDHCP6PdReplyEvents) GetCrcString() string   { return "c5e2af94" }
1563 func (*WantDHCP6PdReplyEvents) GetMessageType() api.MessageType {
1564         return api.RequestMessage
1565 }
1566
1567 func (m *WantDHCP6PdReplyEvents) Size() (size int) {
1568         if m == nil {
1569                 return 0
1570         }
1571         size += 1 // m.EnableDisable
1572         size += 4 // m.PID
1573         return size
1574 }
1575 func (m *WantDHCP6PdReplyEvents) Marshal(b []byte) ([]byte, error) {
1576         if b == nil {
1577                 b = make([]byte, m.Size())
1578         }
1579         buf := codec.NewBuffer(b)
1580         buf.EncodeBool(m.EnableDisable)
1581         buf.EncodeUint32(m.PID)
1582         return buf.Bytes(), nil
1583 }
1584 func (m *WantDHCP6PdReplyEvents) Unmarshal(b []byte) error {
1585         buf := codec.NewBuffer(b)
1586         m.EnableDisable = buf.DecodeBool()
1587         m.PID = buf.DecodeUint32()
1588         return nil
1589 }
1590
1591 // WantDHCP6PdReplyEventsReply defines message 'want_dhcp6_pd_reply_events_reply'.
1592 type WantDHCP6PdReplyEventsReply struct {
1593         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1594 }
1595
1596 func (m *WantDHCP6PdReplyEventsReply) Reset() { *m = WantDHCP6PdReplyEventsReply{} }
1597 func (*WantDHCP6PdReplyEventsReply) GetMessageName() string {
1598         return "want_dhcp6_pd_reply_events_reply"
1599 }
1600 func (*WantDHCP6PdReplyEventsReply) GetCrcString() string { return "e8d4e804" }
1601 func (*WantDHCP6PdReplyEventsReply) GetMessageType() api.MessageType {
1602         return api.ReplyMessage
1603 }
1604
1605 func (m *WantDHCP6PdReplyEventsReply) Size() (size int) {
1606         if m == nil {
1607                 return 0
1608         }
1609         size += 4 // m.Retval
1610         return size
1611 }
1612 func (m *WantDHCP6PdReplyEventsReply) Marshal(b []byte) ([]byte, error) {
1613         if b == nil {
1614                 b = make([]byte, m.Size())
1615         }
1616         buf := codec.NewBuffer(b)
1617         buf.EncodeInt32(m.Retval)
1618         return buf.Bytes(), nil
1619 }
1620 func (m *WantDHCP6PdReplyEventsReply) Unmarshal(b []byte) error {
1621         buf := codec.NewBuffer(b)
1622         m.Retval = buf.DecodeInt32()
1623         return nil
1624 }
1625
1626 // WantDHCP6ReplyEvents defines message 'want_dhcp6_reply_events'.
1627 type WantDHCP6ReplyEvents struct {
1628         EnableDisable uint8  `binapi:"u8,name=enable_disable" json:"enable_disable,omitempty"`
1629         PID           uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
1630 }
1631
1632 func (m *WantDHCP6ReplyEvents) Reset()               { *m = WantDHCP6ReplyEvents{} }
1633 func (*WantDHCP6ReplyEvents) GetMessageName() string { return "want_dhcp6_reply_events" }
1634 func (*WantDHCP6ReplyEvents) GetCrcString() string   { return "05b454b5" }
1635 func (*WantDHCP6ReplyEvents) GetMessageType() api.MessageType {
1636         return api.RequestMessage
1637 }
1638
1639 func (m *WantDHCP6ReplyEvents) Size() (size int) {
1640         if m == nil {
1641                 return 0
1642         }
1643         size += 1 // m.EnableDisable
1644         size += 4 // m.PID
1645         return size
1646 }
1647 func (m *WantDHCP6ReplyEvents) Marshal(b []byte) ([]byte, error) {
1648         if b == nil {
1649                 b = make([]byte, m.Size())
1650         }
1651         buf := codec.NewBuffer(b)
1652         buf.EncodeUint8(m.EnableDisable)
1653         buf.EncodeUint32(m.PID)
1654         return buf.Bytes(), nil
1655 }
1656 func (m *WantDHCP6ReplyEvents) Unmarshal(b []byte) error {
1657         buf := codec.NewBuffer(b)
1658         m.EnableDisable = buf.DecodeUint8()
1659         m.PID = buf.DecodeUint32()
1660         return nil
1661 }
1662
1663 // WantDHCP6ReplyEventsReply defines message 'want_dhcp6_reply_events_reply'.
1664 type WantDHCP6ReplyEventsReply struct {
1665         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1666 }
1667
1668 func (m *WantDHCP6ReplyEventsReply) Reset()               { *m = WantDHCP6ReplyEventsReply{} }
1669 func (*WantDHCP6ReplyEventsReply) GetMessageName() string { return "want_dhcp6_reply_events_reply" }
1670 func (*WantDHCP6ReplyEventsReply) GetCrcString() string   { return "e8d4e804" }
1671 func (*WantDHCP6ReplyEventsReply) GetMessageType() api.MessageType {
1672         return api.ReplyMessage
1673 }
1674
1675 func (m *WantDHCP6ReplyEventsReply) Size() (size int) {
1676         if m == nil {
1677                 return 0
1678         }
1679         size += 4 // m.Retval
1680         return size
1681 }
1682 func (m *WantDHCP6ReplyEventsReply) Marshal(b []byte) ([]byte, error) {
1683         if b == nil {
1684                 b = make([]byte, m.Size())
1685         }
1686         buf := codec.NewBuffer(b)
1687         buf.EncodeInt32(m.Retval)
1688         return buf.Bytes(), nil
1689 }
1690 func (m *WantDHCP6ReplyEventsReply) Unmarshal(b []byte) error {
1691         buf := codec.NewBuffer(b)
1692         m.Retval = buf.DecodeInt32()
1693         return nil
1694 }
1695
1696 func init() { file_dhcp_binapi_init() }
1697 func file_dhcp_binapi_init() {
1698         api.RegisterMessage((*DHCP6ClientsEnableDisable)(nil), "dhcp6_clients_enable_disable_b3e225d2")
1699         api.RegisterMessage((*DHCP6ClientsEnableDisableReply)(nil), "dhcp6_clients_enable_disable_reply_e8d4e804")
1700         api.RegisterMessage((*DHCP6DuidLlSet)(nil), "dhcp6_duid_ll_set_0f6ca323")
1701         api.RegisterMessage((*DHCP6DuidLlSetReply)(nil), "dhcp6_duid_ll_set_reply_e8d4e804")
1702         api.RegisterMessage((*DHCP6PdReplyEvent)(nil), "dhcp6_pd_reply_event_cb3e462b")
1703         api.RegisterMessage((*DHCP6PdSendClientMessage)(nil), "dhcp6_pd_send_client_message_064badb8")
1704         api.RegisterMessage((*DHCP6PdSendClientMessageReply)(nil), "dhcp6_pd_send_client_message_reply_e8d4e804")
1705         api.RegisterMessage((*DHCP6ReplyEvent)(nil), "dhcp6_reply_event_9f3af9e5")
1706         api.RegisterMessage((*DHCP6SendClientMessage)(nil), "dhcp6_send_client_message_f6f14ef0")
1707         api.RegisterMessage((*DHCP6SendClientMessageReply)(nil), "dhcp6_send_client_message_reply_e8d4e804")
1708         api.RegisterMessage((*DHCPClientConfig)(nil), "dhcp_client_config_959b80a3")
1709         api.RegisterMessage((*DHCPClientConfigReply)(nil), "dhcp_client_config_reply_e8d4e804")
1710         api.RegisterMessage((*DHCPClientDetails)(nil), "dhcp_client_details_acd82f5a")
1711         api.RegisterMessage((*DHCPClientDump)(nil), "dhcp_client_dump_51077d14")
1712         api.RegisterMessage((*DHCPComplEvent)(nil), "dhcp_compl_event_e908fd1d")
1713         api.RegisterMessage((*DHCPPluginControlPing)(nil), "dhcp_plugin_control_ping_51077d14")
1714         api.RegisterMessage((*DHCPPluginControlPingReply)(nil), "dhcp_plugin_control_ping_reply_f6b0b8ca")
1715         api.RegisterMessage((*DHCPPluginGetVersion)(nil), "dhcp_plugin_get_version_51077d14")
1716         api.RegisterMessage((*DHCPPluginGetVersionReply)(nil), "dhcp_plugin_get_version_reply_9b32cf86")
1717         api.RegisterMessage((*DHCPProxyConfig)(nil), "dhcp_proxy_config_6767230e")
1718         api.RegisterMessage((*DHCPProxyConfigReply)(nil), "dhcp_proxy_config_reply_e8d4e804")
1719         api.RegisterMessage((*DHCPProxyDetails)(nil), "dhcp_proxy_details_ce16f044")
1720         api.RegisterMessage((*DHCPProxyDump)(nil), "dhcp_proxy_dump_5c5b063f")
1721         api.RegisterMessage((*DHCPProxySetVss)(nil), "dhcp_proxy_set_vss_50537301")
1722         api.RegisterMessage((*DHCPProxySetVssReply)(nil), "dhcp_proxy_set_vss_reply_e8d4e804")
1723         api.RegisterMessage((*WantDHCP6PdReplyEvents)(nil), "want_dhcp6_pd_reply_events_c5e2af94")
1724         api.RegisterMessage((*WantDHCP6PdReplyEventsReply)(nil), "want_dhcp6_pd_reply_events_reply_e8d4e804")
1725         api.RegisterMessage((*WantDHCP6ReplyEvents)(nil), "want_dhcp6_reply_events_05b454b5")
1726         api.RegisterMessage((*WantDHCP6ReplyEventsReply)(nil), "want_dhcp6_reply_events_reply_e8d4e804")
1727 }
1728
1729 // Messages returns list of all messages in this module.
1730 func AllMessages() []api.Message {
1731         return []api.Message{
1732                 (*DHCP6ClientsEnableDisable)(nil),
1733                 (*DHCP6ClientsEnableDisableReply)(nil),
1734                 (*DHCP6DuidLlSet)(nil),
1735                 (*DHCP6DuidLlSetReply)(nil),
1736                 (*DHCP6PdReplyEvent)(nil),
1737                 (*DHCP6PdSendClientMessage)(nil),
1738                 (*DHCP6PdSendClientMessageReply)(nil),
1739                 (*DHCP6ReplyEvent)(nil),
1740                 (*DHCP6SendClientMessage)(nil),
1741                 (*DHCP6SendClientMessageReply)(nil),
1742                 (*DHCPClientConfig)(nil),
1743                 (*DHCPClientConfigReply)(nil),
1744                 (*DHCPClientDetails)(nil),
1745                 (*DHCPClientDump)(nil),
1746                 (*DHCPComplEvent)(nil),
1747                 (*DHCPPluginControlPing)(nil),
1748                 (*DHCPPluginControlPingReply)(nil),
1749                 (*DHCPPluginGetVersion)(nil),
1750                 (*DHCPPluginGetVersionReply)(nil),
1751                 (*DHCPProxyConfig)(nil),
1752                 (*DHCPProxyConfigReply)(nil),
1753                 (*DHCPProxyDetails)(nil),
1754                 (*DHCPProxyDump)(nil),
1755                 (*DHCPProxySetVss)(nil),
1756                 (*DHCPProxySetVssReply)(nil),
1757                 (*WantDHCP6PdReplyEvents)(nil),
1758                 (*WantDHCP6PdReplyEventsReply)(nil),
1759                 (*WantDHCP6ReplyEvents)(nil),
1760                 (*WantDHCP6ReplyEventsReply)(nil),
1761         }
1762 }