github.com/networkservicemesh/govpp@v0.0.0-20240328101142-8a444680fbba/binapi/ip6_nd/ip6_nd.ba.go (about)

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  // versions:
     3  //  binapi-generator: v0.10.0-dev
     4  //  VPP:              23.10-rc0~170-g6f1548434
     5  // source: core/ip6_nd.api.json
     6  
     7  // Package ip6_nd contains generated bindings for API file ip6_nd.api.
     8  //
     9  // Contents:
    10  // -  2 structs
    11  // - 17 messages
    12  package ip6_nd
    13  
    14  import (
    15  	interface_types "github.com/networkservicemesh/govpp/binapi/interface_types"
    16  	ip_types "github.com/networkservicemesh/govpp/binapi/ip_types"
    17  	api "go.fd.io/govpp/api"
    18  	codec "go.fd.io/govpp/codec"
    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    = "ip6_nd"
    29  	APIVersion = "1.1.0"
    30  	VersionCrc = 0x5f19a809
    31  )
    32  
    33  // IP6RaPrefixInfo defines type 'ip6_ra_prefix_info'.
    34  type IP6RaPrefixInfo struct {
    35  	Prefix        ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
    36  	Flags         uint8           `binapi:"u8,name=flags" json:"flags,omitempty"`
    37  	ValidTime     uint32          `binapi:"u32,name=valid_time" json:"valid_time,omitempty"`
    38  	PreferredTime uint32          `binapi:"u32,name=preferred_time" json:"preferred_time,omitempty"`
    39  }
    40  
    41  // IP6ndRaPrefix defines type 'ip6nd_ra_prefix'.
    42  type IP6ndRaPrefix struct {
    43  	Prefix                ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
    44  	OnlinkFlag            bool            `binapi:"bool,name=onlink_flag" json:"onlink_flag,omitempty"`
    45  	AutonomousFlag        bool            `binapi:"bool,name=autonomous_flag" json:"autonomous_flag,omitempty"`
    46  	ValLifetime           uint32          `binapi:"u32,name=val_lifetime" json:"val_lifetime,omitempty"`
    47  	PrefLifetime          uint32          `binapi:"u32,name=pref_lifetime" json:"pref_lifetime,omitempty"`
    48  	ValidLifetimeExpires  float64         `binapi:"f64,name=valid_lifetime_expires" json:"valid_lifetime_expires,omitempty"`
    49  	PrefLifetimeExpires   float64         `binapi:"f64,name=pref_lifetime_expires" json:"pref_lifetime_expires,omitempty"`
    50  	DecrementLifetimeFlag bool            `binapi:"bool,name=decrement_lifetime_flag" json:"decrement_lifetime_flag,omitempty"`
    51  	NoAdvertise           bool            `binapi:"bool,name=no_advertise" json:"no_advertise,omitempty"`
    52  }
    53  
    54  // Tell client about a router advertisement event
    55  //   - pid - client pid registered to receive notification
    56  //   - current_hop_limit - RA current hop limit
    57  //   - flags - RA flags
    58  //   - router_lifetime_in_sec - RA lifetime in seconds
    59  //   - router_addr - The router's address
    60  //   - neighbor_reachable_time_in_msec - RA neighbor reachable time in msec
    61  //   - time_in_msec_between_retransmitted_neighbor_solicitations -
    62  //     time in msec between retransmitted neighbor solicitations
    63  //   - n_prefixes -
    64  //   - prefixes -
    65  //
    66  // IP6RaEvent defines message 'ip6_ra_event'.
    67  type IP6RaEvent struct {
    68  	PID                                                 uint32                         `binapi:"u32,name=pid" json:"pid,omitempty"`
    69  	SwIfIndex                                           interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
    70  	RouterAddr                                          ip_types.IP6Address            `binapi:"ip6_address,name=router_addr" json:"router_addr,omitempty"`
    71  	CurrentHopLimit                                     uint8                          `binapi:"u8,name=current_hop_limit" json:"current_hop_limit,omitempty"`
    72  	Flags                                               uint8                          `binapi:"u8,name=flags" json:"flags,omitempty"`
    73  	RouterLifetimeInSec                                 uint16                         `binapi:"u16,name=router_lifetime_in_sec" json:"router_lifetime_in_sec,omitempty"`
    74  	NeighborReachableTimeInMsec                         uint32                         `binapi:"u32,name=neighbor_reachable_time_in_msec" json:"neighbor_reachable_time_in_msec,omitempty"`
    75  	TimeInMsecBetweenRetransmittedNeighborSolicitations uint32                         `binapi:"u32,name=time_in_msec_between_retransmitted_neighbor_solicitations" json:"time_in_msec_between_retransmitted_neighbor_solicitations,omitempty"`
    76  	NPrefixes                                           uint32                         `binapi:"u32,name=n_prefixes" json:"-"`
    77  	Prefixes                                            []IP6RaPrefixInfo              `binapi:"ip6_ra_prefix_info[n_prefixes],name=prefixes" json:"prefixes,omitempty"`
    78  }
    79  
    80  func (m *IP6RaEvent) Reset()               { *m = IP6RaEvent{} }
    81  func (*IP6RaEvent) GetMessageName() string { return "ip6_ra_event" }
    82  func (*IP6RaEvent) GetCrcString() string   { return "0364c1c5" }
    83  func (*IP6RaEvent) GetMessageType() api.MessageType {
    84  	return api.EventMessage
    85  }
    86  
    87  func (m *IP6RaEvent) Size() (size int) {
    88  	if m == nil {
    89  		return 0
    90  	}
    91  	size += 4      // m.PID
    92  	size += 4      // m.SwIfIndex
    93  	size += 1 * 16 // m.RouterAddr
    94  	size += 1      // m.CurrentHopLimit
    95  	size += 1      // m.Flags
    96  	size += 2      // m.RouterLifetimeInSec
    97  	size += 4      // m.NeighborReachableTimeInMsec
    98  	size += 4      // m.TimeInMsecBetweenRetransmittedNeighborSolicitations
    99  	size += 4      // m.NPrefixes
   100  	for j1 := 0; j1 < len(m.Prefixes); j1++ {
   101  		var s1 IP6RaPrefixInfo
   102  		_ = s1
   103  		if j1 < len(m.Prefixes) {
   104  			s1 = m.Prefixes[j1]
   105  		}
   106  		size += 1      // s1.Prefix.Address.Af
   107  		size += 1 * 16 // s1.Prefix.Address.Un
   108  		size += 1      // s1.Prefix.Len
   109  		size += 1      // s1.Flags
   110  		size += 4      // s1.ValidTime
   111  		size += 4      // s1.PreferredTime
   112  	}
   113  	return size
   114  }
   115  func (m *IP6RaEvent) Marshal(b []byte) ([]byte, error) {
   116  	if b == nil {
   117  		b = make([]byte, m.Size())
   118  	}
   119  	buf := codec.NewBuffer(b)
   120  	buf.EncodeUint32(m.PID)
   121  	buf.EncodeUint32(uint32(m.SwIfIndex))
   122  	buf.EncodeBytes(m.RouterAddr[:], 16)
   123  	buf.EncodeUint8(m.CurrentHopLimit)
   124  	buf.EncodeUint8(m.Flags)
   125  	buf.EncodeUint16(m.RouterLifetimeInSec)
   126  	buf.EncodeUint32(m.NeighborReachableTimeInMsec)
   127  	buf.EncodeUint32(m.TimeInMsecBetweenRetransmittedNeighborSolicitations)
   128  	buf.EncodeUint32(uint32(len(m.Prefixes)))
   129  	for j0 := 0; j0 < len(m.Prefixes); j0++ {
   130  		var v0 IP6RaPrefixInfo // Prefixes
   131  		if j0 < len(m.Prefixes) {
   132  			v0 = m.Prefixes[j0]
   133  		}
   134  		buf.EncodeUint8(uint8(v0.Prefix.Address.Af))
   135  		buf.EncodeBytes(v0.Prefix.Address.Un.XXX_UnionData[:], 16)
   136  		buf.EncodeUint8(v0.Prefix.Len)
   137  		buf.EncodeUint8(v0.Flags)
   138  		buf.EncodeUint32(v0.ValidTime)
   139  		buf.EncodeUint32(v0.PreferredTime)
   140  	}
   141  	return buf.Bytes(), nil
   142  }
   143  func (m *IP6RaEvent) Unmarshal(b []byte) error {
   144  	buf := codec.NewBuffer(b)
   145  	m.PID = buf.DecodeUint32()
   146  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   147  	copy(m.RouterAddr[:], buf.DecodeBytes(16))
   148  	m.CurrentHopLimit = buf.DecodeUint8()
   149  	m.Flags = buf.DecodeUint8()
   150  	m.RouterLifetimeInSec = buf.DecodeUint16()
   151  	m.NeighborReachableTimeInMsec = buf.DecodeUint32()
   152  	m.TimeInMsecBetweenRetransmittedNeighborSolicitations = buf.DecodeUint32()
   153  	m.NPrefixes = buf.DecodeUint32()
   154  	m.Prefixes = make([]IP6RaPrefixInfo, m.NPrefixes)
   155  	for j0 := 0; j0 < len(m.Prefixes); j0++ {
   156  		m.Prefixes[j0].Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
   157  		copy(m.Prefixes[j0].Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   158  		m.Prefixes[j0].Prefix.Len = buf.DecodeUint8()
   159  		m.Prefixes[j0].Flags = buf.DecodeUint8()
   160  		m.Prefixes[j0].ValidTime = buf.DecodeUint32()
   161  		m.Prefixes[j0].PreferredTime = buf.DecodeUint32()
   162  	}
   163  	return nil
   164  }
   165  
   166  // IPv6 ND proxy config
   167  //   - sw_if_index - The interface the host is on
   168  //   - ip - The address of the host for which to proxy for
   169  //   - is_add - Adding or deleting
   170  //
   171  // IP6ndProxyAddDel defines message 'ip6nd_proxy_add_del'.
   172  type IP6ndProxyAddDel struct {
   173  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   174  	IsAdd     bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
   175  	IP        ip_types.IP6Address            `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
   176  }
   177  
   178  func (m *IP6ndProxyAddDel) Reset()               { *m = IP6ndProxyAddDel{} }
   179  func (*IP6ndProxyAddDel) GetMessageName() string { return "ip6nd_proxy_add_del" }
   180  func (*IP6ndProxyAddDel) GetCrcString() string   { return "c2e4a686" }
   181  func (*IP6ndProxyAddDel) GetMessageType() api.MessageType {
   182  	return api.RequestMessage
   183  }
   184  
   185  func (m *IP6ndProxyAddDel) Size() (size int) {
   186  	if m == nil {
   187  		return 0
   188  	}
   189  	size += 4      // m.SwIfIndex
   190  	size += 1      // m.IsAdd
   191  	size += 1 * 16 // m.IP
   192  	return size
   193  }
   194  func (m *IP6ndProxyAddDel) Marshal(b []byte) ([]byte, error) {
   195  	if b == nil {
   196  		b = make([]byte, m.Size())
   197  	}
   198  	buf := codec.NewBuffer(b)
   199  	buf.EncodeUint32(uint32(m.SwIfIndex))
   200  	buf.EncodeBool(m.IsAdd)
   201  	buf.EncodeBytes(m.IP[:], 16)
   202  	return buf.Bytes(), nil
   203  }
   204  func (m *IP6ndProxyAddDel) Unmarshal(b []byte) error {
   205  	buf := codec.NewBuffer(b)
   206  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   207  	m.IsAdd = buf.DecodeBool()
   208  	copy(m.IP[:], buf.DecodeBytes(16))
   209  	return nil
   210  }
   211  
   212  // IP6ndProxyAddDelReply defines message 'ip6nd_proxy_add_del_reply'.
   213  type IP6ndProxyAddDelReply struct {
   214  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   215  }
   216  
   217  func (m *IP6ndProxyAddDelReply) Reset()               { *m = IP6ndProxyAddDelReply{} }
   218  func (*IP6ndProxyAddDelReply) GetMessageName() string { return "ip6nd_proxy_add_del_reply" }
   219  func (*IP6ndProxyAddDelReply) GetCrcString() string   { return "e8d4e804" }
   220  func (*IP6ndProxyAddDelReply) GetMessageType() api.MessageType {
   221  	return api.ReplyMessage
   222  }
   223  
   224  func (m *IP6ndProxyAddDelReply) Size() (size int) {
   225  	if m == nil {
   226  		return 0
   227  	}
   228  	size += 4 // m.Retval
   229  	return size
   230  }
   231  func (m *IP6ndProxyAddDelReply) Marshal(b []byte) ([]byte, error) {
   232  	if b == nil {
   233  		b = make([]byte, m.Size())
   234  	}
   235  	buf := codec.NewBuffer(b)
   236  	buf.EncodeInt32(m.Retval)
   237  	return buf.Bytes(), nil
   238  }
   239  func (m *IP6ndProxyAddDelReply) Unmarshal(b []byte) error {
   240  	buf := codec.NewBuffer(b)
   241  	m.Retval = buf.DecodeInt32()
   242  	return nil
   243  }
   244  
   245  // IPv6 ND proxy details returned after request
   246  //   - sw_if_index - The interface the host is on
   247  //   - ip - The address of the host for which to proxy for
   248  //
   249  // IP6ndProxyDetails defines message 'ip6nd_proxy_details'.
   250  type IP6ndProxyDetails struct {
   251  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   252  	IP        ip_types.IP6Address            `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
   253  }
   254  
   255  func (m *IP6ndProxyDetails) Reset()               { *m = IP6ndProxyDetails{} }
   256  func (*IP6ndProxyDetails) GetMessageName() string { return "ip6nd_proxy_details" }
   257  func (*IP6ndProxyDetails) GetCrcString() string   { return "30b9ff4a" }
   258  func (*IP6ndProxyDetails) GetMessageType() api.MessageType {
   259  	return api.ReplyMessage
   260  }
   261  
   262  func (m *IP6ndProxyDetails) Size() (size int) {
   263  	if m == nil {
   264  		return 0
   265  	}
   266  	size += 4      // m.SwIfIndex
   267  	size += 1 * 16 // m.IP
   268  	return size
   269  }
   270  func (m *IP6ndProxyDetails) Marshal(b []byte) ([]byte, error) {
   271  	if b == nil {
   272  		b = make([]byte, m.Size())
   273  	}
   274  	buf := codec.NewBuffer(b)
   275  	buf.EncodeUint32(uint32(m.SwIfIndex))
   276  	buf.EncodeBytes(m.IP[:], 16)
   277  	return buf.Bytes(), nil
   278  }
   279  func (m *IP6ndProxyDetails) Unmarshal(b []byte) error {
   280  	buf := codec.NewBuffer(b)
   281  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   282  	copy(m.IP[:], buf.DecodeBytes(16))
   283  	return nil
   284  }
   285  
   286  // IPv6 ND proxy dump request
   287  // IP6ndProxyDump defines message 'ip6nd_proxy_dump'.
   288  type IP6ndProxyDump struct{}
   289  
   290  func (m *IP6ndProxyDump) Reset()               { *m = IP6ndProxyDump{} }
   291  func (*IP6ndProxyDump) GetMessageName() string { return "ip6nd_proxy_dump" }
   292  func (*IP6ndProxyDump) GetCrcString() string   { return "51077d14" }
   293  func (*IP6ndProxyDump) GetMessageType() api.MessageType {
   294  	return api.RequestMessage
   295  }
   296  
   297  func (m *IP6ndProxyDump) Size() (size int) {
   298  	if m == nil {
   299  		return 0
   300  	}
   301  	return size
   302  }
   303  func (m *IP6ndProxyDump) Marshal(b []byte) ([]byte, error) {
   304  	if b == nil {
   305  		b = make([]byte, m.Size())
   306  	}
   307  	buf := codec.NewBuffer(b)
   308  	return buf.Bytes(), nil
   309  }
   310  func (m *IP6ndProxyDump) Unmarshal(b []byte) error {
   311  	return nil
   312  }
   313  
   314  // IPv6 ND (mirror) proxy
   315  //   - sw_if_index - The interface the host is on
   316  //   - is_enable - enable or disable
   317  //
   318  // IP6ndProxyEnableDisable defines message 'ip6nd_proxy_enable_disable'.
   319  type IP6ndProxyEnableDisable struct {
   320  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   321  	IsEnable  bool                           `binapi:"bool,name=is_enable" json:"is_enable,omitempty"`
   322  }
   323  
   324  func (m *IP6ndProxyEnableDisable) Reset()               { *m = IP6ndProxyEnableDisable{} }
   325  func (*IP6ndProxyEnableDisable) GetMessageName() string { return "ip6nd_proxy_enable_disable" }
   326  func (*IP6ndProxyEnableDisable) GetCrcString() string   { return "7daa1e3a" }
   327  func (*IP6ndProxyEnableDisable) GetMessageType() api.MessageType {
   328  	return api.RequestMessage
   329  }
   330  
   331  func (m *IP6ndProxyEnableDisable) Size() (size int) {
   332  	if m == nil {
   333  		return 0
   334  	}
   335  	size += 4 // m.SwIfIndex
   336  	size += 1 // m.IsEnable
   337  	return size
   338  }
   339  func (m *IP6ndProxyEnableDisable) Marshal(b []byte) ([]byte, error) {
   340  	if b == nil {
   341  		b = make([]byte, m.Size())
   342  	}
   343  	buf := codec.NewBuffer(b)
   344  	buf.EncodeUint32(uint32(m.SwIfIndex))
   345  	buf.EncodeBool(m.IsEnable)
   346  	return buf.Bytes(), nil
   347  }
   348  func (m *IP6ndProxyEnableDisable) Unmarshal(b []byte) error {
   349  	buf := codec.NewBuffer(b)
   350  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   351  	m.IsEnable = buf.DecodeBool()
   352  	return nil
   353  }
   354  
   355  // IP6ndProxyEnableDisableReply defines message 'ip6nd_proxy_enable_disable_reply'.
   356  type IP6ndProxyEnableDisableReply struct {
   357  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   358  }
   359  
   360  func (m *IP6ndProxyEnableDisableReply) Reset() { *m = IP6ndProxyEnableDisableReply{} }
   361  func (*IP6ndProxyEnableDisableReply) GetMessageName() string {
   362  	return "ip6nd_proxy_enable_disable_reply"
   363  }
   364  func (*IP6ndProxyEnableDisableReply) GetCrcString() string { return "e8d4e804" }
   365  func (*IP6ndProxyEnableDisableReply) GetMessageType() api.MessageType {
   366  	return api.ReplyMessage
   367  }
   368  
   369  func (m *IP6ndProxyEnableDisableReply) Size() (size int) {
   370  	if m == nil {
   371  		return 0
   372  	}
   373  	size += 4 // m.Retval
   374  	return size
   375  }
   376  func (m *IP6ndProxyEnableDisableReply) Marshal(b []byte) ([]byte, error) {
   377  	if b == nil {
   378  		b = make([]byte, m.Size())
   379  	}
   380  	buf := codec.NewBuffer(b)
   381  	buf.EncodeInt32(m.Retval)
   382  	return buf.Bytes(), nil
   383  }
   384  func (m *IP6ndProxyEnableDisableReply) Unmarshal(b []byte) error {
   385  	buf := codec.NewBuffer(b)
   386  	m.Retval = buf.DecodeInt32()
   387  	return nil
   388  }
   389  
   390  // Start / stop sending router solicitation
   391  //   - irt - initial retransmission time
   392  //   - mrt - maximum retransmission time
   393  //   - mrc - maximum retransmission count
   394  //   - mrd - maximum retransmission duration
   395  //   - sw_if_index - software interface index of interface
   396  //     for sending router solicitation
   397  //   - stop - if non-zero then stop sending router solicitation,
   398  //     otherwise start sending router solicitation
   399  //
   400  // IP6ndSendRouterSolicitation defines message 'ip6nd_send_router_solicitation'.
   401  type IP6ndSendRouterSolicitation struct {
   402  	Irt       uint32                         `binapi:"u32,name=irt" json:"irt,omitempty"`
   403  	Mrt       uint32                         `binapi:"u32,name=mrt" json:"mrt,omitempty"`
   404  	Mrc       uint32                         `binapi:"u32,name=mrc" json:"mrc,omitempty"`
   405  	Mrd       uint32                         `binapi:"u32,name=mrd" json:"mrd,omitempty"`
   406  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   407  	Stop      bool                           `binapi:"bool,name=stop" json:"stop,omitempty"`
   408  }
   409  
   410  func (m *IP6ndSendRouterSolicitation) Reset()               { *m = IP6ndSendRouterSolicitation{} }
   411  func (*IP6ndSendRouterSolicitation) GetMessageName() string { return "ip6nd_send_router_solicitation" }
   412  func (*IP6ndSendRouterSolicitation) GetCrcString() string   { return "e5de609c" }
   413  func (*IP6ndSendRouterSolicitation) GetMessageType() api.MessageType {
   414  	return api.RequestMessage
   415  }
   416  
   417  func (m *IP6ndSendRouterSolicitation) Size() (size int) {
   418  	if m == nil {
   419  		return 0
   420  	}
   421  	size += 4 // m.Irt
   422  	size += 4 // m.Mrt
   423  	size += 4 // m.Mrc
   424  	size += 4 // m.Mrd
   425  	size += 4 // m.SwIfIndex
   426  	size += 1 // m.Stop
   427  	return size
   428  }
   429  func (m *IP6ndSendRouterSolicitation) Marshal(b []byte) ([]byte, error) {
   430  	if b == nil {
   431  		b = make([]byte, m.Size())
   432  	}
   433  	buf := codec.NewBuffer(b)
   434  	buf.EncodeUint32(m.Irt)
   435  	buf.EncodeUint32(m.Mrt)
   436  	buf.EncodeUint32(m.Mrc)
   437  	buf.EncodeUint32(m.Mrd)
   438  	buf.EncodeUint32(uint32(m.SwIfIndex))
   439  	buf.EncodeBool(m.Stop)
   440  	return buf.Bytes(), nil
   441  }
   442  func (m *IP6ndSendRouterSolicitation) Unmarshal(b []byte) error {
   443  	buf := codec.NewBuffer(b)
   444  	m.Irt = buf.DecodeUint32()
   445  	m.Mrt = buf.DecodeUint32()
   446  	m.Mrc = buf.DecodeUint32()
   447  	m.Mrd = buf.DecodeUint32()
   448  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   449  	m.Stop = buf.DecodeBool()
   450  	return nil
   451  }
   452  
   453  // IP6ndSendRouterSolicitationReply defines message 'ip6nd_send_router_solicitation_reply'.
   454  type IP6ndSendRouterSolicitationReply struct {
   455  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   456  }
   457  
   458  func (m *IP6ndSendRouterSolicitationReply) Reset() { *m = IP6ndSendRouterSolicitationReply{} }
   459  func (*IP6ndSendRouterSolicitationReply) GetMessageName() string {
   460  	return "ip6nd_send_router_solicitation_reply"
   461  }
   462  func (*IP6ndSendRouterSolicitationReply) GetCrcString() string { return "e8d4e804" }
   463  func (*IP6ndSendRouterSolicitationReply) GetMessageType() api.MessageType {
   464  	return api.ReplyMessage
   465  }
   466  
   467  func (m *IP6ndSendRouterSolicitationReply) Size() (size int) {
   468  	if m == nil {
   469  		return 0
   470  	}
   471  	size += 4 // m.Retval
   472  	return size
   473  }
   474  func (m *IP6ndSendRouterSolicitationReply) Marshal(b []byte) ([]byte, error) {
   475  	if b == nil {
   476  		b = make([]byte, m.Size())
   477  	}
   478  	buf := codec.NewBuffer(b)
   479  	buf.EncodeInt32(m.Retval)
   480  	return buf.Bytes(), nil
   481  }
   482  func (m *IP6ndSendRouterSolicitationReply) Unmarshal(b []byte) error {
   483  	buf := codec.NewBuffer(b)
   484  	m.Retval = buf.DecodeInt32()
   485  	return nil
   486  }
   487  
   488  // IPv6 router advertisement config request
   489  //   - suppress -
   490  //   - managed -
   491  //   - other -
   492  //   - ll_option -
   493  //   - send_unicast -
   494  //   - cease -
   495  //   - is_no -
   496  //   - default_router -
   497  //   - max_interval -
   498  //   - min_interval -
   499  //   - lifetime -
   500  //   - initial_count -
   501  //   - initial_interval -
   502  //
   503  // SwInterfaceIP6ndRaConfig defines message 'sw_interface_ip6nd_ra_config'.
   504  type SwInterfaceIP6ndRaConfig struct {
   505  	SwIfIndex       interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   506  	Suppress        uint8                          `binapi:"u8,name=suppress" json:"suppress,omitempty"`
   507  	Managed         uint8                          `binapi:"u8,name=managed" json:"managed,omitempty"`
   508  	Other           uint8                          `binapi:"u8,name=other" json:"other,omitempty"`
   509  	LlOption        uint8                          `binapi:"u8,name=ll_option" json:"ll_option,omitempty"`
   510  	SendUnicast     uint8                          `binapi:"u8,name=send_unicast" json:"send_unicast,omitempty"`
   511  	Cease           uint8                          `binapi:"u8,name=cease" json:"cease,omitempty"`
   512  	IsNo            bool                           `binapi:"bool,name=is_no" json:"is_no,omitempty"`
   513  	DefaultRouter   uint8                          `binapi:"u8,name=default_router" json:"default_router,omitempty"`
   514  	MaxInterval     uint32                         `binapi:"u32,name=max_interval" json:"max_interval,omitempty"`
   515  	MinInterval     uint32                         `binapi:"u32,name=min_interval" json:"min_interval,omitempty"`
   516  	Lifetime        uint32                         `binapi:"u32,name=lifetime" json:"lifetime,omitempty"`
   517  	InitialCount    uint32                         `binapi:"u32,name=initial_count" json:"initial_count,omitempty"`
   518  	InitialInterval uint32                         `binapi:"u32,name=initial_interval" json:"initial_interval,omitempty"`
   519  }
   520  
   521  func (m *SwInterfaceIP6ndRaConfig) Reset()               { *m = SwInterfaceIP6ndRaConfig{} }
   522  func (*SwInterfaceIP6ndRaConfig) GetMessageName() string { return "sw_interface_ip6nd_ra_config" }
   523  func (*SwInterfaceIP6ndRaConfig) GetCrcString() string   { return "3eb00b1c" }
   524  func (*SwInterfaceIP6ndRaConfig) GetMessageType() api.MessageType {
   525  	return api.RequestMessage
   526  }
   527  
   528  func (m *SwInterfaceIP6ndRaConfig) Size() (size int) {
   529  	if m == nil {
   530  		return 0
   531  	}
   532  	size += 4 // m.SwIfIndex
   533  	size += 1 // m.Suppress
   534  	size += 1 // m.Managed
   535  	size += 1 // m.Other
   536  	size += 1 // m.LlOption
   537  	size += 1 // m.SendUnicast
   538  	size += 1 // m.Cease
   539  	size += 1 // m.IsNo
   540  	size += 1 // m.DefaultRouter
   541  	size += 4 // m.MaxInterval
   542  	size += 4 // m.MinInterval
   543  	size += 4 // m.Lifetime
   544  	size += 4 // m.InitialCount
   545  	size += 4 // m.InitialInterval
   546  	return size
   547  }
   548  func (m *SwInterfaceIP6ndRaConfig) Marshal(b []byte) ([]byte, error) {
   549  	if b == nil {
   550  		b = make([]byte, m.Size())
   551  	}
   552  	buf := codec.NewBuffer(b)
   553  	buf.EncodeUint32(uint32(m.SwIfIndex))
   554  	buf.EncodeUint8(m.Suppress)
   555  	buf.EncodeUint8(m.Managed)
   556  	buf.EncodeUint8(m.Other)
   557  	buf.EncodeUint8(m.LlOption)
   558  	buf.EncodeUint8(m.SendUnicast)
   559  	buf.EncodeUint8(m.Cease)
   560  	buf.EncodeBool(m.IsNo)
   561  	buf.EncodeUint8(m.DefaultRouter)
   562  	buf.EncodeUint32(m.MaxInterval)
   563  	buf.EncodeUint32(m.MinInterval)
   564  	buf.EncodeUint32(m.Lifetime)
   565  	buf.EncodeUint32(m.InitialCount)
   566  	buf.EncodeUint32(m.InitialInterval)
   567  	return buf.Bytes(), nil
   568  }
   569  func (m *SwInterfaceIP6ndRaConfig) Unmarshal(b []byte) error {
   570  	buf := codec.NewBuffer(b)
   571  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   572  	m.Suppress = buf.DecodeUint8()
   573  	m.Managed = buf.DecodeUint8()
   574  	m.Other = buf.DecodeUint8()
   575  	m.LlOption = buf.DecodeUint8()
   576  	m.SendUnicast = buf.DecodeUint8()
   577  	m.Cease = buf.DecodeUint8()
   578  	m.IsNo = buf.DecodeBool()
   579  	m.DefaultRouter = buf.DecodeUint8()
   580  	m.MaxInterval = buf.DecodeUint32()
   581  	m.MinInterval = buf.DecodeUint32()
   582  	m.Lifetime = buf.DecodeUint32()
   583  	m.InitialCount = buf.DecodeUint32()
   584  	m.InitialInterval = buf.DecodeUint32()
   585  	return nil
   586  }
   587  
   588  // SwInterfaceIP6ndRaConfigReply defines message 'sw_interface_ip6nd_ra_config_reply'.
   589  type SwInterfaceIP6ndRaConfigReply struct {
   590  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   591  }
   592  
   593  func (m *SwInterfaceIP6ndRaConfigReply) Reset() { *m = SwInterfaceIP6ndRaConfigReply{} }
   594  func (*SwInterfaceIP6ndRaConfigReply) GetMessageName() string {
   595  	return "sw_interface_ip6nd_ra_config_reply"
   596  }
   597  func (*SwInterfaceIP6ndRaConfigReply) GetCrcString() string { return "e8d4e804" }
   598  func (*SwInterfaceIP6ndRaConfigReply) GetMessageType() api.MessageType {
   599  	return api.ReplyMessage
   600  }
   601  
   602  func (m *SwInterfaceIP6ndRaConfigReply) Size() (size int) {
   603  	if m == nil {
   604  		return 0
   605  	}
   606  	size += 4 // m.Retval
   607  	return size
   608  }
   609  func (m *SwInterfaceIP6ndRaConfigReply) Marshal(b []byte) ([]byte, error) {
   610  	if b == nil {
   611  		b = make([]byte, m.Size())
   612  	}
   613  	buf := codec.NewBuffer(b)
   614  	buf.EncodeInt32(m.Retval)
   615  	return buf.Bytes(), nil
   616  }
   617  func (m *SwInterfaceIP6ndRaConfigReply) Unmarshal(b []byte) error {
   618  	buf := codec.NewBuffer(b)
   619  	m.Retval = buf.DecodeInt32()
   620  	return nil
   621  }
   622  
   623  // Details on IPv6 Router Advertisements for a single interface
   624  //   - sw_if_index - interface index the details are belong to
   625  //   - cur_hop_limit - current hop limit
   626  //   - adv_managed_flag - if true, enable DHCP for address
   627  //   - adv_other_flag - if true, Enable DHCP for other information
   628  //   - adv_router_lifetime - lifetime associated with the default router in
   629  //     seconds (zero indicates that the router is not
   630  //     a default router)
   631  //   - adv_neighbor_reachable_time - number of milliseconds within which a
   632  //     neighbor is assumed to be reachable
   633  //     (zero means unspecified)
   634  //   - adv_retransmit_interval - number of milliseconds between
   635  //     retransmitted Neighbor Solicitation
   636  //     messages (zero means unspecified)
   637  //   - adv_link_mtu - MTU that all the nodes on a link use
   638  //   - send_radv - if true, send periodic Router Advertisements
   639  //   - cease_radv - if true, cease to send periodic Router Advertisements
   640  //   - send_unicast - if true, destination address of a Router
   641  //     Advertisement message will use the source address of
   642  //     the Router Solicitation message (when available).
   643  //     Otherwise, multicast address will be used
   644  //   - adv_link_layer_address - if true, add link layer address option
   645  //   - max_radv_interval - maximum time in seconds allowed between sending
   646  //     unsolicited multicast Router Advertisements
   647  //   - min_radv_interval - minimum time in seconds allowed between sending
   648  //     unsolicited multicast Router Advertisements
   649  //   - last_radv_time - number of seconds since the last time a solicited
   650  //     Router Advertisement message was sent (zero means
   651  //     never)
   652  //   - last_multicast_time - number of seconds since the last time a
   653  //     multicast Router Advertisements message was
   654  //     sent (zero means never)
   655  //   - next_multicast_time - number of seconds within which next time a
   656  //     multicast Router Advertisement message will be
   657  //     sent (zero means never)
   658  //   - initial_adverts_count - number of initial Router Advertisement
   659  //     messages to send
   660  //   - initial_adverts_interval - number of seconds between initial Router
   661  //     Advertisement messages
   662  //   - initial_adverts_sent - if true, all initial Router Advertisement
   663  //     messages were sent
   664  //   - n_advertisements_sent - number of Router Advertisements sent
   665  //   - n_solicitations_rcvd - number of Router Solicitations received
   666  //   - n_solicitations_dropped - number of Router Solicitations dropped
   667  //   - n_prefixes - number of prefix entries
   668  //   - prefixes - array of prefix entries
   669  //
   670  // SwInterfaceIP6ndRaDetails defines message 'sw_interface_ip6nd_ra_details'.
   671  // InProgress: the message form may change in the future versions
   672  type SwInterfaceIP6ndRaDetails struct {
   673  	SwIfIndex                interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   674  	CurHopLimit              uint8                          `binapi:"u8,name=cur_hop_limit" json:"cur_hop_limit,omitempty"`
   675  	AdvManagedFlag           bool                           `binapi:"bool,name=adv_managed_flag" json:"adv_managed_flag,omitempty"`
   676  	AdvOtherFlag             bool                           `binapi:"bool,name=adv_other_flag" json:"adv_other_flag,omitempty"`
   677  	AdvRouterLifetime        uint16                         `binapi:"u16,name=adv_router_lifetime" json:"adv_router_lifetime,omitempty"`
   678  	AdvNeighborReachableTime uint32                         `binapi:"u32,name=adv_neighbor_reachable_time" json:"adv_neighbor_reachable_time,omitempty"`
   679  	AdvRetransmitInterval    uint32                         `binapi:"u32,name=adv_retransmit_interval" json:"adv_retransmit_interval,omitempty"`
   680  	AdvLinkMtu               uint32                         `binapi:"u32,name=adv_link_mtu" json:"adv_link_mtu,omitempty"`
   681  	SendRadv                 bool                           `binapi:"bool,name=send_radv" json:"send_radv,omitempty"`
   682  	CeaseRadv                bool                           `binapi:"bool,name=cease_radv" json:"cease_radv,omitempty"`
   683  	SendUnicast              bool                           `binapi:"bool,name=send_unicast" json:"send_unicast,omitempty"`
   684  	AdvLinkLayerAddress      bool                           `binapi:"bool,name=adv_link_layer_address" json:"adv_link_layer_address,omitempty"`
   685  	MaxRadvInterval          float64                        `binapi:"f64,name=max_radv_interval" json:"max_radv_interval,omitempty"`
   686  	MinRadvInterval          float64                        `binapi:"f64,name=min_radv_interval" json:"min_radv_interval,omitempty"`
   687  	LastRadvTime             float64                        `binapi:"f64,name=last_radv_time" json:"last_radv_time,omitempty"`
   688  	LastMulticastTime        float64                        `binapi:"f64,name=last_multicast_time" json:"last_multicast_time,omitempty"`
   689  	NextMulticastTime        float64                        `binapi:"f64,name=next_multicast_time" json:"next_multicast_time,omitempty"`
   690  	InitialAdvertsCount      uint32                         `binapi:"u32,name=initial_adverts_count" json:"initial_adverts_count,omitempty"`
   691  	InitialAdvertsInterval   float64                        `binapi:"f64,name=initial_adverts_interval" json:"initial_adverts_interval,omitempty"`
   692  	InitialAdvertsSent       bool                           `binapi:"bool,name=initial_adverts_sent" json:"initial_adverts_sent,omitempty"`
   693  	NAdvertisementsSent      uint32                         `binapi:"u32,name=n_advertisements_sent" json:"n_advertisements_sent,omitempty"`
   694  	NSolicitationsRcvd       uint32                         `binapi:"u32,name=n_solicitations_rcvd" json:"n_solicitations_rcvd,omitempty"`
   695  	NSolicitationsDropped    uint32                         `binapi:"u32,name=n_solicitations_dropped" json:"n_solicitations_dropped,omitempty"`
   696  	NPrefixes                uint32                         `binapi:"u32,name=n_prefixes" json:"-"`
   697  	Prefixes                 []IP6ndRaPrefix                `binapi:"ip6nd_ra_prefix[n_prefixes],name=prefixes" json:"prefixes,omitempty"`
   698  }
   699  
   700  func (m *SwInterfaceIP6ndRaDetails) Reset()               { *m = SwInterfaceIP6ndRaDetails{} }
   701  func (*SwInterfaceIP6ndRaDetails) GetMessageName() string { return "sw_interface_ip6nd_ra_details" }
   702  func (*SwInterfaceIP6ndRaDetails) GetCrcString() string   { return "d3198de5" }
   703  func (*SwInterfaceIP6ndRaDetails) GetMessageType() api.MessageType {
   704  	return api.ReplyMessage
   705  }
   706  
   707  func (m *SwInterfaceIP6ndRaDetails) Size() (size int) {
   708  	if m == nil {
   709  		return 0
   710  	}
   711  	size += 4 // m.SwIfIndex
   712  	size += 1 // m.CurHopLimit
   713  	size += 1 // m.AdvManagedFlag
   714  	size += 1 // m.AdvOtherFlag
   715  	size += 2 // m.AdvRouterLifetime
   716  	size += 4 // m.AdvNeighborReachableTime
   717  	size += 4 // m.AdvRetransmitInterval
   718  	size += 4 // m.AdvLinkMtu
   719  	size += 1 // m.SendRadv
   720  	size += 1 // m.CeaseRadv
   721  	size += 1 // m.SendUnicast
   722  	size += 1 // m.AdvLinkLayerAddress
   723  	size += 8 // m.MaxRadvInterval
   724  	size += 8 // m.MinRadvInterval
   725  	size += 8 // m.LastRadvTime
   726  	size += 8 // m.LastMulticastTime
   727  	size += 8 // m.NextMulticastTime
   728  	size += 4 // m.InitialAdvertsCount
   729  	size += 8 // m.InitialAdvertsInterval
   730  	size += 1 // m.InitialAdvertsSent
   731  	size += 4 // m.NAdvertisementsSent
   732  	size += 4 // m.NSolicitationsRcvd
   733  	size += 4 // m.NSolicitationsDropped
   734  	size += 4 // m.NPrefixes
   735  	for j1 := 0; j1 < len(m.Prefixes); j1++ {
   736  		var s1 IP6ndRaPrefix
   737  		_ = s1
   738  		if j1 < len(m.Prefixes) {
   739  			s1 = m.Prefixes[j1]
   740  		}
   741  		size += 1      // s1.Prefix.Address.Af
   742  		size += 1 * 16 // s1.Prefix.Address.Un
   743  		size += 1      // s1.Prefix.Len
   744  		size += 1      // s1.OnlinkFlag
   745  		size += 1      // s1.AutonomousFlag
   746  		size += 4      // s1.ValLifetime
   747  		size += 4      // s1.PrefLifetime
   748  		size += 8      // s1.ValidLifetimeExpires
   749  		size += 8      // s1.PrefLifetimeExpires
   750  		size += 1      // s1.DecrementLifetimeFlag
   751  		size += 1      // s1.NoAdvertise
   752  	}
   753  	return size
   754  }
   755  func (m *SwInterfaceIP6ndRaDetails) Marshal(b []byte) ([]byte, error) {
   756  	if b == nil {
   757  		b = make([]byte, m.Size())
   758  	}
   759  	buf := codec.NewBuffer(b)
   760  	buf.EncodeUint32(uint32(m.SwIfIndex))
   761  	buf.EncodeUint8(m.CurHopLimit)
   762  	buf.EncodeBool(m.AdvManagedFlag)
   763  	buf.EncodeBool(m.AdvOtherFlag)
   764  	buf.EncodeUint16(m.AdvRouterLifetime)
   765  	buf.EncodeUint32(m.AdvNeighborReachableTime)
   766  	buf.EncodeUint32(m.AdvRetransmitInterval)
   767  	buf.EncodeUint32(m.AdvLinkMtu)
   768  	buf.EncodeBool(m.SendRadv)
   769  	buf.EncodeBool(m.CeaseRadv)
   770  	buf.EncodeBool(m.SendUnicast)
   771  	buf.EncodeBool(m.AdvLinkLayerAddress)
   772  	buf.EncodeFloat64(m.MaxRadvInterval)
   773  	buf.EncodeFloat64(m.MinRadvInterval)
   774  	buf.EncodeFloat64(m.LastRadvTime)
   775  	buf.EncodeFloat64(m.LastMulticastTime)
   776  	buf.EncodeFloat64(m.NextMulticastTime)
   777  	buf.EncodeUint32(m.InitialAdvertsCount)
   778  	buf.EncodeFloat64(m.InitialAdvertsInterval)
   779  	buf.EncodeBool(m.InitialAdvertsSent)
   780  	buf.EncodeUint32(m.NAdvertisementsSent)
   781  	buf.EncodeUint32(m.NSolicitationsRcvd)
   782  	buf.EncodeUint32(m.NSolicitationsDropped)
   783  	buf.EncodeUint32(uint32(len(m.Prefixes)))
   784  	for j0 := 0; j0 < len(m.Prefixes); j0++ {
   785  		var v0 IP6ndRaPrefix // Prefixes
   786  		if j0 < len(m.Prefixes) {
   787  			v0 = m.Prefixes[j0]
   788  		}
   789  		buf.EncodeUint8(uint8(v0.Prefix.Address.Af))
   790  		buf.EncodeBytes(v0.Prefix.Address.Un.XXX_UnionData[:], 16)
   791  		buf.EncodeUint8(v0.Prefix.Len)
   792  		buf.EncodeBool(v0.OnlinkFlag)
   793  		buf.EncodeBool(v0.AutonomousFlag)
   794  		buf.EncodeUint32(v0.ValLifetime)
   795  		buf.EncodeUint32(v0.PrefLifetime)
   796  		buf.EncodeFloat64(v0.ValidLifetimeExpires)
   797  		buf.EncodeFloat64(v0.PrefLifetimeExpires)
   798  		buf.EncodeBool(v0.DecrementLifetimeFlag)
   799  		buf.EncodeBool(v0.NoAdvertise)
   800  	}
   801  	return buf.Bytes(), nil
   802  }
   803  func (m *SwInterfaceIP6ndRaDetails) Unmarshal(b []byte) error {
   804  	buf := codec.NewBuffer(b)
   805  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   806  	m.CurHopLimit = buf.DecodeUint8()
   807  	m.AdvManagedFlag = buf.DecodeBool()
   808  	m.AdvOtherFlag = buf.DecodeBool()
   809  	m.AdvRouterLifetime = buf.DecodeUint16()
   810  	m.AdvNeighborReachableTime = buf.DecodeUint32()
   811  	m.AdvRetransmitInterval = buf.DecodeUint32()
   812  	m.AdvLinkMtu = buf.DecodeUint32()
   813  	m.SendRadv = buf.DecodeBool()
   814  	m.CeaseRadv = buf.DecodeBool()
   815  	m.SendUnicast = buf.DecodeBool()
   816  	m.AdvLinkLayerAddress = buf.DecodeBool()
   817  	m.MaxRadvInterval = buf.DecodeFloat64()
   818  	m.MinRadvInterval = buf.DecodeFloat64()
   819  	m.LastRadvTime = buf.DecodeFloat64()
   820  	m.LastMulticastTime = buf.DecodeFloat64()
   821  	m.NextMulticastTime = buf.DecodeFloat64()
   822  	m.InitialAdvertsCount = buf.DecodeUint32()
   823  	m.InitialAdvertsInterval = buf.DecodeFloat64()
   824  	m.InitialAdvertsSent = buf.DecodeBool()
   825  	m.NAdvertisementsSent = buf.DecodeUint32()
   826  	m.NSolicitationsRcvd = buf.DecodeUint32()
   827  	m.NSolicitationsDropped = buf.DecodeUint32()
   828  	m.NPrefixes = buf.DecodeUint32()
   829  	m.Prefixes = make([]IP6ndRaPrefix, m.NPrefixes)
   830  	for j0 := 0; j0 < len(m.Prefixes); j0++ {
   831  		m.Prefixes[j0].Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
   832  		copy(m.Prefixes[j0].Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   833  		m.Prefixes[j0].Prefix.Len = buf.DecodeUint8()
   834  		m.Prefixes[j0].OnlinkFlag = buf.DecodeBool()
   835  		m.Prefixes[j0].AutonomousFlag = buf.DecodeBool()
   836  		m.Prefixes[j0].ValLifetime = buf.DecodeUint32()
   837  		m.Prefixes[j0].PrefLifetime = buf.DecodeUint32()
   838  		m.Prefixes[j0].ValidLifetimeExpires = buf.DecodeFloat64()
   839  		m.Prefixes[j0].PrefLifetimeExpires = buf.DecodeFloat64()
   840  		m.Prefixes[j0].DecrementLifetimeFlag = buf.DecodeBool()
   841  		m.Prefixes[j0].NoAdvertise = buf.DecodeBool()
   842  	}
   843  	return nil
   844  }
   845  
   846  // Dump IPv6 Router Advertisements details on a per-interface basis
   847  //   - sw_if_index - interface index to use as a filter (0xffffffff
   848  //     represents all interfaces)
   849  //
   850  // SwInterfaceIP6ndRaDump defines message 'sw_interface_ip6nd_ra_dump'.
   851  // InProgress: the message form may change in the future versions
   852  type SwInterfaceIP6ndRaDump struct {
   853  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   854  }
   855  
   856  func (m *SwInterfaceIP6ndRaDump) Reset()               { *m = SwInterfaceIP6ndRaDump{} }
   857  func (*SwInterfaceIP6ndRaDump) GetMessageName() string { return "sw_interface_ip6nd_ra_dump" }
   858  func (*SwInterfaceIP6ndRaDump) GetCrcString() string   { return "f9e6675e" }
   859  func (*SwInterfaceIP6ndRaDump) GetMessageType() api.MessageType {
   860  	return api.RequestMessage
   861  }
   862  
   863  func (m *SwInterfaceIP6ndRaDump) Size() (size int) {
   864  	if m == nil {
   865  		return 0
   866  	}
   867  	size += 4 // m.SwIfIndex
   868  	return size
   869  }
   870  func (m *SwInterfaceIP6ndRaDump) Marshal(b []byte) ([]byte, error) {
   871  	if b == nil {
   872  		b = make([]byte, m.Size())
   873  	}
   874  	buf := codec.NewBuffer(b)
   875  	buf.EncodeUint32(uint32(m.SwIfIndex))
   876  	return buf.Bytes(), nil
   877  }
   878  func (m *SwInterfaceIP6ndRaDump) Unmarshal(b []byte) error {
   879  	buf := codec.NewBuffer(b)
   880  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   881  	return nil
   882  }
   883  
   884  // IPv6 router advertisement prefix config request
   885  //   - sw_if_index - The interface the RA prefix information is for
   886  //   - prefix - The prefix to advertise
   887  //   - use_default - Revert to default settings
   888  //   - no_advertise - Do not advertise this prefix
   889  //   - off_link - The prefix is off link (it is not configured on the interface)
   890  //     Configures the L-flag, When set, indicates that this
   891  //     prefix can be used for on-link determination.
   892  //   - no_autoconfig - Setting for the A-flag. When
   893  //     set indicates that this prefix can be used for
   894  //     stateless address configuration.
   895  //   - no_onlink - The prefix is not on link. Make sure this is consistent
   896  //     with the off_link parameter else YMMV
   897  //   - is_no - add/delete
   898  //   - val_lifetime - The length of time in
   899  //     seconds (relative to the time the packet is sent)
   900  //     that the prefix is valid for the purpose of on-link
   901  //     determination.  A value of all one bits
   902  //     (0xffffffff) represents infinity
   903  //   - pref_lifetime - The length of time in
   904  //     seconds (relative to the time the packet is sent)
   905  //     that addresses generated from the prefix via
   906  //     stateless address autoconfiguration remain
   907  //     preferred [ADDRCONF].  A value of all one bits
   908  //     (0xffffffff) represents infinity.
   909  //
   910  // SwInterfaceIP6ndRaPrefix defines message 'sw_interface_ip6nd_ra_prefix'.
   911  type SwInterfaceIP6ndRaPrefix struct {
   912  	SwIfIndex    interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   913  	Prefix       ip_types.Prefix                `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
   914  	UseDefault   bool                           `binapi:"bool,name=use_default" json:"use_default,omitempty"`
   915  	NoAdvertise  bool                           `binapi:"bool,name=no_advertise" json:"no_advertise,omitempty"`
   916  	OffLink      bool                           `binapi:"bool,name=off_link" json:"off_link,omitempty"`
   917  	NoAutoconfig bool                           `binapi:"bool,name=no_autoconfig" json:"no_autoconfig,omitempty"`
   918  	NoOnlink     bool                           `binapi:"bool,name=no_onlink" json:"no_onlink,omitempty"`
   919  	IsNo         bool                           `binapi:"bool,name=is_no" json:"is_no,omitempty"`
   920  	ValLifetime  uint32                         `binapi:"u32,name=val_lifetime" json:"val_lifetime,omitempty"`
   921  	PrefLifetime uint32                         `binapi:"u32,name=pref_lifetime" json:"pref_lifetime,omitempty"`
   922  }
   923  
   924  func (m *SwInterfaceIP6ndRaPrefix) Reset()               { *m = SwInterfaceIP6ndRaPrefix{} }
   925  func (*SwInterfaceIP6ndRaPrefix) GetMessageName() string { return "sw_interface_ip6nd_ra_prefix" }
   926  func (*SwInterfaceIP6ndRaPrefix) GetCrcString() string   { return "82cc1b28" }
   927  func (*SwInterfaceIP6ndRaPrefix) GetMessageType() api.MessageType {
   928  	return api.RequestMessage
   929  }
   930  
   931  func (m *SwInterfaceIP6ndRaPrefix) Size() (size int) {
   932  	if m == nil {
   933  		return 0
   934  	}
   935  	size += 4      // m.SwIfIndex
   936  	size += 1      // m.Prefix.Address.Af
   937  	size += 1 * 16 // m.Prefix.Address.Un
   938  	size += 1      // m.Prefix.Len
   939  	size += 1      // m.UseDefault
   940  	size += 1      // m.NoAdvertise
   941  	size += 1      // m.OffLink
   942  	size += 1      // m.NoAutoconfig
   943  	size += 1      // m.NoOnlink
   944  	size += 1      // m.IsNo
   945  	size += 4      // m.ValLifetime
   946  	size += 4      // m.PrefLifetime
   947  	return size
   948  }
   949  func (m *SwInterfaceIP6ndRaPrefix) Marshal(b []byte) ([]byte, error) {
   950  	if b == nil {
   951  		b = make([]byte, m.Size())
   952  	}
   953  	buf := codec.NewBuffer(b)
   954  	buf.EncodeUint32(uint32(m.SwIfIndex))
   955  	buf.EncodeUint8(uint8(m.Prefix.Address.Af))
   956  	buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
   957  	buf.EncodeUint8(m.Prefix.Len)
   958  	buf.EncodeBool(m.UseDefault)
   959  	buf.EncodeBool(m.NoAdvertise)
   960  	buf.EncodeBool(m.OffLink)
   961  	buf.EncodeBool(m.NoAutoconfig)
   962  	buf.EncodeBool(m.NoOnlink)
   963  	buf.EncodeBool(m.IsNo)
   964  	buf.EncodeUint32(m.ValLifetime)
   965  	buf.EncodeUint32(m.PrefLifetime)
   966  	return buf.Bytes(), nil
   967  }
   968  func (m *SwInterfaceIP6ndRaPrefix) Unmarshal(b []byte) error {
   969  	buf := codec.NewBuffer(b)
   970  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   971  	m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
   972  	copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   973  	m.Prefix.Len = buf.DecodeUint8()
   974  	m.UseDefault = buf.DecodeBool()
   975  	m.NoAdvertise = buf.DecodeBool()
   976  	m.OffLink = buf.DecodeBool()
   977  	m.NoAutoconfig = buf.DecodeBool()
   978  	m.NoOnlink = buf.DecodeBool()
   979  	m.IsNo = buf.DecodeBool()
   980  	m.ValLifetime = buf.DecodeUint32()
   981  	m.PrefLifetime = buf.DecodeUint32()
   982  	return nil
   983  }
   984  
   985  // SwInterfaceIP6ndRaPrefixReply defines message 'sw_interface_ip6nd_ra_prefix_reply'.
   986  type SwInterfaceIP6ndRaPrefixReply struct {
   987  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   988  }
   989  
   990  func (m *SwInterfaceIP6ndRaPrefixReply) Reset() { *m = SwInterfaceIP6ndRaPrefixReply{} }
   991  func (*SwInterfaceIP6ndRaPrefixReply) GetMessageName() string {
   992  	return "sw_interface_ip6nd_ra_prefix_reply"
   993  }
   994  func (*SwInterfaceIP6ndRaPrefixReply) GetCrcString() string { return "e8d4e804" }
   995  func (*SwInterfaceIP6ndRaPrefixReply) GetMessageType() api.MessageType {
   996  	return api.ReplyMessage
   997  }
   998  
   999  func (m *SwInterfaceIP6ndRaPrefixReply) Size() (size int) {
  1000  	if m == nil {
  1001  		return 0
  1002  	}
  1003  	size += 4 // m.Retval
  1004  	return size
  1005  }
  1006  func (m *SwInterfaceIP6ndRaPrefixReply) Marshal(b []byte) ([]byte, error) {
  1007  	if b == nil {
  1008  		b = make([]byte, m.Size())
  1009  	}
  1010  	buf := codec.NewBuffer(b)
  1011  	buf.EncodeInt32(m.Retval)
  1012  	return buf.Bytes(), nil
  1013  }
  1014  func (m *SwInterfaceIP6ndRaPrefixReply) Unmarshal(b []byte) error {
  1015  	buf := codec.NewBuffer(b)
  1016  	m.Retval = buf.DecodeInt32()
  1017  	return nil
  1018  }
  1019  
  1020  // Register for ip6 router advertisement events
  1021  //   - enable - 1 => register for events, 0 => cancel registration
  1022  //   - pid - sender's pid
  1023  //
  1024  // WantIP6RaEvents defines message 'want_ip6_ra_events'.
  1025  type WantIP6RaEvents struct {
  1026  	Enable bool   `binapi:"bool,name=enable" json:"enable,omitempty"`
  1027  	PID    uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
  1028  }
  1029  
  1030  func (m *WantIP6RaEvents) Reset()               { *m = WantIP6RaEvents{} }
  1031  func (*WantIP6RaEvents) GetMessageName() string { return "want_ip6_ra_events" }
  1032  func (*WantIP6RaEvents) GetCrcString() string   { return "3ec6d6c2" }
  1033  func (*WantIP6RaEvents) GetMessageType() api.MessageType {
  1034  	return api.RequestMessage
  1035  }
  1036  
  1037  func (m *WantIP6RaEvents) Size() (size int) {
  1038  	if m == nil {
  1039  		return 0
  1040  	}
  1041  	size += 1 // m.Enable
  1042  	size += 4 // m.PID
  1043  	return size
  1044  }
  1045  func (m *WantIP6RaEvents) Marshal(b []byte) ([]byte, error) {
  1046  	if b == nil {
  1047  		b = make([]byte, m.Size())
  1048  	}
  1049  	buf := codec.NewBuffer(b)
  1050  	buf.EncodeBool(m.Enable)
  1051  	buf.EncodeUint32(m.PID)
  1052  	return buf.Bytes(), nil
  1053  }
  1054  func (m *WantIP6RaEvents) Unmarshal(b []byte) error {
  1055  	buf := codec.NewBuffer(b)
  1056  	m.Enable = buf.DecodeBool()
  1057  	m.PID = buf.DecodeUint32()
  1058  	return nil
  1059  }
  1060  
  1061  // WantIP6RaEventsReply defines message 'want_ip6_ra_events_reply'.
  1062  type WantIP6RaEventsReply struct {
  1063  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1064  }
  1065  
  1066  func (m *WantIP6RaEventsReply) Reset()               { *m = WantIP6RaEventsReply{} }
  1067  func (*WantIP6RaEventsReply) GetMessageName() string { return "want_ip6_ra_events_reply" }
  1068  func (*WantIP6RaEventsReply) GetCrcString() string   { return "e8d4e804" }
  1069  func (*WantIP6RaEventsReply) GetMessageType() api.MessageType {
  1070  	return api.ReplyMessage
  1071  }
  1072  
  1073  func (m *WantIP6RaEventsReply) Size() (size int) {
  1074  	if m == nil {
  1075  		return 0
  1076  	}
  1077  	size += 4 // m.Retval
  1078  	return size
  1079  }
  1080  func (m *WantIP6RaEventsReply) Marshal(b []byte) ([]byte, error) {
  1081  	if b == nil {
  1082  		b = make([]byte, m.Size())
  1083  	}
  1084  	buf := codec.NewBuffer(b)
  1085  	buf.EncodeInt32(m.Retval)
  1086  	return buf.Bytes(), nil
  1087  }
  1088  func (m *WantIP6RaEventsReply) Unmarshal(b []byte) error {
  1089  	buf := codec.NewBuffer(b)
  1090  	m.Retval = buf.DecodeInt32()
  1091  	return nil
  1092  }
  1093  
  1094  func init() { file_ip6_nd_binapi_init() }
  1095  func file_ip6_nd_binapi_init() {
  1096  	api.RegisterMessage((*IP6RaEvent)(nil), "ip6_ra_event_0364c1c5")
  1097  	api.RegisterMessage((*IP6ndProxyAddDel)(nil), "ip6nd_proxy_add_del_c2e4a686")
  1098  	api.RegisterMessage((*IP6ndProxyAddDelReply)(nil), "ip6nd_proxy_add_del_reply_e8d4e804")
  1099  	api.RegisterMessage((*IP6ndProxyDetails)(nil), "ip6nd_proxy_details_30b9ff4a")
  1100  	api.RegisterMessage((*IP6ndProxyDump)(nil), "ip6nd_proxy_dump_51077d14")
  1101  	api.RegisterMessage((*IP6ndProxyEnableDisable)(nil), "ip6nd_proxy_enable_disable_7daa1e3a")
  1102  	api.RegisterMessage((*IP6ndProxyEnableDisableReply)(nil), "ip6nd_proxy_enable_disable_reply_e8d4e804")
  1103  	api.RegisterMessage((*IP6ndSendRouterSolicitation)(nil), "ip6nd_send_router_solicitation_e5de609c")
  1104  	api.RegisterMessage((*IP6ndSendRouterSolicitationReply)(nil), "ip6nd_send_router_solicitation_reply_e8d4e804")
  1105  	api.RegisterMessage((*SwInterfaceIP6ndRaConfig)(nil), "sw_interface_ip6nd_ra_config_3eb00b1c")
  1106  	api.RegisterMessage((*SwInterfaceIP6ndRaConfigReply)(nil), "sw_interface_ip6nd_ra_config_reply_e8d4e804")
  1107  	api.RegisterMessage((*SwInterfaceIP6ndRaDetails)(nil), "sw_interface_ip6nd_ra_details_d3198de5")
  1108  	api.RegisterMessage((*SwInterfaceIP6ndRaDump)(nil), "sw_interface_ip6nd_ra_dump_f9e6675e")
  1109  	api.RegisterMessage((*SwInterfaceIP6ndRaPrefix)(nil), "sw_interface_ip6nd_ra_prefix_82cc1b28")
  1110  	api.RegisterMessage((*SwInterfaceIP6ndRaPrefixReply)(nil), "sw_interface_ip6nd_ra_prefix_reply_e8d4e804")
  1111  	api.RegisterMessage((*WantIP6RaEvents)(nil), "want_ip6_ra_events_3ec6d6c2")
  1112  	api.RegisterMessage((*WantIP6RaEventsReply)(nil), "want_ip6_ra_events_reply_e8d4e804")
  1113  }
  1114  
  1115  // Messages returns list of all messages in this module.
  1116  func AllMessages() []api.Message {
  1117  	return []api.Message{
  1118  		(*IP6RaEvent)(nil),
  1119  		(*IP6ndProxyAddDel)(nil),
  1120  		(*IP6ndProxyAddDelReply)(nil),
  1121  		(*IP6ndProxyDetails)(nil),
  1122  		(*IP6ndProxyDump)(nil),
  1123  		(*IP6ndProxyEnableDisable)(nil),
  1124  		(*IP6ndProxyEnableDisableReply)(nil),
  1125  		(*IP6ndSendRouterSolicitation)(nil),
  1126  		(*IP6ndSendRouterSolicitationReply)(nil),
  1127  		(*SwInterfaceIP6ndRaConfig)(nil),
  1128  		(*SwInterfaceIP6ndRaConfigReply)(nil),
  1129  		(*SwInterfaceIP6ndRaDetails)(nil),
  1130  		(*SwInterfaceIP6ndRaDump)(nil),
  1131  		(*SwInterfaceIP6ndRaPrefix)(nil),
  1132  		(*SwInterfaceIP6ndRaPrefixReply)(nil),
  1133  		(*WantIP6RaEvents)(nil),
  1134  		(*WantIP6RaEventsReply)(nil),
  1135  	}
  1136  }