github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/ip/ip.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/ip.api.json 6 7 // Package ip contains generated bindings for API file ip.api. 8 // 9 // Contents: 10 // 2 enums 11 // 7 structs 12 // 91 messages 13 // 14 package ip 15 16 import ( 17 "strconv" 18 19 api "git.fd.io/govpp.git/api" 20 codec "git.fd.io/govpp.git/codec" 21 _ "github.com/edwarnicke/govpp/binapi/ethernet_types" 22 fib_types "github.com/edwarnicke/govpp/binapi/fib_types" 23 interface_types "github.com/edwarnicke/govpp/binapi/interface_types" 24 ip_types "github.com/edwarnicke/govpp/binapi/ip_types" 25 mfib_types "github.com/edwarnicke/govpp/binapi/mfib_types" 26 ) 27 28 // This is a compile-time assertion to ensure that this generated file 29 // is compatible with the GoVPP api package it is being compiled against. 30 // A compilation error at this line likely means your copy of the 31 // GoVPP api package needs to be updated. 32 const _ = api.GoVppAPIPackageIsVersion2 33 34 const ( 35 APIFile = "ip" 36 APIVersion = "3.2.0" 37 VersionCrc = 0x41299705 38 ) 39 40 // IPReassType defines enum 'ip_reass_type'. 41 type IPReassType uint32 42 43 const ( 44 IP_REASS_TYPE_FULL IPReassType = 0 45 IP_REASS_TYPE_SHALLOW_VIRTUAL IPReassType = 1 46 ) 47 48 var ( 49 IPReassType_name = map[uint32]string{ 50 0: "IP_REASS_TYPE_FULL", 51 1: "IP_REASS_TYPE_SHALLOW_VIRTUAL", 52 } 53 IPReassType_value = map[string]uint32{ 54 "IP_REASS_TYPE_FULL": 0, 55 "IP_REASS_TYPE_SHALLOW_VIRTUAL": 1, 56 } 57 ) 58 59 func (x IPReassType) String() string { 60 s, ok := IPReassType_name[uint32(x)] 61 if ok { 62 return s 63 } 64 return "IPReassType(" + strconv.Itoa(int(x)) + ")" 65 } 66 67 // IPFlowHashConfig defines enum 'ip_flow_hash_config'. 68 type IPFlowHashConfig uint32 69 70 const ( 71 IP_API_FLOW_HASH_SRC_IP IPFlowHashConfig = 1 72 IP_API_FLOW_HASH_DST_IP IPFlowHashConfig = 2 73 IP_API_FLOW_HASH_SRC_PORT IPFlowHashConfig = 4 74 IP_API_FLOW_HASH_DST_PORT IPFlowHashConfig = 8 75 IP_API_FLOW_HASH_PROTO IPFlowHashConfig = 16 76 IP_API_FLOW_HASH_REVERSE IPFlowHashConfig = 32 77 IP_API_FLOW_HASH_SYMETRIC IPFlowHashConfig = 64 78 IP_API_FLOW_HASH_FLOW_LABEL IPFlowHashConfig = 128 79 ) 80 81 var ( 82 IPFlowHashConfig_name = map[uint32]string{ 83 1: "IP_API_FLOW_HASH_SRC_IP", 84 2: "IP_API_FLOW_HASH_DST_IP", 85 4: "IP_API_FLOW_HASH_SRC_PORT", 86 8: "IP_API_FLOW_HASH_DST_PORT", 87 16: "IP_API_FLOW_HASH_PROTO", 88 32: "IP_API_FLOW_HASH_REVERSE", 89 64: "IP_API_FLOW_HASH_SYMETRIC", 90 128: "IP_API_FLOW_HASH_FLOW_LABEL", 91 } 92 IPFlowHashConfig_value = map[string]uint32{ 93 "IP_API_FLOW_HASH_SRC_IP": 1, 94 "IP_API_FLOW_HASH_DST_IP": 2, 95 "IP_API_FLOW_HASH_SRC_PORT": 4, 96 "IP_API_FLOW_HASH_DST_PORT": 8, 97 "IP_API_FLOW_HASH_PROTO": 16, 98 "IP_API_FLOW_HASH_REVERSE": 32, 99 "IP_API_FLOW_HASH_SYMETRIC": 64, 100 "IP_API_FLOW_HASH_FLOW_LABEL": 128, 101 } 102 ) 103 104 func (x IPFlowHashConfig) String() string { 105 s, ok := IPFlowHashConfig_name[uint32(x)] 106 if ok { 107 return s 108 } 109 str := func(n uint32) string { 110 s, ok := IPFlowHashConfig_name[uint32(n)] 111 if ok { 112 return s 113 } 114 return "IPFlowHashConfig(" + strconv.Itoa(int(n)) + ")" 115 } 116 for i := uint32(0); i <= 32; i++ { 117 val := uint32(x) 118 if val&(1<<i) != 0 { 119 if s != "" { 120 s += "|" 121 } 122 s += str(1 << i) 123 } 124 } 125 if s == "" { 126 return str(uint32(x)) 127 } 128 return s 129 } 130 131 // IPMroute defines type 'ip_mroute'. 132 type IPMroute struct { 133 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 134 EntryFlags mfib_types.MfibEntryFlags `binapi:"mfib_entry_flags,name=entry_flags" json:"entry_flags,omitempty"` 135 RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"` 136 Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"` 137 NPaths uint8 `binapi:"u8,name=n_paths" json:"-"` 138 Paths []mfib_types.MfibPath `binapi:"mfib_path[n_paths],name=paths" json:"paths,omitempty"` 139 } 140 141 // IPPathMtu defines type 'ip_path_mtu'. 142 type IPPathMtu struct { 143 ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"` 144 Context uint32 `binapi:"u32,name=context" json:"context,omitempty"` 145 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 146 Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"` 147 PathMtu uint16 `binapi:"u16,name=path_mtu" json:"path_mtu,omitempty"` 148 } 149 150 // IPRoute defines type 'ip_route'. 151 type IPRoute struct { 152 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 153 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` 154 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 155 NPaths uint8 `binapi:"u8,name=n_paths" json:"-"` 156 Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"` 157 } 158 159 // IPRouteV2 defines type 'ip_route_v2'. 160 type IPRouteV2 struct { 161 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 162 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` 163 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 164 NPaths uint8 `binapi:"u8,name=n_paths" json:"-"` 165 Src uint8 `binapi:"u8,name=src" json:"src,omitempty"` 166 Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"` 167 } 168 169 // IPTable defines type 'ip_table'. 170 type IPTable struct { 171 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 172 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` 173 Name string `binapi:"string[64],name=name" json:"name,omitempty"` 174 } 175 176 // PuntRedirect defines type 'punt_redirect'. 177 type PuntRedirect struct { 178 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` 179 TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"` 180 Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"` 181 } 182 183 // PuntRedirectV2 defines type 'punt_redirect_v2'. 184 type PuntRedirectV2 struct { 185 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index,default=4294967295" json:"rx_sw_if_index,omitempty"` 186 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"` 187 NPaths uint32 `binapi:"u32,name=n_paths" json:"-"` 188 Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"` 189 } 190 191 // AddDelIPPuntRedirectV2 defines message 'add_del_ip_punt_redirect_v2'. 192 type AddDelIPPuntRedirectV2 struct { 193 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 194 Punt PuntRedirectV2 `binapi:"punt_redirect_v2,name=punt" json:"punt,omitempty"` 195 } 196 197 func (m *AddDelIPPuntRedirectV2) Reset() { *m = AddDelIPPuntRedirectV2{} } 198 func (*AddDelIPPuntRedirectV2) GetMessageName() string { return "add_del_ip_punt_redirect_v2" } 199 func (*AddDelIPPuntRedirectV2) GetCrcString() string { return "9e804227" } 200 func (*AddDelIPPuntRedirectV2) GetMessageType() api.MessageType { 201 return api.RequestMessage 202 } 203 204 func (m *AddDelIPPuntRedirectV2) Size() (size int) { 205 if m == nil { 206 return 0 207 } 208 size += 1 // m.IsAdd 209 size += 4 // m.Punt.RxSwIfIndex 210 size += 1 // m.Punt.Af 211 size += 4 // m.Punt.NPaths 212 for j2 := 0; j2 < len(m.Punt.Paths); j2++ { 213 var s2 fib_types.FibPath 214 _ = s2 215 if j2 < len(m.Punt.Paths) { 216 s2 = m.Punt.Paths[j2] 217 } 218 size += 4 // s2.SwIfIndex 219 size += 4 // s2.TableID 220 size += 4 // s2.RpfID 221 size += 1 // s2.Weight 222 size += 1 // s2.Preference 223 size += 4 // s2.Type 224 size += 4 // s2.Flags 225 size += 4 // s2.Proto 226 size += 1 * 16 // s2.Nh.Address 227 size += 4 // s2.Nh.ViaLabel 228 size += 4 // s2.Nh.ObjID 229 size += 4 // s2.Nh.ClassifyTableIndex 230 size += 1 // s2.NLabels 231 for j3 := 0; j3 < 16; j3++ { 232 size += 1 // s2.LabelStack[j3].IsUniform 233 size += 4 // s2.LabelStack[j3].Label 234 size += 1 // s2.LabelStack[j3].TTL 235 size += 1 // s2.LabelStack[j3].Exp 236 } 237 } 238 return size 239 } 240 func (m *AddDelIPPuntRedirectV2) Marshal(b []byte) ([]byte, error) { 241 if b == nil { 242 b = make([]byte, m.Size()) 243 } 244 buf := codec.NewBuffer(b) 245 buf.EncodeBool(m.IsAdd) 246 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex)) 247 buf.EncodeUint8(uint8(m.Punt.Af)) 248 buf.EncodeUint32(uint32(len(m.Punt.Paths))) 249 for j1 := 0; j1 < len(m.Punt.Paths); j1++ { 250 var v1 fib_types.FibPath // Paths 251 if j1 < len(m.Punt.Paths) { 252 v1 = m.Punt.Paths[j1] 253 } 254 buf.EncodeUint32(v1.SwIfIndex) 255 buf.EncodeUint32(v1.TableID) 256 buf.EncodeUint32(v1.RpfID) 257 buf.EncodeUint8(v1.Weight) 258 buf.EncodeUint8(v1.Preference) 259 buf.EncodeUint32(uint32(v1.Type)) 260 buf.EncodeUint32(uint32(v1.Flags)) 261 buf.EncodeUint32(uint32(v1.Proto)) 262 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 263 buf.EncodeUint32(v1.Nh.ViaLabel) 264 buf.EncodeUint32(v1.Nh.ObjID) 265 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 266 buf.EncodeUint8(v1.NLabels) 267 for j2 := 0; j2 < 16; j2++ { 268 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 269 buf.EncodeUint32(v1.LabelStack[j2].Label) 270 buf.EncodeUint8(v1.LabelStack[j2].TTL) 271 buf.EncodeUint8(v1.LabelStack[j2].Exp) 272 } 273 } 274 return buf.Bytes(), nil 275 } 276 func (m *AddDelIPPuntRedirectV2) Unmarshal(b []byte) error { 277 buf := codec.NewBuffer(b) 278 m.IsAdd = buf.DecodeBool() 279 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 280 m.Punt.Af = ip_types.AddressFamily(buf.DecodeUint8()) 281 m.Punt.NPaths = buf.DecodeUint32() 282 m.Punt.Paths = make([]fib_types.FibPath, m.Punt.NPaths) 283 for j1 := 0; j1 < len(m.Punt.Paths); j1++ { 284 m.Punt.Paths[j1].SwIfIndex = buf.DecodeUint32() 285 m.Punt.Paths[j1].TableID = buf.DecodeUint32() 286 m.Punt.Paths[j1].RpfID = buf.DecodeUint32() 287 m.Punt.Paths[j1].Weight = buf.DecodeUint8() 288 m.Punt.Paths[j1].Preference = buf.DecodeUint8() 289 m.Punt.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 290 m.Punt.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 291 m.Punt.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 292 copy(m.Punt.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 293 m.Punt.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 294 m.Punt.Paths[j1].Nh.ObjID = buf.DecodeUint32() 295 m.Punt.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 296 m.Punt.Paths[j1].NLabels = buf.DecodeUint8() 297 for j2 := 0; j2 < 16; j2++ { 298 m.Punt.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 299 m.Punt.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 300 m.Punt.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 301 m.Punt.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 302 } 303 } 304 return nil 305 } 306 307 // AddDelIPPuntRedirectV2Reply defines message 'add_del_ip_punt_redirect_v2_reply'. 308 type AddDelIPPuntRedirectV2Reply struct { 309 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 310 } 311 312 func (m *AddDelIPPuntRedirectV2Reply) Reset() { *m = AddDelIPPuntRedirectV2Reply{} } 313 func (*AddDelIPPuntRedirectV2Reply) GetMessageName() string { 314 return "add_del_ip_punt_redirect_v2_reply" 315 } 316 func (*AddDelIPPuntRedirectV2Reply) GetCrcString() string { return "e8d4e804" } 317 func (*AddDelIPPuntRedirectV2Reply) GetMessageType() api.MessageType { 318 return api.ReplyMessage 319 } 320 321 func (m *AddDelIPPuntRedirectV2Reply) Size() (size int) { 322 if m == nil { 323 return 0 324 } 325 size += 4 // m.Retval 326 return size 327 } 328 func (m *AddDelIPPuntRedirectV2Reply) Marshal(b []byte) ([]byte, error) { 329 if b == nil { 330 b = make([]byte, m.Size()) 331 } 332 buf := codec.NewBuffer(b) 333 buf.EncodeInt32(m.Retval) 334 return buf.Bytes(), nil 335 } 336 func (m *AddDelIPPuntRedirectV2Reply) Unmarshal(b []byte) error { 337 buf := codec.NewBuffer(b) 338 m.Retval = buf.DecodeInt32() 339 return nil 340 } 341 342 // IoamDisable defines message 'ioam_disable'. 343 type IoamDisable struct { 344 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"` 345 } 346 347 func (m *IoamDisable) Reset() { *m = IoamDisable{} } 348 func (*IoamDisable) GetMessageName() string { return "ioam_disable" } 349 func (*IoamDisable) GetCrcString() string { return "6b16a45e" } 350 func (*IoamDisable) GetMessageType() api.MessageType { 351 return api.RequestMessage 352 } 353 354 func (m *IoamDisable) Size() (size int) { 355 if m == nil { 356 return 0 357 } 358 size += 2 // m.ID 359 return size 360 } 361 func (m *IoamDisable) Marshal(b []byte) ([]byte, error) { 362 if b == nil { 363 b = make([]byte, m.Size()) 364 } 365 buf := codec.NewBuffer(b) 366 buf.EncodeUint16(m.ID) 367 return buf.Bytes(), nil 368 } 369 func (m *IoamDisable) Unmarshal(b []byte) error { 370 buf := codec.NewBuffer(b) 371 m.ID = buf.DecodeUint16() 372 return nil 373 } 374 375 // IoamDisableReply defines message 'ioam_disable_reply'. 376 type IoamDisableReply struct { 377 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 378 } 379 380 func (m *IoamDisableReply) Reset() { *m = IoamDisableReply{} } 381 func (*IoamDisableReply) GetMessageName() string { return "ioam_disable_reply" } 382 func (*IoamDisableReply) GetCrcString() string { return "e8d4e804" } 383 func (*IoamDisableReply) GetMessageType() api.MessageType { 384 return api.ReplyMessage 385 } 386 387 func (m *IoamDisableReply) Size() (size int) { 388 if m == nil { 389 return 0 390 } 391 size += 4 // m.Retval 392 return size 393 } 394 func (m *IoamDisableReply) Marshal(b []byte) ([]byte, error) { 395 if b == nil { 396 b = make([]byte, m.Size()) 397 } 398 buf := codec.NewBuffer(b) 399 buf.EncodeInt32(m.Retval) 400 return buf.Bytes(), nil 401 } 402 func (m *IoamDisableReply) Unmarshal(b []byte) error { 403 buf := codec.NewBuffer(b) 404 m.Retval = buf.DecodeInt32() 405 return nil 406 } 407 408 // IoamEnable defines message 'ioam_enable'. 409 type IoamEnable struct { 410 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"` 411 Seqno bool `binapi:"bool,name=seqno" json:"seqno,omitempty"` 412 Analyse bool `binapi:"bool,name=analyse" json:"analyse,omitempty"` 413 PotEnable bool `binapi:"bool,name=pot_enable" json:"pot_enable,omitempty"` 414 TraceEnable bool `binapi:"bool,name=trace_enable" json:"trace_enable,omitempty"` 415 NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"` 416 } 417 418 func (m *IoamEnable) Reset() { *m = IoamEnable{} } 419 func (*IoamEnable) GetMessageName() string { return "ioam_enable" } 420 func (*IoamEnable) GetCrcString() string { return "51ccd868" } 421 func (*IoamEnable) GetMessageType() api.MessageType { 422 return api.RequestMessage 423 } 424 425 func (m *IoamEnable) Size() (size int) { 426 if m == nil { 427 return 0 428 } 429 size += 2 // m.ID 430 size += 1 // m.Seqno 431 size += 1 // m.Analyse 432 size += 1 // m.PotEnable 433 size += 1 // m.TraceEnable 434 size += 4 // m.NodeID 435 return size 436 } 437 func (m *IoamEnable) Marshal(b []byte) ([]byte, error) { 438 if b == nil { 439 b = make([]byte, m.Size()) 440 } 441 buf := codec.NewBuffer(b) 442 buf.EncodeUint16(m.ID) 443 buf.EncodeBool(m.Seqno) 444 buf.EncodeBool(m.Analyse) 445 buf.EncodeBool(m.PotEnable) 446 buf.EncodeBool(m.TraceEnable) 447 buf.EncodeUint32(m.NodeID) 448 return buf.Bytes(), nil 449 } 450 func (m *IoamEnable) Unmarshal(b []byte) error { 451 buf := codec.NewBuffer(b) 452 m.ID = buf.DecodeUint16() 453 m.Seqno = buf.DecodeBool() 454 m.Analyse = buf.DecodeBool() 455 m.PotEnable = buf.DecodeBool() 456 m.TraceEnable = buf.DecodeBool() 457 m.NodeID = buf.DecodeUint32() 458 return nil 459 } 460 461 // IoamEnableReply defines message 'ioam_enable_reply'. 462 type IoamEnableReply struct { 463 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 464 } 465 466 func (m *IoamEnableReply) Reset() { *m = IoamEnableReply{} } 467 func (*IoamEnableReply) GetMessageName() string { return "ioam_enable_reply" } 468 func (*IoamEnableReply) GetCrcString() string { return "e8d4e804" } 469 func (*IoamEnableReply) GetMessageType() api.MessageType { 470 return api.ReplyMessage 471 } 472 473 func (m *IoamEnableReply) Size() (size int) { 474 if m == nil { 475 return 0 476 } 477 size += 4 // m.Retval 478 return size 479 } 480 func (m *IoamEnableReply) Marshal(b []byte) ([]byte, error) { 481 if b == nil { 482 b = make([]byte, m.Size()) 483 } 484 buf := codec.NewBuffer(b) 485 buf.EncodeInt32(m.Retval) 486 return buf.Bytes(), nil 487 } 488 func (m *IoamEnableReply) Unmarshal(b []byte) error { 489 buf := codec.NewBuffer(b) 490 m.Retval = buf.DecodeInt32() 491 return nil 492 } 493 494 // IPAddressDetails defines message 'ip_address_details'. 495 type IPAddressDetails struct { 496 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 497 Prefix ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"` 498 } 499 500 func (m *IPAddressDetails) Reset() { *m = IPAddressDetails{} } 501 func (*IPAddressDetails) GetMessageName() string { return "ip_address_details" } 502 func (*IPAddressDetails) GetCrcString() string { return "ee29b797" } 503 func (*IPAddressDetails) GetMessageType() api.MessageType { 504 return api.ReplyMessage 505 } 506 507 func (m *IPAddressDetails) Size() (size int) { 508 if m == nil { 509 return 0 510 } 511 size += 4 // m.SwIfIndex 512 size += 1 // m.Prefix.Address.Af 513 size += 1 * 16 // m.Prefix.Address.Un 514 size += 1 // m.Prefix.Len 515 return size 516 } 517 func (m *IPAddressDetails) Marshal(b []byte) ([]byte, error) { 518 if b == nil { 519 b = make([]byte, m.Size()) 520 } 521 buf := codec.NewBuffer(b) 522 buf.EncodeUint32(uint32(m.SwIfIndex)) 523 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 524 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 525 buf.EncodeUint8(m.Prefix.Len) 526 return buf.Bytes(), nil 527 } 528 func (m *IPAddressDetails) Unmarshal(b []byte) error { 529 buf := codec.NewBuffer(b) 530 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 531 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 532 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 533 m.Prefix.Len = buf.DecodeUint8() 534 return nil 535 } 536 537 // IPAddressDump defines message 'ip_address_dump'. 538 type IPAddressDump struct { 539 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 540 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 541 } 542 543 func (m *IPAddressDump) Reset() { *m = IPAddressDump{} } 544 func (*IPAddressDump) GetMessageName() string { return "ip_address_dump" } 545 func (*IPAddressDump) GetCrcString() string { return "2d033de4" } 546 func (*IPAddressDump) GetMessageType() api.MessageType { 547 return api.RequestMessage 548 } 549 550 func (m *IPAddressDump) Size() (size int) { 551 if m == nil { 552 return 0 553 } 554 size += 4 // m.SwIfIndex 555 size += 1 // m.IsIPv6 556 return size 557 } 558 func (m *IPAddressDump) Marshal(b []byte) ([]byte, error) { 559 if b == nil { 560 b = make([]byte, m.Size()) 561 } 562 buf := codec.NewBuffer(b) 563 buf.EncodeUint32(uint32(m.SwIfIndex)) 564 buf.EncodeBool(m.IsIPv6) 565 return buf.Bytes(), nil 566 } 567 func (m *IPAddressDump) Unmarshal(b []byte) error { 568 buf := codec.NewBuffer(b) 569 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 570 m.IsIPv6 = buf.DecodeBool() 571 return nil 572 } 573 574 // IPContainerProxyAddDel defines message 'ip_container_proxy_add_del'. 575 type IPContainerProxyAddDel struct { 576 Pfx ip_types.Prefix `binapi:"prefix,name=pfx" json:"pfx,omitempty"` 577 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 578 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 579 } 580 581 func (m *IPContainerProxyAddDel) Reset() { *m = IPContainerProxyAddDel{} } 582 func (*IPContainerProxyAddDel) GetMessageName() string { return "ip_container_proxy_add_del" } 583 func (*IPContainerProxyAddDel) GetCrcString() string { return "7df1dff1" } 584 func (*IPContainerProxyAddDel) GetMessageType() api.MessageType { 585 return api.RequestMessage 586 } 587 588 func (m *IPContainerProxyAddDel) Size() (size int) { 589 if m == nil { 590 return 0 591 } 592 size += 1 // m.Pfx.Address.Af 593 size += 1 * 16 // m.Pfx.Address.Un 594 size += 1 // m.Pfx.Len 595 size += 4 // m.SwIfIndex 596 size += 1 // m.IsAdd 597 return size 598 } 599 func (m *IPContainerProxyAddDel) Marshal(b []byte) ([]byte, error) { 600 if b == nil { 601 b = make([]byte, m.Size()) 602 } 603 buf := codec.NewBuffer(b) 604 buf.EncodeUint8(uint8(m.Pfx.Address.Af)) 605 buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16) 606 buf.EncodeUint8(m.Pfx.Len) 607 buf.EncodeUint32(uint32(m.SwIfIndex)) 608 buf.EncodeBool(m.IsAdd) 609 return buf.Bytes(), nil 610 } 611 func (m *IPContainerProxyAddDel) Unmarshal(b []byte) error { 612 buf := codec.NewBuffer(b) 613 m.Pfx.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 614 copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 615 m.Pfx.Len = buf.DecodeUint8() 616 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 617 m.IsAdd = buf.DecodeBool() 618 return nil 619 } 620 621 // IPContainerProxyAddDelReply defines message 'ip_container_proxy_add_del_reply'. 622 type IPContainerProxyAddDelReply struct { 623 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 624 } 625 626 func (m *IPContainerProxyAddDelReply) Reset() { *m = IPContainerProxyAddDelReply{} } 627 func (*IPContainerProxyAddDelReply) GetMessageName() string { 628 return "ip_container_proxy_add_del_reply" 629 } 630 func (*IPContainerProxyAddDelReply) GetCrcString() string { return "e8d4e804" } 631 func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType { 632 return api.ReplyMessage 633 } 634 635 func (m *IPContainerProxyAddDelReply) Size() (size int) { 636 if m == nil { 637 return 0 638 } 639 size += 4 // m.Retval 640 return size 641 } 642 func (m *IPContainerProxyAddDelReply) Marshal(b []byte) ([]byte, error) { 643 if b == nil { 644 b = make([]byte, m.Size()) 645 } 646 buf := codec.NewBuffer(b) 647 buf.EncodeInt32(m.Retval) 648 return buf.Bytes(), nil 649 } 650 func (m *IPContainerProxyAddDelReply) Unmarshal(b []byte) error { 651 buf := codec.NewBuffer(b) 652 m.Retval = buf.DecodeInt32() 653 return nil 654 } 655 656 // IPContainerProxyDetails defines message 'ip_container_proxy_details'. 657 type IPContainerProxyDetails struct { 658 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 659 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 660 } 661 662 func (m *IPContainerProxyDetails) Reset() { *m = IPContainerProxyDetails{} } 663 func (*IPContainerProxyDetails) GetMessageName() string { return "ip_container_proxy_details" } 664 func (*IPContainerProxyDetails) GetCrcString() string { return "a8085523" } 665 func (*IPContainerProxyDetails) GetMessageType() api.MessageType { 666 return api.ReplyMessage 667 } 668 669 func (m *IPContainerProxyDetails) Size() (size int) { 670 if m == nil { 671 return 0 672 } 673 size += 4 // m.SwIfIndex 674 size += 1 // m.Prefix.Address.Af 675 size += 1 * 16 // m.Prefix.Address.Un 676 size += 1 // m.Prefix.Len 677 return size 678 } 679 func (m *IPContainerProxyDetails) Marshal(b []byte) ([]byte, error) { 680 if b == nil { 681 b = make([]byte, m.Size()) 682 } 683 buf := codec.NewBuffer(b) 684 buf.EncodeUint32(uint32(m.SwIfIndex)) 685 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 686 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 687 buf.EncodeUint8(m.Prefix.Len) 688 return buf.Bytes(), nil 689 } 690 func (m *IPContainerProxyDetails) Unmarshal(b []byte) error { 691 buf := codec.NewBuffer(b) 692 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 693 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 694 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 695 m.Prefix.Len = buf.DecodeUint8() 696 return nil 697 } 698 699 // IPContainerProxyDump defines message 'ip_container_proxy_dump'. 700 type IPContainerProxyDump struct{} 701 702 func (m *IPContainerProxyDump) Reset() { *m = IPContainerProxyDump{} } 703 func (*IPContainerProxyDump) GetMessageName() string { return "ip_container_proxy_dump" } 704 func (*IPContainerProxyDump) GetCrcString() string { return "51077d14" } 705 func (*IPContainerProxyDump) GetMessageType() api.MessageType { 706 return api.RequestMessage 707 } 708 709 func (m *IPContainerProxyDump) Size() (size int) { 710 if m == nil { 711 return 0 712 } 713 return size 714 } 715 func (m *IPContainerProxyDump) Marshal(b []byte) ([]byte, error) { 716 if b == nil { 717 b = make([]byte, m.Size()) 718 } 719 buf := codec.NewBuffer(b) 720 return buf.Bytes(), nil 721 } 722 func (m *IPContainerProxyDump) Unmarshal(b []byte) error { 723 return nil 724 } 725 726 // IPDetails defines message 'ip_details'. 727 type IPDetails struct { 728 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 729 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 730 } 731 732 func (m *IPDetails) Reset() { *m = IPDetails{} } 733 func (*IPDetails) GetMessageName() string { return "ip_details" } 734 func (*IPDetails) GetCrcString() string { return "eb152d07" } 735 func (*IPDetails) GetMessageType() api.MessageType { 736 return api.ReplyMessage 737 } 738 739 func (m *IPDetails) Size() (size int) { 740 if m == nil { 741 return 0 742 } 743 size += 4 // m.SwIfIndex 744 size += 1 // m.IsIPv6 745 return size 746 } 747 func (m *IPDetails) Marshal(b []byte) ([]byte, error) { 748 if b == nil { 749 b = make([]byte, m.Size()) 750 } 751 buf := codec.NewBuffer(b) 752 buf.EncodeUint32(uint32(m.SwIfIndex)) 753 buf.EncodeBool(m.IsIPv6) 754 return buf.Bytes(), nil 755 } 756 func (m *IPDetails) Unmarshal(b []byte) error { 757 buf := codec.NewBuffer(b) 758 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 759 m.IsIPv6 = buf.DecodeBool() 760 return nil 761 } 762 763 // IPDump defines message 'ip_dump'. 764 type IPDump struct { 765 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 766 } 767 768 func (m *IPDump) Reset() { *m = IPDump{} } 769 func (*IPDump) GetMessageName() string { return "ip_dump" } 770 func (*IPDump) GetCrcString() string { return "98d231ca" } 771 func (*IPDump) GetMessageType() api.MessageType { 772 return api.RequestMessage 773 } 774 775 func (m *IPDump) Size() (size int) { 776 if m == nil { 777 return 0 778 } 779 size += 1 // m.IsIPv6 780 return size 781 } 782 func (m *IPDump) Marshal(b []byte) ([]byte, error) { 783 if b == nil { 784 b = make([]byte, m.Size()) 785 } 786 buf := codec.NewBuffer(b) 787 buf.EncodeBool(m.IsIPv6) 788 return buf.Bytes(), nil 789 } 790 func (m *IPDump) Unmarshal(b []byte) error { 791 buf := codec.NewBuffer(b) 792 m.IsIPv6 = buf.DecodeBool() 793 return nil 794 } 795 796 // IPLocalReassEnableDisable defines message 'ip_local_reass_enable_disable'. 797 type IPLocalReassEnableDisable struct { 798 EnableIP4 bool `binapi:"bool,name=enable_ip4" json:"enable_ip4,omitempty"` 799 EnableIP6 bool `binapi:"bool,name=enable_ip6" json:"enable_ip6,omitempty"` 800 } 801 802 func (m *IPLocalReassEnableDisable) Reset() { *m = IPLocalReassEnableDisable{} } 803 func (*IPLocalReassEnableDisable) GetMessageName() string { return "ip_local_reass_enable_disable" } 804 func (*IPLocalReassEnableDisable) GetCrcString() string { return "34e2ccc4" } 805 func (*IPLocalReassEnableDisable) GetMessageType() api.MessageType { 806 return api.RequestMessage 807 } 808 809 func (m *IPLocalReassEnableDisable) Size() (size int) { 810 if m == nil { 811 return 0 812 } 813 size += 1 // m.EnableIP4 814 size += 1 // m.EnableIP6 815 return size 816 } 817 func (m *IPLocalReassEnableDisable) Marshal(b []byte) ([]byte, error) { 818 if b == nil { 819 b = make([]byte, m.Size()) 820 } 821 buf := codec.NewBuffer(b) 822 buf.EncodeBool(m.EnableIP4) 823 buf.EncodeBool(m.EnableIP6) 824 return buf.Bytes(), nil 825 } 826 func (m *IPLocalReassEnableDisable) Unmarshal(b []byte) error { 827 buf := codec.NewBuffer(b) 828 m.EnableIP4 = buf.DecodeBool() 829 m.EnableIP6 = buf.DecodeBool() 830 return nil 831 } 832 833 // IPLocalReassEnableDisableReply defines message 'ip_local_reass_enable_disable_reply'. 834 type IPLocalReassEnableDisableReply struct { 835 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 836 } 837 838 func (m *IPLocalReassEnableDisableReply) Reset() { *m = IPLocalReassEnableDisableReply{} } 839 func (*IPLocalReassEnableDisableReply) GetMessageName() string { 840 return "ip_local_reass_enable_disable_reply" 841 } 842 func (*IPLocalReassEnableDisableReply) GetCrcString() string { return "e8d4e804" } 843 func (*IPLocalReassEnableDisableReply) GetMessageType() api.MessageType { 844 return api.ReplyMessage 845 } 846 847 func (m *IPLocalReassEnableDisableReply) Size() (size int) { 848 if m == nil { 849 return 0 850 } 851 size += 4 // m.Retval 852 return size 853 } 854 func (m *IPLocalReassEnableDisableReply) Marshal(b []byte) ([]byte, error) { 855 if b == nil { 856 b = make([]byte, m.Size()) 857 } 858 buf := codec.NewBuffer(b) 859 buf.EncodeInt32(m.Retval) 860 return buf.Bytes(), nil 861 } 862 func (m *IPLocalReassEnableDisableReply) Unmarshal(b []byte) error { 863 buf := codec.NewBuffer(b) 864 m.Retval = buf.DecodeInt32() 865 return nil 866 } 867 868 // IPLocalReassGet defines message 'ip_local_reass_get'. 869 type IPLocalReassGet struct{} 870 871 func (m *IPLocalReassGet) Reset() { *m = IPLocalReassGet{} } 872 func (*IPLocalReassGet) GetMessageName() string { return "ip_local_reass_get" } 873 func (*IPLocalReassGet) GetCrcString() string { return "51077d14" } 874 func (*IPLocalReassGet) GetMessageType() api.MessageType { 875 return api.RequestMessage 876 } 877 878 func (m *IPLocalReassGet) Size() (size int) { 879 if m == nil { 880 return 0 881 } 882 return size 883 } 884 func (m *IPLocalReassGet) Marshal(b []byte) ([]byte, error) { 885 if b == nil { 886 b = make([]byte, m.Size()) 887 } 888 buf := codec.NewBuffer(b) 889 return buf.Bytes(), nil 890 } 891 func (m *IPLocalReassGet) Unmarshal(b []byte) error { 892 return nil 893 } 894 895 // IPLocalReassGetReply defines message 'ip_local_reass_get_reply'. 896 type IPLocalReassGetReply struct { 897 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 898 IP4IsEnabled bool `binapi:"bool,name=ip4_is_enabled" json:"ip4_is_enabled,omitempty"` 899 IP6IsEnabled bool `binapi:"bool,name=ip6_is_enabled" json:"ip6_is_enabled,omitempty"` 900 } 901 902 func (m *IPLocalReassGetReply) Reset() { *m = IPLocalReassGetReply{} } 903 func (*IPLocalReassGetReply) GetMessageName() string { return "ip_local_reass_get_reply" } 904 func (*IPLocalReassGetReply) GetCrcString() string { return "3e93a702" } 905 func (*IPLocalReassGetReply) GetMessageType() api.MessageType { 906 return api.ReplyMessage 907 } 908 909 func (m *IPLocalReassGetReply) Size() (size int) { 910 if m == nil { 911 return 0 912 } 913 size += 4 // m.Retval 914 size += 1 // m.IP4IsEnabled 915 size += 1 // m.IP6IsEnabled 916 return size 917 } 918 func (m *IPLocalReassGetReply) Marshal(b []byte) ([]byte, error) { 919 if b == nil { 920 b = make([]byte, m.Size()) 921 } 922 buf := codec.NewBuffer(b) 923 buf.EncodeInt32(m.Retval) 924 buf.EncodeBool(m.IP4IsEnabled) 925 buf.EncodeBool(m.IP6IsEnabled) 926 return buf.Bytes(), nil 927 } 928 func (m *IPLocalReassGetReply) Unmarshal(b []byte) error { 929 buf := codec.NewBuffer(b) 930 m.Retval = buf.DecodeInt32() 931 m.IP4IsEnabled = buf.DecodeBool() 932 m.IP6IsEnabled = buf.DecodeBool() 933 return nil 934 } 935 936 // IPMrouteAddDel defines message 'ip_mroute_add_del'. 937 type IPMrouteAddDel struct { 938 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 939 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"` 940 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"` 941 } 942 943 func (m *IPMrouteAddDel) Reset() { *m = IPMrouteAddDel{} } 944 func (*IPMrouteAddDel) GetMessageName() string { return "ip_mroute_add_del" } 945 func (*IPMrouteAddDel) GetCrcString() string { return "0dd7e790" } 946 func (*IPMrouteAddDel) GetMessageType() api.MessageType { 947 return api.RequestMessage 948 } 949 950 func (m *IPMrouteAddDel) Size() (size int) { 951 if m == nil { 952 return 0 953 } 954 size += 1 // m.IsAdd 955 size += 1 // m.IsMultipath 956 size += 4 // m.Route.TableID 957 size += 4 // m.Route.EntryFlags 958 size += 4 // m.Route.RpfID 959 size += 1 // m.Route.Prefix.Af 960 size += 2 // m.Route.Prefix.GrpAddressLength 961 size += 1 * 16 // m.Route.Prefix.GrpAddress 962 size += 1 * 16 // m.Route.Prefix.SrcAddress 963 size += 1 // m.Route.NPaths 964 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 965 var s2 mfib_types.MfibPath 966 _ = s2 967 if j2 < len(m.Route.Paths) { 968 s2 = m.Route.Paths[j2] 969 } 970 size += 4 // s2.ItfFlags 971 size += 4 // s2.Path.SwIfIndex 972 size += 4 // s2.Path.TableID 973 size += 4 // s2.Path.RpfID 974 size += 1 // s2.Path.Weight 975 size += 1 // s2.Path.Preference 976 size += 4 // s2.Path.Type 977 size += 4 // s2.Path.Flags 978 size += 4 // s2.Path.Proto 979 size += 1 * 16 // s2.Path.Nh.Address 980 size += 4 // s2.Path.Nh.ViaLabel 981 size += 4 // s2.Path.Nh.ObjID 982 size += 4 // s2.Path.Nh.ClassifyTableIndex 983 size += 1 // s2.Path.NLabels 984 for j4 := 0; j4 < 16; j4++ { 985 size += 1 // s2.Path.LabelStack[j4].IsUniform 986 size += 4 // s2.Path.LabelStack[j4].Label 987 size += 1 // s2.Path.LabelStack[j4].TTL 988 size += 1 // s2.Path.LabelStack[j4].Exp 989 } 990 } 991 return size 992 } 993 func (m *IPMrouteAddDel) Marshal(b []byte) ([]byte, error) { 994 if b == nil { 995 b = make([]byte, m.Size()) 996 } 997 buf := codec.NewBuffer(b) 998 buf.EncodeBool(m.IsAdd) 999 buf.EncodeBool(m.IsMultipath) 1000 buf.EncodeUint32(m.Route.TableID) 1001 buf.EncodeUint32(uint32(m.Route.EntryFlags)) 1002 buf.EncodeUint32(m.Route.RpfID) 1003 buf.EncodeUint8(uint8(m.Route.Prefix.Af)) 1004 buf.EncodeUint16(m.Route.Prefix.GrpAddressLength) 1005 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16) 1006 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16) 1007 buf.EncodeUint8(uint8(len(m.Route.Paths))) 1008 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 1009 var v1 mfib_types.MfibPath // Paths 1010 if j1 < len(m.Route.Paths) { 1011 v1 = m.Route.Paths[j1] 1012 } 1013 buf.EncodeUint32(uint32(v1.ItfFlags)) 1014 buf.EncodeUint32(v1.Path.SwIfIndex) 1015 buf.EncodeUint32(v1.Path.TableID) 1016 buf.EncodeUint32(v1.Path.RpfID) 1017 buf.EncodeUint8(v1.Path.Weight) 1018 buf.EncodeUint8(v1.Path.Preference) 1019 buf.EncodeUint32(uint32(v1.Path.Type)) 1020 buf.EncodeUint32(uint32(v1.Path.Flags)) 1021 buf.EncodeUint32(uint32(v1.Path.Proto)) 1022 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16) 1023 buf.EncodeUint32(v1.Path.Nh.ViaLabel) 1024 buf.EncodeUint32(v1.Path.Nh.ObjID) 1025 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex) 1026 buf.EncodeUint8(v1.Path.NLabels) 1027 for j3 := 0; j3 < 16; j3++ { 1028 buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform) 1029 buf.EncodeUint32(v1.Path.LabelStack[j3].Label) 1030 buf.EncodeUint8(v1.Path.LabelStack[j3].TTL) 1031 buf.EncodeUint8(v1.Path.LabelStack[j3].Exp) 1032 } 1033 } 1034 return buf.Bytes(), nil 1035 } 1036 func (m *IPMrouteAddDel) Unmarshal(b []byte) error { 1037 buf := codec.NewBuffer(b) 1038 m.IsAdd = buf.DecodeBool() 1039 m.IsMultipath = buf.DecodeBool() 1040 m.Route.TableID = buf.DecodeUint32() 1041 m.Route.EntryFlags = mfib_types.MfibEntryFlags(buf.DecodeUint32()) 1042 m.Route.RpfID = buf.DecodeUint32() 1043 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1044 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16() 1045 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 1046 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 1047 m.Route.NPaths = buf.DecodeUint8() 1048 m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths) 1049 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 1050 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32()) 1051 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32() 1052 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32() 1053 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32() 1054 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8() 1055 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8() 1056 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32()) 1057 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 1058 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 1059 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 1060 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32() 1061 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32() 1062 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32() 1063 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8() 1064 for j3 := 0; j3 < 16; j3++ { 1065 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8() 1066 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32() 1067 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8() 1068 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8() 1069 } 1070 } 1071 return nil 1072 } 1073 1074 // IPMrouteAddDelReply defines message 'ip_mroute_add_del_reply'. 1075 type IPMrouteAddDelReply struct { 1076 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1077 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` 1078 } 1079 1080 func (m *IPMrouteAddDelReply) Reset() { *m = IPMrouteAddDelReply{} } 1081 func (*IPMrouteAddDelReply) GetMessageName() string { return "ip_mroute_add_del_reply" } 1082 func (*IPMrouteAddDelReply) GetCrcString() string { return "1992deab" } 1083 func (*IPMrouteAddDelReply) GetMessageType() api.MessageType { 1084 return api.ReplyMessage 1085 } 1086 1087 func (m *IPMrouteAddDelReply) Size() (size int) { 1088 if m == nil { 1089 return 0 1090 } 1091 size += 4 // m.Retval 1092 size += 4 // m.StatsIndex 1093 return size 1094 } 1095 func (m *IPMrouteAddDelReply) Marshal(b []byte) ([]byte, error) { 1096 if b == nil { 1097 b = make([]byte, m.Size()) 1098 } 1099 buf := codec.NewBuffer(b) 1100 buf.EncodeInt32(m.Retval) 1101 buf.EncodeUint32(m.StatsIndex) 1102 return buf.Bytes(), nil 1103 } 1104 func (m *IPMrouteAddDelReply) Unmarshal(b []byte) error { 1105 buf := codec.NewBuffer(b) 1106 m.Retval = buf.DecodeInt32() 1107 m.StatsIndex = buf.DecodeUint32() 1108 return nil 1109 } 1110 1111 // IPMrouteDetails defines message 'ip_mroute_details'. 1112 type IPMrouteDetails struct { 1113 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"` 1114 } 1115 1116 func (m *IPMrouteDetails) Reset() { *m = IPMrouteDetails{} } 1117 func (*IPMrouteDetails) GetMessageName() string { return "ip_mroute_details" } 1118 func (*IPMrouteDetails) GetCrcString() string { return "c5cb23fc" } 1119 func (*IPMrouteDetails) GetMessageType() api.MessageType { 1120 return api.ReplyMessage 1121 } 1122 1123 func (m *IPMrouteDetails) Size() (size int) { 1124 if m == nil { 1125 return 0 1126 } 1127 size += 4 // m.Route.TableID 1128 size += 4 // m.Route.EntryFlags 1129 size += 4 // m.Route.RpfID 1130 size += 1 // m.Route.Prefix.Af 1131 size += 2 // m.Route.Prefix.GrpAddressLength 1132 size += 1 * 16 // m.Route.Prefix.GrpAddress 1133 size += 1 * 16 // m.Route.Prefix.SrcAddress 1134 size += 1 // m.Route.NPaths 1135 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 1136 var s2 mfib_types.MfibPath 1137 _ = s2 1138 if j2 < len(m.Route.Paths) { 1139 s2 = m.Route.Paths[j2] 1140 } 1141 size += 4 // s2.ItfFlags 1142 size += 4 // s2.Path.SwIfIndex 1143 size += 4 // s2.Path.TableID 1144 size += 4 // s2.Path.RpfID 1145 size += 1 // s2.Path.Weight 1146 size += 1 // s2.Path.Preference 1147 size += 4 // s2.Path.Type 1148 size += 4 // s2.Path.Flags 1149 size += 4 // s2.Path.Proto 1150 size += 1 * 16 // s2.Path.Nh.Address 1151 size += 4 // s2.Path.Nh.ViaLabel 1152 size += 4 // s2.Path.Nh.ObjID 1153 size += 4 // s2.Path.Nh.ClassifyTableIndex 1154 size += 1 // s2.Path.NLabels 1155 for j4 := 0; j4 < 16; j4++ { 1156 size += 1 // s2.Path.LabelStack[j4].IsUniform 1157 size += 4 // s2.Path.LabelStack[j4].Label 1158 size += 1 // s2.Path.LabelStack[j4].TTL 1159 size += 1 // s2.Path.LabelStack[j4].Exp 1160 } 1161 } 1162 return size 1163 } 1164 func (m *IPMrouteDetails) Marshal(b []byte) ([]byte, error) { 1165 if b == nil { 1166 b = make([]byte, m.Size()) 1167 } 1168 buf := codec.NewBuffer(b) 1169 buf.EncodeUint32(m.Route.TableID) 1170 buf.EncodeUint32(uint32(m.Route.EntryFlags)) 1171 buf.EncodeUint32(m.Route.RpfID) 1172 buf.EncodeUint8(uint8(m.Route.Prefix.Af)) 1173 buf.EncodeUint16(m.Route.Prefix.GrpAddressLength) 1174 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16) 1175 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16) 1176 buf.EncodeUint8(uint8(len(m.Route.Paths))) 1177 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 1178 var v1 mfib_types.MfibPath // Paths 1179 if j1 < len(m.Route.Paths) { 1180 v1 = m.Route.Paths[j1] 1181 } 1182 buf.EncodeUint32(uint32(v1.ItfFlags)) 1183 buf.EncodeUint32(v1.Path.SwIfIndex) 1184 buf.EncodeUint32(v1.Path.TableID) 1185 buf.EncodeUint32(v1.Path.RpfID) 1186 buf.EncodeUint8(v1.Path.Weight) 1187 buf.EncodeUint8(v1.Path.Preference) 1188 buf.EncodeUint32(uint32(v1.Path.Type)) 1189 buf.EncodeUint32(uint32(v1.Path.Flags)) 1190 buf.EncodeUint32(uint32(v1.Path.Proto)) 1191 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16) 1192 buf.EncodeUint32(v1.Path.Nh.ViaLabel) 1193 buf.EncodeUint32(v1.Path.Nh.ObjID) 1194 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex) 1195 buf.EncodeUint8(v1.Path.NLabels) 1196 for j3 := 0; j3 < 16; j3++ { 1197 buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform) 1198 buf.EncodeUint32(v1.Path.LabelStack[j3].Label) 1199 buf.EncodeUint8(v1.Path.LabelStack[j3].TTL) 1200 buf.EncodeUint8(v1.Path.LabelStack[j3].Exp) 1201 } 1202 } 1203 return buf.Bytes(), nil 1204 } 1205 func (m *IPMrouteDetails) Unmarshal(b []byte) error { 1206 buf := codec.NewBuffer(b) 1207 m.Route.TableID = buf.DecodeUint32() 1208 m.Route.EntryFlags = mfib_types.MfibEntryFlags(buf.DecodeUint32()) 1209 m.Route.RpfID = buf.DecodeUint32() 1210 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1211 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16() 1212 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 1213 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 1214 m.Route.NPaths = buf.DecodeUint8() 1215 m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths) 1216 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 1217 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32()) 1218 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32() 1219 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32() 1220 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32() 1221 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8() 1222 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8() 1223 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32()) 1224 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 1225 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 1226 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 1227 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32() 1228 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32() 1229 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32() 1230 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8() 1231 for j3 := 0; j3 < 16; j3++ { 1232 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8() 1233 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32() 1234 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8() 1235 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8() 1236 } 1237 } 1238 return nil 1239 } 1240 1241 // IPMrouteDump defines message 'ip_mroute_dump'. 1242 type IPMrouteDump struct { 1243 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 1244 } 1245 1246 func (m *IPMrouteDump) Reset() { *m = IPMrouteDump{} } 1247 func (*IPMrouteDump) GetMessageName() string { return "ip_mroute_dump" } 1248 func (*IPMrouteDump) GetCrcString() string { return "b9d2e09e" } 1249 func (*IPMrouteDump) GetMessageType() api.MessageType { 1250 return api.RequestMessage 1251 } 1252 1253 func (m *IPMrouteDump) Size() (size int) { 1254 if m == nil { 1255 return 0 1256 } 1257 size += 4 // m.Table.TableID 1258 size += 1 // m.Table.IsIP6 1259 size += 64 // m.Table.Name 1260 return size 1261 } 1262 func (m *IPMrouteDump) Marshal(b []byte) ([]byte, error) { 1263 if b == nil { 1264 b = make([]byte, m.Size()) 1265 } 1266 buf := codec.NewBuffer(b) 1267 buf.EncodeUint32(m.Table.TableID) 1268 buf.EncodeBool(m.Table.IsIP6) 1269 buf.EncodeString(m.Table.Name, 64) 1270 return buf.Bytes(), nil 1271 } 1272 func (m *IPMrouteDump) Unmarshal(b []byte) error { 1273 buf := codec.NewBuffer(b) 1274 m.Table.TableID = buf.DecodeUint32() 1275 m.Table.IsIP6 = buf.DecodeBool() 1276 m.Table.Name = buf.DecodeString(64) 1277 return nil 1278 } 1279 1280 // IPMtableDetails defines message 'ip_mtable_details'. 1281 type IPMtableDetails struct { 1282 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 1283 } 1284 1285 func (m *IPMtableDetails) Reset() { *m = IPMtableDetails{} } 1286 func (*IPMtableDetails) GetMessageName() string { return "ip_mtable_details" } 1287 func (*IPMtableDetails) GetCrcString() string { return "b9d2e09e" } 1288 func (*IPMtableDetails) GetMessageType() api.MessageType { 1289 return api.RequestMessage 1290 } 1291 1292 func (m *IPMtableDetails) Size() (size int) { 1293 if m == nil { 1294 return 0 1295 } 1296 size += 4 // m.Table.TableID 1297 size += 1 // m.Table.IsIP6 1298 size += 64 // m.Table.Name 1299 return size 1300 } 1301 func (m *IPMtableDetails) Marshal(b []byte) ([]byte, error) { 1302 if b == nil { 1303 b = make([]byte, m.Size()) 1304 } 1305 buf := codec.NewBuffer(b) 1306 buf.EncodeUint32(m.Table.TableID) 1307 buf.EncodeBool(m.Table.IsIP6) 1308 buf.EncodeString(m.Table.Name, 64) 1309 return buf.Bytes(), nil 1310 } 1311 func (m *IPMtableDetails) Unmarshal(b []byte) error { 1312 buf := codec.NewBuffer(b) 1313 m.Table.TableID = buf.DecodeUint32() 1314 m.Table.IsIP6 = buf.DecodeBool() 1315 m.Table.Name = buf.DecodeString(64) 1316 return nil 1317 } 1318 1319 // IPMtableDump defines message 'ip_mtable_dump'. 1320 type IPMtableDump struct{} 1321 1322 func (m *IPMtableDump) Reset() { *m = IPMtableDump{} } 1323 func (*IPMtableDump) GetMessageName() string { return "ip_mtable_dump" } 1324 func (*IPMtableDump) GetCrcString() string { return "51077d14" } 1325 func (*IPMtableDump) GetMessageType() api.MessageType { 1326 return api.RequestMessage 1327 } 1328 1329 func (m *IPMtableDump) Size() (size int) { 1330 if m == nil { 1331 return 0 1332 } 1333 return size 1334 } 1335 func (m *IPMtableDump) Marshal(b []byte) ([]byte, error) { 1336 if b == nil { 1337 b = make([]byte, m.Size()) 1338 } 1339 buf := codec.NewBuffer(b) 1340 return buf.Bytes(), nil 1341 } 1342 func (m *IPMtableDump) Unmarshal(b []byte) error { 1343 return nil 1344 } 1345 1346 // IPPathMtuDetails defines message 'ip_path_mtu_details'. 1347 type IPPathMtuDetails struct { 1348 Pmtu IPPathMtu `binapi:"ip_path_mtu,name=pmtu" json:"pmtu,omitempty"` 1349 } 1350 1351 func (m *IPPathMtuDetails) Reset() { *m = IPPathMtuDetails{} } 1352 func (*IPPathMtuDetails) GetMessageName() string { return "ip_path_mtu_details" } 1353 func (*IPPathMtuDetails) GetCrcString() string { return "ac9539a7" } 1354 func (*IPPathMtuDetails) GetMessageType() api.MessageType { 1355 return api.ReplyMessage 1356 } 1357 1358 func (m *IPPathMtuDetails) Size() (size int) { 1359 if m == nil { 1360 return 0 1361 } 1362 size += 4 // m.Pmtu.ClientIndex 1363 size += 4 // m.Pmtu.Context 1364 size += 4 // m.Pmtu.TableID 1365 size += 1 // m.Pmtu.Nh.Af 1366 size += 1 * 16 // m.Pmtu.Nh.Un 1367 size += 2 // m.Pmtu.PathMtu 1368 return size 1369 } 1370 func (m *IPPathMtuDetails) Marshal(b []byte) ([]byte, error) { 1371 if b == nil { 1372 b = make([]byte, m.Size()) 1373 } 1374 buf := codec.NewBuffer(b) 1375 buf.EncodeUint32(m.Pmtu.ClientIndex) 1376 buf.EncodeUint32(m.Pmtu.Context) 1377 buf.EncodeUint32(m.Pmtu.TableID) 1378 buf.EncodeUint8(uint8(m.Pmtu.Nh.Af)) 1379 buf.EncodeBytes(m.Pmtu.Nh.Un.XXX_UnionData[:], 16) 1380 buf.EncodeUint16(m.Pmtu.PathMtu) 1381 return buf.Bytes(), nil 1382 } 1383 func (m *IPPathMtuDetails) Unmarshal(b []byte) error { 1384 buf := codec.NewBuffer(b) 1385 m.Pmtu.ClientIndex = buf.DecodeUint32() 1386 m.Pmtu.Context = buf.DecodeUint32() 1387 m.Pmtu.TableID = buf.DecodeUint32() 1388 m.Pmtu.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1389 copy(m.Pmtu.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1390 m.Pmtu.PathMtu = buf.DecodeUint16() 1391 return nil 1392 } 1393 1394 // IPPathMtuGet defines message 'ip_path_mtu_get'. 1395 type IPPathMtuGet struct { 1396 Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` 1397 } 1398 1399 func (m *IPPathMtuGet) Reset() { *m = IPPathMtuGet{} } 1400 func (*IPPathMtuGet) GetMessageName() string { return "ip_path_mtu_get" } 1401 func (*IPPathMtuGet) GetCrcString() string { return "f75ba505" } 1402 func (*IPPathMtuGet) GetMessageType() api.MessageType { 1403 return api.RequestMessage 1404 } 1405 1406 func (m *IPPathMtuGet) Size() (size int) { 1407 if m == nil { 1408 return 0 1409 } 1410 size += 4 // m.Cursor 1411 return size 1412 } 1413 func (m *IPPathMtuGet) Marshal(b []byte) ([]byte, error) { 1414 if b == nil { 1415 b = make([]byte, m.Size()) 1416 } 1417 buf := codec.NewBuffer(b) 1418 buf.EncodeUint32(m.Cursor) 1419 return buf.Bytes(), nil 1420 } 1421 func (m *IPPathMtuGet) Unmarshal(b []byte) error { 1422 buf := codec.NewBuffer(b) 1423 m.Cursor = buf.DecodeUint32() 1424 return nil 1425 } 1426 1427 // IPPathMtuGetReply defines message 'ip_path_mtu_get_reply'. 1428 type IPPathMtuGetReply struct { 1429 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1430 Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` 1431 } 1432 1433 func (m *IPPathMtuGetReply) Reset() { *m = IPPathMtuGetReply{} } 1434 func (*IPPathMtuGetReply) GetMessageName() string { return "ip_path_mtu_get_reply" } 1435 func (*IPPathMtuGetReply) GetCrcString() string { return "53b48f5d" } 1436 func (*IPPathMtuGetReply) GetMessageType() api.MessageType { 1437 return api.ReplyMessage 1438 } 1439 1440 func (m *IPPathMtuGetReply) Size() (size int) { 1441 if m == nil { 1442 return 0 1443 } 1444 size += 4 // m.Retval 1445 size += 4 // m.Cursor 1446 return size 1447 } 1448 func (m *IPPathMtuGetReply) Marshal(b []byte) ([]byte, error) { 1449 if b == nil { 1450 b = make([]byte, m.Size()) 1451 } 1452 buf := codec.NewBuffer(b) 1453 buf.EncodeInt32(m.Retval) 1454 buf.EncodeUint32(m.Cursor) 1455 return buf.Bytes(), nil 1456 } 1457 func (m *IPPathMtuGetReply) Unmarshal(b []byte) error { 1458 buf := codec.NewBuffer(b) 1459 m.Retval = buf.DecodeInt32() 1460 m.Cursor = buf.DecodeUint32() 1461 return nil 1462 } 1463 1464 // IPPathMtuReplaceBegin defines message 'ip_path_mtu_replace_begin'. 1465 type IPPathMtuReplaceBegin struct{} 1466 1467 func (m *IPPathMtuReplaceBegin) Reset() { *m = IPPathMtuReplaceBegin{} } 1468 func (*IPPathMtuReplaceBegin) GetMessageName() string { return "ip_path_mtu_replace_begin" } 1469 func (*IPPathMtuReplaceBegin) GetCrcString() string { return "51077d14" } 1470 func (*IPPathMtuReplaceBegin) GetMessageType() api.MessageType { 1471 return api.RequestMessage 1472 } 1473 1474 func (m *IPPathMtuReplaceBegin) Size() (size int) { 1475 if m == nil { 1476 return 0 1477 } 1478 return size 1479 } 1480 func (m *IPPathMtuReplaceBegin) Marshal(b []byte) ([]byte, error) { 1481 if b == nil { 1482 b = make([]byte, m.Size()) 1483 } 1484 buf := codec.NewBuffer(b) 1485 return buf.Bytes(), nil 1486 } 1487 func (m *IPPathMtuReplaceBegin) Unmarshal(b []byte) error { 1488 return nil 1489 } 1490 1491 // IPPathMtuReplaceBeginReply defines message 'ip_path_mtu_replace_begin_reply'. 1492 type IPPathMtuReplaceBeginReply struct { 1493 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1494 } 1495 1496 func (m *IPPathMtuReplaceBeginReply) Reset() { *m = IPPathMtuReplaceBeginReply{} } 1497 func (*IPPathMtuReplaceBeginReply) GetMessageName() string { return "ip_path_mtu_replace_begin_reply" } 1498 func (*IPPathMtuReplaceBeginReply) GetCrcString() string { return "e8d4e804" } 1499 func (*IPPathMtuReplaceBeginReply) GetMessageType() api.MessageType { 1500 return api.ReplyMessage 1501 } 1502 1503 func (m *IPPathMtuReplaceBeginReply) Size() (size int) { 1504 if m == nil { 1505 return 0 1506 } 1507 size += 4 // m.Retval 1508 return size 1509 } 1510 func (m *IPPathMtuReplaceBeginReply) Marshal(b []byte) ([]byte, error) { 1511 if b == nil { 1512 b = make([]byte, m.Size()) 1513 } 1514 buf := codec.NewBuffer(b) 1515 buf.EncodeInt32(m.Retval) 1516 return buf.Bytes(), nil 1517 } 1518 func (m *IPPathMtuReplaceBeginReply) Unmarshal(b []byte) error { 1519 buf := codec.NewBuffer(b) 1520 m.Retval = buf.DecodeInt32() 1521 return nil 1522 } 1523 1524 // IPPathMtuReplaceEnd defines message 'ip_path_mtu_replace_end'. 1525 type IPPathMtuReplaceEnd struct{} 1526 1527 func (m *IPPathMtuReplaceEnd) Reset() { *m = IPPathMtuReplaceEnd{} } 1528 func (*IPPathMtuReplaceEnd) GetMessageName() string { return "ip_path_mtu_replace_end" } 1529 func (*IPPathMtuReplaceEnd) GetCrcString() string { return "51077d14" } 1530 func (*IPPathMtuReplaceEnd) GetMessageType() api.MessageType { 1531 return api.RequestMessage 1532 } 1533 1534 func (m *IPPathMtuReplaceEnd) Size() (size int) { 1535 if m == nil { 1536 return 0 1537 } 1538 return size 1539 } 1540 func (m *IPPathMtuReplaceEnd) Marshal(b []byte) ([]byte, error) { 1541 if b == nil { 1542 b = make([]byte, m.Size()) 1543 } 1544 buf := codec.NewBuffer(b) 1545 return buf.Bytes(), nil 1546 } 1547 func (m *IPPathMtuReplaceEnd) Unmarshal(b []byte) error { 1548 return nil 1549 } 1550 1551 // IPPathMtuReplaceEndReply defines message 'ip_path_mtu_replace_end_reply'. 1552 type IPPathMtuReplaceEndReply struct { 1553 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1554 } 1555 1556 func (m *IPPathMtuReplaceEndReply) Reset() { *m = IPPathMtuReplaceEndReply{} } 1557 func (*IPPathMtuReplaceEndReply) GetMessageName() string { return "ip_path_mtu_replace_end_reply" } 1558 func (*IPPathMtuReplaceEndReply) GetCrcString() string { return "e8d4e804" } 1559 func (*IPPathMtuReplaceEndReply) GetMessageType() api.MessageType { 1560 return api.ReplyMessage 1561 } 1562 1563 func (m *IPPathMtuReplaceEndReply) Size() (size int) { 1564 if m == nil { 1565 return 0 1566 } 1567 size += 4 // m.Retval 1568 return size 1569 } 1570 func (m *IPPathMtuReplaceEndReply) Marshal(b []byte) ([]byte, error) { 1571 if b == nil { 1572 b = make([]byte, m.Size()) 1573 } 1574 buf := codec.NewBuffer(b) 1575 buf.EncodeInt32(m.Retval) 1576 return buf.Bytes(), nil 1577 } 1578 func (m *IPPathMtuReplaceEndReply) Unmarshal(b []byte) error { 1579 buf := codec.NewBuffer(b) 1580 m.Retval = buf.DecodeInt32() 1581 return nil 1582 } 1583 1584 // IPPathMtuUpdate defines message 'ip_path_mtu_update'. 1585 type IPPathMtuUpdate struct { 1586 Pmtu IPPathMtu `binapi:"ip_path_mtu,name=pmtu" json:"pmtu,omitempty"` 1587 } 1588 1589 func (m *IPPathMtuUpdate) Reset() { *m = IPPathMtuUpdate{} } 1590 func (*IPPathMtuUpdate) GetMessageName() string { return "ip_path_mtu_update" } 1591 func (*IPPathMtuUpdate) GetCrcString() string { return "10bbe5cb" } 1592 func (*IPPathMtuUpdate) GetMessageType() api.MessageType { 1593 return api.RequestMessage 1594 } 1595 1596 func (m *IPPathMtuUpdate) Size() (size int) { 1597 if m == nil { 1598 return 0 1599 } 1600 size += 4 // m.Pmtu.ClientIndex 1601 size += 4 // m.Pmtu.Context 1602 size += 4 // m.Pmtu.TableID 1603 size += 1 // m.Pmtu.Nh.Af 1604 size += 1 * 16 // m.Pmtu.Nh.Un 1605 size += 2 // m.Pmtu.PathMtu 1606 return size 1607 } 1608 func (m *IPPathMtuUpdate) Marshal(b []byte) ([]byte, error) { 1609 if b == nil { 1610 b = make([]byte, m.Size()) 1611 } 1612 buf := codec.NewBuffer(b) 1613 buf.EncodeUint32(m.Pmtu.ClientIndex) 1614 buf.EncodeUint32(m.Pmtu.Context) 1615 buf.EncodeUint32(m.Pmtu.TableID) 1616 buf.EncodeUint8(uint8(m.Pmtu.Nh.Af)) 1617 buf.EncodeBytes(m.Pmtu.Nh.Un.XXX_UnionData[:], 16) 1618 buf.EncodeUint16(m.Pmtu.PathMtu) 1619 return buf.Bytes(), nil 1620 } 1621 func (m *IPPathMtuUpdate) Unmarshal(b []byte) error { 1622 buf := codec.NewBuffer(b) 1623 m.Pmtu.ClientIndex = buf.DecodeUint32() 1624 m.Pmtu.Context = buf.DecodeUint32() 1625 m.Pmtu.TableID = buf.DecodeUint32() 1626 m.Pmtu.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1627 copy(m.Pmtu.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1628 m.Pmtu.PathMtu = buf.DecodeUint16() 1629 return nil 1630 } 1631 1632 // IPPathMtuUpdateReply defines message 'ip_path_mtu_update_reply'. 1633 type IPPathMtuUpdateReply struct { 1634 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1635 } 1636 1637 func (m *IPPathMtuUpdateReply) Reset() { *m = IPPathMtuUpdateReply{} } 1638 func (*IPPathMtuUpdateReply) GetMessageName() string { return "ip_path_mtu_update_reply" } 1639 func (*IPPathMtuUpdateReply) GetCrcString() string { return "e8d4e804" } 1640 func (*IPPathMtuUpdateReply) GetMessageType() api.MessageType { 1641 return api.ReplyMessage 1642 } 1643 1644 func (m *IPPathMtuUpdateReply) Size() (size int) { 1645 if m == nil { 1646 return 0 1647 } 1648 size += 4 // m.Retval 1649 return size 1650 } 1651 func (m *IPPathMtuUpdateReply) Marshal(b []byte) ([]byte, error) { 1652 if b == nil { 1653 b = make([]byte, m.Size()) 1654 } 1655 buf := codec.NewBuffer(b) 1656 buf.EncodeInt32(m.Retval) 1657 return buf.Bytes(), nil 1658 } 1659 func (m *IPPathMtuUpdateReply) Unmarshal(b []byte) error { 1660 buf := codec.NewBuffer(b) 1661 m.Retval = buf.DecodeInt32() 1662 return nil 1663 } 1664 1665 // IPPuntPolice defines message 'ip_punt_police'. 1666 type IPPuntPolice struct { 1667 PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"` 1668 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 1669 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` 1670 } 1671 1672 func (m *IPPuntPolice) Reset() { *m = IPPuntPolice{} } 1673 func (*IPPuntPolice) GetMessageName() string { return "ip_punt_police" } 1674 func (*IPPuntPolice) GetCrcString() string { return "db867cea" } 1675 func (*IPPuntPolice) GetMessageType() api.MessageType { 1676 return api.RequestMessage 1677 } 1678 1679 func (m *IPPuntPolice) Size() (size int) { 1680 if m == nil { 1681 return 0 1682 } 1683 size += 4 // m.PolicerIndex 1684 size += 1 // m.IsAdd 1685 size += 1 // m.IsIP6 1686 return size 1687 } 1688 func (m *IPPuntPolice) Marshal(b []byte) ([]byte, error) { 1689 if b == nil { 1690 b = make([]byte, m.Size()) 1691 } 1692 buf := codec.NewBuffer(b) 1693 buf.EncodeUint32(m.PolicerIndex) 1694 buf.EncodeBool(m.IsAdd) 1695 buf.EncodeBool(m.IsIP6) 1696 return buf.Bytes(), nil 1697 } 1698 func (m *IPPuntPolice) Unmarshal(b []byte) error { 1699 buf := codec.NewBuffer(b) 1700 m.PolicerIndex = buf.DecodeUint32() 1701 m.IsAdd = buf.DecodeBool() 1702 m.IsIP6 = buf.DecodeBool() 1703 return nil 1704 } 1705 1706 // IPPuntPoliceReply defines message 'ip_punt_police_reply'. 1707 type IPPuntPoliceReply struct { 1708 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1709 } 1710 1711 func (m *IPPuntPoliceReply) Reset() { *m = IPPuntPoliceReply{} } 1712 func (*IPPuntPoliceReply) GetMessageName() string { return "ip_punt_police_reply" } 1713 func (*IPPuntPoliceReply) GetCrcString() string { return "e8d4e804" } 1714 func (*IPPuntPoliceReply) GetMessageType() api.MessageType { 1715 return api.ReplyMessage 1716 } 1717 1718 func (m *IPPuntPoliceReply) Size() (size int) { 1719 if m == nil { 1720 return 0 1721 } 1722 size += 4 // m.Retval 1723 return size 1724 } 1725 func (m *IPPuntPoliceReply) Marshal(b []byte) ([]byte, error) { 1726 if b == nil { 1727 b = make([]byte, m.Size()) 1728 } 1729 buf := codec.NewBuffer(b) 1730 buf.EncodeInt32(m.Retval) 1731 return buf.Bytes(), nil 1732 } 1733 func (m *IPPuntPoliceReply) Unmarshal(b []byte) error { 1734 buf := codec.NewBuffer(b) 1735 m.Retval = buf.DecodeInt32() 1736 return nil 1737 } 1738 1739 // IPPuntRedirect defines message 'ip_punt_redirect'. 1740 // Deprecated: the message will be removed in the future versions 1741 type IPPuntRedirect struct { 1742 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"` 1743 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 1744 } 1745 1746 func (m *IPPuntRedirect) Reset() { *m = IPPuntRedirect{} } 1747 func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" } 1748 func (*IPPuntRedirect) GetCrcString() string { return "6580f635" } 1749 func (*IPPuntRedirect) GetMessageType() api.MessageType { 1750 return api.RequestMessage 1751 } 1752 1753 func (m *IPPuntRedirect) Size() (size int) { 1754 if m == nil { 1755 return 0 1756 } 1757 size += 4 // m.Punt.RxSwIfIndex 1758 size += 4 // m.Punt.TxSwIfIndex 1759 size += 1 // m.Punt.Nh.Af 1760 size += 1 * 16 // m.Punt.Nh.Un 1761 size += 1 // m.IsAdd 1762 return size 1763 } 1764 func (m *IPPuntRedirect) Marshal(b []byte) ([]byte, error) { 1765 if b == nil { 1766 b = make([]byte, m.Size()) 1767 } 1768 buf := codec.NewBuffer(b) 1769 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex)) 1770 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex)) 1771 buf.EncodeUint8(uint8(m.Punt.Nh.Af)) 1772 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16) 1773 buf.EncodeBool(m.IsAdd) 1774 return buf.Bytes(), nil 1775 } 1776 func (m *IPPuntRedirect) Unmarshal(b []byte) error { 1777 buf := codec.NewBuffer(b) 1778 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1779 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1780 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1781 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1782 m.IsAdd = buf.DecodeBool() 1783 return nil 1784 } 1785 1786 // IPPuntRedirectDetails defines message 'ip_punt_redirect_details'. 1787 type IPPuntRedirectDetails struct { 1788 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"` 1789 } 1790 1791 func (m *IPPuntRedirectDetails) Reset() { *m = IPPuntRedirectDetails{} } 1792 func (*IPPuntRedirectDetails) GetMessageName() string { return "ip_punt_redirect_details" } 1793 func (*IPPuntRedirectDetails) GetCrcString() string { return "2cef63e7" } 1794 func (*IPPuntRedirectDetails) GetMessageType() api.MessageType { 1795 return api.ReplyMessage 1796 } 1797 1798 func (m *IPPuntRedirectDetails) Size() (size int) { 1799 if m == nil { 1800 return 0 1801 } 1802 size += 4 // m.Punt.RxSwIfIndex 1803 size += 4 // m.Punt.TxSwIfIndex 1804 size += 1 // m.Punt.Nh.Af 1805 size += 1 * 16 // m.Punt.Nh.Un 1806 return size 1807 } 1808 func (m *IPPuntRedirectDetails) Marshal(b []byte) ([]byte, error) { 1809 if b == nil { 1810 b = make([]byte, m.Size()) 1811 } 1812 buf := codec.NewBuffer(b) 1813 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex)) 1814 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex)) 1815 buf.EncodeUint8(uint8(m.Punt.Nh.Af)) 1816 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16) 1817 return buf.Bytes(), nil 1818 } 1819 func (m *IPPuntRedirectDetails) Unmarshal(b []byte) error { 1820 buf := codec.NewBuffer(b) 1821 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1822 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1823 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1824 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1825 return nil 1826 } 1827 1828 // IPPuntRedirectDump defines message 'ip_punt_redirect_dump'. 1829 type IPPuntRedirectDump struct { 1830 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1831 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 1832 } 1833 1834 func (m *IPPuntRedirectDump) Reset() { *m = IPPuntRedirectDump{} } 1835 func (*IPPuntRedirectDump) GetMessageName() string { return "ip_punt_redirect_dump" } 1836 func (*IPPuntRedirectDump) GetCrcString() string { return "2d033de4" } 1837 func (*IPPuntRedirectDump) GetMessageType() api.MessageType { 1838 return api.RequestMessage 1839 } 1840 1841 func (m *IPPuntRedirectDump) Size() (size int) { 1842 if m == nil { 1843 return 0 1844 } 1845 size += 4 // m.SwIfIndex 1846 size += 1 // m.IsIPv6 1847 return size 1848 } 1849 func (m *IPPuntRedirectDump) Marshal(b []byte) ([]byte, error) { 1850 if b == nil { 1851 b = make([]byte, m.Size()) 1852 } 1853 buf := codec.NewBuffer(b) 1854 buf.EncodeUint32(uint32(m.SwIfIndex)) 1855 buf.EncodeBool(m.IsIPv6) 1856 return buf.Bytes(), nil 1857 } 1858 func (m *IPPuntRedirectDump) Unmarshal(b []byte) error { 1859 buf := codec.NewBuffer(b) 1860 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1861 m.IsIPv6 = buf.DecodeBool() 1862 return nil 1863 } 1864 1865 // IPPuntRedirectReply defines message 'ip_punt_redirect_reply'. 1866 // Deprecated: the message will be removed in the future versions 1867 type IPPuntRedirectReply struct { 1868 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1869 } 1870 1871 func (m *IPPuntRedirectReply) Reset() { *m = IPPuntRedirectReply{} } 1872 func (*IPPuntRedirectReply) GetMessageName() string { return "ip_punt_redirect_reply" } 1873 func (*IPPuntRedirectReply) GetCrcString() string { return "e8d4e804" } 1874 func (*IPPuntRedirectReply) GetMessageType() api.MessageType { 1875 return api.ReplyMessage 1876 } 1877 1878 func (m *IPPuntRedirectReply) Size() (size int) { 1879 if m == nil { 1880 return 0 1881 } 1882 size += 4 // m.Retval 1883 return size 1884 } 1885 func (m *IPPuntRedirectReply) Marshal(b []byte) ([]byte, error) { 1886 if b == nil { 1887 b = make([]byte, m.Size()) 1888 } 1889 buf := codec.NewBuffer(b) 1890 buf.EncodeInt32(m.Retval) 1891 return buf.Bytes(), nil 1892 } 1893 func (m *IPPuntRedirectReply) Unmarshal(b []byte) error { 1894 buf := codec.NewBuffer(b) 1895 m.Retval = buf.DecodeInt32() 1896 return nil 1897 } 1898 1899 // IPPuntRedirectV2Details defines message 'ip_punt_redirect_v2_details'. 1900 type IPPuntRedirectV2Details struct { 1901 Punt PuntRedirectV2 `binapi:"punt_redirect_v2,name=punt" json:"punt,omitempty"` 1902 } 1903 1904 func (m *IPPuntRedirectV2Details) Reset() { *m = IPPuntRedirectV2Details{} } 1905 func (*IPPuntRedirectV2Details) GetMessageName() string { return "ip_punt_redirect_v2_details" } 1906 func (*IPPuntRedirectV2Details) GetCrcString() string { return "7ba42e1d" } 1907 func (*IPPuntRedirectV2Details) GetMessageType() api.MessageType { 1908 return api.ReplyMessage 1909 } 1910 1911 func (m *IPPuntRedirectV2Details) Size() (size int) { 1912 if m == nil { 1913 return 0 1914 } 1915 size += 4 // m.Punt.RxSwIfIndex 1916 size += 1 // m.Punt.Af 1917 size += 4 // m.Punt.NPaths 1918 for j2 := 0; j2 < len(m.Punt.Paths); j2++ { 1919 var s2 fib_types.FibPath 1920 _ = s2 1921 if j2 < len(m.Punt.Paths) { 1922 s2 = m.Punt.Paths[j2] 1923 } 1924 size += 4 // s2.SwIfIndex 1925 size += 4 // s2.TableID 1926 size += 4 // s2.RpfID 1927 size += 1 // s2.Weight 1928 size += 1 // s2.Preference 1929 size += 4 // s2.Type 1930 size += 4 // s2.Flags 1931 size += 4 // s2.Proto 1932 size += 1 * 16 // s2.Nh.Address 1933 size += 4 // s2.Nh.ViaLabel 1934 size += 4 // s2.Nh.ObjID 1935 size += 4 // s2.Nh.ClassifyTableIndex 1936 size += 1 // s2.NLabels 1937 for j3 := 0; j3 < 16; j3++ { 1938 size += 1 // s2.LabelStack[j3].IsUniform 1939 size += 4 // s2.LabelStack[j3].Label 1940 size += 1 // s2.LabelStack[j3].TTL 1941 size += 1 // s2.LabelStack[j3].Exp 1942 } 1943 } 1944 return size 1945 } 1946 func (m *IPPuntRedirectV2Details) Marshal(b []byte) ([]byte, error) { 1947 if b == nil { 1948 b = make([]byte, m.Size()) 1949 } 1950 buf := codec.NewBuffer(b) 1951 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex)) 1952 buf.EncodeUint8(uint8(m.Punt.Af)) 1953 buf.EncodeUint32(uint32(len(m.Punt.Paths))) 1954 for j1 := 0; j1 < len(m.Punt.Paths); j1++ { 1955 var v1 fib_types.FibPath // Paths 1956 if j1 < len(m.Punt.Paths) { 1957 v1 = m.Punt.Paths[j1] 1958 } 1959 buf.EncodeUint32(v1.SwIfIndex) 1960 buf.EncodeUint32(v1.TableID) 1961 buf.EncodeUint32(v1.RpfID) 1962 buf.EncodeUint8(v1.Weight) 1963 buf.EncodeUint8(v1.Preference) 1964 buf.EncodeUint32(uint32(v1.Type)) 1965 buf.EncodeUint32(uint32(v1.Flags)) 1966 buf.EncodeUint32(uint32(v1.Proto)) 1967 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 1968 buf.EncodeUint32(v1.Nh.ViaLabel) 1969 buf.EncodeUint32(v1.Nh.ObjID) 1970 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 1971 buf.EncodeUint8(v1.NLabels) 1972 for j2 := 0; j2 < 16; j2++ { 1973 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 1974 buf.EncodeUint32(v1.LabelStack[j2].Label) 1975 buf.EncodeUint8(v1.LabelStack[j2].TTL) 1976 buf.EncodeUint8(v1.LabelStack[j2].Exp) 1977 } 1978 } 1979 return buf.Bytes(), nil 1980 } 1981 func (m *IPPuntRedirectV2Details) Unmarshal(b []byte) error { 1982 buf := codec.NewBuffer(b) 1983 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1984 m.Punt.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1985 m.Punt.NPaths = buf.DecodeUint32() 1986 m.Punt.Paths = make([]fib_types.FibPath, m.Punt.NPaths) 1987 for j1 := 0; j1 < len(m.Punt.Paths); j1++ { 1988 m.Punt.Paths[j1].SwIfIndex = buf.DecodeUint32() 1989 m.Punt.Paths[j1].TableID = buf.DecodeUint32() 1990 m.Punt.Paths[j1].RpfID = buf.DecodeUint32() 1991 m.Punt.Paths[j1].Weight = buf.DecodeUint8() 1992 m.Punt.Paths[j1].Preference = buf.DecodeUint8() 1993 m.Punt.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 1994 m.Punt.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 1995 m.Punt.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 1996 copy(m.Punt.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 1997 m.Punt.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 1998 m.Punt.Paths[j1].Nh.ObjID = buf.DecodeUint32() 1999 m.Punt.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 2000 m.Punt.Paths[j1].NLabels = buf.DecodeUint8() 2001 for j2 := 0; j2 < 16; j2++ { 2002 m.Punt.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 2003 m.Punt.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 2004 m.Punt.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 2005 m.Punt.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 2006 } 2007 } 2008 return nil 2009 } 2010 2011 // IPPuntRedirectV2Dump defines message 'ip_punt_redirect_v2_dump'. 2012 type IPPuntRedirectV2Dump struct { 2013 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2014 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"` 2015 } 2016 2017 func (m *IPPuntRedirectV2Dump) Reset() { *m = IPPuntRedirectV2Dump{} } 2018 func (*IPPuntRedirectV2Dump) GetMessageName() string { return "ip_punt_redirect_v2_dump" } 2019 func (*IPPuntRedirectV2Dump) GetCrcString() string { return "d817a484" } 2020 func (*IPPuntRedirectV2Dump) GetMessageType() api.MessageType { 2021 return api.RequestMessage 2022 } 2023 2024 func (m *IPPuntRedirectV2Dump) Size() (size int) { 2025 if m == nil { 2026 return 0 2027 } 2028 size += 4 // m.SwIfIndex 2029 size += 1 // m.Af 2030 return size 2031 } 2032 func (m *IPPuntRedirectV2Dump) Marshal(b []byte) ([]byte, error) { 2033 if b == nil { 2034 b = make([]byte, m.Size()) 2035 } 2036 buf := codec.NewBuffer(b) 2037 buf.EncodeUint32(uint32(m.SwIfIndex)) 2038 buf.EncodeUint8(uint8(m.Af)) 2039 return buf.Bytes(), nil 2040 } 2041 func (m *IPPuntRedirectV2Dump) Unmarshal(b []byte) error { 2042 buf := codec.NewBuffer(b) 2043 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2044 m.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2045 return nil 2046 } 2047 2048 // IPReassemblyEnableDisable defines message 'ip_reassembly_enable_disable'. 2049 type IPReassemblyEnableDisable struct { 2050 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2051 EnableIP4 bool `binapi:"bool,name=enable_ip4" json:"enable_ip4,omitempty"` 2052 EnableIP6 bool `binapi:"bool,name=enable_ip6" json:"enable_ip6,omitempty"` 2053 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"` 2054 } 2055 2056 func (m *IPReassemblyEnableDisable) Reset() { *m = IPReassemblyEnableDisable{} } 2057 func (*IPReassemblyEnableDisable) GetMessageName() string { return "ip_reassembly_enable_disable" } 2058 func (*IPReassemblyEnableDisable) GetCrcString() string { return "eb77968d" } 2059 func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType { 2060 return api.RequestMessage 2061 } 2062 2063 func (m *IPReassemblyEnableDisable) Size() (size int) { 2064 if m == nil { 2065 return 0 2066 } 2067 size += 4 // m.SwIfIndex 2068 size += 1 // m.EnableIP4 2069 size += 1 // m.EnableIP6 2070 size += 4 // m.Type 2071 return size 2072 } 2073 func (m *IPReassemblyEnableDisable) Marshal(b []byte) ([]byte, error) { 2074 if b == nil { 2075 b = make([]byte, m.Size()) 2076 } 2077 buf := codec.NewBuffer(b) 2078 buf.EncodeUint32(uint32(m.SwIfIndex)) 2079 buf.EncodeBool(m.EnableIP4) 2080 buf.EncodeBool(m.EnableIP6) 2081 buf.EncodeUint32(uint32(m.Type)) 2082 return buf.Bytes(), nil 2083 } 2084 func (m *IPReassemblyEnableDisable) Unmarshal(b []byte) error { 2085 buf := codec.NewBuffer(b) 2086 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2087 m.EnableIP4 = buf.DecodeBool() 2088 m.EnableIP6 = buf.DecodeBool() 2089 m.Type = IPReassType(buf.DecodeUint32()) 2090 return nil 2091 } 2092 2093 // IPReassemblyEnableDisableReply defines message 'ip_reassembly_enable_disable_reply'. 2094 type IPReassemblyEnableDisableReply struct { 2095 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2096 } 2097 2098 func (m *IPReassemblyEnableDisableReply) Reset() { *m = IPReassemblyEnableDisableReply{} } 2099 func (*IPReassemblyEnableDisableReply) GetMessageName() string { 2100 return "ip_reassembly_enable_disable_reply" 2101 } 2102 func (*IPReassemblyEnableDisableReply) GetCrcString() string { return "e8d4e804" } 2103 func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType { 2104 return api.ReplyMessage 2105 } 2106 2107 func (m *IPReassemblyEnableDisableReply) Size() (size int) { 2108 if m == nil { 2109 return 0 2110 } 2111 size += 4 // m.Retval 2112 return size 2113 } 2114 func (m *IPReassemblyEnableDisableReply) Marshal(b []byte) ([]byte, error) { 2115 if b == nil { 2116 b = make([]byte, m.Size()) 2117 } 2118 buf := codec.NewBuffer(b) 2119 buf.EncodeInt32(m.Retval) 2120 return buf.Bytes(), nil 2121 } 2122 func (m *IPReassemblyEnableDisableReply) Unmarshal(b []byte) error { 2123 buf := codec.NewBuffer(b) 2124 m.Retval = buf.DecodeInt32() 2125 return nil 2126 } 2127 2128 // IPReassemblyGet defines message 'ip_reassembly_get'. 2129 type IPReassemblyGet struct { 2130 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` 2131 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"` 2132 } 2133 2134 func (m *IPReassemblyGet) Reset() { *m = IPReassemblyGet{} } 2135 func (*IPReassemblyGet) GetMessageName() string { return "ip_reassembly_get" } 2136 func (*IPReassemblyGet) GetCrcString() string { return "ea13ff63" } 2137 func (*IPReassemblyGet) GetMessageType() api.MessageType { 2138 return api.RequestMessage 2139 } 2140 2141 func (m *IPReassemblyGet) Size() (size int) { 2142 if m == nil { 2143 return 0 2144 } 2145 size += 1 // m.IsIP6 2146 size += 4 // m.Type 2147 return size 2148 } 2149 func (m *IPReassemblyGet) Marshal(b []byte) ([]byte, error) { 2150 if b == nil { 2151 b = make([]byte, m.Size()) 2152 } 2153 buf := codec.NewBuffer(b) 2154 buf.EncodeBool(m.IsIP6) 2155 buf.EncodeUint32(uint32(m.Type)) 2156 return buf.Bytes(), nil 2157 } 2158 func (m *IPReassemblyGet) Unmarshal(b []byte) error { 2159 buf := codec.NewBuffer(b) 2160 m.IsIP6 = buf.DecodeBool() 2161 m.Type = IPReassType(buf.DecodeUint32()) 2162 return nil 2163 } 2164 2165 // IPReassemblyGetReply defines message 'ip_reassembly_get_reply'. 2166 type IPReassemblyGetReply struct { 2167 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2168 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"` 2169 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"` 2170 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"` 2171 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"` 2172 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` 2173 } 2174 2175 func (m *IPReassemblyGetReply) Reset() { *m = IPReassemblyGetReply{} } 2176 func (*IPReassemblyGetReply) GetMessageName() string { return "ip_reassembly_get_reply" } 2177 func (*IPReassemblyGetReply) GetCrcString() string { return "d5eb8d34" } 2178 func (*IPReassemblyGetReply) GetMessageType() api.MessageType { 2179 return api.ReplyMessage 2180 } 2181 2182 func (m *IPReassemblyGetReply) Size() (size int) { 2183 if m == nil { 2184 return 0 2185 } 2186 size += 4 // m.Retval 2187 size += 4 // m.TimeoutMs 2188 size += 4 // m.MaxReassemblies 2189 size += 4 // m.MaxReassemblyLength 2190 size += 4 // m.ExpireWalkIntervalMs 2191 size += 1 // m.IsIP6 2192 return size 2193 } 2194 func (m *IPReassemblyGetReply) Marshal(b []byte) ([]byte, error) { 2195 if b == nil { 2196 b = make([]byte, m.Size()) 2197 } 2198 buf := codec.NewBuffer(b) 2199 buf.EncodeInt32(m.Retval) 2200 buf.EncodeUint32(m.TimeoutMs) 2201 buf.EncodeUint32(m.MaxReassemblies) 2202 buf.EncodeUint32(m.MaxReassemblyLength) 2203 buf.EncodeUint32(m.ExpireWalkIntervalMs) 2204 buf.EncodeBool(m.IsIP6) 2205 return buf.Bytes(), nil 2206 } 2207 func (m *IPReassemblyGetReply) Unmarshal(b []byte) error { 2208 buf := codec.NewBuffer(b) 2209 m.Retval = buf.DecodeInt32() 2210 m.TimeoutMs = buf.DecodeUint32() 2211 m.MaxReassemblies = buf.DecodeUint32() 2212 m.MaxReassemblyLength = buf.DecodeUint32() 2213 m.ExpireWalkIntervalMs = buf.DecodeUint32() 2214 m.IsIP6 = buf.DecodeBool() 2215 return nil 2216 } 2217 2218 // IPReassemblySet defines message 'ip_reassembly_set'. 2219 type IPReassemblySet struct { 2220 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"` 2221 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"` 2222 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"` 2223 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"` 2224 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` 2225 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"` 2226 } 2227 2228 func (m *IPReassemblySet) Reset() { *m = IPReassemblySet{} } 2229 func (*IPReassemblySet) GetMessageName() string { return "ip_reassembly_set" } 2230 func (*IPReassemblySet) GetCrcString() string { return "16467d25" } 2231 func (*IPReassemblySet) GetMessageType() api.MessageType { 2232 return api.RequestMessage 2233 } 2234 2235 func (m *IPReassemblySet) Size() (size int) { 2236 if m == nil { 2237 return 0 2238 } 2239 size += 4 // m.TimeoutMs 2240 size += 4 // m.MaxReassemblies 2241 size += 4 // m.MaxReassemblyLength 2242 size += 4 // m.ExpireWalkIntervalMs 2243 size += 1 // m.IsIP6 2244 size += 4 // m.Type 2245 return size 2246 } 2247 func (m *IPReassemblySet) Marshal(b []byte) ([]byte, error) { 2248 if b == nil { 2249 b = make([]byte, m.Size()) 2250 } 2251 buf := codec.NewBuffer(b) 2252 buf.EncodeUint32(m.TimeoutMs) 2253 buf.EncodeUint32(m.MaxReassemblies) 2254 buf.EncodeUint32(m.MaxReassemblyLength) 2255 buf.EncodeUint32(m.ExpireWalkIntervalMs) 2256 buf.EncodeBool(m.IsIP6) 2257 buf.EncodeUint32(uint32(m.Type)) 2258 return buf.Bytes(), nil 2259 } 2260 func (m *IPReassemblySet) Unmarshal(b []byte) error { 2261 buf := codec.NewBuffer(b) 2262 m.TimeoutMs = buf.DecodeUint32() 2263 m.MaxReassemblies = buf.DecodeUint32() 2264 m.MaxReassemblyLength = buf.DecodeUint32() 2265 m.ExpireWalkIntervalMs = buf.DecodeUint32() 2266 m.IsIP6 = buf.DecodeBool() 2267 m.Type = IPReassType(buf.DecodeUint32()) 2268 return nil 2269 } 2270 2271 // IPReassemblySetReply defines message 'ip_reassembly_set_reply'. 2272 type IPReassemblySetReply struct { 2273 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2274 } 2275 2276 func (m *IPReassemblySetReply) Reset() { *m = IPReassemblySetReply{} } 2277 func (*IPReassemblySetReply) GetMessageName() string { return "ip_reassembly_set_reply" } 2278 func (*IPReassemblySetReply) GetCrcString() string { return "e8d4e804" } 2279 func (*IPReassemblySetReply) GetMessageType() api.MessageType { 2280 return api.ReplyMessage 2281 } 2282 2283 func (m *IPReassemblySetReply) Size() (size int) { 2284 if m == nil { 2285 return 0 2286 } 2287 size += 4 // m.Retval 2288 return size 2289 } 2290 func (m *IPReassemblySetReply) Marshal(b []byte) ([]byte, error) { 2291 if b == nil { 2292 b = make([]byte, m.Size()) 2293 } 2294 buf := codec.NewBuffer(b) 2295 buf.EncodeInt32(m.Retval) 2296 return buf.Bytes(), nil 2297 } 2298 func (m *IPReassemblySetReply) Unmarshal(b []byte) error { 2299 buf := codec.NewBuffer(b) 2300 m.Retval = buf.DecodeInt32() 2301 return nil 2302 } 2303 2304 // IPRouteAddDel defines message 'ip_route_add_del'. 2305 type IPRouteAddDel struct { 2306 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 2307 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"` 2308 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"` 2309 } 2310 2311 func (m *IPRouteAddDel) Reset() { *m = IPRouteAddDel{} } 2312 func (*IPRouteAddDel) GetMessageName() string { return "ip_route_add_del" } 2313 func (*IPRouteAddDel) GetCrcString() string { return "b8ecfe0d" } 2314 func (*IPRouteAddDel) GetMessageType() api.MessageType { 2315 return api.RequestMessage 2316 } 2317 2318 func (m *IPRouteAddDel) Size() (size int) { 2319 if m == nil { 2320 return 0 2321 } 2322 size += 1 // m.IsAdd 2323 size += 1 // m.IsMultipath 2324 size += 4 // m.Route.TableID 2325 size += 4 // m.Route.StatsIndex 2326 size += 1 // m.Route.Prefix.Address.Af 2327 size += 1 * 16 // m.Route.Prefix.Address.Un 2328 size += 1 // m.Route.Prefix.Len 2329 size += 1 // m.Route.NPaths 2330 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 2331 var s2 fib_types.FibPath 2332 _ = s2 2333 if j2 < len(m.Route.Paths) { 2334 s2 = m.Route.Paths[j2] 2335 } 2336 size += 4 // s2.SwIfIndex 2337 size += 4 // s2.TableID 2338 size += 4 // s2.RpfID 2339 size += 1 // s2.Weight 2340 size += 1 // s2.Preference 2341 size += 4 // s2.Type 2342 size += 4 // s2.Flags 2343 size += 4 // s2.Proto 2344 size += 1 * 16 // s2.Nh.Address 2345 size += 4 // s2.Nh.ViaLabel 2346 size += 4 // s2.Nh.ObjID 2347 size += 4 // s2.Nh.ClassifyTableIndex 2348 size += 1 // s2.NLabels 2349 for j3 := 0; j3 < 16; j3++ { 2350 size += 1 // s2.LabelStack[j3].IsUniform 2351 size += 4 // s2.LabelStack[j3].Label 2352 size += 1 // s2.LabelStack[j3].TTL 2353 size += 1 // s2.LabelStack[j3].Exp 2354 } 2355 } 2356 return size 2357 } 2358 func (m *IPRouteAddDel) Marshal(b []byte) ([]byte, error) { 2359 if b == nil { 2360 b = make([]byte, m.Size()) 2361 } 2362 buf := codec.NewBuffer(b) 2363 buf.EncodeBool(m.IsAdd) 2364 buf.EncodeBool(m.IsMultipath) 2365 buf.EncodeUint32(m.Route.TableID) 2366 buf.EncodeUint32(m.Route.StatsIndex) 2367 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af)) 2368 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16) 2369 buf.EncodeUint8(m.Route.Prefix.Len) 2370 buf.EncodeUint8(uint8(len(m.Route.Paths))) 2371 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2372 var v1 fib_types.FibPath // Paths 2373 if j1 < len(m.Route.Paths) { 2374 v1 = m.Route.Paths[j1] 2375 } 2376 buf.EncodeUint32(v1.SwIfIndex) 2377 buf.EncodeUint32(v1.TableID) 2378 buf.EncodeUint32(v1.RpfID) 2379 buf.EncodeUint8(v1.Weight) 2380 buf.EncodeUint8(v1.Preference) 2381 buf.EncodeUint32(uint32(v1.Type)) 2382 buf.EncodeUint32(uint32(v1.Flags)) 2383 buf.EncodeUint32(uint32(v1.Proto)) 2384 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 2385 buf.EncodeUint32(v1.Nh.ViaLabel) 2386 buf.EncodeUint32(v1.Nh.ObjID) 2387 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 2388 buf.EncodeUint8(v1.NLabels) 2389 for j2 := 0; j2 < 16; j2++ { 2390 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 2391 buf.EncodeUint32(v1.LabelStack[j2].Label) 2392 buf.EncodeUint8(v1.LabelStack[j2].TTL) 2393 buf.EncodeUint8(v1.LabelStack[j2].Exp) 2394 } 2395 } 2396 return buf.Bytes(), nil 2397 } 2398 func (m *IPRouteAddDel) Unmarshal(b []byte) error { 2399 buf := codec.NewBuffer(b) 2400 m.IsAdd = buf.DecodeBool() 2401 m.IsMultipath = buf.DecodeBool() 2402 m.Route.TableID = buf.DecodeUint32() 2403 m.Route.StatsIndex = buf.DecodeUint32() 2404 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2405 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2406 m.Route.Prefix.Len = buf.DecodeUint8() 2407 m.Route.NPaths = buf.DecodeUint8() 2408 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths) 2409 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2410 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32() 2411 m.Route.Paths[j1].TableID = buf.DecodeUint32() 2412 m.Route.Paths[j1].RpfID = buf.DecodeUint32() 2413 m.Route.Paths[j1].Weight = buf.DecodeUint8() 2414 m.Route.Paths[j1].Preference = buf.DecodeUint8() 2415 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 2416 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 2417 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 2418 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 2419 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 2420 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32() 2421 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 2422 m.Route.Paths[j1].NLabels = buf.DecodeUint8() 2423 for j2 := 0; j2 < 16; j2++ { 2424 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 2425 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 2426 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 2427 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 2428 } 2429 } 2430 return nil 2431 } 2432 2433 // IPRouteAddDelReply defines message 'ip_route_add_del_reply'. 2434 type IPRouteAddDelReply struct { 2435 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2436 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` 2437 } 2438 2439 func (m *IPRouteAddDelReply) Reset() { *m = IPRouteAddDelReply{} } 2440 func (*IPRouteAddDelReply) GetMessageName() string { return "ip_route_add_del_reply" } 2441 func (*IPRouteAddDelReply) GetCrcString() string { return "1992deab" } 2442 func (*IPRouteAddDelReply) GetMessageType() api.MessageType { 2443 return api.ReplyMessage 2444 } 2445 2446 func (m *IPRouteAddDelReply) Size() (size int) { 2447 if m == nil { 2448 return 0 2449 } 2450 size += 4 // m.Retval 2451 size += 4 // m.StatsIndex 2452 return size 2453 } 2454 func (m *IPRouteAddDelReply) Marshal(b []byte) ([]byte, error) { 2455 if b == nil { 2456 b = make([]byte, m.Size()) 2457 } 2458 buf := codec.NewBuffer(b) 2459 buf.EncodeInt32(m.Retval) 2460 buf.EncodeUint32(m.StatsIndex) 2461 return buf.Bytes(), nil 2462 } 2463 func (m *IPRouteAddDelReply) Unmarshal(b []byte) error { 2464 buf := codec.NewBuffer(b) 2465 m.Retval = buf.DecodeInt32() 2466 m.StatsIndex = buf.DecodeUint32() 2467 return nil 2468 } 2469 2470 // IPRouteAddDelV2 defines message 'ip_route_add_del_v2'. 2471 // InProgress: the message form may change in the future versions 2472 type IPRouteAddDelV2 struct { 2473 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 2474 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"` 2475 Route IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"` 2476 } 2477 2478 func (m *IPRouteAddDelV2) Reset() { *m = IPRouteAddDelV2{} } 2479 func (*IPRouteAddDelV2) GetMessageName() string { return "ip_route_add_del_v2" } 2480 func (*IPRouteAddDelV2) GetCrcString() string { return "521ef330" } 2481 func (*IPRouteAddDelV2) GetMessageType() api.MessageType { 2482 return api.RequestMessage 2483 } 2484 2485 func (m *IPRouteAddDelV2) Size() (size int) { 2486 if m == nil { 2487 return 0 2488 } 2489 size += 1 // m.IsAdd 2490 size += 1 // m.IsMultipath 2491 size += 4 // m.Route.TableID 2492 size += 4 // m.Route.StatsIndex 2493 size += 1 // m.Route.Prefix.Address.Af 2494 size += 1 * 16 // m.Route.Prefix.Address.Un 2495 size += 1 // m.Route.Prefix.Len 2496 size += 1 // m.Route.NPaths 2497 size += 1 // m.Route.Src 2498 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 2499 var s2 fib_types.FibPath 2500 _ = s2 2501 if j2 < len(m.Route.Paths) { 2502 s2 = m.Route.Paths[j2] 2503 } 2504 size += 4 // s2.SwIfIndex 2505 size += 4 // s2.TableID 2506 size += 4 // s2.RpfID 2507 size += 1 // s2.Weight 2508 size += 1 // s2.Preference 2509 size += 4 // s2.Type 2510 size += 4 // s2.Flags 2511 size += 4 // s2.Proto 2512 size += 1 * 16 // s2.Nh.Address 2513 size += 4 // s2.Nh.ViaLabel 2514 size += 4 // s2.Nh.ObjID 2515 size += 4 // s2.Nh.ClassifyTableIndex 2516 size += 1 // s2.NLabels 2517 for j3 := 0; j3 < 16; j3++ { 2518 size += 1 // s2.LabelStack[j3].IsUniform 2519 size += 4 // s2.LabelStack[j3].Label 2520 size += 1 // s2.LabelStack[j3].TTL 2521 size += 1 // s2.LabelStack[j3].Exp 2522 } 2523 } 2524 return size 2525 } 2526 func (m *IPRouteAddDelV2) Marshal(b []byte) ([]byte, error) { 2527 if b == nil { 2528 b = make([]byte, m.Size()) 2529 } 2530 buf := codec.NewBuffer(b) 2531 buf.EncodeBool(m.IsAdd) 2532 buf.EncodeBool(m.IsMultipath) 2533 buf.EncodeUint32(m.Route.TableID) 2534 buf.EncodeUint32(m.Route.StatsIndex) 2535 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af)) 2536 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16) 2537 buf.EncodeUint8(m.Route.Prefix.Len) 2538 buf.EncodeUint8(uint8(len(m.Route.Paths))) 2539 buf.EncodeUint8(m.Route.Src) 2540 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2541 var v1 fib_types.FibPath // Paths 2542 if j1 < len(m.Route.Paths) { 2543 v1 = m.Route.Paths[j1] 2544 } 2545 buf.EncodeUint32(v1.SwIfIndex) 2546 buf.EncodeUint32(v1.TableID) 2547 buf.EncodeUint32(v1.RpfID) 2548 buf.EncodeUint8(v1.Weight) 2549 buf.EncodeUint8(v1.Preference) 2550 buf.EncodeUint32(uint32(v1.Type)) 2551 buf.EncodeUint32(uint32(v1.Flags)) 2552 buf.EncodeUint32(uint32(v1.Proto)) 2553 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 2554 buf.EncodeUint32(v1.Nh.ViaLabel) 2555 buf.EncodeUint32(v1.Nh.ObjID) 2556 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 2557 buf.EncodeUint8(v1.NLabels) 2558 for j2 := 0; j2 < 16; j2++ { 2559 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 2560 buf.EncodeUint32(v1.LabelStack[j2].Label) 2561 buf.EncodeUint8(v1.LabelStack[j2].TTL) 2562 buf.EncodeUint8(v1.LabelStack[j2].Exp) 2563 } 2564 } 2565 return buf.Bytes(), nil 2566 } 2567 func (m *IPRouteAddDelV2) Unmarshal(b []byte) error { 2568 buf := codec.NewBuffer(b) 2569 m.IsAdd = buf.DecodeBool() 2570 m.IsMultipath = buf.DecodeBool() 2571 m.Route.TableID = buf.DecodeUint32() 2572 m.Route.StatsIndex = buf.DecodeUint32() 2573 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2574 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2575 m.Route.Prefix.Len = buf.DecodeUint8() 2576 m.Route.NPaths = buf.DecodeUint8() 2577 m.Route.Src = buf.DecodeUint8() 2578 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths) 2579 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2580 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32() 2581 m.Route.Paths[j1].TableID = buf.DecodeUint32() 2582 m.Route.Paths[j1].RpfID = buf.DecodeUint32() 2583 m.Route.Paths[j1].Weight = buf.DecodeUint8() 2584 m.Route.Paths[j1].Preference = buf.DecodeUint8() 2585 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 2586 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 2587 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 2588 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 2589 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 2590 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32() 2591 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 2592 m.Route.Paths[j1].NLabels = buf.DecodeUint8() 2593 for j2 := 0; j2 < 16; j2++ { 2594 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 2595 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 2596 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 2597 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 2598 } 2599 } 2600 return nil 2601 } 2602 2603 // IPRouteAddDelV2Reply defines message 'ip_route_add_del_v2_reply'. 2604 // InProgress: the message form may change in the future versions 2605 type IPRouteAddDelV2Reply struct { 2606 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2607 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` 2608 } 2609 2610 func (m *IPRouteAddDelV2Reply) Reset() { *m = IPRouteAddDelV2Reply{} } 2611 func (*IPRouteAddDelV2Reply) GetMessageName() string { return "ip_route_add_del_v2_reply" } 2612 func (*IPRouteAddDelV2Reply) GetCrcString() string { return "1992deab" } 2613 func (*IPRouteAddDelV2Reply) GetMessageType() api.MessageType { 2614 return api.ReplyMessage 2615 } 2616 2617 func (m *IPRouteAddDelV2Reply) Size() (size int) { 2618 if m == nil { 2619 return 0 2620 } 2621 size += 4 // m.Retval 2622 size += 4 // m.StatsIndex 2623 return size 2624 } 2625 func (m *IPRouteAddDelV2Reply) Marshal(b []byte) ([]byte, error) { 2626 if b == nil { 2627 b = make([]byte, m.Size()) 2628 } 2629 buf := codec.NewBuffer(b) 2630 buf.EncodeInt32(m.Retval) 2631 buf.EncodeUint32(m.StatsIndex) 2632 return buf.Bytes(), nil 2633 } 2634 func (m *IPRouteAddDelV2Reply) Unmarshal(b []byte) error { 2635 buf := codec.NewBuffer(b) 2636 m.Retval = buf.DecodeInt32() 2637 m.StatsIndex = buf.DecodeUint32() 2638 return nil 2639 } 2640 2641 // IPRouteDetails defines message 'ip_route_details'. 2642 type IPRouteDetails struct { 2643 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"` 2644 } 2645 2646 func (m *IPRouteDetails) Reset() { *m = IPRouteDetails{} } 2647 func (*IPRouteDetails) GetMessageName() string { return "ip_route_details" } 2648 func (*IPRouteDetails) GetCrcString() string { return "bda8f315" } 2649 func (*IPRouteDetails) GetMessageType() api.MessageType { 2650 return api.ReplyMessage 2651 } 2652 2653 func (m *IPRouteDetails) Size() (size int) { 2654 if m == nil { 2655 return 0 2656 } 2657 size += 4 // m.Route.TableID 2658 size += 4 // m.Route.StatsIndex 2659 size += 1 // m.Route.Prefix.Address.Af 2660 size += 1 * 16 // m.Route.Prefix.Address.Un 2661 size += 1 // m.Route.Prefix.Len 2662 size += 1 // m.Route.NPaths 2663 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 2664 var s2 fib_types.FibPath 2665 _ = s2 2666 if j2 < len(m.Route.Paths) { 2667 s2 = m.Route.Paths[j2] 2668 } 2669 size += 4 // s2.SwIfIndex 2670 size += 4 // s2.TableID 2671 size += 4 // s2.RpfID 2672 size += 1 // s2.Weight 2673 size += 1 // s2.Preference 2674 size += 4 // s2.Type 2675 size += 4 // s2.Flags 2676 size += 4 // s2.Proto 2677 size += 1 * 16 // s2.Nh.Address 2678 size += 4 // s2.Nh.ViaLabel 2679 size += 4 // s2.Nh.ObjID 2680 size += 4 // s2.Nh.ClassifyTableIndex 2681 size += 1 // s2.NLabels 2682 for j3 := 0; j3 < 16; j3++ { 2683 size += 1 // s2.LabelStack[j3].IsUniform 2684 size += 4 // s2.LabelStack[j3].Label 2685 size += 1 // s2.LabelStack[j3].TTL 2686 size += 1 // s2.LabelStack[j3].Exp 2687 } 2688 } 2689 return size 2690 } 2691 func (m *IPRouteDetails) Marshal(b []byte) ([]byte, error) { 2692 if b == nil { 2693 b = make([]byte, m.Size()) 2694 } 2695 buf := codec.NewBuffer(b) 2696 buf.EncodeUint32(m.Route.TableID) 2697 buf.EncodeUint32(m.Route.StatsIndex) 2698 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af)) 2699 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16) 2700 buf.EncodeUint8(m.Route.Prefix.Len) 2701 buf.EncodeUint8(uint8(len(m.Route.Paths))) 2702 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2703 var v1 fib_types.FibPath // Paths 2704 if j1 < len(m.Route.Paths) { 2705 v1 = m.Route.Paths[j1] 2706 } 2707 buf.EncodeUint32(v1.SwIfIndex) 2708 buf.EncodeUint32(v1.TableID) 2709 buf.EncodeUint32(v1.RpfID) 2710 buf.EncodeUint8(v1.Weight) 2711 buf.EncodeUint8(v1.Preference) 2712 buf.EncodeUint32(uint32(v1.Type)) 2713 buf.EncodeUint32(uint32(v1.Flags)) 2714 buf.EncodeUint32(uint32(v1.Proto)) 2715 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 2716 buf.EncodeUint32(v1.Nh.ViaLabel) 2717 buf.EncodeUint32(v1.Nh.ObjID) 2718 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 2719 buf.EncodeUint8(v1.NLabels) 2720 for j2 := 0; j2 < 16; j2++ { 2721 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 2722 buf.EncodeUint32(v1.LabelStack[j2].Label) 2723 buf.EncodeUint8(v1.LabelStack[j2].TTL) 2724 buf.EncodeUint8(v1.LabelStack[j2].Exp) 2725 } 2726 } 2727 return buf.Bytes(), nil 2728 } 2729 func (m *IPRouteDetails) Unmarshal(b []byte) error { 2730 buf := codec.NewBuffer(b) 2731 m.Route.TableID = buf.DecodeUint32() 2732 m.Route.StatsIndex = buf.DecodeUint32() 2733 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2734 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2735 m.Route.Prefix.Len = buf.DecodeUint8() 2736 m.Route.NPaths = buf.DecodeUint8() 2737 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths) 2738 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2739 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32() 2740 m.Route.Paths[j1].TableID = buf.DecodeUint32() 2741 m.Route.Paths[j1].RpfID = buf.DecodeUint32() 2742 m.Route.Paths[j1].Weight = buf.DecodeUint8() 2743 m.Route.Paths[j1].Preference = buf.DecodeUint8() 2744 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 2745 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 2746 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 2747 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 2748 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 2749 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32() 2750 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 2751 m.Route.Paths[j1].NLabels = buf.DecodeUint8() 2752 for j2 := 0; j2 < 16; j2++ { 2753 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 2754 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 2755 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 2756 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 2757 } 2758 } 2759 return nil 2760 } 2761 2762 // IPRouteDump defines message 'ip_route_dump'. 2763 type IPRouteDump struct { 2764 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 2765 } 2766 2767 func (m *IPRouteDump) Reset() { *m = IPRouteDump{} } 2768 func (*IPRouteDump) GetMessageName() string { return "ip_route_dump" } 2769 func (*IPRouteDump) GetCrcString() string { return "b9d2e09e" } 2770 func (*IPRouteDump) GetMessageType() api.MessageType { 2771 return api.RequestMessage 2772 } 2773 2774 func (m *IPRouteDump) Size() (size int) { 2775 if m == nil { 2776 return 0 2777 } 2778 size += 4 // m.Table.TableID 2779 size += 1 // m.Table.IsIP6 2780 size += 64 // m.Table.Name 2781 return size 2782 } 2783 func (m *IPRouteDump) Marshal(b []byte) ([]byte, error) { 2784 if b == nil { 2785 b = make([]byte, m.Size()) 2786 } 2787 buf := codec.NewBuffer(b) 2788 buf.EncodeUint32(m.Table.TableID) 2789 buf.EncodeBool(m.Table.IsIP6) 2790 buf.EncodeString(m.Table.Name, 64) 2791 return buf.Bytes(), nil 2792 } 2793 func (m *IPRouteDump) Unmarshal(b []byte) error { 2794 buf := codec.NewBuffer(b) 2795 m.Table.TableID = buf.DecodeUint32() 2796 m.Table.IsIP6 = buf.DecodeBool() 2797 m.Table.Name = buf.DecodeString(64) 2798 return nil 2799 } 2800 2801 // IPRouteLookup defines message 'ip_route_lookup'. 2802 type IPRouteLookup struct { 2803 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 2804 Exact uint8 `binapi:"u8,name=exact" json:"exact,omitempty"` 2805 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 2806 } 2807 2808 func (m *IPRouteLookup) Reset() { *m = IPRouteLookup{} } 2809 func (*IPRouteLookup) GetMessageName() string { return "ip_route_lookup" } 2810 func (*IPRouteLookup) GetCrcString() string { return "710d6471" } 2811 func (*IPRouteLookup) GetMessageType() api.MessageType { 2812 return api.RequestMessage 2813 } 2814 2815 func (m *IPRouteLookup) Size() (size int) { 2816 if m == nil { 2817 return 0 2818 } 2819 size += 4 // m.TableID 2820 size += 1 // m.Exact 2821 size += 1 // m.Prefix.Address.Af 2822 size += 1 * 16 // m.Prefix.Address.Un 2823 size += 1 // m.Prefix.Len 2824 return size 2825 } 2826 func (m *IPRouteLookup) Marshal(b []byte) ([]byte, error) { 2827 if b == nil { 2828 b = make([]byte, m.Size()) 2829 } 2830 buf := codec.NewBuffer(b) 2831 buf.EncodeUint32(m.TableID) 2832 buf.EncodeUint8(m.Exact) 2833 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 2834 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 2835 buf.EncodeUint8(m.Prefix.Len) 2836 return buf.Bytes(), nil 2837 } 2838 func (m *IPRouteLookup) Unmarshal(b []byte) error { 2839 buf := codec.NewBuffer(b) 2840 m.TableID = buf.DecodeUint32() 2841 m.Exact = buf.DecodeUint8() 2842 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2843 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2844 m.Prefix.Len = buf.DecodeUint8() 2845 return nil 2846 } 2847 2848 // IPRouteLookupReply defines message 'ip_route_lookup_reply'. 2849 type IPRouteLookupReply struct { 2850 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2851 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"` 2852 } 2853 2854 func (m *IPRouteLookupReply) Reset() { *m = IPRouteLookupReply{} } 2855 func (*IPRouteLookupReply) GetMessageName() string { return "ip_route_lookup_reply" } 2856 func (*IPRouteLookupReply) GetCrcString() string { return "5d8febcb" } 2857 func (*IPRouteLookupReply) GetMessageType() api.MessageType { 2858 return api.ReplyMessage 2859 } 2860 2861 func (m *IPRouteLookupReply) Size() (size int) { 2862 if m == nil { 2863 return 0 2864 } 2865 size += 4 // m.Retval 2866 size += 4 // m.Route.TableID 2867 size += 4 // m.Route.StatsIndex 2868 size += 1 // m.Route.Prefix.Address.Af 2869 size += 1 * 16 // m.Route.Prefix.Address.Un 2870 size += 1 // m.Route.Prefix.Len 2871 size += 1 // m.Route.NPaths 2872 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 2873 var s2 fib_types.FibPath 2874 _ = s2 2875 if j2 < len(m.Route.Paths) { 2876 s2 = m.Route.Paths[j2] 2877 } 2878 size += 4 // s2.SwIfIndex 2879 size += 4 // s2.TableID 2880 size += 4 // s2.RpfID 2881 size += 1 // s2.Weight 2882 size += 1 // s2.Preference 2883 size += 4 // s2.Type 2884 size += 4 // s2.Flags 2885 size += 4 // s2.Proto 2886 size += 1 * 16 // s2.Nh.Address 2887 size += 4 // s2.Nh.ViaLabel 2888 size += 4 // s2.Nh.ObjID 2889 size += 4 // s2.Nh.ClassifyTableIndex 2890 size += 1 // s2.NLabels 2891 for j3 := 0; j3 < 16; j3++ { 2892 size += 1 // s2.LabelStack[j3].IsUniform 2893 size += 4 // s2.LabelStack[j3].Label 2894 size += 1 // s2.LabelStack[j3].TTL 2895 size += 1 // s2.LabelStack[j3].Exp 2896 } 2897 } 2898 return size 2899 } 2900 func (m *IPRouteLookupReply) Marshal(b []byte) ([]byte, error) { 2901 if b == nil { 2902 b = make([]byte, m.Size()) 2903 } 2904 buf := codec.NewBuffer(b) 2905 buf.EncodeInt32(m.Retval) 2906 buf.EncodeUint32(m.Route.TableID) 2907 buf.EncodeUint32(m.Route.StatsIndex) 2908 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af)) 2909 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16) 2910 buf.EncodeUint8(m.Route.Prefix.Len) 2911 buf.EncodeUint8(uint8(len(m.Route.Paths))) 2912 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2913 var v1 fib_types.FibPath // Paths 2914 if j1 < len(m.Route.Paths) { 2915 v1 = m.Route.Paths[j1] 2916 } 2917 buf.EncodeUint32(v1.SwIfIndex) 2918 buf.EncodeUint32(v1.TableID) 2919 buf.EncodeUint32(v1.RpfID) 2920 buf.EncodeUint8(v1.Weight) 2921 buf.EncodeUint8(v1.Preference) 2922 buf.EncodeUint32(uint32(v1.Type)) 2923 buf.EncodeUint32(uint32(v1.Flags)) 2924 buf.EncodeUint32(uint32(v1.Proto)) 2925 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 2926 buf.EncodeUint32(v1.Nh.ViaLabel) 2927 buf.EncodeUint32(v1.Nh.ObjID) 2928 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 2929 buf.EncodeUint8(v1.NLabels) 2930 for j2 := 0; j2 < 16; j2++ { 2931 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 2932 buf.EncodeUint32(v1.LabelStack[j2].Label) 2933 buf.EncodeUint8(v1.LabelStack[j2].TTL) 2934 buf.EncodeUint8(v1.LabelStack[j2].Exp) 2935 } 2936 } 2937 return buf.Bytes(), nil 2938 } 2939 func (m *IPRouteLookupReply) Unmarshal(b []byte) error { 2940 buf := codec.NewBuffer(b) 2941 m.Retval = buf.DecodeInt32() 2942 m.Route.TableID = buf.DecodeUint32() 2943 m.Route.StatsIndex = buf.DecodeUint32() 2944 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2945 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2946 m.Route.Prefix.Len = buf.DecodeUint8() 2947 m.Route.NPaths = buf.DecodeUint8() 2948 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths) 2949 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2950 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32() 2951 m.Route.Paths[j1].TableID = buf.DecodeUint32() 2952 m.Route.Paths[j1].RpfID = buf.DecodeUint32() 2953 m.Route.Paths[j1].Weight = buf.DecodeUint8() 2954 m.Route.Paths[j1].Preference = buf.DecodeUint8() 2955 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 2956 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 2957 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 2958 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 2959 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 2960 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32() 2961 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 2962 m.Route.Paths[j1].NLabels = buf.DecodeUint8() 2963 for j2 := 0; j2 < 16; j2++ { 2964 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 2965 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 2966 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 2967 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 2968 } 2969 } 2970 return nil 2971 } 2972 2973 // IPRouteLookupV2 defines message 'ip_route_lookup_v2'. 2974 // InProgress: the message form may change in the future versions 2975 type IPRouteLookupV2 struct { 2976 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 2977 Exact uint8 `binapi:"u8,name=exact" json:"exact,omitempty"` 2978 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 2979 } 2980 2981 func (m *IPRouteLookupV2) Reset() { *m = IPRouteLookupV2{} } 2982 func (*IPRouteLookupV2) GetMessageName() string { return "ip_route_lookup_v2" } 2983 func (*IPRouteLookupV2) GetCrcString() string { return "710d6471" } 2984 func (*IPRouteLookupV2) GetMessageType() api.MessageType { 2985 return api.RequestMessage 2986 } 2987 2988 func (m *IPRouteLookupV2) Size() (size int) { 2989 if m == nil { 2990 return 0 2991 } 2992 size += 4 // m.TableID 2993 size += 1 // m.Exact 2994 size += 1 // m.Prefix.Address.Af 2995 size += 1 * 16 // m.Prefix.Address.Un 2996 size += 1 // m.Prefix.Len 2997 return size 2998 } 2999 func (m *IPRouteLookupV2) Marshal(b []byte) ([]byte, error) { 3000 if b == nil { 3001 b = make([]byte, m.Size()) 3002 } 3003 buf := codec.NewBuffer(b) 3004 buf.EncodeUint32(m.TableID) 3005 buf.EncodeUint8(m.Exact) 3006 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 3007 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 3008 buf.EncodeUint8(m.Prefix.Len) 3009 return buf.Bytes(), nil 3010 } 3011 func (m *IPRouteLookupV2) Unmarshal(b []byte) error { 3012 buf := codec.NewBuffer(b) 3013 m.TableID = buf.DecodeUint32() 3014 m.Exact = buf.DecodeUint8() 3015 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 3016 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 3017 m.Prefix.Len = buf.DecodeUint8() 3018 return nil 3019 } 3020 3021 // IPRouteLookupV2Reply defines message 'ip_route_lookup_v2_reply'. 3022 // InProgress: the message form may change in the future versions 3023 type IPRouteLookupV2Reply struct { 3024 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3025 Route IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"` 3026 } 3027 3028 func (m *IPRouteLookupV2Reply) Reset() { *m = IPRouteLookupV2Reply{} } 3029 func (*IPRouteLookupV2Reply) GetMessageName() string { return "ip_route_lookup_v2_reply" } 3030 func (*IPRouteLookupV2Reply) GetCrcString() string { return "84cc9e03" } 3031 func (*IPRouteLookupV2Reply) GetMessageType() api.MessageType { 3032 return api.ReplyMessage 3033 } 3034 3035 func (m *IPRouteLookupV2Reply) Size() (size int) { 3036 if m == nil { 3037 return 0 3038 } 3039 size += 4 // m.Retval 3040 size += 4 // m.Route.TableID 3041 size += 4 // m.Route.StatsIndex 3042 size += 1 // m.Route.Prefix.Address.Af 3043 size += 1 * 16 // m.Route.Prefix.Address.Un 3044 size += 1 // m.Route.Prefix.Len 3045 size += 1 // m.Route.NPaths 3046 size += 1 // m.Route.Src 3047 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 3048 var s2 fib_types.FibPath 3049 _ = s2 3050 if j2 < len(m.Route.Paths) { 3051 s2 = m.Route.Paths[j2] 3052 } 3053 size += 4 // s2.SwIfIndex 3054 size += 4 // s2.TableID 3055 size += 4 // s2.RpfID 3056 size += 1 // s2.Weight 3057 size += 1 // s2.Preference 3058 size += 4 // s2.Type 3059 size += 4 // s2.Flags 3060 size += 4 // s2.Proto 3061 size += 1 * 16 // s2.Nh.Address 3062 size += 4 // s2.Nh.ViaLabel 3063 size += 4 // s2.Nh.ObjID 3064 size += 4 // s2.Nh.ClassifyTableIndex 3065 size += 1 // s2.NLabels 3066 for j3 := 0; j3 < 16; j3++ { 3067 size += 1 // s2.LabelStack[j3].IsUniform 3068 size += 4 // s2.LabelStack[j3].Label 3069 size += 1 // s2.LabelStack[j3].TTL 3070 size += 1 // s2.LabelStack[j3].Exp 3071 } 3072 } 3073 return size 3074 } 3075 func (m *IPRouteLookupV2Reply) Marshal(b []byte) ([]byte, error) { 3076 if b == nil { 3077 b = make([]byte, m.Size()) 3078 } 3079 buf := codec.NewBuffer(b) 3080 buf.EncodeInt32(m.Retval) 3081 buf.EncodeUint32(m.Route.TableID) 3082 buf.EncodeUint32(m.Route.StatsIndex) 3083 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af)) 3084 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16) 3085 buf.EncodeUint8(m.Route.Prefix.Len) 3086 buf.EncodeUint8(uint8(len(m.Route.Paths))) 3087 buf.EncodeUint8(m.Route.Src) 3088 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 3089 var v1 fib_types.FibPath // Paths 3090 if j1 < len(m.Route.Paths) { 3091 v1 = m.Route.Paths[j1] 3092 } 3093 buf.EncodeUint32(v1.SwIfIndex) 3094 buf.EncodeUint32(v1.TableID) 3095 buf.EncodeUint32(v1.RpfID) 3096 buf.EncodeUint8(v1.Weight) 3097 buf.EncodeUint8(v1.Preference) 3098 buf.EncodeUint32(uint32(v1.Type)) 3099 buf.EncodeUint32(uint32(v1.Flags)) 3100 buf.EncodeUint32(uint32(v1.Proto)) 3101 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 3102 buf.EncodeUint32(v1.Nh.ViaLabel) 3103 buf.EncodeUint32(v1.Nh.ObjID) 3104 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 3105 buf.EncodeUint8(v1.NLabels) 3106 for j2 := 0; j2 < 16; j2++ { 3107 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 3108 buf.EncodeUint32(v1.LabelStack[j2].Label) 3109 buf.EncodeUint8(v1.LabelStack[j2].TTL) 3110 buf.EncodeUint8(v1.LabelStack[j2].Exp) 3111 } 3112 } 3113 return buf.Bytes(), nil 3114 } 3115 func (m *IPRouteLookupV2Reply) Unmarshal(b []byte) error { 3116 buf := codec.NewBuffer(b) 3117 m.Retval = buf.DecodeInt32() 3118 m.Route.TableID = buf.DecodeUint32() 3119 m.Route.StatsIndex = buf.DecodeUint32() 3120 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 3121 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 3122 m.Route.Prefix.Len = buf.DecodeUint8() 3123 m.Route.NPaths = buf.DecodeUint8() 3124 m.Route.Src = buf.DecodeUint8() 3125 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths) 3126 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 3127 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32() 3128 m.Route.Paths[j1].TableID = buf.DecodeUint32() 3129 m.Route.Paths[j1].RpfID = buf.DecodeUint32() 3130 m.Route.Paths[j1].Weight = buf.DecodeUint8() 3131 m.Route.Paths[j1].Preference = buf.DecodeUint8() 3132 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 3133 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 3134 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 3135 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 3136 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 3137 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32() 3138 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 3139 m.Route.Paths[j1].NLabels = buf.DecodeUint8() 3140 for j2 := 0; j2 < 16; j2++ { 3141 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 3142 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 3143 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 3144 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 3145 } 3146 } 3147 return nil 3148 } 3149 3150 // IPRouteV2Details defines message 'ip_route_v2_details'. 3151 // InProgress: the message form may change in the future versions 3152 type IPRouteV2Details struct { 3153 Route IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"` 3154 } 3155 3156 func (m *IPRouteV2Details) Reset() { *m = IPRouteV2Details{} } 3157 func (*IPRouteV2Details) GetMessageName() string { return "ip_route_v2_details" } 3158 func (*IPRouteV2Details) GetCrcString() string { return "b09aa6c0" } 3159 func (*IPRouteV2Details) GetMessageType() api.MessageType { 3160 return api.ReplyMessage 3161 } 3162 3163 func (m *IPRouteV2Details) Size() (size int) { 3164 if m == nil { 3165 return 0 3166 } 3167 size += 4 // m.Route.TableID 3168 size += 4 // m.Route.StatsIndex 3169 size += 1 // m.Route.Prefix.Address.Af 3170 size += 1 * 16 // m.Route.Prefix.Address.Un 3171 size += 1 // m.Route.Prefix.Len 3172 size += 1 // m.Route.NPaths 3173 size += 1 // m.Route.Src 3174 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 3175 var s2 fib_types.FibPath 3176 _ = s2 3177 if j2 < len(m.Route.Paths) { 3178 s2 = m.Route.Paths[j2] 3179 } 3180 size += 4 // s2.SwIfIndex 3181 size += 4 // s2.TableID 3182 size += 4 // s2.RpfID 3183 size += 1 // s2.Weight 3184 size += 1 // s2.Preference 3185 size += 4 // s2.Type 3186 size += 4 // s2.Flags 3187 size += 4 // s2.Proto 3188 size += 1 * 16 // s2.Nh.Address 3189 size += 4 // s2.Nh.ViaLabel 3190 size += 4 // s2.Nh.ObjID 3191 size += 4 // s2.Nh.ClassifyTableIndex 3192 size += 1 // s2.NLabels 3193 for j3 := 0; j3 < 16; j3++ { 3194 size += 1 // s2.LabelStack[j3].IsUniform 3195 size += 4 // s2.LabelStack[j3].Label 3196 size += 1 // s2.LabelStack[j3].TTL 3197 size += 1 // s2.LabelStack[j3].Exp 3198 } 3199 } 3200 return size 3201 } 3202 func (m *IPRouteV2Details) Marshal(b []byte) ([]byte, error) { 3203 if b == nil { 3204 b = make([]byte, m.Size()) 3205 } 3206 buf := codec.NewBuffer(b) 3207 buf.EncodeUint32(m.Route.TableID) 3208 buf.EncodeUint32(m.Route.StatsIndex) 3209 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af)) 3210 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16) 3211 buf.EncodeUint8(m.Route.Prefix.Len) 3212 buf.EncodeUint8(uint8(len(m.Route.Paths))) 3213 buf.EncodeUint8(m.Route.Src) 3214 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 3215 var v1 fib_types.FibPath // Paths 3216 if j1 < len(m.Route.Paths) { 3217 v1 = m.Route.Paths[j1] 3218 } 3219 buf.EncodeUint32(v1.SwIfIndex) 3220 buf.EncodeUint32(v1.TableID) 3221 buf.EncodeUint32(v1.RpfID) 3222 buf.EncodeUint8(v1.Weight) 3223 buf.EncodeUint8(v1.Preference) 3224 buf.EncodeUint32(uint32(v1.Type)) 3225 buf.EncodeUint32(uint32(v1.Flags)) 3226 buf.EncodeUint32(uint32(v1.Proto)) 3227 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 3228 buf.EncodeUint32(v1.Nh.ViaLabel) 3229 buf.EncodeUint32(v1.Nh.ObjID) 3230 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 3231 buf.EncodeUint8(v1.NLabels) 3232 for j2 := 0; j2 < 16; j2++ { 3233 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 3234 buf.EncodeUint32(v1.LabelStack[j2].Label) 3235 buf.EncodeUint8(v1.LabelStack[j2].TTL) 3236 buf.EncodeUint8(v1.LabelStack[j2].Exp) 3237 } 3238 } 3239 return buf.Bytes(), nil 3240 } 3241 func (m *IPRouteV2Details) Unmarshal(b []byte) error { 3242 buf := codec.NewBuffer(b) 3243 m.Route.TableID = buf.DecodeUint32() 3244 m.Route.StatsIndex = buf.DecodeUint32() 3245 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 3246 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 3247 m.Route.Prefix.Len = buf.DecodeUint8() 3248 m.Route.NPaths = buf.DecodeUint8() 3249 m.Route.Src = buf.DecodeUint8() 3250 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths) 3251 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 3252 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32() 3253 m.Route.Paths[j1].TableID = buf.DecodeUint32() 3254 m.Route.Paths[j1].RpfID = buf.DecodeUint32() 3255 m.Route.Paths[j1].Weight = buf.DecodeUint8() 3256 m.Route.Paths[j1].Preference = buf.DecodeUint8() 3257 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 3258 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 3259 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 3260 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 3261 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 3262 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32() 3263 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 3264 m.Route.Paths[j1].NLabels = buf.DecodeUint8() 3265 for j2 := 0; j2 < 16; j2++ { 3266 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 3267 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 3268 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 3269 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 3270 } 3271 } 3272 return nil 3273 } 3274 3275 // IPRouteV2Dump defines message 'ip_route_v2_dump'. 3276 // InProgress: the message form may change in the future versions 3277 type IPRouteV2Dump struct { 3278 Src uint8 `binapi:"u8,name=src" json:"src,omitempty"` 3279 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 3280 } 3281 3282 func (m *IPRouteV2Dump) Reset() { *m = IPRouteV2Dump{} } 3283 func (*IPRouteV2Dump) GetMessageName() string { return "ip_route_v2_dump" } 3284 func (*IPRouteV2Dump) GetCrcString() string { return "d16f72e6" } 3285 func (*IPRouteV2Dump) GetMessageType() api.MessageType { 3286 return api.RequestMessage 3287 } 3288 3289 func (m *IPRouteV2Dump) Size() (size int) { 3290 if m == nil { 3291 return 0 3292 } 3293 size += 1 // m.Src 3294 size += 4 // m.Table.TableID 3295 size += 1 // m.Table.IsIP6 3296 size += 64 // m.Table.Name 3297 return size 3298 } 3299 func (m *IPRouteV2Dump) Marshal(b []byte) ([]byte, error) { 3300 if b == nil { 3301 b = make([]byte, m.Size()) 3302 } 3303 buf := codec.NewBuffer(b) 3304 buf.EncodeUint8(m.Src) 3305 buf.EncodeUint32(m.Table.TableID) 3306 buf.EncodeBool(m.Table.IsIP6) 3307 buf.EncodeString(m.Table.Name, 64) 3308 return buf.Bytes(), nil 3309 } 3310 func (m *IPRouteV2Dump) Unmarshal(b []byte) error { 3311 buf := codec.NewBuffer(b) 3312 m.Src = buf.DecodeUint8() 3313 m.Table.TableID = buf.DecodeUint32() 3314 m.Table.IsIP6 = buf.DecodeBool() 3315 m.Table.Name = buf.DecodeString(64) 3316 return nil 3317 } 3318 3319 // IPSourceAndPortRangeCheckAddDel defines message 'ip_source_and_port_range_check_add_del'. 3320 type IPSourceAndPortRangeCheckAddDel struct { 3321 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 3322 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 3323 NumberOfRanges uint8 `binapi:"u8,name=number_of_ranges" json:"number_of_ranges,omitempty"` 3324 LowPorts []uint16 `binapi:"u16[32],name=low_ports" json:"low_ports,omitempty"` 3325 HighPorts []uint16 `binapi:"u16[32],name=high_ports" json:"high_ports,omitempty"` 3326 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 3327 } 3328 3329 func (m *IPSourceAndPortRangeCheckAddDel) Reset() { *m = IPSourceAndPortRangeCheckAddDel{} } 3330 func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string { 3331 return "ip_source_and_port_range_check_add_del" 3332 } 3333 func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "92a067e3" } 3334 func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType { 3335 return api.RequestMessage 3336 } 3337 3338 func (m *IPSourceAndPortRangeCheckAddDel) Size() (size int) { 3339 if m == nil { 3340 return 0 3341 } 3342 size += 1 // m.IsAdd 3343 size += 1 // m.Prefix.Address.Af 3344 size += 1 * 16 // m.Prefix.Address.Un 3345 size += 1 // m.Prefix.Len 3346 size += 1 // m.NumberOfRanges 3347 size += 2 * 32 // m.LowPorts 3348 size += 2 * 32 // m.HighPorts 3349 size += 4 // m.VrfID 3350 return size 3351 } 3352 func (m *IPSourceAndPortRangeCheckAddDel) Marshal(b []byte) ([]byte, error) { 3353 if b == nil { 3354 b = make([]byte, m.Size()) 3355 } 3356 buf := codec.NewBuffer(b) 3357 buf.EncodeBool(m.IsAdd) 3358 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 3359 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 3360 buf.EncodeUint8(m.Prefix.Len) 3361 buf.EncodeUint8(m.NumberOfRanges) 3362 for i := 0; i < 32; i++ { 3363 var x uint16 3364 if i < len(m.LowPorts) { 3365 x = uint16(m.LowPorts[i]) 3366 } 3367 buf.EncodeUint16(x) 3368 } 3369 for i := 0; i < 32; i++ { 3370 var x uint16 3371 if i < len(m.HighPorts) { 3372 x = uint16(m.HighPorts[i]) 3373 } 3374 buf.EncodeUint16(x) 3375 } 3376 buf.EncodeUint32(m.VrfID) 3377 return buf.Bytes(), nil 3378 } 3379 func (m *IPSourceAndPortRangeCheckAddDel) Unmarshal(b []byte) error { 3380 buf := codec.NewBuffer(b) 3381 m.IsAdd = buf.DecodeBool() 3382 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 3383 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 3384 m.Prefix.Len = buf.DecodeUint8() 3385 m.NumberOfRanges = buf.DecodeUint8() 3386 m.LowPorts = make([]uint16, 32) 3387 for i := 0; i < len(m.LowPorts); i++ { 3388 m.LowPorts[i] = buf.DecodeUint16() 3389 } 3390 m.HighPorts = make([]uint16, 32) 3391 for i := 0; i < len(m.HighPorts); i++ { 3392 m.HighPorts[i] = buf.DecodeUint16() 3393 } 3394 m.VrfID = buf.DecodeUint32() 3395 return nil 3396 } 3397 3398 // IPSourceAndPortRangeCheckAddDelReply defines message 'ip_source_and_port_range_check_add_del_reply'. 3399 type IPSourceAndPortRangeCheckAddDelReply struct { 3400 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3401 } 3402 3403 func (m *IPSourceAndPortRangeCheckAddDelReply) Reset() { *m = IPSourceAndPortRangeCheckAddDelReply{} } 3404 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageName() string { 3405 return "ip_source_and_port_range_check_add_del_reply" 3406 } 3407 func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { return "e8d4e804" } 3408 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageType() api.MessageType { 3409 return api.ReplyMessage 3410 } 3411 3412 func (m *IPSourceAndPortRangeCheckAddDelReply) Size() (size int) { 3413 if m == nil { 3414 return 0 3415 } 3416 size += 4 // m.Retval 3417 return size 3418 } 3419 func (m *IPSourceAndPortRangeCheckAddDelReply) Marshal(b []byte) ([]byte, error) { 3420 if b == nil { 3421 b = make([]byte, m.Size()) 3422 } 3423 buf := codec.NewBuffer(b) 3424 buf.EncodeInt32(m.Retval) 3425 return buf.Bytes(), nil 3426 } 3427 func (m *IPSourceAndPortRangeCheckAddDelReply) Unmarshal(b []byte) error { 3428 buf := codec.NewBuffer(b) 3429 m.Retval = buf.DecodeInt32() 3430 return nil 3431 } 3432 3433 // IPSourceAndPortRangeCheckInterfaceAddDel defines message 'ip_source_and_port_range_check_interface_add_del'. 3434 type IPSourceAndPortRangeCheckInterfaceAddDel struct { 3435 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 3436 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 3437 TCPInVrfID uint32 `binapi:"u32,name=tcp_in_vrf_id" json:"tcp_in_vrf_id,omitempty"` 3438 TCPOutVrfID uint32 `binapi:"u32,name=tcp_out_vrf_id" json:"tcp_out_vrf_id,omitempty"` 3439 UDPInVrfID uint32 `binapi:"u32,name=udp_in_vrf_id" json:"udp_in_vrf_id,omitempty"` 3440 UDPOutVrfID uint32 `binapi:"u32,name=udp_out_vrf_id" json:"udp_out_vrf_id,omitempty"` 3441 } 3442 3443 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Reset() { 3444 *m = IPSourceAndPortRangeCheckInterfaceAddDel{} 3445 } 3446 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageName() string { 3447 return "ip_source_and_port_range_check_interface_add_del" 3448 } 3449 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { return "e1ba8987" } 3450 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageType() api.MessageType { 3451 return api.RequestMessage 3452 } 3453 3454 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Size() (size int) { 3455 if m == nil { 3456 return 0 3457 } 3458 size += 1 // m.IsAdd 3459 size += 4 // m.SwIfIndex 3460 size += 4 // m.TCPInVrfID 3461 size += 4 // m.TCPOutVrfID 3462 size += 4 // m.UDPInVrfID 3463 size += 4 // m.UDPOutVrfID 3464 return size 3465 } 3466 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Marshal(b []byte) ([]byte, error) { 3467 if b == nil { 3468 b = make([]byte, m.Size()) 3469 } 3470 buf := codec.NewBuffer(b) 3471 buf.EncodeBool(m.IsAdd) 3472 buf.EncodeUint32(uint32(m.SwIfIndex)) 3473 buf.EncodeUint32(m.TCPInVrfID) 3474 buf.EncodeUint32(m.TCPOutVrfID) 3475 buf.EncodeUint32(m.UDPInVrfID) 3476 buf.EncodeUint32(m.UDPOutVrfID) 3477 return buf.Bytes(), nil 3478 } 3479 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Unmarshal(b []byte) error { 3480 buf := codec.NewBuffer(b) 3481 m.IsAdd = buf.DecodeBool() 3482 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 3483 m.TCPInVrfID = buf.DecodeUint32() 3484 m.TCPOutVrfID = buf.DecodeUint32() 3485 m.UDPInVrfID = buf.DecodeUint32() 3486 m.UDPOutVrfID = buf.DecodeUint32() 3487 return nil 3488 } 3489 3490 // IPSourceAndPortRangeCheckInterfaceAddDelReply defines message 'ip_source_and_port_range_check_interface_add_del_reply'. 3491 type IPSourceAndPortRangeCheckInterfaceAddDelReply struct { 3492 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3493 } 3494 3495 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Reset() { 3496 *m = IPSourceAndPortRangeCheckInterfaceAddDelReply{} 3497 } 3498 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageName() string { 3499 return "ip_source_and_port_range_check_interface_add_del_reply" 3500 } 3501 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" } 3502 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.MessageType { 3503 return api.ReplyMessage 3504 } 3505 3506 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Size() (size int) { 3507 if m == nil { 3508 return 0 3509 } 3510 size += 4 // m.Retval 3511 return size 3512 } 3513 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) { 3514 if b == nil { 3515 b = make([]byte, m.Size()) 3516 } 3517 buf := codec.NewBuffer(b) 3518 buf.EncodeInt32(m.Retval) 3519 return buf.Bytes(), nil 3520 } 3521 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Unmarshal(b []byte) error { 3522 buf := codec.NewBuffer(b) 3523 m.Retval = buf.DecodeInt32() 3524 return nil 3525 } 3526 3527 // IPTableAddDel defines message 'ip_table_add_del'. 3528 type IPTableAddDel struct { 3529 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 3530 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 3531 } 3532 3533 func (m *IPTableAddDel) Reset() { *m = IPTableAddDel{} } 3534 func (*IPTableAddDel) GetMessageName() string { return "ip_table_add_del" } 3535 func (*IPTableAddDel) GetCrcString() string { return "0ffdaec0" } 3536 func (*IPTableAddDel) GetMessageType() api.MessageType { 3537 return api.RequestMessage 3538 } 3539 3540 func (m *IPTableAddDel) Size() (size int) { 3541 if m == nil { 3542 return 0 3543 } 3544 size += 1 // m.IsAdd 3545 size += 4 // m.Table.TableID 3546 size += 1 // m.Table.IsIP6 3547 size += 64 // m.Table.Name 3548 return size 3549 } 3550 func (m *IPTableAddDel) Marshal(b []byte) ([]byte, error) { 3551 if b == nil { 3552 b = make([]byte, m.Size()) 3553 } 3554 buf := codec.NewBuffer(b) 3555 buf.EncodeBool(m.IsAdd) 3556 buf.EncodeUint32(m.Table.TableID) 3557 buf.EncodeBool(m.Table.IsIP6) 3558 buf.EncodeString(m.Table.Name, 64) 3559 return buf.Bytes(), nil 3560 } 3561 func (m *IPTableAddDel) Unmarshal(b []byte) error { 3562 buf := codec.NewBuffer(b) 3563 m.IsAdd = buf.DecodeBool() 3564 m.Table.TableID = buf.DecodeUint32() 3565 m.Table.IsIP6 = buf.DecodeBool() 3566 m.Table.Name = buf.DecodeString(64) 3567 return nil 3568 } 3569 3570 // IPTableAddDelReply defines message 'ip_table_add_del_reply'. 3571 type IPTableAddDelReply struct { 3572 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3573 } 3574 3575 func (m *IPTableAddDelReply) Reset() { *m = IPTableAddDelReply{} } 3576 func (*IPTableAddDelReply) GetMessageName() string { return "ip_table_add_del_reply" } 3577 func (*IPTableAddDelReply) GetCrcString() string { return "e8d4e804" } 3578 func (*IPTableAddDelReply) GetMessageType() api.MessageType { 3579 return api.ReplyMessage 3580 } 3581 3582 func (m *IPTableAddDelReply) Size() (size int) { 3583 if m == nil { 3584 return 0 3585 } 3586 size += 4 // m.Retval 3587 return size 3588 } 3589 func (m *IPTableAddDelReply) Marshal(b []byte) ([]byte, error) { 3590 if b == nil { 3591 b = make([]byte, m.Size()) 3592 } 3593 buf := codec.NewBuffer(b) 3594 buf.EncodeInt32(m.Retval) 3595 return buf.Bytes(), nil 3596 } 3597 func (m *IPTableAddDelReply) Unmarshal(b []byte) error { 3598 buf := codec.NewBuffer(b) 3599 m.Retval = buf.DecodeInt32() 3600 return nil 3601 } 3602 3603 // IPTableAllocate defines message 'ip_table_allocate'. 3604 type IPTableAllocate struct { 3605 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 3606 } 3607 3608 func (m *IPTableAllocate) Reset() { *m = IPTableAllocate{} } 3609 func (*IPTableAllocate) GetMessageName() string { return "ip_table_allocate" } 3610 func (*IPTableAllocate) GetCrcString() string { return "b9d2e09e" } 3611 func (*IPTableAllocate) GetMessageType() api.MessageType { 3612 return api.RequestMessage 3613 } 3614 3615 func (m *IPTableAllocate) Size() (size int) { 3616 if m == nil { 3617 return 0 3618 } 3619 size += 4 // m.Table.TableID 3620 size += 1 // m.Table.IsIP6 3621 size += 64 // m.Table.Name 3622 return size 3623 } 3624 func (m *IPTableAllocate) Marshal(b []byte) ([]byte, error) { 3625 if b == nil { 3626 b = make([]byte, m.Size()) 3627 } 3628 buf := codec.NewBuffer(b) 3629 buf.EncodeUint32(m.Table.TableID) 3630 buf.EncodeBool(m.Table.IsIP6) 3631 buf.EncodeString(m.Table.Name, 64) 3632 return buf.Bytes(), nil 3633 } 3634 func (m *IPTableAllocate) Unmarshal(b []byte) error { 3635 buf := codec.NewBuffer(b) 3636 m.Table.TableID = buf.DecodeUint32() 3637 m.Table.IsIP6 = buf.DecodeBool() 3638 m.Table.Name = buf.DecodeString(64) 3639 return nil 3640 } 3641 3642 // IPTableAllocateReply defines message 'ip_table_allocate_reply'. 3643 type IPTableAllocateReply struct { 3644 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3645 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 3646 } 3647 3648 func (m *IPTableAllocateReply) Reset() { *m = IPTableAllocateReply{} } 3649 func (*IPTableAllocateReply) GetMessageName() string { return "ip_table_allocate_reply" } 3650 func (*IPTableAllocateReply) GetCrcString() string { return "1728303a" } 3651 func (*IPTableAllocateReply) GetMessageType() api.MessageType { 3652 return api.ReplyMessage 3653 } 3654 3655 func (m *IPTableAllocateReply) Size() (size int) { 3656 if m == nil { 3657 return 0 3658 } 3659 size += 4 // m.Retval 3660 size += 4 // m.Table.TableID 3661 size += 1 // m.Table.IsIP6 3662 size += 64 // m.Table.Name 3663 return size 3664 } 3665 func (m *IPTableAllocateReply) Marshal(b []byte) ([]byte, error) { 3666 if b == nil { 3667 b = make([]byte, m.Size()) 3668 } 3669 buf := codec.NewBuffer(b) 3670 buf.EncodeInt32(m.Retval) 3671 buf.EncodeUint32(m.Table.TableID) 3672 buf.EncodeBool(m.Table.IsIP6) 3673 buf.EncodeString(m.Table.Name, 64) 3674 return buf.Bytes(), nil 3675 } 3676 func (m *IPTableAllocateReply) Unmarshal(b []byte) error { 3677 buf := codec.NewBuffer(b) 3678 m.Retval = buf.DecodeInt32() 3679 m.Table.TableID = buf.DecodeUint32() 3680 m.Table.IsIP6 = buf.DecodeBool() 3681 m.Table.Name = buf.DecodeString(64) 3682 return nil 3683 } 3684 3685 // IPTableDetails defines message 'ip_table_details'. 3686 type IPTableDetails struct { 3687 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 3688 } 3689 3690 func (m *IPTableDetails) Reset() { *m = IPTableDetails{} } 3691 func (*IPTableDetails) GetMessageName() string { return "ip_table_details" } 3692 func (*IPTableDetails) GetCrcString() string { return "c79fca0f" } 3693 func (*IPTableDetails) GetMessageType() api.MessageType { 3694 return api.ReplyMessage 3695 } 3696 3697 func (m *IPTableDetails) Size() (size int) { 3698 if m == nil { 3699 return 0 3700 } 3701 size += 4 // m.Table.TableID 3702 size += 1 // m.Table.IsIP6 3703 size += 64 // m.Table.Name 3704 return size 3705 } 3706 func (m *IPTableDetails) Marshal(b []byte) ([]byte, error) { 3707 if b == nil { 3708 b = make([]byte, m.Size()) 3709 } 3710 buf := codec.NewBuffer(b) 3711 buf.EncodeUint32(m.Table.TableID) 3712 buf.EncodeBool(m.Table.IsIP6) 3713 buf.EncodeString(m.Table.Name, 64) 3714 return buf.Bytes(), nil 3715 } 3716 func (m *IPTableDetails) Unmarshal(b []byte) error { 3717 buf := codec.NewBuffer(b) 3718 m.Table.TableID = buf.DecodeUint32() 3719 m.Table.IsIP6 = buf.DecodeBool() 3720 m.Table.Name = buf.DecodeString(64) 3721 return nil 3722 } 3723 3724 // IPTableDump defines message 'ip_table_dump'. 3725 type IPTableDump struct{} 3726 3727 func (m *IPTableDump) Reset() { *m = IPTableDump{} } 3728 func (*IPTableDump) GetMessageName() string { return "ip_table_dump" } 3729 func (*IPTableDump) GetCrcString() string { return "51077d14" } 3730 func (*IPTableDump) GetMessageType() api.MessageType { 3731 return api.RequestMessage 3732 } 3733 3734 func (m *IPTableDump) Size() (size int) { 3735 if m == nil { 3736 return 0 3737 } 3738 return size 3739 } 3740 func (m *IPTableDump) Marshal(b []byte) ([]byte, error) { 3741 if b == nil { 3742 b = make([]byte, m.Size()) 3743 } 3744 buf := codec.NewBuffer(b) 3745 return buf.Bytes(), nil 3746 } 3747 func (m *IPTableDump) Unmarshal(b []byte) error { 3748 return nil 3749 } 3750 3751 // IPTableFlush defines message 'ip_table_flush'. 3752 type IPTableFlush struct { 3753 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 3754 } 3755 3756 func (m *IPTableFlush) Reset() { *m = IPTableFlush{} } 3757 func (*IPTableFlush) GetMessageName() string { return "ip_table_flush" } 3758 func (*IPTableFlush) GetCrcString() string { return "b9d2e09e" } 3759 func (*IPTableFlush) GetMessageType() api.MessageType { 3760 return api.RequestMessage 3761 } 3762 3763 func (m *IPTableFlush) Size() (size int) { 3764 if m == nil { 3765 return 0 3766 } 3767 size += 4 // m.Table.TableID 3768 size += 1 // m.Table.IsIP6 3769 size += 64 // m.Table.Name 3770 return size 3771 } 3772 func (m *IPTableFlush) Marshal(b []byte) ([]byte, error) { 3773 if b == nil { 3774 b = make([]byte, m.Size()) 3775 } 3776 buf := codec.NewBuffer(b) 3777 buf.EncodeUint32(m.Table.TableID) 3778 buf.EncodeBool(m.Table.IsIP6) 3779 buf.EncodeString(m.Table.Name, 64) 3780 return buf.Bytes(), nil 3781 } 3782 func (m *IPTableFlush) Unmarshal(b []byte) error { 3783 buf := codec.NewBuffer(b) 3784 m.Table.TableID = buf.DecodeUint32() 3785 m.Table.IsIP6 = buf.DecodeBool() 3786 m.Table.Name = buf.DecodeString(64) 3787 return nil 3788 } 3789 3790 // IPTableFlushReply defines message 'ip_table_flush_reply'. 3791 type IPTableFlushReply struct { 3792 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3793 } 3794 3795 func (m *IPTableFlushReply) Reset() { *m = IPTableFlushReply{} } 3796 func (*IPTableFlushReply) GetMessageName() string { return "ip_table_flush_reply" } 3797 func (*IPTableFlushReply) GetCrcString() string { return "e8d4e804" } 3798 func (*IPTableFlushReply) GetMessageType() api.MessageType { 3799 return api.ReplyMessage 3800 } 3801 3802 func (m *IPTableFlushReply) Size() (size int) { 3803 if m == nil { 3804 return 0 3805 } 3806 size += 4 // m.Retval 3807 return size 3808 } 3809 func (m *IPTableFlushReply) Marshal(b []byte) ([]byte, error) { 3810 if b == nil { 3811 b = make([]byte, m.Size()) 3812 } 3813 buf := codec.NewBuffer(b) 3814 buf.EncodeInt32(m.Retval) 3815 return buf.Bytes(), nil 3816 } 3817 func (m *IPTableFlushReply) Unmarshal(b []byte) error { 3818 buf := codec.NewBuffer(b) 3819 m.Retval = buf.DecodeInt32() 3820 return nil 3821 } 3822 3823 // IPTableReplaceBegin defines message 'ip_table_replace_begin'. 3824 type IPTableReplaceBegin struct { 3825 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 3826 } 3827 3828 func (m *IPTableReplaceBegin) Reset() { *m = IPTableReplaceBegin{} } 3829 func (*IPTableReplaceBegin) GetMessageName() string { return "ip_table_replace_begin" } 3830 func (*IPTableReplaceBegin) GetCrcString() string { return "b9d2e09e" } 3831 func (*IPTableReplaceBegin) GetMessageType() api.MessageType { 3832 return api.RequestMessage 3833 } 3834 3835 func (m *IPTableReplaceBegin) Size() (size int) { 3836 if m == nil { 3837 return 0 3838 } 3839 size += 4 // m.Table.TableID 3840 size += 1 // m.Table.IsIP6 3841 size += 64 // m.Table.Name 3842 return size 3843 } 3844 func (m *IPTableReplaceBegin) Marshal(b []byte) ([]byte, error) { 3845 if b == nil { 3846 b = make([]byte, m.Size()) 3847 } 3848 buf := codec.NewBuffer(b) 3849 buf.EncodeUint32(m.Table.TableID) 3850 buf.EncodeBool(m.Table.IsIP6) 3851 buf.EncodeString(m.Table.Name, 64) 3852 return buf.Bytes(), nil 3853 } 3854 func (m *IPTableReplaceBegin) Unmarshal(b []byte) error { 3855 buf := codec.NewBuffer(b) 3856 m.Table.TableID = buf.DecodeUint32() 3857 m.Table.IsIP6 = buf.DecodeBool() 3858 m.Table.Name = buf.DecodeString(64) 3859 return nil 3860 } 3861 3862 // IPTableReplaceBeginReply defines message 'ip_table_replace_begin_reply'. 3863 type IPTableReplaceBeginReply struct { 3864 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3865 } 3866 3867 func (m *IPTableReplaceBeginReply) Reset() { *m = IPTableReplaceBeginReply{} } 3868 func (*IPTableReplaceBeginReply) GetMessageName() string { return "ip_table_replace_begin_reply" } 3869 func (*IPTableReplaceBeginReply) GetCrcString() string { return "e8d4e804" } 3870 func (*IPTableReplaceBeginReply) GetMessageType() api.MessageType { 3871 return api.ReplyMessage 3872 } 3873 3874 func (m *IPTableReplaceBeginReply) Size() (size int) { 3875 if m == nil { 3876 return 0 3877 } 3878 size += 4 // m.Retval 3879 return size 3880 } 3881 func (m *IPTableReplaceBeginReply) Marshal(b []byte) ([]byte, error) { 3882 if b == nil { 3883 b = make([]byte, m.Size()) 3884 } 3885 buf := codec.NewBuffer(b) 3886 buf.EncodeInt32(m.Retval) 3887 return buf.Bytes(), nil 3888 } 3889 func (m *IPTableReplaceBeginReply) Unmarshal(b []byte) error { 3890 buf := codec.NewBuffer(b) 3891 m.Retval = buf.DecodeInt32() 3892 return nil 3893 } 3894 3895 // IPTableReplaceEnd defines message 'ip_table_replace_end'. 3896 type IPTableReplaceEnd struct { 3897 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 3898 } 3899 3900 func (m *IPTableReplaceEnd) Reset() { *m = IPTableReplaceEnd{} } 3901 func (*IPTableReplaceEnd) GetMessageName() string { return "ip_table_replace_end" } 3902 func (*IPTableReplaceEnd) GetCrcString() string { return "b9d2e09e" } 3903 func (*IPTableReplaceEnd) GetMessageType() api.MessageType { 3904 return api.RequestMessage 3905 } 3906 3907 func (m *IPTableReplaceEnd) Size() (size int) { 3908 if m == nil { 3909 return 0 3910 } 3911 size += 4 // m.Table.TableID 3912 size += 1 // m.Table.IsIP6 3913 size += 64 // m.Table.Name 3914 return size 3915 } 3916 func (m *IPTableReplaceEnd) Marshal(b []byte) ([]byte, error) { 3917 if b == nil { 3918 b = make([]byte, m.Size()) 3919 } 3920 buf := codec.NewBuffer(b) 3921 buf.EncodeUint32(m.Table.TableID) 3922 buf.EncodeBool(m.Table.IsIP6) 3923 buf.EncodeString(m.Table.Name, 64) 3924 return buf.Bytes(), nil 3925 } 3926 func (m *IPTableReplaceEnd) Unmarshal(b []byte) error { 3927 buf := codec.NewBuffer(b) 3928 m.Table.TableID = buf.DecodeUint32() 3929 m.Table.IsIP6 = buf.DecodeBool() 3930 m.Table.Name = buf.DecodeString(64) 3931 return nil 3932 } 3933 3934 // IPTableReplaceEndReply defines message 'ip_table_replace_end_reply'. 3935 type IPTableReplaceEndReply struct { 3936 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3937 } 3938 3939 func (m *IPTableReplaceEndReply) Reset() { *m = IPTableReplaceEndReply{} } 3940 func (*IPTableReplaceEndReply) GetMessageName() string { return "ip_table_replace_end_reply" } 3941 func (*IPTableReplaceEndReply) GetCrcString() string { return "e8d4e804" } 3942 func (*IPTableReplaceEndReply) GetMessageType() api.MessageType { 3943 return api.ReplyMessage 3944 } 3945 3946 func (m *IPTableReplaceEndReply) Size() (size int) { 3947 if m == nil { 3948 return 0 3949 } 3950 size += 4 // m.Retval 3951 return size 3952 } 3953 func (m *IPTableReplaceEndReply) Marshal(b []byte) ([]byte, error) { 3954 if b == nil { 3955 b = make([]byte, m.Size()) 3956 } 3957 buf := codec.NewBuffer(b) 3958 buf.EncodeInt32(m.Retval) 3959 return buf.Bytes(), nil 3960 } 3961 func (m *IPTableReplaceEndReply) Unmarshal(b []byte) error { 3962 buf := codec.NewBuffer(b) 3963 m.Retval = buf.DecodeInt32() 3964 return nil 3965 } 3966 3967 // IPUnnumberedDetails defines message 'ip_unnumbered_details'. 3968 type IPUnnumberedDetails struct { 3969 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 3970 IPSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip_sw_if_index" json:"ip_sw_if_index,omitempty"` 3971 } 3972 3973 func (m *IPUnnumberedDetails) Reset() { *m = IPUnnumberedDetails{} } 3974 func (*IPUnnumberedDetails) GetMessageName() string { return "ip_unnumbered_details" } 3975 func (*IPUnnumberedDetails) GetCrcString() string { return "cc59bd42" } 3976 func (*IPUnnumberedDetails) GetMessageType() api.MessageType { 3977 return api.ReplyMessage 3978 } 3979 3980 func (m *IPUnnumberedDetails) Size() (size int) { 3981 if m == nil { 3982 return 0 3983 } 3984 size += 4 // m.SwIfIndex 3985 size += 4 // m.IPSwIfIndex 3986 return size 3987 } 3988 func (m *IPUnnumberedDetails) Marshal(b []byte) ([]byte, error) { 3989 if b == nil { 3990 b = make([]byte, m.Size()) 3991 } 3992 buf := codec.NewBuffer(b) 3993 buf.EncodeUint32(uint32(m.SwIfIndex)) 3994 buf.EncodeUint32(uint32(m.IPSwIfIndex)) 3995 return buf.Bytes(), nil 3996 } 3997 func (m *IPUnnumberedDetails) Unmarshal(b []byte) error { 3998 buf := codec.NewBuffer(b) 3999 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 4000 m.IPSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 4001 return nil 4002 } 4003 4004 // IPUnnumberedDump defines message 'ip_unnumbered_dump'. 4005 type IPUnnumberedDump struct { 4006 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` 4007 } 4008 4009 func (m *IPUnnumberedDump) Reset() { *m = IPUnnumberedDump{} } 4010 func (*IPUnnumberedDump) GetMessageName() string { return "ip_unnumbered_dump" } 4011 func (*IPUnnumberedDump) GetCrcString() string { return "f9e6675e" } 4012 func (*IPUnnumberedDump) GetMessageType() api.MessageType { 4013 return api.RequestMessage 4014 } 4015 4016 func (m *IPUnnumberedDump) Size() (size int) { 4017 if m == nil { 4018 return 0 4019 } 4020 size += 4 // m.SwIfIndex 4021 return size 4022 } 4023 func (m *IPUnnumberedDump) Marshal(b []byte) ([]byte, error) { 4024 if b == nil { 4025 b = make([]byte, m.Size()) 4026 } 4027 buf := codec.NewBuffer(b) 4028 buf.EncodeUint32(uint32(m.SwIfIndex)) 4029 return buf.Bytes(), nil 4030 } 4031 func (m *IPUnnumberedDump) Unmarshal(b []byte) error { 4032 buf := codec.NewBuffer(b) 4033 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 4034 return nil 4035 } 4036 4037 // MfibSignalDetails defines message 'mfib_signal_details'. 4038 type MfibSignalDetails struct { 4039 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 4040 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 4041 Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"` 4042 IPPacketLen uint16 `binapi:"u16,name=ip_packet_len" json:"ip_packet_len,omitempty"` 4043 IPPacketData []byte `binapi:"u8[256],name=ip_packet_data" json:"ip_packet_data,omitempty"` 4044 } 4045 4046 func (m *MfibSignalDetails) Reset() { *m = MfibSignalDetails{} } 4047 func (*MfibSignalDetails) GetMessageName() string { return "mfib_signal_details" } 4048 func (*MfibSignalDetails) GetCrcString() string { return "6f4a4cfb" } 4049 func (*MfibSignalDetails) GetMessageType() api.MessageType { 4050 return api.ReplyMessage 4051 } 4052 4053 func (m *MfibSignalDetails) Size() (size int) { 4054 if m == nil { 4055 return 0 4056 } 4057 size += 4 // m.SwIfIndex 4058 size += 4 // m.TableID 4059 size += 1 // m.Prefix.Af 4060 size += 2 // m.Prefix.GrpAddressLength 4061 size += 1 * 16 // m.Prefix.GrpAddress 4062 size += 1 * 16 // m.Prefix.SrcAddress 4063 size += 2 // m.IPPacketLen 4064 size += 1 * 256 // m.IPPacketData 4065 return size 4066 } 4067 func (m *MfibSignalDetails) Marshal(b []byte) ([]byte, error) { 4068 if b == nil { 4069 b = make([]byte, m.Size()) 4070 } 4071 buf := codec.NewBuffer(b) 4072 buf.EncodeUint32(uint32(m.SwIfIndex)) 4073 buf.EncodeUint32(m.TableID) 4074 buf.EncodeUint8(uint8(m.Prefix.Af)) 4075 buf.EncodeUint16(m.Prefix.GrpAddressLength) 4076 buf.EncodeBytes(m.Prefix.GrpAddress.XXX_UnionData[:], 16) 4077 buf.EncodeBytes(m.Prefix.SrcAddress.XXX_UnionData[:], 16) 4078 buf.EncodeUint16(m.IPPacketLen) 4079 buf.EncodeBytes(m.IPPacketData, 256) 4080 return buf.Bytes(), nil 4081 } 4082 func (m *MfibSignalDetails) Unmarshal(b []byte) error { 4083 buf := codec.NewBuffer(b) 4084 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 4085 m.TableID = buf.DecodeUint32() 4086 m.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8()) 4087 m.Prefix.GrpAddressLength = buf.DecodeUint16() 4088 copy(m.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 4089 copy(m.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 4090 m.IPPacketLen = buf.DecodeUint16() 4091 m.IPPacketData = make([]byte, 256) 4092 copy(m.IPPacketData, buf.DecodeBytes(len(m.IPPacketData))) 4093 return nil 4094 } 4095 4096 // MfibSignalDump defines message 'mfib_signal_dump'. 4097 type MfibSignalDump struct{} 4098 4099 func (m *MfibSignalDump) Reset() { *m = MfibSignalDump{} } 4100 func (*MfibSignalDump) GetMessageName() string { return "mfib_signal_dump" } 4101 func (*MfibSignalDump) GetCrcString() string { return "51077d14" } 4102 func (*MfibSignalDump) GetMessageType() api.MessageType { 4103 return api.RequestMessage 4104 } 4105 4106 func (m *MfibSignalDump) Size() (size int) { 4107 if m == nil { 4108 return 0 4109 } 4110 return size 4111 } 4112 func (m *MfibSignalDump) Marshal(b []byte) ([]byte, error) { 4113 if b == nil { 4114 b = make([]byte, m.Size()) 4115 } 4116 buf := codec.NewBuffer(b) 4117 return buf.Bytes(), nil 4118 } 4119 func (m *MfibSignalDump) Unmarshal(b []byte) error { 4120 return nil 4121 } 4122 4123 // SetIPFlowHash defines message 'set_ip_flow_hash'. 4124 // Deprecated: the message will be removed in the future versions 4125 type SetIPFlowHash struct { 4126 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 4127 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 4128 Src bool `binapi:"bool,name=src" json:"src,omitempty"` 4129 Dst bool `binapi:"bool,name=dst" json:"dst,omitempty"` 4130 Sport bool `binapi:"bool,name=sport" json:"sport,omitempty"` 4131 Dport bool `binapi:"bool,name=dport" json:"dport,omitempty"` 4132 Proto bool `binapi:"bool,name=proto" json:"proto,omitempty"` 4133 Reverse bool `binapi:"bool,name=reverse" json:"reverse,omitempty"` 4134 Symmetric bool `binapi:"bool,name=symmetric" json:"symmetric,omitempty"` 4135 } 4136 4137 func (m *SetIPFlowHash) Reset() { *m = SetIPFlowHash{} } 4138 func (*SetIPFlowHash) GetMessageName() string { return "set_ip_flow_hash" } 4139 func (*SetIPFlowHash) GetCrcString() string { return "084ee09e" } 4140 func (*SetIPFlowHash) GetMessageType() api.MessageType { 4141 return api.RequestMessage 4142 } 4143 4144 func (m *SetIPFlowHash) Size() (size int) { 4145 if m == nil { 4146 return 0 4147 } 4148 size += 4 // m.VrfID 4149 size += 1 // m.IsIPv6 4150 size += 1 // m.Src 4151 size += 1 // m.Dst 4152 size += 1 // m.Sport 4153 size += 1 // m.Dport 4154 size += 1 // m.Proto 4155 size += 1 // m.Reverse 4156 size += 1 // m.Symmetric 4157 return size 4158 } 4159 func (m *SetIPFlowHash) Marshal(b []byte) ([]byte, error) { 4160 if b == nil { 4161 b = make([]byte, m.Size()) 4162 } 4163 buf := codec.NewBuffer(b) 4164 buf.EncodeUint32(m.VrfID) 4165 buf.EncodeBool(m.IsIPv6) 4166 buf.EncodeBool(m.Src) 4167 buf.EncodeBool(m.Dst) 4168 buf.EncodeBool(m.Sport) 4169 buf.EncodeBool(m.Dport) 4170 buf.EncodeBool(m.Proto) 4171 buf.EncodeBool(m.Reverse) 4172 buf.EncodeBool(m.Symmetric) 4173 return buf.Bytes(), nil 4174 } 4175 func (m *SetIPFlowHash) Unmarshal(b []byte) error { 4176 buf := codec.NewBuffer(b) 4177 m.VrfID = buf.DecodeUint32() 4178 m.IsIPv6 = buf.DecodeBool() 4179 m.Src = buf.DecodeBool() 4180 m.Dst = buf.DecodeBool() 4181 m.Sport = buf.DecodeBool() 4182 m.Dport = buf.DecodeBool() 4183 m.Proto = buf.DecodeBool() 4184 m.Reverse = buf.DecodeBool() 4185 m.Symmetric = buf.DecodeBool() 4186 return nil 4187 } 4188 4189 // SetIPFlowHashReply defines message 'set_ip_flow_hash_reply'. 4190 // Deprecated: the message will be removed in the future versions 4191 type SetIPFlowHashReply struct { 4192 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 4193 } 4194 4195 func (m *SetIPFlowHashReply) Reset() { *m = SetIPFlowHashReply{} } 4196 func (*SetIPFlowHashReply) GetMessageName() string { return "set_ip_flow_hash_reply" } 4197 func (*SetIPFlowHashReply) GetCrcString() string { return "e8d4e804" } 4198 func (*SetIPFlowHashReply) GetMessageType() api.MessageType { 4199 return api.ReplyMessage 4200 } 4201 4202 func (m *SetIPFlowHashReply) Size() (size int) { 4203 if m == nil { 4204 return 0 4205 } 4206 size += 4 // m.Retval 4207 return size 4208 } 4209 func (m *SetIPFlowHashReply) Marshal(b []byte) ([]byte, error) { 4210 if b == nil { 4211 b = make([]byte, m.Size()) 4212 } 4213 buf := codec.NewBuffer(b) 4214 buf.EncodeInt32(m.Retval) 4215 return buf.Bytes(), nil 4216 } 4217 func (m *SetIPFlowHashReply) Unmarshal(b []byte) error { 4218 buf := codec.NewBuffer(b) 4219 m.Retval = buf.DecodeInt32() 4220 return nil 4221 } 4222 4223 // SetIPFlowHashRouterID defines message 'set_ip_flow_hash_router_id'. 4224 type SetIPFlowHashRouterID struct { 4225 RouterID uint32 `binapi:"u32,name=router_id" json:"router_id,omitempty"` 4226 } 4227 4228 func (m *SetIPFlowHashRouterID) Reset() { *m = SetIPFlowHashRouterID{} } 4229 func (*SetIPFlowHashRouterID) GetMessageName() string { return "set_ip_flow_hash_router_id" } 4230 func (*SetIPFlowHashRouterID) GetCrcString() string { return "03e4f48e" } 4231 func (*SetIPFlowHashRouterID) GetMessageType() api.MessageType { 4232 return api.RequestMessage 4233 } 4234 4235 func (m *SetIPFlowHashRouterID) Size() (size int) { 4236 if m == nil { 4237 return 0 4238 } 4239 size += 4 // m.RouterID 4240 return size 4241 } 4242 func (m *SetIPFlowHashRouterID) Marshal(b []byte) ([]byte, error) { 4243 if b == nil { 4244 b = make([]byte, m.Size()) 4245 } 4246 buf := codec.NewBuffer(b) 4247 buf.EncodeUint32(m.RouterID) 4248 return buf.Bytes(), nil 4249 } 4250 func (m *SetIPFlowHashRouterID) Unmarshal(b []byte) error { 4251 buf := codec.NewBuffer(b) 4252 m.RouterID = buf.DecodeUint32() 4253 return nil 4254 } 4255 4256 // SetIPFlowHashRouterIDReply defines message 'set_ip_flow_hash_router_id_reply'. 4257 type SetIPFlowHashRouterIDReply struct { 4258 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 4259 } 4260 4261 func (m *SetIPFlowHashRouterIDReply) Reset() { *m = SetIPFlowHashRouterIDReply{} } 4262 func (*SetIPFlowHashRouterIDReply) GetMessageName() string { return "set_ip_flow_hash_router_id_reply" } 4263 func (*SetIPFlowHashRouterIDReply) GetCrcString() string { return "e8d4e804" } 4264 func (*SetIPFlowHashRouterIDReply) GetMessageType() api.MessageType { 4265 return api.ReplyMessage 4266 } 4267 4268 func (m *SetIPFlowHashRouterIDReply) Size() (size int) { 4269 if m == nil { 4270 return 0 4271 } 4272 size += 4 // m.Retval 4273 return size 4274 } 4275 func (m *SetIPFlowHashRouterIDReply) Marshal(b []byte) ([]byte, error) { 4276 if b == nil { 4277 b = make([]byte, m.Size()) 4278 } 4279 buf := codec.NewBuffer(b) 4280 buf.EncodeInt32(m.Retval) 4281 return buf.Bytes(), nil 4282 } 4283 func (m *SetIPFlowHashRouterIDReply) Unmarshal(b []byte) error { 4284 buf := codec.NewBuffer(b) 4285 m.Retval = buf.DecodeInt32() 4286 return nil 4287 } 4288 4289 // SetIPFlowHashV2 defines message 'set_ip_flow_hash_v2'. 4290 type SetIPFlowHashV2 struct { 4291 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 4292 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"` 4293 FlowHashConfig IPFlowHashConfig `binapi:"ip_flow_hash_config,name=flow_hash_config" json:"flow_hash_config,omitempty"` 4294 } 4295 4296 func (m *SetIPFlowHashV2) Reset() { *m = SetIPFlowHashV2{} } 4297 func (*SetIPFlowHashV2) GetMessageName() string { return "set_ip_flow_hash_v2" } 4298 func (*SetIPFlowHashV2) GetCrcString() string { return "6d132100" } 4299 func (*SetIPFlowHashV2) GetMessageType() api.MessageType { 4300 return api.RequestMessage 4301 } 4302 4303 func (m *SetIPFlowHashV2) Size() (size int) { 4304 if m == nil { 4305 return 0 4306 } 4307 size += 4 // m.TableID 4308 size += 1 // m.Af 4309 size += 4 // m.FlowHashConfig 4310 return size 4311 } 4312 func (m *SetIPFlowHashV2) Marshal(b []byte) ([]byte, error) { 4313 if b == nil { 4314 b = make([]byte, m.Size()) 4315 } 4316 buf := codec.NewBuffer(b) 4317 buf.EncodeUint32(m.TableID) 4318 buf.EncodeUint8(uint8(m.Af)) 4319 buf.EncodeUint32(uint32(m.FlowHashConfig)) 4320 return buf.Bytes(), nil 4321 } 4322 func (m *SetIPFlowHashV2) Unmarshal(b []byte) error { 4323 buf := codec.NewBuffer(b) 4324 m.TableID = buf.DecodeUint32() 4325 m.Af = ip_types.AddressFamily(buf.DecodeUint8()) 4326 m.FlowHashConfig = IPFlowHashConfig(buf.DecodeUint32()) 4327 return nil 4328 } 4329 4330 // SetIPFlowHashV2Reply defines message 'set_ip_flow_hash_v2_reply'. 4331 type SetIPFlowHashV2Reply struct { 4332 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 4333 } 4334 4335 func (m *SetIPFlowHashV2Reply) Reset() { *m = SetIPFlowHashV2Reply{} } 4336 func (*SetIPFlowHashV2Reply) GetMessageName() string { return "set_ip_flow_hash_v2_reply" } 4337 func (*SetIPFlowHashV2Reply) GetCrcString() string { return "e8d4e804" } 4338 func (*SetIPFlowHashV2Reply) GetMessageType() api.MessageType { 4339 return api.ReplyMessage 4340 } 4341 4342 func (m *SetIPFlowHashV2Reply) Size() (size int) { 4343 if m == nil { 4344 return 0 4345 } 4346 size += 4 // m.Retval 4347 return size 4348 } 4349 func (m *SetIPFlowHashV2Reply) Marshal(b []byte) ([]byte, error) { 4350 if b == nil { 4351 b = make([]byte, m.Size()) 4352 } 4353 buf := codec.NewBuffer(b) 4354 buf.EncodeInt32(m.Retval) 4355 return buf.Bytes(), nil 4356 } 4357 func (m *SetIPFlowHashV2Reply) Unmarshal(b []byte) error { 4358 buf := codec.NewBuffer(b) 4359 m.Retval = buf.DecodeInt32() 4360 return nil 4361 } 4362 4363 // SwInterfaceIP6EnableDisable defines message 'sw_interface_ip6_enable_disable'. 4364 type SwInterfaceIP6EnableDisable struct { 4365 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 4366 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 4367 } 4368 4369 func (m *SwInterfaceIP6EnableDisable) Reset() { *m = SwInterfaceIP6EnableDisable{} } 4370 func (*SwInterfaceIP6EnableDisable) GetMessageName() string { return "sw_interface_ip6_enable_disable" } 4371 func (*SwInterfaceIP6EnableDisable) GetCrcString() string { return "ae6cfcfb" } 4372 func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType { 4373 return api.RequestMessage 4374 } 4375 4376 func (m *SwInterfaceIP6EnableDisable) Size() (size int) { 4377 if m == nil { 4378 return 0 4379 } 4380 size += 4 // m.SwIfIndex 4381 size += 1 // m.Enable 4382 return size 4383 } 4384 func (m *SwInterfaceIP6EnableDisable) Marshal(b []byte) ([]byte, error) { 4385 if b == nil { 4386 b = make([]byte, m.Size()) 4387 } 4388 buf := codec.NewBuffer(b) 4389 buf.EncodeUint32(uint32(m.SwIfIndex)) 4390 buf.EncodeBool(m.Enable) 4391 return buf.Bytes(), nil 4392 } 4393 func (m *SwInterfaceIP6EnableDisable) Unmarshal(b []byte) error { 4394 buf := codec.NewBuffer(b) 4395 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 4396 m.Enable = buf.DecodeBool() 4397 return nil 4398 } 4399 4400 // SwInterfaceIP6EnableDisableReply defines message 'sw_interface_ip6_enable_disable_reply'. 4401 type SwInterfaceIP6EnableDisableReply struct { 4402 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 4403 } 4404 4405 func (m *SwInterfaceIP6EnableDisableReply) Reset() { *m = SwInterfaceIP6EnableDisableReply{} } 4406 func (*SwInterfaceIP6EnableDisableReply) GetMessageName() string { 4407 return "sw_interface_ip6_enable_disable_reply" 4408 } 4409 func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" } 4410 func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType { 4411 return api.ReplyMessage 4412 } 4413 4414 func (m *SwInterfaceIP6EnableDisableReply) Size() (size int) { 4415 if m == nil { 4416 return 0 4417 } 4418 size += 4 // m.Retval 4419 return size 4420 } 4421 func (m *SwInterfaceIP6EnableDisableReply) Marshal(b []byte) ([]byte, error) { 4422 if b == nil { 4423 b = make([]byte, m.Size()) 4424 } 4425 buf := codec.NewBuffer(b) 4426 buf.EncodeInt32(m.Retval) 4427 return buf.Bytes(), nil 4428 } 4429 func (m *SwInterfaceIP6EnableDisableReply) Unmarshal(b []byte) error { 4430 buf := codec.NewBuffer(b) 4431 m.Retval = buf.DecodeInt32() 4432 return nil 4433 } 4434 4435 // SwInterfaceIP6GetLinkLocalAddress defines message 'sw_interface_ip6_get_link_local_address'. 4436 type SwInterfaceIP6GetLinkLocalAddress struct { 4437 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 4438 } 4439 4440 func (m *SwInterfaceIP6GetLinkLocalAddress) Reset() { *m = SwInterfaceIP6GetLinkLocalAddress{} } 4441 func (*SwInterfaceIP6GetLinkLocalAddress) GetMessageName() string { 4442 return "sw_interface_ip6_get_link_local_address" 4443 } 4444 func (*SwInterfaceIP6GetLinkLocalAddress) GetCrcString() string { return "f9e6675e" } 4445 func (*SwInterfaceIP6GetLinkLocalAddress) GetMessageType() api.MessageType { 4446 return api.RequestMessage 4447 } 4448 4449 func (m *SwInterfaceIP6GetLinkLocalAddress) Size() (size int) { 4450 if m == nil { 4451 return 0 4452 } 4453 size += 4 // m.SwIfIndex 4454 return size 4455 } 4456 func (m *SwInterfaceIP6GetLinkLocalAddress) Marshal(b []byte) ([]byte, error) { 4457 if b == nil { 4458 b = make([]byte, m.Size()) 4459 } 4460 buf := codec.NewBuffer(b) 4461 buf.EncodeUint32(uint32(m.SwIfIndex)) 4462 return buf.Bytes(), nil 4463 } 4464 func (m *SwInterfaceIP6GetLinkLocalAddress) Unmarshal(b []byte) error { 4465 buf := codec.NewBuffer(b) 4466 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 4467 return nil 4468 } 4469 4470 // SwInterfaceIP6GetLinkLocalAddressReply defines message 'sw_interface_ip6_get_link_local_address_reply'. 4471 type SwInterfaceIP6GetLinkLocalAddressReply struct { 4472 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 4473 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"` 4474 } 4475 4476 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Reset() { 4477 *m = SwInterfaceIP6GetLinkLocalAddressReply{} 4478 } 4479 func (*SwInterfaceIP6GetLinkLocalAddressReply) GetMessageName() string { 4480 return "sw_interface_ip6_get_link_local_address_reply" 4481 } 4482 func (*SwInterfaceIP6GetLinkLocalAddressReply) GetCrcString() string { return "d16b7130" } 4483 func (*SwInterfaceIP6GetLinkLocalAddressReply) GetMessageType() api.MessageType { 4484 return api.ReplyMessage 4485 } 4486 4487 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Size() (size int) { 4488 if m == nil { 4489 return 0 4490 } 4491 size += 4 // m.Retval 4492 size += 1 * 16 // m.IP 4493 return size 4494 } 4495 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) { 4496 if b == nil { 4497 b = make([]byte, m.Size()) 4498 } 4499 buf := codec.NewBuffer(b) 4500 buf.EncodeInt32(m.Retval) 4501 buf.EncodeBytes(m.IP[:], 16) 4502 return buf.Bytes(), nil 4503 } 4504 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Unmarshal(b []byte) error { 4505 buf := codec.NewBuffer(b) 4506 m.Retval = buf.DecodeInt32() 4507 copy(m.IP[:], buf.DecodeBytes(16)) 4508 return nil 4509 } 4510 4511 // SwInterfaceIP6SetLinkLocalAddress defines message 'sw_interface_ip6_set_link_local_address'. 4512 type SwInterfaceIP6SetLinkLocalAddress struct { 4513 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 4514 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"` 4515 } 4516 4517 func (m *SwInterfaceIP6SetLinkLocalAddress) Reset() { *m = SwInterfaceIP6SetLinkLocalAddress{} } 4518 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string { 4519 return "sw_interface_ip6_set_link_local_address" 4520 } 4521 func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "1c10f15f" } 4522 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType { 4523 return api.RequestMessage 4524 } 4525 4526 func (m *SwInterfaceIP6SetLinkLocalAddress) Size() (size int) { 4527 if m == nil { 4528 return 0 4529 } 4530 size += 4 // m.SwIfIndex 4531 size += 1 * 16 // m.IP 4532 return size 4533 } 4534 func (m *SwInterfaceIP6SetLinkLocalAddress) Marshal(b []byte) ([]byte, error) { 4535 if b == nil { 4536 b = make([]byte, m.Size()) 4537 } 4538 buf := codec.NewBuffer(b) 4539 buf.EncodeUint32(uint32(m.SwIfIndex)) 4540 buf.EncodeBytes(m.IP[:], 16) 4541 return buf.Bytes(), nil 4542 } 4543 func (m *SwInterfaceIP6SetLinkLocalAddress) Unmarshal(b []byte) error { 4544 buf := codec.NewBuffer(b) 4545 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 4546 copy(m.IP[:], buf.DecodeBytes(16)) 4547 return nil 4548 } 4549 4550 // SwInterfaceIP6SetLinkLocalAddressReply defines message 'sw_interface_ip6_set_link_local_address_reply'. 4551 type SwInterfaceIP6SetLinkLocalAddressReply struct { 4552 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 4553 } 4554 4555 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Reset() { 4556 *m = SwInterfaceIP6SetLinkLocalAddressReply{} 4557 } 4558 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string { 4559 return "sw_interface_ip6_set_link_local_address_reply" 4560 } 4561 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { return "e8d4e804" } 4562 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType { 4563 return api.ReplyMessage 4564 } 4565 4566 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Size() (size int) { 4567 if m == nil { 4568 return 0 4569 } 4570 size += 4 // m.Retval 4571 return size 4572 } 4573 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) { 4574 if b == nil { 4575 b = make([]byte, m.Size()) 4576 } 4577 buf := codec.NewBuffer(b) 4578 buf.EncodeInt32(m.Retval) 4579 return buf.Bytes(), nil 4580 } 4581 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(b []byte) error { 4582 buf := codec.NewBuffer(b) 4583 m.Retval = buf.DecodeInt32() 4584 return nil 4585 } 4586 4587 func init() { file_ip_binapi_init() } 4588 func file_ip_binapi_init() { 4589 api.RegisterMessage((*AddDelIPPuntRedirectV2)(nil), "add_del_ip_punt_redirect_v2_9e804227") 4590 api.RegisterMessage((*AddDelIPPuntRedirectV2Reply)(nil), "add_del_ip_punt_redirect_v2_reply_e8d4e804") 4591 api.RegisterMessage((*IoamDisable)(nil), "ioam_disable_6b16a45e") 4592 api.RegisterMessage((*IoamDisableReply)(nil), "ioam_disable_reply_e8d4e804") 4593 api.RegisterMessage((*IoamEnable)(nil), "ioam_enable_51ccd868") 4594 api.RegisterMessage((*IoamEnableReply)(nil), "ioam_enable_reply_e8d4e804") 4595 api.RegisterMessage((*IPAddressDetails)(nil), "ip_address_details_ee29b797") 4596 api.RegisterMessage((*IPAddressDump)(nil), "ip_address_dump_2d033de4") 4597 api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip_container_proxy_add_del_7df1dff1") 4598 api.RegisterMessage((*IPContainerProxyAddDelReply)(nil), "ip_container_proxy_add_del_reply_e8d4e804") 4599 api.RegisterMessage((*IPContainerProxyDetails)(nil), "ip_container_proxy_details_a8085523") 4600 api.RegisterMessage((*IPContainerProxyDump)(nil), "ip_container_proxy_dump_51077d14") 4601 api.RegisterMessage((*IPDetails)(nil), "ip_details_eb152d07") 4602 api.RegisterMessage((*IPDump)(nil), "ip_dump_98d231ca") 4603 api.RegisterMessage((*IPLocalReassEnableDisable)(nil), "ip_local_reass_enable_disable_34e2ccc4") 4604 api.RegisterMessage((*IPLocalReassEnableDisableReply)(nil), "ip_local_reass_enable_disable_reply_e8d4e804") 4605 api.RegisterMessage((*IPLocalReassGet)(nil), "ip_local_reass_get_51077d14") 4606 api.RegisterMessage((*IPLocalReassGetReply)(nil), "ip_local_reass_get_reply_3e93a702") 4607 api.RegisterMessage((*IPMrouteAddDel)(nil), "ip_mroute_add_del_0dd7e790") 4608 api.RegisterMessage((*IPMrouteAddDelReply)(nil), "ip_mroute_add_del_reply_1992deab") 4609 api.RegisterMessage((*IPMrouteDetails)(nil), "ip_mroute_details_c5cb23fc") 4610 api.RegisterMessage((*IPMrouteDump)(nil), "ip_mroute_dump_b9d2e09e") 4611 api.RegisterMessage((*IPMtableDetails)(nil), "ip_mtable_details_b9d2e09e") 4612 api.RegisterMessage((*IPMtableDump)(nil), "ip_mtable_dump_51077d14") 4613 api.RegisterMessage((*IPPathMtuDetails)(nil), "ip_path_mtu_details_ac9539a7") 4614 api.RegisterMessage((*IPPathMtuGet)(nil), "ip_path_mtu_get_f75ba505") 4615 api.RegisterMessage((*IPPathMtuGetReply)(nil), "ip_path_mtu_get_reply_53b48f5d") 4616 api.RegisterMessage((*IPPathMtuReplaceBegin)(nil), "ip_path_mtu_replace_begin_51077d14") 4617 api.RegisterMessage((*IPPathMtuReplaceBeginReply)(nil), "ip_path_mtu_replace_begin_reply_e8d4e804") 4618 api.RegisterMessage((*IPPathMtuReplaceEnd)(nil), "ip_path_mtu_replace_end_51077d14") 4619 api.RegisterMessage((*IPPathMtuReplaceEndReply)(nil), "ip_path_mtu_replace_end_reply_e8d4e804") 4620 api.RegisterMessage((*IPPathMtuUpdate)(nil), "ip_path_mtu_update_10bbe5cb") 4621 api.RegisterMessage((*IPPathMtuUpdateReply)(nil), "ip_path_mtu_update_reply_e8d4e804") 4622 api.RegisterMessage((*IPPuntPolice)(nil), "ip_punt_police_db867cea") 4623 api.RegisterMessage((*IPPuntPoliceReply)(nil), "ip_punt_police_reply_e8d4e804") 4624 api.RegisterMessage((*IPPuntRedirect)(nil), "ip_punt_redirect_6580f635") 4625 api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip_punt_redirect_details_2cef63e7") 4626 api.RegisterMessage((*IPPuntRedirectDump)(nil), "ip_punt_redirect_dump_2d033de4") 4627 api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip_punt_redirect_reply_e8d4e804") 4628 api.RegisterMessage((*IPPuntRedirectV2Details)(nil), "ip_punt_redirect_v2_details_7ba42e1d") 4629 api.RegisterMessage((*IPPuntRedirectV2Dump)(nil), "ip_punt_redirect_v2_dump_d817a484") 4630 api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip_reassembly_enable_disable_eb77968d") 4631 api.RegisterMessage((*IPReassemblyEnableDisableReply)(nil), "ip_reassembly_enable_disable_reply_e8d4e804") 4632 api.RegisterMessage((*IPReassemblyGet)(nil), "ip_reassembly_get_ea13ff63") 4633 api.RegisterMessage((*IPReassemblyGetReply)(nil), "ip_reassembly_get_reply_d5eb8d34") 4634 api.RegisterMessage((*IPReassemblySet)(nil), "ip_reassembly_set_16467d25") 4635 api.RegisterMessage((*IPReassemblySetReply)(nil), "ip_reassembly_set_reply_e8d4e804") 4636 api.RegisterMessage((*IPRouteAddDel)(nil), "ip_route_add_del_b8ecfe0d") 4637 api.RegisterMessage((*IPRouteAddDelReply)(nil), "ip_route_add_del_reply_1992deab") 4638 api.RegisterMessage((*IPRouteAddDelV2)(nil), "ip_route_add_del_v2_521ef330") 4639 api.RegisterMessage((*IPRouteAddDelV2Reply)(nil), "ip_route_add_del_v2_reply_1992deab") 4640 api.RegisterMessage((*IPRouteDetails)(nil), "ip_route_details_bda8f315") 4641 api.RegisterMessage((*IPRouteDump)(nil), "ip_route_dump_b9d2e09e") 4642 api.RegisterMessage((*IPRouteLookup)(nil), "ip_route_lookup_710d6471") 4643 api.RegisterMessage((*IPRouteLookupReply)(nil), "ip_route_lookup_reply_5d8febcb") 4644 api.RegisterMessage((*IPRouteLookupV2)(nil), "ip_route_lookup_v2_710d6471") 4645 api.RegisterMessage((*IPRouteLookupV2Reply)(nil), "ip_route_lookup_v2_reply_84cc9e03") 4646 api.RegisterMessage((*IPRouteV2Details)(nil), "ip_route_v2_details_b09aa6c0") 4647 api.RegisterMessage((*IPRouteV2Dump)(nil), "ip_route_v2_dump_d16f72e6") 4648 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip_source_and_port_range_check_add_del_92a067e3") 4649 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip_source_and_port_range_check_add_del_reply_e8d4e804") 4650 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip_source_and_port_range_check_interface_add_del_e1ba8987") 4651 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip_source_and_port_range_check_interface_add_del_reply_e8d4e804") 4652 api.RegisterMessage((*IPTableAddDel)(nil), "ip_table_add_del_0ffdaec0") 4653 api.RegisterMessage((*IPTableAddDelReply)(nil), "ip_table_add_del_reply_e8d4e804") 4654 api.RegisterMessage((*IPTableAllocate)(nil), "ip_table_allocate_b9d2e09e") 4655 api.RegisterMessage((*IPTableAllocateReply)(nil), "ip_table_allocate_reply_1728303a") 4656 api.RegisterMessage((*IPTableDetails)(nil), "ip_table_details_c79fca0f") 4657 api.RegisterMessage((*IPTableDump)(nil), "ip_table_dump_51077d14") 4658 api.RegisterMessage((*IPTableFlush)(nil), "ip_table_flush_b9d2e09e") 4659 api.RegisterMessage((*IPTableFlushReply)(nil), "ip_table_flush_reply_e8d4e804") 4660 api.RegisterMessage((*IPTableReplaceBegin)(nil), "ip_table_replace_begin_b9d2e09e") 4661 api.RegisterMessage((*IPTableReplaceBeginReply)(nil), "ip_table_replace_begin_reply_e8d4e804") 4662 api.RegisterMessage((*IPTableReplaceEnd)(nil), "ip_table_replace_end_b9d2e09e") 4663 api.RegisterMessage((*IPTableReplaceEndReply)(nil), "ip_table_replace_end_reply_e8d4e804") 4664 api.RegisterMessage((*IPUnnumberedDetails)(nil), "ip_unnumbered_details_cc59bd42") 4665 api.RegisterMessage((*IPUnnumberedDump)(nil), "ip_unnumbered_dump_f9e6675e") 4666 api.RegisterMessage((*MfibSignalDetails)(nil), "mfib_signal_details_6f4a4cfb") 4667 api.RegisterMessage((*MfibSignalDump)(nil), "mfib_signal_dump_51077d14") 4668 api.RegisterMessage((*SetIPFlowHash)(nil), "set_ip_flow_hash_084ee09e") 4669 api.RegisterMessage((*SetIPFlowHashReply)(nil), "set_ip_flow_hash_reply_e8d4e804") 4670 api.RegisterMessage((*SetIPFlowHashRouterID)(nil), "set_ip_flow_hash_router_id_03e4f48e") 4671 api.RegisterMessage((*SetIPFlowHashRouterIDReply)(nil), "set_ip_flow_hash_router_id_reply_e8d4e804") 4672 api.RegisterMessage((*SetIPFlowHashV2)(nil), "set_ip_flow_hash_v2_6d132100") 4673 api.RegisterMessage((*SetIPFlowHashV2Reply)(nil), "set_ip_flow_hash_v2_reply_e8d4e804") 4674 api.RegisterMessage((*SwInterfaceIP6EnableDisable)(nil), "sw_interface_ip6_enable_disable_ae6cfcfb") 4675 api.RegisterMessage((*SwInterfaceIP6EnableDisableReply)(nil), "sw_interface_ip6_enable_disable_reply_e8d4e804") 4676 api.RegisterMessage((*SwInterfaceIP6GetLinkLocalAddress)(nil), "sw_interface_ip6_get_link_local_address_f9e6675e") 4677 api.RegisterMessage((*SwInterfaceIP6GetLinkLocalAddressReply)(nil), "sw_interface_ip6_get_link_local_address_reply_d16b7130") 4678 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "sw_interface_ip6_set_link_local_address_1c10f15f") 4679 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "sw_interface_ip6_set_link_local_address_reply_e8d4e804") 4680 } 4681 4682 // Messages returns list of all messages in this module. 4683 func AllMessages() []api.Message { 4684 return []api.Message{ 4685 (*AddDelIPPuntRedirectV2)(nil), 4686 (*AddDelIPPuntRedirectV2Reply)(nil), 4687 (*IoamDisable)(nil), 4688 (*IoamDisableReply)(nil), 4689 (*IoamEnable)(nil), 4690 (*IoamEnableReply)(nil), 4691 (*IPAddressDetails)(nil), 4692 (*IPAddressDump)(nil), 4693 (*IPContainerProxyAddDel)(nil), 4694 (*IPContainerProxyAddDelReply)(nil), 4695 (*IPContainerProxyDetails)(nil), 4696 (*IPContainerProxyDump)(nil), 4697 (*IPDetails)(nil), 4698 (*IPDump)(nil), 4699 (*IPLocalReassEnableDisable)(nil), 4700 (*IPLocalReassEnableDisableReply)(nil), 4701 (*IPLocalReassGet)(nil), 4702 (*IPLocalReassGetReply)(nil), 4703 (*IPMrouteAddDel)(nil), 4704 (*IPMrouteAddDelReply)(nil), 4705 (*IPMrouteDetails)(nil), 4706 (*IPMrouteDump)(nil), 4707 (*IPMtableDetails)(nil), 4708 (*IPMtableDump)(nil), 4709 (*IPPathMtuDetails)(nil), 4710 (*IPPathMtuGet)(nil), 4711 (*IPPathMtuGetReply)(nil), 4712 (*IPPathMtuReplaceBegin)(nil), 4713 (*IPPathMtuReplaceBeginReply)(nil), 4714 (*IPPathMtuReplaceEnd)(nil), 4715 (*IPPathMtuReplaceEndReply)(nil), 4716 (*IPPathMtuUpdate)(nil), 4717 (*IPPathMtuUpdateReply)(nil), 4718 (*IPPuntPolice)(nil), 4719 (*IPPuntPoliceReply)(nil), 4720 (*IPPuntRedirect)(nil), 4721 (*IPPuntRedirectDetails)(nil), 4722 (*IPPuntRedirectDump)(nil), 4723 (*IPPuntRedirectReply)(nil), 4724 (*IPPuntRedirectV2Details)(nil), 4725 (*IPPuntRedirectV2Dump)(nil), 4726 (*IPReassemblyEnableDisable)(nil), 4727 (*IPReassemblyEnableDisableReply)(nil), 4728 (*IPReassemblyGet)(nil), 4729 (*IPReassemblyGetReply)(nil), 4730 (*IPReassemblySet)(nil), 4731 (*IPReassemblySetReply)(nil), 4732 (*IPRouteAddDel)(nil), 4733 (*IPRouteAddDelReply)(nil), 4734 (*IPRouteAddDelV2)(nil), 4735 (*IPRouteAddDelV2Reply)(nil), 4736 (*IPRouteDetails)(nil), 4737 (*IPRouteDump)(nil), 4738 (*IPRouteLookup)(nil), 4739 (*IPRouteLookupReply)(nil), 4740 (*IPRouteLookupV2)(nil), 4741 (*IPRouteLookupV2Reply)(nil), 4742 (*IPRouteV2Details)(nil), 4743 (*IPRouteV2Dump)(nil), 4744 (*IPSourceAndPortRangeCheckAddDel)(nil), 4745 (*IPSourceAndPortRangeCheckAddDelReply)(nil), 4746 (*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), 4747 (*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), 4748 (*IPTableAddDel)(nil), 4749 (*IPTableAddDelReply)(nil), 4750 (*IPTableAllocate)(nil), 4751 (*IPTableAllocateReply)(nil), 4752 (*IPTableDetails)(nil), 4753 (*IPTableDump)(nil), 4754 (*IPTableFlush)(nil), 4755 (*IPTableFlushReply)(nil), 4756 (*IPTableReplaceBegin)(nil), 4757 (*IPTableReplaceBeginReply)(nil), 4758 (*IPTableReplaceEnd)(nil), 4759 (*IPTableReplaceEndReply)(nil), 4760 (*IPUnnumberedDetails)(nil), 4761 (*IPUnnumberedDump)(nil), 4762 (*MfibSignalDetails)(nil), 4763 (*MfibSignalDump)(nil), 4764 (*SetIPFlowHash)(nil), 4765 (*SetIPFlowHashReply)(nil), 4766 (*SetIPFlowHashRouterID)(nil), 4767 (*SetIPFlowHashRouterIDReply)(nil), 4768 (*SetIPFlowHashV2)(nil), 4769 (*SetIPFlowHashV2Reply)(nil), 4770 (*SwInterfaceIP6EnableDisable)(nil), 4771 (*SwInterfaceIP6EnableDisableReply)(nil), 4772 (*SwInterfaceIP6GetLinkLocalAddress)(nil), 4773 (*SwInterfaceIP6GetLinkLocalAddressReply)(nil), 4774 (*SwInterfaceIP6SetLinkLocalAddress)(nil), 4775 (*SwInterfaceIP6SetLinkLocalAddressReply)(nil), 4776 } 4777 }