go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2106/ip6_nd/ip6_nd.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 3 // Package ip6_nd contains generated bindings for API file ip6_nd.api. 4 // 5 // Contents: 6 // - 1 struct 7 // - 13 messages 8 package ip6_nd 9 10 import ( 11 api "go.fd.io/govpp/api" 12 codec "go.fd.io/govpp/codec" 13 interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/interface_types" 14 ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/ip_types" 15 ) 16 17 // This is a compile-time assertion to ensure that this generated file 18 // is compatible with the GoVPP api package it is being compiled against. 19 // A compilation error at this line likely means your copy of the 20 // GoVPP api package needs to be updated. 21 const _ = api.GoVppAPIPackageIsVersion2 22 23 const ( 24 APIFile = "ip6_nd" 25 APIVersion = "1.0.0" 26 VersionCrc = 0x90f5895b 27 ) 28 29 // IP6RaPrefixInfo defines type 'ip6_ra_prefix_info'. 30 type IP6RaPrefixInfo struct { 31 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 32 Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"` 33 ValidTime uint32 `binapi:"u32,name=valid_time" json:"valid_time,omitempty"` 34 PreferredTime uint32 `binapi:"u32,name=preferred_time" json:"preferred_time,omitempty"` 35 } 36 37 // IP6RaEvent defines message 'ip6_ra_event'. 38 type IP6RaEvent struct { 39 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` 40 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 41 RouterAddr ip_types.IP6Address `binapi:"ip6_address,name=router_addr" json:"router_addr,omitempty"` 42 CurrentHopLimit uint8 `binapi:"u8,name=current_hop_limit" json:"current_hop_limit,omitempty"` 43 Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"` 44 RouterLifetimeInSec uint16 `binapi:"u16,name=router_lifetime_in_sec" json:"router_lifetime_in_sec,omitempty"` 45 NeighborReachableTimeInMsec uint32 `binapi:"u32,name=neighbor_reachable_time_in_msec" json:"neighbor_reachable_time_in_msec,omitempty"` 46 TimeInMsecBetweenRetransmittedNeighborSolicitations uint32 `binapi:"u32,name=time_in_msec_between_retransmitted_neighbor_solicitations" json:"time_in_msec_between_retransmitted_neighbor_solicitations,omitempty"` 47 NPrefixes uint32 `binapi:"u32,name=n_prefixes" json:"-"` 48 Prefixes []IP6RaPrefixInfo `binapi:"ip6_ra_prefix_info[n_prefixes],name=prefixes" json:"prefixes,omitempty"` 49 } 50 51 func (m *IP6RaEvent) Reset() { *m = IP6RaEvent{} } 52 func (*IP6RaEvent) GetMessageName() string { return "ip6_ra_event" } 53 func (*IP6RaEvent) GetCrcString() string { return "0364c1c5" } 54 func (*IP6RaEvent) GetMessageType() api.MessageType { 55 return api.EventMessage 56 } 57 58 func (m *IP6RaEvent) Size() (size int) { 59 if m == nil { 60 return 0 61 } 62 size += 4 // m.PID 63 size += 4 // m.SwIfIndex 64 size += 1 * 16 // m.RouterAddr 65 size += 1 // m.CurrentHopLimit 66 size += 1 // m.Flags 67 size += 2 // m.RouterLifetimeInSec 68 size += 4 // m.NeighborReachableTimeInMsec 69 size += 4 // m.TimeInMsecBetweenRetransmittedNeighborSolicitations 70 size += 4 // m.NPrefixes 71 for j1 := 0; j1 < len(m.Prefixes); j1++ { 72 var s1 IP6RaPrefixInfo 73 _ = s1 74 if j1 < len(m.Prefixes) { 75 s1 = m.Prefixes[j1] 76 } 77 size += 1 // s1.Prefix.Address.Af 78 size += 1 * 16 // s1.Prefix.Address.Un 79 size += 1 // s1.Prefix.Len 80 size += 1 // s1.Flags 81 size += 4 // s1.ValidTime 82 size += 4 // s1.PreferredTime 83 } 84 return size 85 } 86 func (m *IP6RaEvent) Marshal(b []byte) ([]byte, error) { 87 if b == nil { 88 b = make([]byte, m.Size()) 89 } 90 buf := codec.NewBuffer(b) 91 buf.EncodeUint32(m.PID) 92 buf.EncodeUint32(uint32(m.SwIfIndex)) 93 buf.EncodeBytes(m.RouterAddr[:], 16) 94 buf.EncodeUint8(m.CurrentHopLimit) 95 buf.EncodeUint8(m.Flags) 96 buf.EncodeUint16(m.RouterLifetimeInSec) 97 buf.EncodeUint32(m.NeighborReachableTimeInMsec) 98 buf.EncodeUint32(m.TimeInMsecBetweenRetransmittedNeighborSolicitations) 99 buf.EncodeUint32(uint32(len(m.Prefixes))) 100 for j0 := 0; j0 < len(m.Prefixes); j0++ { 101 var v0 IP6RaPrefixInfo // Prefixes 102 if j0 < len(m.Prefixes) { 103 v0 = m.Prefixes[j0] 104 } 105 buf.EncodeUint8(uint8(v0.Prefix.Address.Af)) 106 buf.EncodeBytes(v0.Prefix.Address.Un.XXX_UnionData[:], 16) 107 buf.EncodeUint8(v0.Prefix.Len) 108 buf.EncodeUint8(v0.Flags) 109 buf.EncodeUint32(v0.ValidTime) 110 buf.EncodeUint32(v0.PreferredTime) 111 } 112 return buf.Bytes(), nil 113 } 114 func (m *IP6RaEvent) Unmarshal(b []byte) error { 115 buf := codec.NewBuffer(b) 116 m.PID = buf.DecodeUint32() 117 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 118 copy(m.RouterAddr[:], buf.DecodeBytes(16)) 119 m.CurrentHopLimit = buf.DecodeUint8() 120 m.Flags = buf.DecodeUint8() 121 m.RouterLifetimeInSec = buf.DecodeUint16() 122 m.NeighborReachableTimeInMsec = buf.DecodeUint32() 123 m.TimeInMsecBetweenRetransmittedNeighborSolicitations = buf.DecodeUint32() 124 m.NPrefixes = buf.DecodeUint32() 125 m.Prefixes = make([]IP6RaPrefixInfo, m.NPrefixes) 126 for j0 := 0; j0 < len(m.Prefixes); j0++ { 127 m.Prefixes[j0].Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 128 copy(m.Prefixes[j0].Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 129 m.Prefixes[j0].Prefix.Len = buf.DecodeUint8() 130 m.Prefixes[j0].Flags = buf.DecodeUint8() 131 m.Prefixes[j0].ValidTime = buf.DecodeUint32() 132 m.Prefixes[j0].PreferredTime = buf.DecodeUint32() 133 } 134 return nil 135 } 136 137 // IP6ndProxyAddDel defines message 'ip6nd_proxy_add_del'. 138 type IP6ndProxyAddDel struct { 139 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 140 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 141 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"` 142 } 143 144 func (m *IP6ndProxyAddDel) Reset() { *m = IP6ndProxyAddDel{} } 145 func (*IP6ndProxyAddDel) GetMessageName() string { return "ip6nd_proxy_add_del" } 146 func (*IP6ndProxyAddDel) GetCrcString() string { return "c2e4a686" } 147 func (*IP6ndProxyAddDel) GetMessageType() api.MessageType { 148 return api.RequestMessage 149 } 150 151 func (m *IP6ndProxyAddDel) Size() (size int) { 152 if m == nil { 153 return 0 154 } 155 size += 4 // m.SwIfIndex 156 size += 1 // m.IsAdd 157 size += 1 * 16 // m.IP 158 return size 159 } 160 func (m *IP6ndProxyAddDel) Marshal(b []byte) ([]byte, error) { 161 if b == nil { 162 b = make([]byte, m.Size()) 163 } 164 buf := codec.NewBuffer(b) 165 buf.EncodeUint32(uint32(m.SwIfIndex)) 166 buf.EncodeBool(m.IsAdd) 167 buf.EncodeBytes(m.IP[:], 16) 168 return buf.Bytes(), nil 169 } 170 func (m *IP6ndProxyAddDel) Unmarshal(b []byte) error { 171 buf := codec.NewBuffer(b) 172 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 173 m.IsAdd = buf.DecodeBool() 174 copy(m.IP[:], buf.DecodeBytes(16)) 175 return nil 176 } 177 178 // IP6ndProxyAddDelReply defines message 'ip6nd_proxy_add_del_reply'. 179 type IP6ndProxyAddDelReply struct { 180 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 181 } 182 183 func (m *IP6ndProxyAddDelReply) Reset() { *m = IP6ndProxyAddDelReply{} } 184 func (*IP6ndProxyAddDelReply) GetMessageName() string { return "ip6nd_proxy_add_del_reply" } 185 func (*IP6ndProxyAddDelReply) GetCrcString() string { return "e8d4e804" } 186 func (*IP6ndProxyAddDelReply) GetMessageType() api.MessageType { 187 return api.ReplyMessage 188 } 189 190 func (m *IP6ndProxyAddDelReply) Size() (size int) { 191 if m == nil { 192 return 0 193 } 194 size += 4 // m.Retval 195 return size 196 } 197 func (m *IP6ndProxyAddDelReply) Marshal(b []byte) ([]byte, error) { 198 if b == nil { 199 b = make([]byte, m.Size()) 200 } 201 buf := codec.NewBuffer(b) 202 buf.EncodeInt32(m.Retval) 203 return buf.Bytes(), nil 204 } 205 func (m *IP6ndProxyAddDelReply) Unmarshal(b []byte) error { 206 buf := codec.NewBuffer(b) 207 m.Retval = buf.DecodeInt32() 208 return nil 209 } 210 211 // IP6ndProxyDetails defines message 'ip6nd_proxy_details'. 212 type IP6ndProxyDetails struct { 213 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 214 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"` 215 } 216 217 func (m *IP6ndProxyDetails) Reset() { *m = IP6ndProxyDetails{} } 218 func (*IP6ndProxyDetails) GetMessageName() string { return "ip6nd_proxy_details" } 219 func (*IP6ndProxyDetails) GetCrcString() string { return "30b9ff4a" } 220 func (*IP6ndProxyDetails) GetMessageType() api.MessageType { 221 return api.ReplyMessage 222 } 223 224 func (m *IP6ndProxyDetails) Size() (size int) { 225 if m == nil { 226 return 0 227 } 228 size += 4 // m.SwIfIndex 229 size += 1 * 16 // m.IP 230 return size 231 } 232 func (m *IP6ndProxyDetails) Marshal(b []byte) ([]byte, error) { 233 if b == nil { 234 b = make([]byte, m.Size()) 235 } 236 buf := codec.NewBuffer(b) 237 buf.EncodeUint32(uint32(m.SwIfIndex)) 238 buf.EncodeBytes(m.IP[:], 16) 239 return buf.Bytes(), nil 240 } 241 func (m *IP6ndProxyDetails) Unmarshal(b []byte) error { 242 buf := codec.NewBuffer(b) 243 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 244 copy(m.IP[:], buf.DecodeBytes(16)) 245 return nil 246 } 247 248 // IP6ndProxyDump defines message 'ip6nd_proxy_dump'. 249 type IP6ndProxyDump struct{} 250 251 func (m *IP6ndProxyDump) Reset() { *m = IP6ndProxyDump{} } 252 func (*IP6ndProxyDump) GetMessageName() string { return "ip6nd_proxy_dump" } 253 func (*IP6ndProxyDump) GetCrcString() string { return "51077d14" } 254 func (*IP6ndProxyDump) GetMessageType() api.MessageType { 255 return api.RequestMessage 256 } 257 258 func (m *IP6ndProxyDump) Size() (size int) { 259 if m == nil { 260 return 0 261 } 262 return size 263 } 264 func (m *IP6ndProxyDump) Marshal(b []byte) ([]byte, error) { 265 if b == nil { 266 b = make([]byte, m.Size()) 267 } 268 buf := codec.NewBuffer(b) 269 return buf.Bytes(), nil 270 } 271 func (m *IP6ndProxyDump) Unmarshal(b []byte) error { 272 return nil 273 } 274 275 // IP6ndSendRouterSolicitation defines message 'ip6nd_send_router_solicitation'. 276 type IP6ndSendRouterSolicitation struct { 277 Irt uint32 `binapi:"u32,name=irt" json:"irt,omitempty"` 278 Mrt uint32 `binapi:"u32,name=mrt" json:"mrt,omitempty"` 279 Mrc uint32 `binapi:"u32,name=mrc" json:"mrc,omitempty"` 280 Mrd uint32 `binapi:"u32,name=mrd" json:"mrd,omitempty"` 281 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 282 Stop bool `binapi:"bool,name=stop" json:"stop,omitempty"` 283 } 284 285 func (m *IP6ndSendRouterSolicitation) Reset() { *m = IP6ndSendRouterSolicitation{} } 286 func (*IP6ndSendRouterSolicitation) GetMessageName() string { return "ip6nd_send_router_solicitation" } 287 func (*IP6ndSendRouterSolicitation) GetCrcString() string { return "e5de609c" } 288 func (*IP6ndSendRouterSolicitation) GetMessageType() api.MessageType { 289 return api.RequestMessage 290 } 291 292 func (m *IP6ndSendRouterSolicitation) Size() (size int) { 293 if m == nil { 294 return 0 295 } 296 size += 4 // m.Irt 297 size += 4 // m.Mrt 298 size += 4 // m.Mrc 299 size += 4 // m.Mrd 300 size += 4 // m.SwIfIndex 301 size += 1 // m.Stop 302 return size 303 } 304 func (m *IP6ndSendRouterSolicitation) Marshal(b []byte) ([]byte, error) { 305 if b == nil { 306 b = make([]byte, m.Size()) 307 } 308 buf := codec.NewBuffer(b) 309 buf.EncodeUint32(m.Irt) 310 buf.EncodeUint32(m.Mrt) 311 buf.EncodeUint32(m.Mrc) 312 buf.EncodeUint32(m.Mrd) 313 buf.EncodeUint32(uint32(m.SwIfIndex)) 314 buf.EncodeBool(m.Stop) 315 return buf.Bytes(), nil 316 } 317 func (m *IP6ndSendRouterSolicitation) Unmarshal(b []byte) error { 318 buf := codec.NewBuffer(b) 319 m.Irt = buf.DecodeUint32() 320 m.Mrt = buf.DecodeUint32() 321 m.Mrc = buf.DecodeUint32() 322 m.Mrd = buf.DecodeUint32() 323 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 324 m.Stop = buf.DecodeBool() 325 return nil 326 } 327 328 // IP6ndSendRouterSolicitationReply defines message 'ip6nd_send_router_solicitation_reply'. 329 type IP6ndSendRouterSolicitationReply struct { 330 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 331 } 332 333 func (m *IP6ndSendRouterSolicitationReply) Reset() { *m = IP6ndSendRouterSolicitationReply{} } 334 func (*IP6ndSendRouterSolicitationReply) GetMessageName() string { 335 return "ip6nd_send_router_solicitation_reply" 336 } 337 func (*IP6ndSendRouterSolicitationReply) GetCrcString() string { return "e8d4e804" } 338 func (*IP6ndSendRouterSolicitationReply) GetMessageType() api.MessageType { 339 return api.ReplyMessage 340 } 341 342 func (m *IP6ndSendRouterSolicitationReply) Size() (size int) { 343 if m == nil { 344 return 0 345 } 346 size += 4 // m.Retval 347 return size 348 } 349 func (m *IP6ndSendRouterSolicitationReply) Marshal(b []byte) ([]byte, error) { 350 if b == nil { 351 b = make([]byte, m.Size()) 352 } 353 buf := codec.NewBuffer(b) 354 buf.EncodeInt32(m.Retval) 355 return buf.Bytes(), nil 356 } 357 func (m *IP6ndSendRouterSolicitationReply) Unmarshal(b []byte) error { 358 buf := codec.NewBuffer(b) 359 m.Retval = buf.DecodeInt32() 360 return nil 361 } 362 363 // SwInterfaceIP6ndRaConfig defines message 'sw_interface_ip6nd_ra_config'. 364 type SwInterfaceIP6ndRaConfig struct { 365 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 366 Suppress uint8 `binapi:"u8,name=suppress" json:"suppress,omitempty"` 367 Managed uint8 `binapi:"u8,name=managed" json:"managed,omitempty"` 368 Other uint8 `binapi:"u8,name=other" json:"other,omitempty"` 369 LlOption uint8 `binapi:"u8,name=ll_option" json:"ll_option,omitempty"` 370 SendUnicast uint8 `binapi:"u8,name=send_unicast" json:"send_unicast,omitempty"` 371 Cease uint8 `binapi:"u8,name=cease" json:"cease,omitempty"` 372 IsNo bool `binapi:"bool,name=is_no" json:"is_no,omitempty"` 373 DefaultRouter uint8 `binapi:"u8,name=default_router" json:"default_router,omitempty"` 374 MaxInterval uint32 `binapi:"u32,name=max_interval" json:"max_interval,omitempty"` 375 MinInterval uint32 `binapi:"u32,name=min_interval" json:"min_interval,omitempty"` 376 Lifetime uint32 `binapi:"u32,name=lifetime" json:"lifetime,omitempty"` 377 InitialCount uint32 `binapi:"u32,name=initial_count" json:"initial_count,omitempty"` 378 InitialInterval uint32 `binapi:"u32,name=initial_interval" json:"initial_interval,omitempty"` 379 } 380 381 func (m *SwInterfaceIP6ndRaConfig) Reset() { *m = SwInterfaceIP6ndRaConfig{} } 382 func (*SwInterfaceIP6ndRaConfig) GetMessageName() string { return "sw_interface_ip6nd_ra_config" } 383 func (*SwInterfaceIP6ndRaConfig) GetCrcString() string { return "3eb00b1c" } 384 func (*SwInterfaceIP6ndRaConfig) GetMessageType() api.MessageType { 385 return api.RequestMessage 386 } 387 388 func (m *SwInterfaceIP6ndRaConfig) Size() (size int) { 389 if m == nil { 390 return 0 391 } 392 size += 4 // m.SwIfIndex 393 size += 1 // m.Suppress 394 size += 1 // m.Managed 395 size += 1 // m.Other 396 size += 1 // m.LlOption 397 size += 1 // m.SendUnicast 398 size += 1 // m.Cease 399 size += 1 // m.IsNo 400 size += 1 // m.DefaultRouter 401 size += 4 // m.MaxInterval 402 size += 4 // m.MinInterval 403 size += 4 // m.Lifetime 404 size += 4 // m.InitialCount 405 size += 4 // m.InitialInterval 406 return size 407 } 408 func (m *SwInterfaceIP6ndRaConfig) Marshal(b []byte) ([]byte, error) { 409 if b == nil { 410 b = make([]byte, m.Size()) 411 } 412 buf := codec.NewBuffer(b) 413 buf.EncodeUint32(uint32(m.SwIfIndex)) 414 buf.EncodeUint8(m.Suppress) 415 buf.EncodeUint8(m.Managed) 416 buf.EncodeUint8(m.Other) 417 buf.EncodeUint8(m.LlOption) 418 buf.EncodeUint8(m.SendUnicast) 419 buf.EncodeUint8(m.Cease) 420 buf.EncodeBool(m.IsNo) 421 buf.EncodeUint8(m.DefaultRouter) 422 buf.EncodeUint32(m.MaxInterval) 423 buf.EncodeUint32(m.MinInterval) 424 buf.EncodeUint32(m.Lifetime) 425 buf.EncodeUint32(m.InitialCount) 426 buf.EncodeUint32(m.InitialInterval) 427 return buf.Bytes(), nil 428 } 429 func (m *SwInterfaceIP6ndRaConfig) Unmarshal(b []byte) error { 430 buf := codec.NewBuffer(b) 431 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 432 m.Suppress = buf.DecodeUint8() 433 m.Managed = buf.DecodeUint8() 434 m.Other = buf.DecodeUint8() 435 m.LlOption = buf.DecodeUint8() 436 m.SendUnicast = buf.DecodeUint8() 437 m.Cease = buf.DecodeUint8() 438 m.IsNo = buf.DecodeBool() 439 m.DefaultRouter = buf.DecodeUint8() 440 m.MaxInterval = buf.DecodeUint32() 441 m.MinInterval = buf.DecodeUint32() 442 m.Lifetime = buf.DecodeUint32() 443 m.InitialCount = buf.DecodeUint32() 444 m.InitialInterval = buf.DecodeUint32() 445 return nil 446 } 447 448 // SwInterfaceIP6ndRaConfigReply defines message 'sw_interface_ip6nd_ra_config_reply'. 449 type SwInterfaceIP6ndRaConfigReply struct { 450 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 451 } 452 453 func (m *SwInterfaceIP6ndRaConfigReply) Reset() { *m = SwInterfaceIP6ndRaConfigReply{} } 454 func (*SwInterfaceIP6ndRaConfigReply) GetMessageName() string { 455 return "sw_interface_ip6nd_ra_config_reply" 456 } 457 func (*SwInterfaceIP6ndRaConfigReply) GetCrcString() string { return "e8d4e804" } 458 func (*SwInterfaceIP6ndRaConfigReply) GetMessageType() api.MessageType { 459 return api.ReplyMessage 460 } 461 462 func (m *SwInterfaceIP6ndRaConfigReply) Size() (size int) { 463 if m == nil { 464 return 0 465 } 466 size += 4 // m.Retval 467 return size 468 } 469 func (m *SwInterfaceIP6ndRaConfigReply) Marshal(b []byte) ([]byte, error) { 470 if b == nil { 471 b = make([]byte, m.Size()) 472 } 473 buf := codec.NewBuffer(b) 474 buf.EncodeInt32(m.Retval) 475 return buf.Bytes(), nil 476 } 477 func (m *SwInterfaceIP6ndRaConfigReply) Unmarshal(b []byte) error { 478 buf := codec.NewBuffer(b) 479 m.Retval = buf.DecodeInt32() 480 return nil 481 } 482 483 // SwInterfaceIP6ndRaPrefix defines message 'sw_interface_ip6nd_ra_prefix'. 484 type SwInterfaceIP6ndRaPrefix struct { 485 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 486 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 487 UseDefault bool `binapi:"bool,name=use_default" json:"use_default,omitempty"` 488 NoAdvertise bool `binapi:"bool,name=no_advertise" json:"no_advertise,omitempty"` 489 OffLink bool `binapi:"bool,name=off_link" json:"off_link,omitempty"` 490 NoAutoconfig bool `binapi:"bool,name=no_autoconfig" json:"no_autoconfig,omitempty"` 491 NoOnlink bool `binapi:"bool,name=no_onlink" json:"no_onlink,omitempty"` 492 IsNo bool `binapi:"bool,name=is_no" json:"is_no,omitempty"` 493 ValLifetime uint32 `binapi:"u32,name=val_lifetime" json:"val_lifetime,omitempty"` 494 PrefLifetime uint32 `binapi:"u32,name=pref_lifetime" json:"pref_lifetime,omitempty"` 495 } 496 497 func (m *SwInterfaceIP6ndRaPrefix) Reset() { *m = SwInterfaceIP6ndRaPrefix{} } 498 func (*SwInterfaceIP6ndRaPrefix) GetMessageName() string { return "sw_interface_ip6nd_ra_prefix" } 499 func (*SwInterfaceIP6ndRaPrefix) GetCrcString() string { return "82cc1b28" } 500 func (*SwInterfaceIP6ndRaPrefix) GetMessageType() api.MessageType { 501 return api.RequestMessage 502 } 503 504 func (m *SwInterfaceIP6ndRaPrefix) Size() (size int) { 505 if m == nil { 506 return 0 507 } 508 size += 4 // m.SwIfIndex 509 size += 1 // m.Prefix.Address.Af 510 size += 1 * 16 // m.Prefix.Address.Un 511 size += 1 // m.Prefix.Len 512 size += 1 // m.UseDefault 513 size += 1 // m.NoAdvertise 514 size += 1 // m.OffLink 515 size += 1 // m.NoAutoconfig 516 size += 1 // m.NoOnlink 517 size += 1 // m.IsNo 518 size += 4 // m.ValLifetime 519 size += 4 // m.PrefLifetime 520 return size 521 } 522 func (m *SwInterfaceIP6ndRaPrefix) Marshal(b []byte) ([]byte, error) { 523 if b == nil { 524 b = make([]byte, m.Size()) 525 } 526 buf := codec.NewBuffer(b) 527 buf.EncodeUint32(uint32(m.SwIfIndex)) 528 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 529 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 530 buf.EncodeUint8(m.Prefix.Len) 531 buf.EncodeBool(m.UseDefault) 532 buf.EncodeBool(m.NoAdvertise) 533 buf.EncodeBool(m.OffLink) 534 buf.EncodeBool(m.NoAutoconfig) 535 buf.EncodeBool(m.NoOnlink) 536 buf.EncodeBool(m.IsNo) 537 buf.EncodeUint32(m.ValLifetime) 538 buf.EncodeUint32(m.PrefLifetime) 539 return buf.Bytes(), nil 540 } 541 func (m *SwInterfaceIP6ndRaPrefix) Unmarshal(b []byte) error { 542 buf := codec.NewBuffer(b) 543 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 544 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 545 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 546 m.Prefix.Len = buf.DecodeUint8() 547 m.UseDefault = buf.DecodeBool() 548 m.NoAdvertise = buf.DecodeBool() 549 m.OffLink = buf.DecodeBool() 550 m.NoAutoconfig = buf.DecodeBool() 551 m.NoOnlink = buf.DecodeBool() 552 m.IsNo = buf.DecodeBool() 553 m.ValLifetime = buf.DecodeUint32() 554 m.PrefLifetime = buf.DecodeUint32() 555 return nil 556 } 557 558 // SwInterfaceIP6ndRaPrefixReply defines message 'sw_interface_ip6nd_ra_prefix_reply'. 559 type SwInterfaceIP6ndRaPrefixReply struct { 560 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 561 } 562 563 func (m *SwInterfaceIP6ndRaPrefixReply) Reset() { *m = SwInterfaceIP6ndRaPrefixReply{} } 564 func (*SwInterfaceIP6ndRaPrefixReply) GetMessageName() string { 565 return "sw_interface_ip6nd_ra_prefix_reply" 566 } 567 func (*SwInterfaceIP6ndRaPrefixReply) GetCrcString() string { return "e8d4e804" } 568 func (*SwInterfaceIP6ndRaPrefixReply) GetMessageType() api.MessageType { 569 return api.ReplyMessage 570 } 571 572 func (m *SwInterfaceIP6ndRaPrefixReply) Size() (size int) { 573 if m == nil { 574 return 0 575 } 576 size += 4 // m.Retval 577 return size 578 } 579 func (m *SwInterfaceIP6ndRaPrefixReply) Marshal(b []byte) ([]byte, error) { 580 if b == nil { 581 b = make([]byte, m.Size()) 582 } 583 buf := codec.NewBuffer(b) 584 buf.EncodeInt32(m.Retval) 585 return buf.Bytes(), nil 586 } 587 func (m *SwInterfaceIP6ndRaPrefixReply) Unmarshal(b []byte) error { 588 buf := codec.NewBuffer(b) 589 m.Retval = buf.DecodeInt32() 590 return nil 591 } 592 593 // WantIP6RaEvents defines message 'want_ip6_ra_events'. 594 type WantIP6RaEvents struct { 595 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 596 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` 597 } 598 599 func (m *WantIP6RaEvents) Reset() { *m = WantIP6RaEvents{} } 600 func (*WantIP6RaEvents) GetMessageName() string { return "want_ip6_ra_events" } 601 func (*WantIP6RaEvents) GetCrcString() string { return "3ec6d6c2" } 602 func (*WantIP6RaEvents) GetMessageType() api.MessageType { 603 return api.RequestMessage 604 } 605 606 func (m *WantIP6RaEvents) Size() (size int) { 607 if m == nil { 608 return 0 609 } 610 size += 1 // m.Enable 611 size += 4 // m.PID 612 return size 613 } 614 func (m *WantIP6RaEvents) Marshal(b []byte) ([]byte, error) { 615 if b == nil { 616 b = make([]byte, m.Size()) 617 } 618 buf := codec.NewBuffer(b) 619 buf.EncodeBool(m.Enable) 620 buf.EncodeUint32(m.PID) 621 return buf.Bytes(), nil 622 } 623 func (m *WantIP6RaEvents) Unmarshal(b []byte) error { 624 buf := codec.NewBuffer(b) 625 m.Enable = buf.DecodeBool() 626 m.PID = buf.DecodeUint32() 627 return nil 628 } 629 630 // WantIP6RaEventsReply defines message 'want_ip6_ra_events_reply'. 631 type WantIP6RaEventsReply struct { 632 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 633 } 634 635 func (m *WantIP6RaEventsReply) Reset() { *m = WantIP6RaEventsReply{} } 636 func (*WantIP6RaEventsReply) GetMessageName() string { return "want_ip6_ra_events_reply" } 637 func (*WantIP6RaEventsReply) GetCrcString() string { return "e8d4e804" } 638 func (*WantIP6RaEventsReply) GetMessageType() api.MessageType { 639 return api.ReplyMessage 640 } 641 642 func (m *WantIP6RaEventsReply) Size() (size int) { 643 if m == nil { 644 return 0 645 } 646 size += 4 // m.Retval 647 return size 648 } 649 func (m *WantIP6RaEventsReply) Marshal(b []byte) ([]byte, error) { 650 if b == nil { 651 b = make([]byte, m.Size()) 652 } 653 buf := codec.NewBuffer(b) 654 buf.EncodeInt32(m.Retval) 655 return buf.Bytes(), nil 656 } 657 func (m *WantIP6RaEventsReply) Unmarshal(b []byte) error { 658 buf := codec.NewBuffer(b) 659 m.Retval = buf.DecodeInt32() 660 return nil 661 } 662 663 func init() { file_ip6_nd_binapi_init() } 664 func file_ip6_nd_binapi_init() { 665 api.RegisterMessage((*IP6RaEvent)(nil), "ip6_ra_event_0364c1c5") 666 api.RegisterMessage((*IP6ndProxyAddDel)(nil), "ip6nd_proxy_add_del_c2e4a686") 667 api.RegisterMessage((*IP6ndProxyAddDelReply)(nil), "ip6nd_proxy_add_del_reply_e8d4e804") 668 api.RegisterMessage((*IP6ndProxyDetails)(nil), "ip6nd_proxy_details_30b9ff4a") 669 api.RegisterMessage((*IP6ndProxyDump)(nil), "ip6nd_proxy_dump_51077d14") 670 api.RegisterMessage((*IP6ndSendRouterSolicitation)(nil), "ip6nd_send_router_solicitation_e5de609c") 671 api.RegisterMessage((*IP6ndSendRouterSolicitationReply)(nil), "ip6nd_send_router_solicitation_reply_e8d4e804") 672 api.RegisterMessage((*SwInterfaceIP6ndRaConfig)(nil), "sw_interface_ip6nd_ra_config_3eb00b1c") 673 api.RegisterMessage((*SwInterfaceIP6ndRaConfigReply)(nil), "sw_interface_ip6nd_ra_config_reply_e8d4e804") 674 api.RegisterMessage((*SwInterfaceIP6ndRaPrefix)(nil), "sw_interface_ip6nd_ra_prefix_82cc1b28") 675 api.RegisterMessage((*SwInterfaceIP6ndRaPrefixReply)(nil), "sw_interface_ip6nd_ra_prefix_reply_e8d4e804") 676 api.RegisterMessage((*WantIP6RaEvents)(nil), "want_ip6_ra_events_3ec6d6c2") 677 api.RegisterMessage((*WantIP6RaEventsReply)(nil), "want_ip6_ra_events_reply_e8d4e804") 678 } 679 680 // Messages returns list of all messages in this module. 681 func AllMessages() []api.Message { 682 return []api.Message{ 683 (*IP6RaEvent)(nil), 684 (*IP6ndProxyAddDel)(nil), 685 (*IP6ndProxyAddDelReply)(nil), 686 (*IP6ndProxyDetails)(nil), 687 (*IP6ndProxyDump)(nil), 688 (*IP6ndSendRouterSolicitation)(nil), 689 (*IP6ndSendRouterSolicitationReply)(nil), 690 (*SwInterfaceIP6ndRaConfig)(nil), 691 (*SwInterfaceIP6ndRaConfigReply)(nil), 692 (*SwInterfaceIP6ndRaPrefix)(nil), 693 (*SwInterfaceIP6ndRaPrefixReply)(nil), 694 (*WantIP6RaEvents)(nil), 695 (*WantIP6RaEventsReply)(nil), 696 } 697 }