go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2202/dhcp/dhcp.ba.go (about)

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