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