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