go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2106/nat44_ed/nat44_ed.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 3 // Package nat44_ed contains generated bindings for API file nat44_ed.api. 4 // 5 // Contents: 6 // - 1 enum 7 // - 1 struct 8 // - 97 messages 9 package nat44_ed 10 11 import ( 12 "strconv" 13 14 api "go.fd.io/govpp/api" 15 codec "go.fd.io/govpp/codec" 16 interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/interface_types" 17 ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/ip_types" 18 nat_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/nat_types" 19 ) 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the GoVPP api package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // GoVPP api package needs to be updated. 25 const _ = api.GoVppAPIPackageIsVersion2 26 27 const ( 28 APIFile = "nat44_ed" 29 APIVersion = "5.3.0" 30 VersionCrc = 0xfd9ae40f 31 ) 32 33 // Nat44ConfigFlags defines enum 'nat44_config_flags'. 34 type Nat44ConfigFlags uint8 35 36 const ( 37 NAT44_IS_ENDPOINT_INDEPENDENT Nat44ConfigFlags = 0 38 NAT44_IS_ENDPOINT_DEPENDENT Nat44ConfigFlags = 1 39 NAT44_IS_STATIC_MAPPING_ONLY Nat44ConfigFlags = 2 40 NAT44_IS_CONNECTION_TRACKING Nat44ConfigFlags = 4 41 NAT44_IS_OUT2IN_DPO Nat44ConfigFlags = 8 42 ) 43 44 var ( 45 Nat44ConfigFlags_name = map[uint8]string{ 46 0: "NAT44_IS_ENDPOINT_INDEPENDENT", 47 1: "NAT44_IS_ENDPOINT_DEPENDENT", 48 2: "NAT44_IS_STATIC_MAPPING_ONLY", 49 4: "NAT44_IS_CONNECTION_TRACKING", 50 8: "NAT44_IS_OUT2IN_DPO", 51 } 52 Nat44ConfigFlags_value = map[string]uint8{ 53 "NAT44_IS_ENDPOINT_INDEPENDENT": 0, 54 "NAT44_IS_ENDPOINT_DEPENDENT": 1, 55 "NAT44_IS_STATIC_MAPPING_ONLY": 2, 56 "NAT44_IS_CONNECTION_TRACKING": 4, 57 "NAT44_IS_OUT2IN_DPO": 8, 58 } 59 ) 60 61 func (x Nat44ConfigFlags) String() string { 62 s, ok := Nat44ConfigFlags_name[uint8(x)] 63 if ok { 64 return s 65 } 66 str := func(n uint8) string { 67 s, ok := Nat44ConfigFlags_name[uint8(n)] 68 if ok { 69 return s 70 } 71 return "Nat44ConfigFlags(" + strconv.Itoa(int(n)) + ")" 72 } 73 for i := uint8(0); i <= 8; i++ { 74 val := uint8(x) 75 if val&(1<<i) != 0 { 76 if s != "" { 77 s += "|" 78 } 79 s += str(1 << i) 80 } 81 } 82 if s == "" { 83 return str(uint8(x)) 84 } 85 return s 86 } 87 88 // Nat44LbAddrPort defines type 'nat44_lb_addr_port'. 89 type Nat44LbAddrPort struct { 90 Addr ip_types.IP4Address `binapi:"ip4_address,name=addr" json:"addr,omitempty"` 91 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` 92 Probability uint8 `binapi:"u8,name=probability" json:"probability,omitempty"` 93 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 94 } 95 96 // Nat44AddDelAddressRange defines message 'nat44_add_del_address_range'. 97 type Nat44AddDelAddressRange struct { 98 FirstIPAddress ip_types.IP4Address `binapi:"ip4_address,name=first_ip_address" json:"first_ip_address,omitempty"` 99 LastIPAddress ip_types.IP4Address `binapi:"ip4_address,name=last_ip_address" json:"last_ip_address,omitempty"` 100 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 101 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 102 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 103 } 104 105 func (m *Nat44AddDelAddressRange) Reset() { *m = Nat44AddDelAddressRange{} } 106 func (*Nat44AddDelAddressRange) GetMessageName() string { return "nat44_add_del_address_range" } 107 func (*Nat44AddDelAddressRange) GetCrcString() string { return "6f2b8055" } 108 func (*Nat44AddDelAddressRange) GetMessageType() api.MessageType { 109 return api.RequestMessage 110 } 111 112 func (m *Nat44AddDelAddressRange) Size() (size int) { 113 if m == nil { 114 return 0 115 } 116 size += 1 * 4 // m.FirstIPAddress 117 size += 1 * 4 // m.LastIPAddress 118 size += 4 // m.VrfID 119 size += 1 // m.IsAdd 120 size += 1 // m.Flags 121 return size 122 } 123 func (m *Nat44AddDelAddressRange) Marshal(b []byte) ([]byte, error) { 124 if b == nil { 125 b = make([]byte, m.Size()) 126 } 127 buf := codec.NewBuffer(b) 128 buf.EncodeBytes(m.FirstIPAddress[:], 4) 129 buf.EncodeBytes(m.LastIPAddress[:], 4) 130 buf.EncodeUint32(m.VrfID) 131 buf.EncodeBool(m.IsAdd) 132 buf.EncodeUint8(uint8(m.Flags)) 133 return buf.Bytes(), nil 134 } 135 func (m *Nat44AddDelAddressRange) Unmarshal(b []byte) error { 136 buf := codec.NewBuffer(b) 137 copy(m.FirstIPAddress[:], buf.DecodeBytes(4)) 138 copy(m.LastIPAddress[:], buf.DecodeBytes(4)) 139 m.VrfID = buf.DecodeUint32() 140 m.IsAdd = buf.DecodeBool() 141 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 142 return nil 143 } 144 145 // Nat44AddDelAddressRangeReply defines message 'nat44_add_del_address_range_reply'. 146 type Nat44AddDelAddressRangeReply struct { 147 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 148 } 149 150 func (m *Nat44AddDelAddressRangeReply) Reset() { *m = Nat44AddDelAddressRangeReply{} } 151 func (*Nat44AddDelAddressRangeReply) GetMessageName() string { 152 return "nat44_add_del_address_range_reply" 153 } 154 func (*Nat44AddDelAddressRangeReply) GetCrcString() string { return "e8d4e804" } 155 func (*Nat44AddDelAddressRangeReply) GetMessageType() api.MessageType { 156 return api.ReplyMessage 157 } 158 159 func (m *Nat44AddDelAddressRangeReply) Size() (size int) { 160 if m == nil { 161 return 0 162 } 163 size += 4 // m.Retval 164 return size 165 } 166 func (m *Nat44AddDelAddressRangeReply) Marshal(b []byte) ([]byte, error) { 167 if b == nil { 168 b = make([]byte, m.Size()) 169 } 170 buf := codec.NewBuffer(b) 171 buf.EncodeInt32(m.Retval) 172 return buf.Bytes(), nil 173 } 174 func (m *Nat44AddDelAddressRangeReply) Unmarshal(b []byte) error { 175 buf := codec.NewBuffer(b) 176 m.Retval = buf.DecodeInt32() 177 return nil 178 } 179 180 // Nat44AddDelIdentityMapping defines message 'nat44_add_del_identity_mapping'. 181 type Nat44AddDelIdentityMapping struct { 182 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 183 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 184 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 185 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` 186 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` 187 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 188 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 189 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 190 } 191 192 func (m *Nat44AddDelIdentityMapping) Reset() { *m = Nat44AddDelIdentityMapping{} } 193 func (*Nat44AddDelIdentityMapping) GetMessageName() string { return "nat44_add_del_identity_mapping" } 194 func (*Nat44AddDelIdentityMapping) GetCrcString() string { return "02faaa22" } 195 func (*Nat44AddDelIdentityMapping) GetMessageType() api.MessageType { 196 return api.RequestMessage 197 } 198 199 func (m *Nat44AddDelIdentityMapping) Size() (size int) { 200 if m == nil { 201 return 0 202 } 203 size += 1 // m.IsAdd 204 size += 1 // m.Flags 205 size += 1 * 4 // m.IPAddress 206 size += 1 // m.Protocol 207 size += 2 // m.Port 208 size += 4 // m.SwIfIndex 209 size += 4 // m.VrfID 210 size += 64 // m.Tag 211 return size 212 } 213 func (m *Nat44AddDelIdentityMapping) Marshal(b []byte) ([]byte, error) { 214 if b == nil { 215 b = make([]byte, m.Size()) 216 } 217 buf := codec.NewBuffer(b) 218 buf.EncodeBool(m.IsAdd) 219 buf.EncodeUint8(uint8(m.Flags)) 220 buf.EncodeBytes(m.IPAddress[:], 4) 221 buf.EncodeUint8(m.Protocol) 222 buf.EncodeUint16(m.Port) 223 buf.EncodeUint32(uint32(m.SwIfIndex)) 224 buf.EncodeUint32(m.VrfID) 225 buf.EncodeString(m.Tag, 64) 226 return buf.Bytes(), nil 227 } 228 func (m *Nat44AddDelIdentityMapping) Unmarshal(b []byte) error { 229 buf := codec.NewBuffer(b) 230 m.IsAdd = buf.DecodeBool() 231 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 232 copy(m.IPAddress[:], buf.DecodeBytes(4)) 233 m.Protocol = buf.DecodeUint8() 234 m.Port = buf.DecodeUint16() 235 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 236 m.VrfID = buf.DecodeUint32() 237 m.Tag = buf.DecodeString(64) 238 return nil 239 } 240 241 // Nat44AddDelIdentityMappingReply defines message 'nat44_add_del_identity_mapping_reply'. 242 type Nat44AddDelIdentityMappingReply struct { 243 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 244 } 245 246 func (m *Nat44AddDelIdentityMappingReply) Reset() { *m = Nat44AddDelIdentityMappingReply{} } 247 func (*Nat44AddDelIdentityMappingReply) GetMessageName() string { 248 return "nat44_add_del_identity_mapping_reply" 249 } 250 func (*Nat44AddDelIdentityMappingReply) GetCrcString() string { return "e8d4e804" } 251 func (*Nat44AddDelIdentityMappingReply) GetMessageType() api.MessageType { 252 return api.ReplyMessage 253 } 254 255 func (m *Nat44AddDelIdentityMappingReply) Size() (size int) { 256 if m == nil { 257 return 0 258 } 259 size += 4 // m.Retval 260 return size 261 } 262 func (m *Nat44AddDelIdentityMappingReply) Marshal(b []byte) ([]byte, error) { 263 if b == nil { 264 b = make([]byte, m.Size()) 265 } 266 buf := codec.NewBuffer(b) 267 buf.EncodeInt32(m.Retval) 268 return buf.Bytes(), nil 269 } 270 func (m *Nat44AddDelIdentityMappingReply) Unmarshal(b []byte) error { 271 buf := codec.NewBuffer(b) 272 m.Retval = buf.DecodeInt32() 273 return nil 274 } 275 276 // Nat44AddDelInterfaceAddr defines message 'nat44_add_del_interface_addr'. 277 type Nat44AddDelInterfaceAddr struct { 278 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 279 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 280 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 281 } 282 283 func (m *Nat44AddDelInterfaceAddr) Reset() { *m = Nat44AddDelInterfaceAddr{} } 284 func (*Nat44AddDelInterfaceAddr) GetMessageName() string { return "nat44_add_del_interface_addr" } 285 func (*Nat44AddDelInterfaceAddr) GetCrcString() string { return "4aed50c0" } 286 func (*Nat44AddDelInterfaceAddr) GetMessageType() api.MessageType { 287 return api.RequestMessage 288 } 289 290 func (m *Nat44AddDelInterfaceAddr) Size() (size int) { 291 if m == nil { 292 return 0 293 } 294 size += 1 // m.IsAdd 295 size += 4 // m.SwIfIndex 296 size += 1 // m.Flags 297 return size 298 } 299 func (m *Nat44AddDelInterfaceAddr) Marshal(b []byte) ([]byte, error) { 300 if b == nil { 301 b = make([]byte, m.Size()) 302 } 303 buf := codec.NewBuffer(b) 304 buf.EncodeBool(m.IsAdd) 305 buf.EncodeUint32(uint32(m.SwIfIndex)) 306 buf.EncodeUint8(uint8(m.Flags)) 307 return buf.Bytes(), nil 308 } 309 func (m *Nat44AddDelInterfaceAddr) Unmarshal(b []byte) error { 310 buf := codec.NewBuffer(b) 311 m.IsAdd = buf.DecodeBool() 312 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 313 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 314 return nil 315 } 316 317 // Nat44AddDelInterfaceAddrReply defines message 'nat44_add_del_interface_addr_reply'. 318 type Nat44AddDelInterfaceAddrReply struct { 319 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 320 } 321 322 func (m *Nat44AddDelInterfaceAddrReply) Reset() { *m = Nat44AddDelInterfaceAddrReply{} } 323 func (*Nat44AddDelInterfaceAddrReply) GetMessageName() string { 324 return "nat44_add_del_interface_addr_reply" 325 } 326 func (*Nat44AddDelInterfaceAddrReply) GetCrcString() string { return "e8d4e804" } 327 func (*Nat44AddDelInterfaceAddrReply) GetMessageType() api.MessageType { 328 return api.ReplyMessage 329 } 330 331 func (m *Nat44AddDelInterfaceAddrReply) Size() (size int) { 332 if m == nil { 333 return 0 334 } 335 size += 4 // m.Retval 336 return size 337 } 338 func (m *Nat44AddDelInterfaceAddrReply) Marshal(b []byte) ([]byte, error) { 339 if b == nil { 340 b = make([]byte, m.Size()) 341 } 342 buf := codec.NewBuffer(b) 343 buf.EncodeInt32(m.Retval) 344 return buf.Bytes(), nil 345 } 346 func (m *Nat44AddDelInterfaceAddrReply) Unmarshal(b []byte) error { 347 buf := codec.NewBuffer(b) 348 m.Retval = buf.DecodeInt32() 349 return nil 350 } 351 352 // Nat44AddDelLbStaticMapping defines message 'nat44_add_del_lb_static_mapping'. 353 type Nat44AddDelLbStaticMapping struct { 354 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 355 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 356 ExternalAddr ip_types.IP4Address `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"` 357 ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"` 358 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` 359 Affinity uint32 `binapi:"u32,name=affinity" json:"affinity,omitempty"` 360 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 361 LocalNum uint32 `binapi:"u32,name=local_num" json:"-"` 362 Locals []Nat44LbAddrPort `binapi:"nat44_lb_addr_port[local_num],name=locals" json:"locals,omitempty"` 363 } 364 365 func (m *Nat44AddDelLbStaticMapping) Reset() { *m = Nat44AddDelLbStaticMapping{} } 366 func (*Nat44AddDelLbStaticMapping) GetMessageName() string { return "nat44_add_del_lb_static_mapping" } 367 func (*Nat44AddDelLbStaticMapping) GetCrcString() string { return "4f68ee9d" } 368 func (*Nat44AddDelLbStaticMapping) GetMessageType() api.MessageType { 369 return api.RequestMessage 370 } 371 372 func (m *Nat44AddDelLbStaticMapping) Size() (size int) { 373 if m == nil { 374 return 0 375 } 376 size += 1 // m.IsAdd 377 size += 1 // m.Flags 378 size += 1 * 4 // m.ExternalAddr 379 size += 2 // m.ExternalPort 380 size += 1 // m.Protocol 381 size += 4 // m.Affinity 382 size += 64 // m.Tag 383 size += 4 // m.LocalNum 384 for j1 := 0; j1 < len(m.Locals); j1++ { 385 var s1 Nat44LbAddrPort 386 _ = s1 387 if j1 < len(m.Locals) { 388 s1 = m.Locals[j1] 389 } 390 size += 1 * 4 // s1.Addr 391 size += 2 // s1.Port 392 size += 1 // s1.Probability 393 size += 4 // s1.VrfID 394 } 395 return size 396 } 397 func (m *Nat44AddDelLbStaticMapping) Marshal(b []byte) ([]byte, error) { 398 if b == nil { 399 b = make([]byte, m.Size()) 400 } 401 buf := codec.NewBuffer(b) 402 buf.EncodeBool(m.IsAdd) 403 buf.EncodeUint8(uint8(m.Flags)) 404 buf.EncodeBytes(m.ExternalAddr[:], 4) 405 buf.EncodeUint16(m.ExternalPort) 406 buf.EncodeUint8(m.Protocol) 407 buf.EncodeUint32(m.Affinity) 408 buf.EncodeString(m.Tag, 64) 409 buf.EncodeUint32(uint32(len(m.Locals))) 410 for j0 := 0; j0 < len(m.Locals); j0++ { 411 var v0 Nat44LbAddrPort // Locals 412 if j0 < len(m.Locals) { 413 v0 = m.Locals[j0] 414 } 415 buf.EncodeBytes(v0.Addr[:], 4) 416 buf.EncodeUint16(v0.Port) 417 buf.EncodeUint8(v0.Probability) 418 buf.EncodeUint32(v0.VrfID) 419 } 420 return buf.Bytes(), nil 421 } 422 func (m *Nat44AddDelLbStaticMapping) Unmarshal(b []byte) error { 423 buf := codec.NewBuffer(b) 424 m.IsAdd = buf.DecodeBool() 425 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 426 copy(m.ExternalAddr[:], buf.DecodeBytes(4)) 427 m.ExternalPort = buf.DecodeUint16() 428 m.Protocol = buf.DecodeUint8() 429 m.Affinity = buf.DecodeUint32() 430 m.Tag = buf.DecodeString(64) 431 m.LocalNum = buf.DecodeUint32() 432 m.Locals = make([]Nat44LbAddrPort, m.LocalNum) 433 for j0 := 0; j0 < len(m.Locals); j0++ { 434 copy(m.Locals[j0].Addr[:], buf.DecodeBytes(4)) 435 m.Locals[j0].Port = buf.DecodeUint16() 436 m.Locals[j0].Probability = buf.DecodeUint8() 437 m.Locals[j0].VrfID = buf.DecodeUint32() 438 } 439 return nil 440 } 441 442 // Nat44AddDelLbStaticMappingReply defines message 'nat44_add_del_lb_static_mapping_reply'. 443 type Nat44AddDelLbStaticMappingReply struct { 444 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 445 } 446 447 func (m *Nat44AddDelLbStaticMappingReply) Reset() { *m = Nat44AddDelLbStaticMappingReply{} } 448 func (*Nat44AddDelLbStaticMappingReply) GetMessageName() string { 449 return "nat44_add_del_lb_static_mapping_reply" 450 } 451 func (*Nat44AddDelLbStaticMappingReply) GetCrcString() string { return "e8d4e804" } 452 func (*Nat44AddDelLbStaticMappingReply) GetMessageType() api.MessageType { 453 return api.ReplyMessage 454 } 455 456 func (m *Nat44AddDelLbStaticMappingReply) Size() (size int) { 457 if m == nil { 458 return 0 459 } 460 size += 4 // m.Retval 461 return size 462 } 463 func (m *Nat44AddDelLbStaticMappingReply) Marshal(b []byte) ([]byte, error) { 464 if b == nil { 465 b = make([]byte, m.Size()) 466 } 467 buf := codec.NewBuffer(b) 468 buf.EncodeInt32(m.Retval) 469 return buf.Bytes(), nil 470 } 471 func (m *Nat44AddDelLbStaticMappingReply) Unmarshal(b []byte) error { 472 buf := codec.NewBuffer(b) 473 m.Retval = buf.DecodeInt32() 474 return nil 475 } 476 477 // Nat44AddDelStaticMapping defines message 'nat44_add_del_static_mapping'. 478 type Nat44AddDelStaticMapping struct { 479 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 480 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 481 LocalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=local_ip_address" json:"local_ip_address,omitempty"` 482 ExternalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=external_ip_address" json:"external_ip_address,omitempty"` 483 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` 484 LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"` 485 ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"` 486 ExternalSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=external_sw_if_index" json:"external_sw_if_index,omitempty"` 487 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 488 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 489 } 490 491 func (m *Nat44AddDelStaticMapping) Reset() { *m = Nat44AddDelStaticMapping{} } 492 func (*Nat44AddDelStaticMapping) GetMessageName() string { return "nat44_add_del_static_mapping" } 493 func (*Nat44AddDelStaticMapping) GetCrcString() string { return "5ae5f03e" } 494 func (*Nat44AddDelStaticMapping) GetMessageType() api.MessageType { 495 return api.RequestMessage 496 } 497 498 func (m *Nat44AddDelStaticMapping) Size() (size int) { 499 if m == nil { 500 return 0 501 } 502 size += 1 // m.IsAdd 503 size += 1 // m.Flags 504 size += 1 * 4 // m.LocalIPAddress 505 size += 1 * 4 // m.ExternalIPAddress 506 size += 1 // m.Protocol 507 size += 2 // m.LocalPort 508 size += 2 // m.ExternalPort 509 size += 4 // m.ExternalSwIfIndex 510 size += 4 // m.VrfID 511 size += 64 // m.Tag 512 return size 513 } 514 func (m *Nat44AddDelStaticMapping) Marshal(b []byte) ([]byte, error) { 515 if b == nil { 516 b = make([]byte, m.Size()) 517 } 518 buf := codec.NewBuffer(b) 519 buf.EncodeBool(m.IsAdd) 520 buf.EncodeUint8(uint8(m.Flags)) 521 buf.EncodeBytes(m.LocalIPAddress[:], 4) 522 buf.EncodeBytes(m.ExternalIPAddress[:], 4) 523 buf.EncodeUint8(m.Protocol) 524 buf.EncodeUint16(m.LocalPort) 525 buf.EncodeUint16(m.ExternalPort) 526 buf.EncodeUint32(uint32(m.ExternalSwIfIndex)) 527 buf.EncodeUint32(m.VrfID) 528 buf.EncodeString(m.Tag, 64) 529 return buf.Bytes(), nil 530 } 531 func (m *Nat44AddDelStaticMapping) Unmarshal(b []byte) error { 532 buf := codec.NewBuffer(b) 533 m.IsAdd = buf.DecodeBool() 534 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 535 copy(m.LocalIPAddress[:], buf.DecodeBytes(4)) 536 copy(m.ExternalIPAddress[:], buf.DecodeBytes(4)) 537 m.Protocol = buf.DecodeUint8() 538 m.LocalPort = buf.DecodeUint16() 539 m.ExternalPort = buf.DecodeUint16() 540 m.ExternalSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 541 m.VrfID = buf.DecodeUint32() 542 m.Tag = buf.DecodeString(64) 543 return nil 544 } 545 546 // Nat44AddDelStaticMappingReply defines message 'nat44_add_del_static_mapping_reply'. 547 type Nat44AddDelStaticMappingReply struct { 548 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 549 } 550 551 func (m *Nat44AddDelStaticMappingReply) Reset() { *m = Nat44AddDelStaticMappingReply{} } 552 func (*Nat44AddDelStaticMappingReply) GetMessageName() string { 553 return "nat44_add_del_static_mapping_reply" 554 } 555 func (*Nat44AddDelStaticMappingReply) GetCrcString() string { return "e8d4e804" } 556 func (*Nat44AddDelStaticMappingReply) GetMessageType() api.MessageType { 557 return api.ReplyMessage 558 } 559 560 func (m *Nat44AddDelStaticMappingReply) Size() (size int) { 561 if m == nil { 562 return 0 563 } 564 size += 4 // m.Retval 565 return size 566 } 567 func (m *Nat44AddDelStaticMappingReply) Marshal(b []byte) ([]byte, error) { 568 if b == nil { 569 b = make([]byte, m.Size()) 570 } 571 buf := codec.NewBuffer(b) 572 buf.EncodeInt32(m.Retval) 573 return buf.Bytes(), nil 574 } 575 func (m *Nat44AddDelStaticMappingReply) Unmarshal(b []byte) error { 576 buf := codec.NewBuffer(b) 577 m.Retval = buf.DecodeInt32() 578 return nil 579 } 580 581 // Nat44AddDelStaticMappingV2 defines message 'nat44_add_del_static_mapping_v2'. 582 // InProgress: the message form may change in the future versions 583 type Nat44AddDelStaticMappingV2 struct { 584 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 585 MatchPool bool `binapi:"bool,name=match_pool" json:"match_pool,omitempty"` 586 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 587 PoolIPAddress ip_types.IP4Address `binapi:"ip4_address,name=pool_ip_address" json:"pool_ip_address,omitempty"` 588 LocalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=local_ip_address" json:"local_ip_address,omitempty"` 589 ExternalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=external_ip_address" json:"external_ip_address,omitempty"` 590 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` 591 LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"` 592 ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"` 593 ExternalSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=external_sw_if_index" json:"external_sw_if_index,omitempty"` 594 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 595 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 596 } 597 598 func (m *Nat44AddDelStaticMappingV2) Reset() { *m = Nat44AddDelStaticMappingV2{} } 599 func (*Nat44AddDelStaticMappingV2) GetMessageName() string { return "nat44_add_del_static_mapping_v2" } 600 func (*Nat44AddDelStaticMappingV2) GetCrcString() string { return "5e205f1a" } 601 func (*Nat44AddDelStaticMappingV2) GetMessageType() api.MessageType { 602 return api.RequestMessage 603 } 604 605 func (m *Nat44AddDelStaticMappingV2) Size() (size int) { 606 if m == nil { 607 return 0 608 } 609 size += 1 // m.IsAdd 610 size += 1 // m.MatchPool 611 size += 1 // m.Flags 612 size += 1 * 4 // m.PoolIPAddress 613 size += 1 * 4 // m.LocalIPAddress 614 size += 1 * 4 // m.ExternalIPAddress 615 size += 1 // m.Protocol 616 size += 2 // m.LocalPort 617 size += 2 // m.ExternalPort 618 size += 4 // m.ExternalSwIfIndex 619 size += 4 // m.VrfID 620 size += 64 // m.Tag 621 return size 622 } 623 func (m *Nat44AddDelStaticMappingV2) Marshal(b []byte) ([]byte, error) { 624 if b == nil { 625 b = make([]byte, m.Size()) 626 } 627 buf := codec.NewBuffer(b) 628 buf.EncodeBool(m.IsAdd) 629 buf.EncodeBool(m.MatchPool) 630 buf.EncodeUint8(uint8(m.Flags)) 631 buf.EncodeBytes(m.PoolIPAddress[:], 4) 632 buf.EncodeBytes(m.LocalIPAddress[:], 4) 633 buf.EncodeBytes(m.ExternalIPAddress[:], 4) 634 buf.EncodeUint8(m.Protocol) 635 buf.EncodeUint16(m.LocalPort) 636 buf.EncodeUint16(m.ExternalPort) 637 buf.EncodeUint32(uint32(m.ExternalSwIfIndex)) 638 buf.EncodeUint32(m.VrfID) 639 buf.EncodeString(m.Tag, 64) 640 return buf.Bytes(), nil 641 } 642 func (m *Nat44AddDelStaticMappingV2) Unmarshal(b []byte) error { 643 buf := codec.NewBuffer(b) 644 m.IsAdd = buf.DecodeBool() 645 m.MatchPool = buf.DecodeBool() 646 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 647 copy(m.PoolIPAddress[:], buf.DecodeBytes(4)) 648 copy(m.LocalIPAddress[:], buf.DecodeBytes(4)) 649 copy(m.ExternalIPAddress[:], buf.DecodeBytes(4)) 650 m.Protocol = buf.DecodeUint8() 651 m.LocalPort = buf.DecodeUint16() 652 m.ExternalPort = buf.DecodeUint16() 653 m.ExternalSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 654 m.VrfID = buf.DecodeUint32() 655 m.Tag = buf.DecodeString(64) 656 return nil 657 } 658 659 // Nat44AddDelStaticMappingV2Reply defines message 'nat44_add_del_static_mapping_v2_reply'. 660 // InProgress: the message form may change in the future versions 661 type Nat44AddDelStaticMappingV2Reply struct { 662 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 663 } 664 665 func (m *Nat44AddDelStaticMappingV2Reply) Reset() { *m = Nat44AddDelStaticMappingV2Reply{} } 666 func (*Nat44AddDelStaticMappingV2Reply) GetMessageName() string { 667 return "nat44_add_del_static_mapping_v2_reply" 668 } 669 func (*Nat44AddDelStaticMappingV2Reply) GetCrcString() string { return "e8d4e804" } 670 func (*Nat44AddDelStaticMappingV2Reply) GetMessageType() api.MessageType { 671 return api.ReplyMessage 672 } 673 674 func (m *Nat44AddDelStaticMappingV2Reply) Size() (size int) { 675 if m == nil { 676 return 0 677 } 678 size += 4 // m.Retval 679 return size 680 } 681 func (m *Nat44AddDelStaticMappingV2Reply) Marshal(b []byte) ([]byte, error) { 682 if b == nil { 683 b = make([]byte, m.Size()) 684 } 685 buf := codec.NewBuffer(b) 686 buf.EncodeInt32(m.Retval) 687 return buf.Bytes(), nil 688 } 689 func (m *Nat44AddDelStaticMappingV2Reply) Unmarshal(b []byte) error { 690 buf := codec.NewBuffer(b) 691 m.Retval = buf.DecodeInt32() 692 return nil 693 } 694 695 // Nat44AddressDetails defines message 'nat44_address_details'. 696 type Nat44AddressDetails struct { 697 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 698 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 699 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 700 } 701 702 func (m *Nat44AddressDetails) Reset() { *m = Nat44AddressDetails{} } 703 func (*Nat44AddressDetails) GetMessageName() string { return "nat44_address_details" } 704 func (*Nat44AddressDetails) GetCrcString() string { return "0d1beac1" } 705 func (*Nat44AddressDetails) GetMessageType() api.MessageType { 706 return api.ReplyMessage 707 } 708 709 func (m *Nat44AddressDetails) Size() (size int) { 710 if m == nil { 711 return 0 712 } 713 size += 1 * 4 // m.IPAddress 714 size += 1 // m.Flags 715 size += 4 // m.VrfID 716 return size 717 } 718 func (m *Nat44AddressDetails) Marshal(b []byte) ([]byte, error) { 719 if b == nil { 720 b = make([]byte, m.Size()) 721 } 722 buf := codec.NewBuffer(b) 723 buf.EncodeBytes(m.IPAddress[:], 4) 724 buf.EncodeUint8(uint8(m.Flags)) 725 buf.EncodeUint32(m.VrfID) 726 return buf.Bytes(), nil 727 } 728 func (m *Nat44AddressDetails) Unmarshal(b []byte) error { 729 buf := codec.NewBuffer(b) 730 copy(m.IPAddress[:], buf.DecodeBytes(4)) 731 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 732 m.VrfID = buf.DecodeUint32() 733 return nil 734 } 735 736 // Nat44AddressDump defines message 'nat44_address_dump'. 737 type Nat44AddressDump struct{} 738 739 func (m *Nat44AddressDump) Reset() { *m = Nat44AddressDump{} } 740 func (*Nat44AddressDump) GetMessageName() string { return "nat44_address_dump" } 741 func (*Nat44AddressDump) GetCrcString() string { return "51077d14" } 742 func (*Nat44AddressDump) GetMessageType() api.MessageType { 743 return api.RequestMessage 744 } 745 746 func (m *Nat44AddressDump) Size() (size int) { 747 if m == nil { 748 return 0 749 } 750 return size 751 } 752 func (m *Nat44AddressDump) Marshal(b []byte) ([]byte, error) { 753 if b == nil { 754 b = make([]byte, m.Size()) 755 } 756 buf := codec.NewBuffer(b) 757 return buf.Bytes(), nil 758 } 759 func (m *Nat44AddressDump) Unmarshal(b []byte) error { 760 return nil 761 } 762 763 // Nat44DelSession defines message 'nat44_del_session'. 764 type Nat44DelSession struct { 765 Address ip_types.IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"` 766 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` 767 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` 768 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 769 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 770 ExtHostAddress ip_types.IP4Address `binapi:"ip4_address,name=ext_host_address" json:"ext_host_address,omitempty"` 771 ExtHostPort uint16 `binapi:"u16,name=ext_host_port" json:"ext_host_port,omitempty"` 772 } 773 774 func (m *Nat44DelSession) Reset() { *m = Nat44DelSession{} } 775 func (*Nat44DelSession) GetMessageName() string { return "nat44_del_session" } 776 func (*Nat44DelSession) GetCrcString() string { return "15a5bf8c" } 777 func (*Nat44DelSession) GetMessageType() api.MessageType { 778 return api.RequestMessage 779 } 780 781 func (m *Nat44DelSession) Size() (size int) { 782 if m == nil { 783 return 0 784 } 785 size += 1 * 4 // m.Address 786 size += 1 // m.Protocol 787 size += 2 // m.Port 788 size += 4 // m.VrfID 789 size += 1 // m.Flags 790 size += 1 * 4 // m.ExtHostAddress 791 size += 2 // m.ExtHostPort 792 return size 793 } 794 func (m *Nat44DelSession) Marshal(b []byte) ([]byte, error) { 795 if b == nil { 796 b = make([]byte, m.Size()) 797 } 798 buf := codec.NewBuffer(b) 799 buf.EncodeBytes(m.Address[:], 4) 800 buf.EncodeUint8(m.Protocol) 801 buf.EncodeUint16(m.Port) 802 buf.EncodeUint32(m.VrfID) 803 buf.EncodeUint8(uint8(m.Flags)) 804 buf.EncodeBytes(m.ExtHostAddress[:], 4) 805 buf.EncodeUint16(m.ExtHostPort) 806 return buf.Bytes(), nil 807 } 808 func (m *Nat44DelSession) Unmarshal(b []byte) error { 809 buf := codec.NewBuffer(b) 810 copy(m.Address[:], buf.DecodeBytes(4)) 811 m.Protocol = buf.DecodeUint8() 812 m.Port = buf.DecodeUint16() 813 m.VrfID = buf.DecodeUint32() 814 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 815 copy(m.ExtHostAddress[:], buf.DecodeBytes(4)) 816 m.ExtHostPort = buf.DecodeUint16() 817 return nil 818 } 819 820 // Nat44DelSessionReply defines message 'nat44_del_session_reply'. 821 type Nat44DelSessionReply struct { 822 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 823 } 824 825 func (m *Nat44DelSessionReply) Reset() { *m = Nat44DelSessionReply{} } 826 func (*Nat44DelSessionReply) GetMessageName() string { return "nat44_del_session_reply" } 827 func (*Nat44DelSessionReply) GetCrcString() string { return "e8d4e804" } 828 func (*Nat44DelSessionReply) GetMessageType() api.MessageType { 829 return api.ReplyMessage 830 } 831 832 func (m *Nat44DelSessionReply) Size() (size int) { 833 if m == nil { 834 return 0 835 } 836 size += 4 // m.Retval 837 return size 838 } 839 func (m *Nat44DelSessionReply) Marshal(b []byte) ([]byte, error) { 840 if b == nil { 841 b = make([]byte, m.Size()) 842 } 843 buf := codec.NewBuffer(b) 844 buf.EncodeInt32(m.Retval) 845 return buf.Bytes(), nil 846 } 847 func (m *Nat44DelSessionReply) Unmarshal(b []byte) error { 848 buf := codec.NewBuffer(b) 849 m.Retval = buf.DecodeInt32() 850 return nil 851 } 852 853 // Nat44DelUser defines message 'nat44_del_user'. 854 type Nat44DelUser struct { 855 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 856 FibIndex uint32 `binapi:"u32,name=fib_index" json:"fib_index,omitempty"` 857 } 858 859 func (m *Nat44DelUser) Reset() { *m = Nat44DelUser{} } 860 func (*Nat44DelUser) GetMessageName() string { return "nat44_del_user" } 861 func (*Nat44DelUser) GetCrcString() string { return "99a9f998" } 862 func (*Nat44DelUser) GetMessageType() api.MessageType { 863 return api.RequestMessage 864 } 865 866 func (m *Nat44DelUser) Size() (size int) { 867 if m == nil { 868 return 0 869 } 870 size += 1 * 4 // m.IPAddress 871 size += 4 // m.FibIndex 872 return size 873 } 874 func (m *Nat44DelUser) Marshal(b []byte) ([]byte, error) { 875 if b == nil { 876 b = make([]byte, m.Size()) 877 } 878 buf := codec.NewBuffer(b) 879 buf.EncodeBytes(m.IPAddress[:], 4) 880 buf.EncodeUint32(m.FibIndex) 881 return buf.Bytes(), nil 882 } 883 func (m *Nat44DelUser) Unmarshal(b []byte) error { 884 buf := codec.NewBuffer(b) 885 copy(m.IPAddress[:], buf.DecodeBytes(4)) 886 m.FibIndex = buf.DecodeUint32() 887 return nil 888 } 889 890 // Nat44DelUserReply defines message 'nat44_del_user_reply'. 891 type Nat44DelUserReply struct { 892 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 893 } 894 895 func (m *Nat44DelUserReply) Reset() { *m = Nat44DelUserReply{} } 896 func (*Nat44DelUserReply) GetMessageName() string { return "nat44_del_user_reply" } 897 func (*Nat44DelUserReply) GetCrcString() string { return "e8d4e804" } 898 func (*Nat44DelUserReply) GetMessageType() api.MessageType { 899 return api.ReplyMessage 900 } 901 902 func (m *Nat44DelUserReply) Size() (size int) { 903 if m == nil { 904 return 0 905 } 906 size += 4 // m.Retval 907 return size 908 } 909 func (m *Nat44DelUserReply) Marshal(b []byte) ([]byte, error) { 910 if b == nil { 911 b = make([]byte, m.Size()) 912 } 913 buf := codec.NewBuffer(b) 914 buf.EncodeInt32(m.Retval) 915 return buf.Bytes(), nil 916 } 917 func (m *Nat44DelUserReply) Unmarshal(b []byte) error { 918 buf := codec.NewBuffer(b) 919 m.Retval = buf.DecodeInt32() 920 return nil 921 } 922 923 // Nat44EdPluginEnableDisable defines message 'nat44_ed_plugin_enable_disable'. 924 // InProgress: the message form may change in the future versions 925 type Nat44EdPluginEnableDisable struct { 926 InsideVrf uint32 `binapi:"u32,name=inside_vrf" json:"inside_vrf,omitempty"` 927 OutsideVrf uint32 `binapi:"u32,name=outside_vrf" json:"outside_vrf,omitempty"` 928 Sessions uint32 `binapi:"u32,name=sessions" json:"sessions,omitempty"` 929 SessionMemory uint32 `binapi:"u32,name=session_memory" json:"session_memory,omitempty"` 930 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 931 Flags Nat44ConfigFlags `binapi:"nat44_config_flags,name=flags" json:"flags,omitempty"` 932 } 933 934 func (m *Nat44EdPluginEnableDisable) Reset() { *m = Nat44EdPluginEnableDisable{} } 935 func (*Nat44EdPluginEnableDisable) GetMessageName() string { return "nat44_ed_plugin_enable_disable" } 936 func (*Nat44EdPluginEnableDisable) GetCrcString() string { return "be17f8dd" } 937 func (*Nat44EdPluginEnableDisable) GetMessageType() api.MessageType { 938 return api.RequestMessage 939 } 940 941 func (m *Nat44EdPluginEnableDisable) Size() (size int) { 942 if m == nil { 943 return 0 944 } 945 size += 4 // m.InsideVrf 946 size += 4 // m.OutsideVrf 947 size += 4 // m.Sessions 948 size += 4 // m.SessionMemory 949 size += 1 // m.Enable 950 size += 1 // m.Flags 951 return size 952 } 953 func (m *Nat44EdPluginEnableDisable) Marshal(b []byte) ([]byte, error) { 954 if b == nil { 955 b = make([]byte, m.Size()) 956 } 957 buf := codec.NewBuffer(b) 958 buf.EncodeUint32(m.InsideVrf) 959 buf.EncodeUint32(m.OutsideVrf) 960 buf.EncodeUint32(m.Sessions) 961 buf.EncodeUint32(m.SessionMemory) 962 buf.EncodeBool(m.Enable) 963 buf.EncodeUint8(uint8(m.Flags)) 964 return buf.Bytes(), nil 965 } 966 func (m *Nat44EdPluginEnableDisable) Unmarshal(b []byte) error { 967 buf := codec.NewBuffer(b) 968 m.InsideVrf = buf.DecodeUint32() 969 m.OutsideVrf = buf.DecodeUint32() 970 m.Sessions = buf.DecodeUint32() 971 m.SessionMemory = buf.DecodeUint32() 972 m.Enable = buf.DecodeBool() 973 m.Flags = Nat44ConfigFlags(buf.DecodeUint8()) 974 return nil 975 } 976 977 // Nat44EdPluginEnableDisableReply defines message 'nat44_ed_plugin_enable_disable_reply'. 978 // InProgress: the message form may change in the future versions 979 type Nat44EdPluginEnableDisableReply struct { 980 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 981 } 982 983 func (m *Nat44EdPluginEnableDisableReply) Reset() { *m = Nat44EdPluginEnableDisableReply{} } 984 func (*Nat44EdPluginEnableDisableReply) GetMessageName() string { 985 return "nat44_ed_plugin_enable_disable_reply" 986 } 987 func (*Nat44EdPluginEnableDisableReply) GetCrcString() string { return "e8d4e804" } 988 func (*Nat44EdPluginEnableDisableReply) GetMessageType() api.MessageType { 989 return api.ReplyMessage 990 } 991 992 func (m *Nat44EdPluginEnableDisableReply) Size() (size int) { 993 if m == nil { 994 return 0 995 } 996 size += 4 // m.Retval 997 return size 998 } 999 func (m *Nat44EdPluginEnableDisableReply) Marshal(b []byte) ([]byte, error) { 1000 if b == nil { 1001 b = make([]byte, m.Size()) 1002 } 1003 buf := codec.NewBuffer(b) 1004 buf.EncodeInt32(m.Retval) 1005 return buf.Bytes(), nil 1006 } 1007 func (m *Nat44EdPluginEnableDisableReply) Unmarshal(b []byte) error { 1008 buf := codec.NewBuffer(b) 1009 m.Retval = buf.DecodeInt32() 1010 return nil 1011 } 1012 1013 // Nat44EdSetFqOptions defines message 'nat44_ed_set_fq_options'. 1014 // InProgress: the message form may change in the future versions 1015 type Nat44EdSetFqOptions struct { 1016 FrameQueueNelts uint32 `binapi:"u32,name=frame_queue_nelts" json:"frame_queue_nelts,omitempty"` 1017 } 1018 1019 func (m *Nat44EdSetFqOptions) Reset() { *m = Nat44EdSetFqOptions{} } 1020 func (*Nat44EdSetFqOptions) GetMessageName() string { return "nat44_ed_set_fq_options" } 1021 func (*Nat44EdSetFqOptions) GetCrcString() string { return "2399bd71" } 1022 func (*Nat44EdSetFqOptions) GetMessageType() api.MessageType { 1023 return api.RequestMessage 1024 } 1025 1026 func (m *Nat44EdSetFqOptions) Size() (size int) { 1027 if m == nil { 1028 return 0 1029 } 1030 size += 4 // m.FrameQueueNelts 1031 return size 1032 } 1033 func (m *Nat44EdSetFqOptions) Marshal(b []byte) ([]byte, error) { 1034 if b == nil { 1035 b = make([]byte, m.Size()) 1036 } 1037 buf := codec.NewBuffer(b) 1038 buf.EncodeUint32(m.FrameQueueNelts) 1039 return buf.Bytes(), nil 1040 } 1041 func (m *Nat44EdSetFqOptions) Unmarshal(b []byte) error { 1042 buf := codec.NewBuffer(b) 1043 m.FrameQueueNelts = buf.DecodeUint32() 1044 return nil 1045 } 1046 1047 // Nat44EdSetFqOptionsReply defines message 'nat44_ed_set_fq_options_reply'. 1048 // InProgress: the message form may change in the future versions 1049 type Nat44EdSetFqOptionsReply struct { 1050 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1051 } 1052 1053 func (m *Nat44EdSetFqOptionsReply) Reset() { *m = Nat44EdSetFqOptionsReply{} } 1054 func (*Nat44EdSetFqOptionsReply) GetMessageName() string { return "nat44_ed_set_fq_options_reply" } 1055 func (*Nat44EdSetFqOptionsReply) GetCrcString() string { return "e8d4e804" } 1056 func (*Nat44EdSetFqOptionsReply) GetMessageType() api.MessageType { 1057 return api.ReplyMessage 1058 } 1059 1060 func (m *Nat44EdSetFqOptionsReply) Size() (size int) { 1061 if m == nil { 1062 return 0 1063 } 1064 size += 4 // m.Retval 1065 return size 1066 } 1067 func (m *Nat44EdSetFqOptionsReply) Marshal(b []byte) ([]byte, error) { 1068 if b == nil { 1069 b = make([]byte, m.Size()) 1070 } 1071 buf := codec.NewBuffer(b) 1072 buf.EncodeInt32(m.Retval) 1073 return buf.Bytes(), nil 1074 } 1075 func (m *Nat44EdSetFqOptionsReply) Unmarshal(b []byte) error { 1076 buf := codec.NewBuffer(b) 1077 m.Retval = buf.DecodeInt32() 1078 return nil 1079 } 1080 1081 // Nat44EdShowFqOptions defines message 'nat44_ed_show_fq_options'. 1082 // InProgress: the message form may change in the future versions 1083 type Nat44EdShowFqOptions struct{} 1084 1085 func (m *Nat44EdShowFqOptions) Reset() { *m = Nat44EdShowFqOptions{} } 1086 func (*Nat44EdShowFqOptions) GetMessageName() string { return "nat44_ed_show_fq_options" } 1087 func (*Nat44EdShowFqOptions) GetCrcString() string { return "51077d14" } 1088 func (*Nat44EdShowFqOptions) GetMessageType() api.MessageType { 1089 return api.RequestMessage 1090 } 1091 1092 func (m *Nat44EdShowFqOptions) Size() (size int) { 1093 if m == nil { 1094 return 0 1095 } 1096 return size 1097 } 1098 func (m *Nat44EdShowFqOptions) Marshal(b []byte) ([]byte, error) { 1099 if b == nil { 1100 b = make([]byte, m.Size()) 1101 } 1102 buf := codec.NewBuffer(b) 1103 return buf.Bytes(), nil 1104 } 1105 func (m *Nat44EdShowFqOptions) Unmarshal(b []byte) error { 1106 return nil 1107 } 1108 1109 // Nat44EdShowFqOptionsReply defines message 'nat44_ed_show_fq_options_reply'. 1110 // InProgress: the message form may change in the future versions 1111 type Nat44EdShowFqOptionsReply struct { 1112 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1113 FrameQueueNelts uint32 `binapi:"u32,name=frame_queue_nelts" json:"frame_queue_nelts,omitempty"` 1114 } 1115 1116 func (m *Nat44EdShowFqOptionsReply) Reset() { *m = Nat44EdShowFqOptionsReply{} } 1117 func (*Nat44EdShowFqOptionsReply) GetMessageName() string { return "nat44_ed_show_fq_options_reply" } 1118 func (*Nat44EdShowFqOptionsReply) GetCrcString() string { return "7213b545" } 1119 func (*Nat44EdShowFqOptionsReply) GetMessageType() api.MessageType { 1120 return api.ReplyMessage 1121 } 1122 1123 func (m *Nat44EdShowFqOptionsReply) Size() (size int) { 1124 if m == nil { 1125 return 0 1126 } 1127 size += 4 // m.Retval 1128 size += 4 // m.FrameQueueNelts 1129 return size 1130 } 1131 func (m *Nat44EdShowFqOptionsReply) Marshal(b []byte) ([]byte, error) { 1132 if b == nil { 1133 b = make([]byte, m.Size()) 1134 } 1135 buf := codec.NewBuffer(b) 1136 buf.EncodeInt32(m.Retval) 1137 buf.EncodeUint32(m.FrameQueueNelts) 1138 return buf.Bytes(), nil 1139 } 1140 func (m *Nat44EdShowFqOptionsReply) Unmarshal(b []byte) error { 1141 buf := codec.NewBuffer(b) 1142 m.Retval = buf.DecodeInt32() 1143 m.FrameQueueNelts = buf.DecodeUint32() 1144 return nil 1145 } 1146 1147 // Nat44ForwardingEnableDisable defines message 'nat44_forwarding_enable_disable'. 1148 // Deprecated: the message will be removed in the future versions 1149 type Nat44ForwardingEnableDisable struct { 1150 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 1151 } 1152 1153 func (m *Nat44ForwardingEnableDisable) Reset() { *m = Nat44ForwardingEnableDisable{} } 1154 func (*Nat44ForwardingEnableDisable) GetMessageName() string { 1155 return "nat44_forwarding_enable_disable" 1156 } 1157 func (*Nat44ForwardingEnableDisable) GetCrcString() string { return "b3e225d2" } 1158 func (*Nat44ForwardingEnableDisable) GetMessageType() api.MessageType { 1159 return api.RequestMessage 1160 } 1161 1162 func (m *Nat44ForwardingEnableDisable) Size() (size int) { 1163 if m == nil { 1164 return 0 1165 } 1166 size += 1 // m.Enable 1167 return size 1168 } 1169 func (m *Nat44ForwardingEnableDisable) Marshal(b []byte) ([]byte, error) { 1170 if b == nil { 1171 b = make([]byte, m.Size()) 1172 } 1173 buf := codec.NewBuffer(b) 1174 buf.EncodeBool(m.Enable) 1175 return buf.Bytes(), nil 1176 } 1177 func (m *Nat44ForwardingEnableDisable) Unmarshal(b []byte) error { 1178 buf := codec.NewBuffer(b) 1179 m.Enable = buf.DecodeBool() 1180 return nil 1181 } 1182 1183 // Nat44ForwardingEnableDisableReply defines message 'nat44_forwarding_enable_disable_reply'. 1184 // Deprecated: the message will be removed in the future versions 1185 type Nat44ForwardingEnableDisableReply struct { 1186 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1187 } 1188 1189 func (m *Nat44ForwardingEnableDisableReply) Reset() { *m = Nat44ForwardingEnableDisableReply{} } 1190 func (*Nat44ForwardingEnableDisableReply) GetMessageName() string { 1191 return "nat44_forwarding_enable_disable_reply" 1192 } 1193 func (*Nat44ForwardingEnableDisableReply) GetCrcString() string { return "e8d4e804" } 1194 func (*Nat44ForwardingEnableDisableReply) GetMessageType() api.MessageType { 1195 return api.ReplyMessage 1196 } 1197 1198 func (m *Nat44ForwardingEnableDisableReply) Size() (size int) { 1199 if m == nil { 1200 return 0 1201 } 1202 size += 4 // m.Retval 1203 return size 1204 } 1205 func (m *Nat44ForwardingEnableDisableReply) Marshal(b []byte) ([]byte, error) { 1206 if b == nil { 1207 b = make([]byte, m.Size()) 1208 } 1209 buf := codec.NewBuffer(b) 1210 buf.EncodeInt32(m.Retval) 1211 return buf.Bytes(), nil 1212 } 1213 func (m *Nat44ForwardingEnableDisableReply) Unmarshal(b []byte) error { 1214 buf := codec.NewBuffer(b) 1215 m.Retval = buf.DecodeInt32() 1216 return nil 1217 } 1218 1219 // Nat44ForwardingIsEnabled defines message 'nat44_forwarding_is_enabled'. 1220 // Deprecated: the message will be removed in the future versions 1221 type Nat44ForwardingIsEnabled struct{} 1222 1223 func (m *Nat44ForwardingIsEnabled) Reset() { *m = Nat44ForwardingIsEnabled{} } 1224 func (*Nat44ForwardingIsEnabled) GetMessageName() string { return "nat44_forwarding_is_enabled" } 1225 func (*Nat44ForwardingIsEnabled) GetCrcString() string { return "51077d14" } 1226 func (*Nat44ForwardingIsEnabled) GetMessageType() api.MessageType { 1227 return api.RequestMessage 1228 } 1229 1230 func (m *Nat44ForwardingIsEnabled) Size() (size int) { 1231 if m == nil { 1232 return 0 1233 } 1234 return size 1235 } 1236 func (m *Nat44ForwardingIsEnabled) Marshal(b []byte) ([]byte, error) { 1237 if b == nil { 1238 b = make([]byte, m.Size()) 1239 } 1240 buf := codec.NewBuffer(b) 1241 return buf.Bytes(), nil 1242 } 1243 func (m *Nat44ForwardingIsEnabled) Unmarshal(b []byte) error { 1244 return nil 1245 } 1246 1247 // Nat44ForwardingIsEnabledReply defines message 'nat44_forwarding_is_enabled_reply'. 1248 // Deprecated: the message will be removed in the future versions 1249 type Nat44ForwardingIsEnabledReply struct { 1250 Enabled bool `binapi:"bool,name=enabled" json:"enabled,omitempty"` 1251 } 1252 1253 func (m *Nat44ForwardingIsEnabledReply) Reset() { *m = Nat44ForwardingIsEnabledReply{} } 1254 func (*Nat44ForwardingIsEnabledReply) GetMessageName() string { 1255 return "nat44_forwarding_is_enabled_reply" 1256 } 1257 func (*Nat44ForwardingIsEnabledReply) GetCrcString() string { return "46924a06" } 1258 func (*Nat44ForwardingIsEnabledReply) GetMessageType() api.MessageType { 1259 return api.ReplyMessage 1260 } 1261 1262 func (m *Nat44ForwardingIsEnabledReply) Size() (size int) { 1263 if m == nil { 1264 return 0 1265 } 1266 size += 1 // m.Enabled 1267 return size 1268 } 1269 func (m *Nat44ForwardingIsEnabledReply) Marshal(b []byte) ([]byte, error) { 1270 if b == nil { 1271 b = make([]byte, m.Size()) 1272 } 1273 buf := codec.NewBuffer(b) 1274 buf.EncodeBool(m.Enabled) 1275 return buf.Bytes(), nil 1276 } 1277 func (m *Nat44ForwardingIsEnabledReply) Unmarshal(b []byte) error { 1278 buf := codec.NewBuffer(b) 1279 m.Enabled = buf.DecodeBool() 1280 return nil 1281 } 1282 1283 // Nat44IdentityMappingDetails defines message 'nat44_identity_mapping_details'. 1284 type Nat44IdentityMappingDetails struct { 1285 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 1286 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 1287 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` 1288 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` 1289 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1290 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 1291 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 1292 } 1293 1294 func (m *Nat44IdentityMappingDetails) Reset() { *m = Nat44IdentityMappingDetails{} } 1295 func (*Nat44IdentityMappingDetails) GetMessageName() string { return "nat44_identity_mapping_details" } 1296 func (*Nat44IdentityMappingDetails) GetCrcString() string { return "2a52a030" } 1297 func (*Nat44IdentityMappingDetails) GetMessageType() api.MessageType { 1298 return api.ReplyMessage 1299 } 1300 1301 func (m *Nat44IdentityMappingDetails) Size() (size int) { 1302 if m == nil { 1303 return 0 1304 } 1305 size += 1 // m.Flags 1306 size += 1 * 4 // m.IPAddress 1307 size += 1 // m.Protocol 1308 size += 2 // m.Port 1309 size += 4 // m.SwIfIndex 1310 size += 4 // m.VrfID 1311 size += 64 // m.Tag 1312 return size 1313 } 1314 func (m *Nat44IdentityMappingDetails) Marshal(b []byte) ([]byte, error) { 1315 if b == nil { 1316 b = make([]byte, m.Size()) 1317 } 1318 buf := codec.NewBuffer(b) 1319 buf.EncodeUint8(uint8(m.Flags)) 1320 buf.EncodeBytes(m.IPAddress[:], 4) 1321 buf.EncodeUint8(m.Protocol) 1322 buf.EncodeUint16(m.Port) 1323 buf.EncodeUint32(uint32(m.SwIfIndex)) 1324 buf.EncodeUint32(m.VrfID) 1325 buf.EncodeString(m.Tag, 64) 1326 return buf.Bytes(), nil 1327 } 1328 func (m *Nat44IdentityMappingDetails) Unmarshal(b []byte) error { 1329 buf := codec.NewBuffer(b) 1330 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 1331 copy(m.IPAddress[:], buf.DecodeBytes(4)) 1332 m.Protocol = buf.DecodeUint8() 1333 m.Port = buf.DecodeUint16() 1334 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1335 m.VrfID = buf.DecodeUint32() 1336 m.Tag = buf.DecodeString(64) 1337 return nil 1338 } 1339 1340 // Nat44IdentityMappingDump defines message 'nat44_identity_mapping_dump'. 1341 type Nat44IdentityMappingDump struct{} 1342 1343 func (m *Nat44IdentityMappingDump) Reset() { *m = Nat44IdentityMappingDump{} } 1344 func (*Nat44IdentityMappingDump) GetMessageName() string { return "nat44_identity_mapping_dump" } 1345 func (*Nat44IdentityMappingDump) GetCrcString() string { return "51077d14" } 1346 func (*Nat44IdentityMappingDump) GetMessageType() api.MessageType { 1347 return api.RequestMessage 1348 } 1349 1350 func (m *Nat44IdentityMappingDump) Size() (size int) { 1351 if m == nil { 1352 return 0 1353 } 1354 return size 1355 } 1356 func (m *Nat44IdentityMappingDump) Marshal(b []byte) ([]byte, error) { 1357 if b == nil { 1358 b = make([]byte, m.Size()) 1359 } 1360 buf := codec.NewBuffer(b) 1361 return buf.Bytes(), nil 1362 } 1363 func (m *Nat44IdentityMappingDump) Unmarshal(b []byte) error { 1364 return nil 1365 } 1366 1367 // Nat44InterfaceAddDelFeature defines message 'nat44_interface_add_del_feature'. 1368 type Nat44InterfaceAddDelFeature struct { 1369 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 1370 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 1371 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1372 } 1373 1374 func (m *Nat44InterfaceAddDelFeature) Reset() { *m = Nat44InterfaceAddDelFeature{} } 1375 func (*Nat44InterfaceAddDelFeature) GetMessageName() string { return "nat44_interface_add_del_feature" } 1376 func (*Nat44InterfaceAddDelFeature) GetCrcString() string { return "f3699b83" } 1377 func (*Nat44InterfaceAddDelFeature) GetMessageType() api.MessageType { 1378 return api.RequestMessage 1379 } 1380 1381 func (m *Nat44InterfaceAddDelFeature) Size() (size int) { 1382 if m == nil { 1383 return 0 1384 } 1385 size += 1 // m.IsAdd 1386 size += 1 // m.Flags 1387 size += 4 // m.SwIfIndex 1388 return size 1389 } 1390 func (m *Nat44InterfaceAddDelFeature) Marshal(b []byte) ([]byte, error) { 1391 if b == nil { 1392 b = make([]byte, m.Size()) 1393 } 1394 buf := codec.NewBuffer(b) 1395 buf.EncodeBool(m.IsAdd) 1396 buf.EncodeUint8(uint8(m.Flags)) 1397 buf.EncodeUint32(uint32(m.SwIfIndex)) 1398 return buf.Bytes(), nil 1399 } 1400 func (m *Nat44InterfaceAddDelFeature) Unmarshal(b []byte) error { 1401 buf := codec.NewBuffer(b) 1402 m.IsAdd = buf.DecodeBool() 1403 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 1404 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1405 return nil 1406 } 1407 1408 // Nat44InterfaceAddDelFeatureReply defines message 'nat44_interface_add_del_feature_reply'. 1409 type Nat44InterfaceAddDelFeatureReply struct { 1410 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1411 } 1412 1413 func (m *Nat44InterfaceAddDelFeatureReply) Reset() { *m = Nat44InterfaceAddDelFeatureReply{} } 1414 func (*Nat44InterfaceAddDelFeatureReply) GetMessageName() string { 1415 return "nat44_interface_add_del_feature_reply" 1416 } 1417 func (*Nat44InterfaceAddDelFeatureReply) GetCrcString() string { return "e8d4e804" } 1418 func (*Nat44InterfaceAddDelFeatureReply) GetMessageType() api.MessageType { 1419 return api.ReplyMessage 1420 } 1421 1422 func (m *Nat44InterfaceAddDelFeatureReply) Size() (size int) { 1423 if m == nil { 1424 return 0 1425 } 1426 size += 4 // m.Retval 1427 return size 1428 } 1429 func (m *Nat44InterfaceAddDelFeatureReply) Marshal(b []byte) ([]byte, error) { 1430 if b == nil { 1431 b = make([]byte, m.Size()) 1432 } 1433 buf := codec.NewBuffer(b) 1434 buf.EncodeInt32(m.Retval) 1435 return buf.Bytes(), nil 1436 } 1437 func (m *Nat44InterfaceAddDelFeatureReply) Unmarshal(b []byte) error { 1438 buf := codec.NewBuffer(b) 1439 m.Retval = buf.DecodeInt32() 1440 return nil 1441 } 1442 1443 // Nat44InterfaceAddDelOutputFeature defines message 'nat44_interface_add_del_output_feature'. 1444 type Nat44InterfaceAddDelOutputFeature struct { 1445 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 1446 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 1447 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1448 } 1449 1450 func (m *Nat44InterfaceAddDelOutputFeature) Reset() { *m = Nat44InterfaceAddDelOutputFeature{} } 1451 func (*Nat44InterfaceAddDelOutputFeature) GetMessageName() string { 1452 return "nat44_interface_add_del_output_feature" 1453 } 1454 func (*Nat44InterfaceAddDelOutputFeature) GetCrcString() string { return "f3699b83" } 1455 func (*Nat44InterfaceAddDelOutputFeature) GetMessageType() api.MessageType { 1456 return api.RequestMessage 1457 } 1458 1459 func (m *Nat44InterfaceAddDelOutputFeature) Size() (size int) { 1460 if m == nil { 1461 return 0 1462 } 1463 size += 1 // m.IsAdd 1464 size += 1 // m.Flags 1465 size += 4 // m.SwIfIndex 1466 return size 1467 } 1468 func (m *Nat44InterfaceAddDelOutputFeature) Marshal(b []byte) ([]byte, error) { 1469 if b == nil { 1470 b = make([]byte, m.Size()) 1471 } 1472 buf := codec.NewBuffer(b) 1473 buf.EncodeBool(m.IsAdd) 1474 buf.EncodeUint8(uint8(m.Flags)) 1475 buf.EncodeUint32(uint32(m.SwIfIndex)) 1476 return buf.Bytes(), nil 1477 } 1478 func (m *Nat44InterfaceAddDelOutputFeature) Unmarshal(b []byte) error { 1479 buf := codec.NewBuffer(b) 1480 m.IsAdd = buf.DecodeBool() 1481 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 1482 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1483 return nil 1484 } 1485 1486 // Nat44InterfaceAddDelOutputFeatureReply defines message 'nat44_interface_add_del_output_feature_reply'. 1487 type Nat44InterfaceAddDelOutputFeatureReply struct { 1488 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1489 } 1490 1491 func (m *Nat44InterfaceAddDelOutputFeatureReply) Reset() { 1492 *m = Nat44InterfaceAddDelOutputFeatureReply{} 1493 } 1494 func (*Nat44InterfaceAddDelOutputFeatureReply) GetMessageName() string { 1495 return "nat44_interface_add_del_output_feature_reply" 1496 } 1497 func (*Nat44InterfaceAddDelOutputFeatureReply) GetCrcString() string { return "e8d4e804" } 1498 func (*Nat44InterfaceAddDelOutputFeatureReply) GetMessageType() api.MessageType { 1499 return api.ReplyMessage 1500 } 1501 1502 func (m *Nat44InterfaceAddDelOutputFeatureReply) Size() (size int) { 1503 if m == nil { 1504 return 0 1505 } 1506 size += 4 // m.Retval 1507 return size 1508 } 1509 func (m *Nat44InterfaceAddDelOutputFeatureReply) Marshal(b []byte) ([]byte, error) { 1510 if b == nil { 1511 b = make([]byte, m.Size()) 1512 } 1513 buf := codec.NewBuffer(b) 1514 buf.EncodeInt32(m.Retval) 1515 return buf.Bytes(), nil 1516 } 1517 func (m *Nat44InterfaceAddDelOutputFeatureReply) Unmarshal(b []byte) error { 1518 buf := codec.NewBuffer(b) 1519 m.Retval = buf.DecodeInt32() 1520 return nil 1521 } 1522 1523 // Nat44InterfaceAddrDetails defines message 'nat44_interface_addr_details'. 1524 type Nat44InterfaceAddrDetails struct { 1525 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1526 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 1527 } 1528 1529 func (m *Nat44InterfaceAddrDetails) Reset() { *m = Nat44InterfaceAddrDetails{} } 1530 func (*Nat44InterfaceAddrDetails) GetMessageName() string { return "nat44_interface_addr_details" } 1531 func (*Nat44InterfaceAddrDetails) GetCrcString() string { return "e4aca9ca" } 1532 func (*Nat44InterfaceAddrDetails) GetMessageType() api.MessageType { 1533 return api.ReplyMessage 1534 } 1535 1536 func (m *Nat44InterfaceAddrDetails) Size() (size int) { 1537 if m == nil { 1538 return 0 1539 } 1540 size += 4 // m.SwIfIndex 1541 size += 1 // m.Flags 1542 return size 1543 } 1544 func (m *Nat44InterfaceAddrDetails) Marshal(b []byte) ([]byte, error) { 1545 if b == nil { 1546 b = make([]byte, m.Size()) 1547 } 1548 buf := codec.NewBuffer(b) 1549 buf.EncodeUint32(uint32(m.SwIfIndex)) 1550 buf.EncodeUint8(uint8(m.Flags)) 1551 return buf.Bytes(), nil 1552 } 1553 func (m *Nat44InterfaceAddrDetails) Unmarshal(b []byte) error { 1554 buf := codec.NewBuffer(b) 1555 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1556 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 1557 return nil 1558 } 1559 1560 // Nat44InterfaceAddrDump defines message 'nat44_interface_addr_dump'. 1561 type Nat44InterfaceAddrDump struct{} 1562 1563 func (m *Nat44InterfaceAddrDump) Reset() { *m = Nat44InterfaceAddrDump{} } 1564 func (*Nat44InterfaceAddrDump) GetMessageName() string { return "nat44_interface_addr_dump" } 1565 func (*Nat44InterfaceAddrDump) GetCrcString() string { return "51077d14" } 1566 func (*Nat44InterfaceAddrDump) GetMessageType() api.MessageType { 1567 return api.RequestMessage 1568 } 1569 1570 func (m *Nat44InterfaceAddrDump) Size() (size int) { 1571 if m == nil { 1572 return 0 1573 } 1574 return size 1575 } 1576 func (m *Nat44InterfaceAddrDump) Marshal(b []byte) ([]byte, error) { 1577 if b == nil { 1578 b = make([]byte, m.Size()) 1579 } 1580 buf := codec.NewBuffer(b) 1581 return buf.Bytes(), nil 1582 } 1583 func (m *Nat44InterfaceAddrDump) Unmarshal(b []byte) error { 1584 return nil 1585 } 1586 1587 // Nat44InterfaceDetails defines message 'nat44_interface_details'. 1588 type Nat44InterfaceDetails struct { 1589 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 1590 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1591 } 1592 1593 func (m *Nat44InterfaceDetails) Reset() { *m = Nat44InterfaceDetails{} } 1594 func (*Nat44InterfaceDetails) GetMessageName() string { return "nat44_interface_details" } 1595 func (*Nat44InterfaceDetails) GetCrcString() string { return "5d286289" } 1596 func (*Nat44InterfaceDetails) GetMessageType() api.MessageType { 1597 return api.ReplyMessage 1598 } 1599 1600 func (m *Nat44InterfaceDetails) Size() (size int) { 1601 if m == nil { 1602 return 0 1603 } 1604 size += 1 // m.Flags 1605 size += 4 // m.SwIfIndex 1606 return size 1607 } 1608 func (m *Nat44InterfaceDetails) Marshal(b []byte) ([]byte, error) { 1609 if b == nil { 1610 b = make([]byte, m.Size()) 1611 } 1612 buf := codec.NewBuffer(b) 1613 buf.EncodeUint8(uint8(m.Flags)) 1614 buf.EncodeUint32(uint32(m.SwIfIndex)) 1615 return buf.Bytes(), nil 1616 } 1617 func (m *Nat44InterfaceDetails) Unmarshal(b []byte) error { 1618 buf := codec.NewBuffer(b) 1619 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 1620 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1621 return nil 1622 } 1623 1624 // Nat44InterfaceDump defines message 'nat44_interface_dump'. 1625 type Nat44InterfaceDump struct{} 1626 1627 func (m *Nat44InterfaceDump) Reset() { *m = Nat44InterfaceDump{} } 1628 func (*Nat44InterfaceDump) GetMessageName() string { return "nat44_interface_dump" } 1629 func (*Nat44InterfaceDump) GetCrcString() string { return "51077d14" } 1630 func (*Nat44InterfaceDump) GetMessageType() api.MessageType { 1631 return api.RequestMessage 1632 } 1633 1634 func (m *Nat44InterfaceDump) Size() (size int) { 1635 if m == nil { 1636 return 0 1637 } 1638 return size 1639 } 1640 func (m *Nat44InterfaceDump) Marshal(b []byte) ([]byte, error) { 1641 if b == nil { 1642 b = make([]byte, m.Size()) 1643 } 1644 buf := codec.NewBuffer(b) 1645 return buf.Bytes(), nil 1646 } 1647 func (m *Nat44InterfaceDump) Unmarshal(b []byte) error { 1648 return nil 1649 } 1650 1651 // Nat44InterfaceOutputFeatureDetails defines message 'nat44_interface_output_feature_details'. 1652 type Nat44InterfaceOutputFeatureDetails struct { 1653 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 1654 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1655 } 1656 1657 func (m *Nat44InterfaceOutputFeatureDetails) Reset() { *m = Nat44InterfaceOutputFeatureDetails{} } 1658 func (*Nat44InterfaceOutputFeatureDetails) GetMessageName() string { 1659 return "nat44_interface_output_feature_details" 1660 } 1661 func (*Nat44InterfaceOutputFeatureDetails) GetCrcString() string { return "5d286289" } 1662 func (*Nat44InterfaceOutputFeatureDetails) GetMessageType() api.MessageType { 1663 return api.ReplyMessage 1664 } 1665 1666 func (m *Nat44InterfaceOutputFeatureDetails) Size() (size int) { 1667 if m == nil { 1668 return 0 1669 } 1670 size += 1 // m.Flags 1671 size += 4 // m.SwIfIndex 1672 return size 1673 } 1674 func (m *Nat44InterfaceOutputFeatureDetails) Marshal(b []byte) ([]byte, error) { 1675 if b == nil { 1676 b = make([]byte, m.Size()) 1677 } 1678 buf := codec.NewBuffer(b) 1679 buf.EncodeUint8(uint8(m.Flags)) 1680 buf.EncodeUint32(uint32(m.SwIfIndex)) 1681 return buf.Bytes(), nil 1682 } 1683 func (m *Nat44InterfaceOutputFeatureDetails) Unmarshal(b []byte) error { 1684 buf := codec.NewBuffer(b) 1685 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 1686 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1687 return nil 1688 } 1689 1690 // Nat44InterfaceOutputFeatureDump defines message 'nat44_interface_output_feature_dump'. 1691 type Nat44InterfaceOutputFeatureDump struct{} 1692 1693 func (m *Nat44InterfaceOutputFeatureDump) Reset() { *m = Nat44InterfaceOutputFeatureDump{} } 1694 func (*Nat44InterfaceOutputFeatureDump) GetMessageName() string { 1695 return "nat44_interface_output_feature_dump" 1696 } 1697 func (*Nat44InterfaceOutputFeatureDump) GetCrcString() string { return "51077d14" } 1698 func (*Nat44InterfaceOutputFeatureDump) GetMessageType() api.MessageType { 1699 return api.RequestMessage 1700 } 1701 1702 func (m *Nat44InterfaceOutputFeatureDump) Size() (size int) { 1703 if m == nil { 1704 return 0 1705 } 1706 return size 1707 } 1708 func (m *Nat44InterfaceOutputFeatureDump) Marshal(b []byte) ([]byte, error) { 1709 if b == nil { 1710 b = make([]byte, m.Size()) 1711 } 1712 buf := codec.NewBuffer(b) 1713 return buf.Bytes(), nil 1714 } 1715 func (m *Nat44InterfaceOutputFeatureDump) Unmarshal(b []byte) error { 1716 return nil 1717 } 1718 1719 // Nat44LbStaticMappingAddDelLocal defines message 'nat44_lb_static_mapping_add_del_local'. 1720 type Nat44LbStaticMappingAddDelLocal struct { 1721 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 1722 ExternalAddr ip_types.IP4Address `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"` 1723 ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"` 1724 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` 1725 Local Nat44LbAddrPort `binapi:"nat44_lb_addr_port,name=local" json:"local,omitempty"` 1726 } 1727 1728 func (m *Nat44LbStaticMappingAddDelLocal) Reset() { *m = Nat44LbStaticMappingAddDelLocal{} } 1729 func (*Nat44LbStaticMappingAddDelLocal) GetMessageName() string { 1730 return "nat44_lb_static_mapping_add_del_local" 1731 } 1732 func (*Nat44LbStaticMappingAddDelLocal) GetCrcString() string { return "7ca47547" } 1733 func (*Nat44LbStaticMappingAddDelLocal) GetMessageType() api.MessageType { 1734 return api.RequestMessage 1735 } 1736 1737 func (m *Nat44LbStaticMappingAddDelLocal) Size() (size int) { 1738 if m == nil { 1739 return 0 1740 } 1741 size += 1 // m.IsAdd 1742 size += 1 * 4 // m.ExternalAddr 1743 size += 2 // m.ExternalPort 1744 size += 1 // m.Protocol 1745 size += 1 * 4 // m.Local.Addr 1746 size += 2 // m.Local.Port 1747 size += 1 // m.Local.Probability 1748 size += 4 // m.Local.VrfID 1749 return size 1750 } 1751 func (m *Nat44LbStaticMappingAddDelLocal) Marshal(b []byte) ([]byte, error) { 1752 if b == nil { 1753 b = make([]byte, m.Size()) 1754 } 1755 buf := codec.NewBuffer(b) 1756 buf.EncodeBool(m.IsAdd) 1757 buf.EncodeBytes(m.ExternalAddr[:], 4) 1758 buf.EncodeUint16(m.ExternalPort) 1759 buf.EncodeUint8(m.Protocol) 1760 buf.EncodeBytes(m.Local.Addr[:], 4) 1761 buf.EncodeUint16(m.Local.Port) 1762 buf.EncodeUint8(m.Local.Probability) 1763 buf.EncodeUint32(m.Local.VrfID) 1764 return buf.Bytes(), nil 1765 } 1766 func (m *Nat44LbStaticMappingAddDelLocal) Unmarshal(b []byte) error { 1767 buf := codec.NewBuffer(b) 1768 m.IsAdd = buf.DecodeBool() 1769 copy(m.ExternalAddr[:], buf.DecodeBytes(4)) 1770 m.ExternalPort = buf.DecodeUint16() 1771 m.Protocol = buf.DecodeUint8() 1772 copy(m.Local.Addr[:], buf.DecodeBytes(4)) 1773 m.Local.Port = buf.DecodeUint16() 1774 m.Local.Probability = buf.DecodeUint8() 1775 m.Local.VrfID = buf.DecodeUint32() 1776 return nil 1777 } 1778 1779 // Nat44LbStaticMappingAddDelLocalReply defines message 'nat44_lb_static_mapping_add_del_local_reply'. 1780 type Nat44LbStaticMappingAddDelLocalReply struct { 1781 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1782 } 1783 1784 func (m *Nat44LbStaticMappingAddDelLocalReply) Reset() { *m = Nat44LbStaticMappingAddDelLocalReply{} } 1785 func (*Nat44LbStaticMappingAddDelLocalReply) GetMessageName() string { 1786 return "nat44_lb_static_mapping_add_del_local_reply" 1787 } 1788 func (*Nat44LbStaticMappingAddDelLocalReply) GetCrcString() string { return "e8d4e804" } 1789 func (*Nat44LbStaticMappingAddDelLocalReply) GetMessageType() api.MessageType { 1790 return api.ReplyMessage 1791 } 1792 1793 func (m *Nat44LbStaticMappingAddDelLocalReply) Size() (size int) { 1794 if m == nil { 1795 return 0 1796 } 1797 size += 4 // m.Retval 1798 return size 1799 } 1800 func (m *Nat44LbStaticMappingAddDelLocalReply) Marshal(b []byte) ([]byte, error) { 1801 if b == nil { 1802 b = make([]byte, m.Size()) 1803 } 1804 buf := codec.NewBuffer(b) 1805 buf.EncodeInt32(m.Retval) 1806 return buf.Bytes(), nil 1807 } 1808 func (m *Nat44LbStaticMappingAddDelLocalReply) Unmarshal(b []byte) error { 1809 buf := codec.NewBuffer(b) 1810 m.Retval = buf.DecodeInt32() 1811 return nil 1812 } 1813 1814 // Nat44LbStaticMappingDetails defines message 'nat44_lb_static_mapping_details'. 1815 type Nat44LbStaticMappingDetails struct { 1816 ExternalAddr ip_types.IP4Address `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"` 1817 ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"` 1818 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` 1819 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 1820 Affinity uint32 `binapi:"u32,name=affinity" json:"affinity,omitempty"` 1821 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 1822 LocalNum uint32 `binapi:"u32,name=local_num" json:"-"` 1823 Locals []Nat44LbAddrPort `binapi:"nat44_lb_addr_port[local_num],name=locals" json:"locals,omitempty"` 1824 } 1825 1826 func (m *Nat44LbStaticMappingDetails) Reset() { *m = Nat44LbStaticMappingDetails{} } 1827 func (*Nat44LbStaticMappingDetails) GetMessageName() string { return "nat44_lb_static_mapping_details" } 1828 func (*Nat44LbStaticMappingDetails) GetCrcString() string { return "ed5ce876" } 1829 func (*Nat44LbStaticMappingDetails) GetMessageType() api.MessageType { 1830 return api.ReplyMessage 1831 } 1832 1833 func (m *Nat44LbStaticMappingDetails) Size() (size int) { 1834 if m == nil { 1835 return 0 1836 } 1837 size += 1 * 4 // m.ExternalAddr 1838 size += 2 // m.ExternalPort 1839 size += 1 // m.Protocol 1840 size += 1 // m.Flags 1841 size += 4 // m.Affinity 1842 size += 64 // m.Tag 1843 size += 4 // m.LocalNum 1844 for j1 := 0; j1 < len(m.Locals); j1++ { 1845 var s1 Nat44LbAddrPort 1846 _ = s1 1847 if j1 < len(m.Locals) { 1848 s1 = m.Locals[j1] 1849 } 1850 size += 1 * 4 // s1.Addr 1851 size += 2 // s1.Port 1852 size += 1 // s1.Probability 1853 size += 4 // s1.VrfID 1854 } 1855 return size 1856 } 1857 func (m *Nat44LbStaticMappingDetails) Marshal(b []byte) ([]byte, error) { 1858 if b == nil { 1859 b = make([]byte, m.Size()) 1860 } 1861 buf := codec.NewBuffer(b) 1862 buf.EncodeBytes(m.ExternalAddr[:], 4) 1863 buf.EncodeUint16(m.ExternalPort) 1864 buf.EncodeUint8(m.Protocol) 1865 buf.EncodeUint8(uint8(m.Flags)) 1866 buf.EncodeUint32(m.Affinity) 1867 buf.EncodeString(m.Tag, 64) 1868 buf.EncodeUint32(uint32(len(m.Locals))) 1869 for j0 := 0; j0 < len(m.Locals); j0++ { 1870 var v0 Nat44LbAddrPort // Locals 1871 if j0 < len(m.Locals) { 1872 v0 = m.Locals[j0] 1873 } 1874 buf.EncodeBytes(v0.Addr[:], 4) 1875 buf.EncodeUint16(v0.Port) 1876 buf.EncodeUint8(v0.Probability) 1877 buf.EncodeUint32(v0.VrfID) 1878 } 1879 return buf.Bytes(), nil 1880 } 1881 func (m *Nat44LbStaticMappingDetails) Unmarshal(b []byte) error { 1882 buf := codec.NewBuffer(b) 1883 copy(m.ExternalAddr[:], buf.DecodeBytes(4)) 1884 m.ExternalPort = buf.DecodeUint16() 1885 m.Protocol = buf.DecodeUint8() 1886 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 1887 m.Affinity = buf.DecodeUint32() 1888 m.Tag = buf.DecodeString(64) 1889 m.LocalNum = buf.DecodeUint32() 1890 m.Locals = make([]Nat44LbAddrPort, m.LocalNum) 1891 for j0 := 0; j0 < len(m.Locals); j0++ { 1892 copy(m.Locals[j0].Addr[:], buf.DecodeBytes(4)) 1893 m.Locals[j0].Port = buf.DecodeUint16() 1894 m.Locals[j0].Probability = buf.DecodeUint8() 1895 m.Locals[j0].VrfID = buf.DecodeUint32() 1896 } 1897 return nil 1898 } 1899 1900 // Nat44LbStaticMappingDump defines message 'nat44_lb_static_mapping_dump'. 1901 type Nat44LbStaticMappingDump struct{} 1902 1903 func (m *Nat44LbStaticMappingDump) Reset() { *m = Nat44LbStaticMappingDump{} } 1904 func (*Nat44LbStaticMappingDump) GetMessageName() string { return "nat44_lb_static_mapping_dump" } 1905 func (*Nat44LbStaticMappingDump) GetCrcString() string { return "51077d14" } 1906 func (*Nat44LbStaticMappingDump) GetMessageType() api.MessageType { 1907 return api.RequestMessage 1908 } 1909 1910 func (m *Nat44LbStaticMappingDump) Size() (size int) { 1911 if m == nil { 1912 return 0 1913 } 1914 return size 1915 } 1916 func (m *Nat44LbStaticMappingDump) Marshal(b []byte) ([]byte, error) { 1917 if b == nil { 1918 b = make([]byte, m.Size()) 1919 } 1920 buf := codec.NewBuffer(b) 1921 return buf.Bytes(), nil 1922 } 1923 func (m *Nat44LbStaticMappingDump) Unmarshal(b []byte) error { 1924 return nil 1925 } 1926 1927 // Nat44PluginEnableDisable defines message 'nat44_plugin_enable_disable'. 1928 // Deprecated: the message will be removed in the future versions 1929 type Nat44PluginEnableDisable struct { 1930 InsideVrf uint32 `binapi:"u32,name=inside_vrf" json:"inside_vrf,omitempty"` 1931 OutsideVrf uint32 `binapi:"u32,name=outside_vrf" json:"outside_vrf,omitempty"` 1932 Users uint32 `binapi:"u32,name=users" json:"users,omitempty"` 1933 UserMemory uint32 `binapi:"u32,name=user_memory" json:"user_memory,omitempty"` 1934 Sessions uint32 `binapi:"u32,name=sessions" json:"sessions,omitempty"` 1935 SessionMemory uint32 `binapi:"u32,name=session_memory" json:"session_memory,omitempty"` 1936 UserSessions uint32 `binapi:"u32,name=user_sessions" json:"user_sessions,omitempty"` 1937 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 1938 Flags Nat44ConfigFlags `binapi:"nat44_config_flags,name=flags" json:"flags,omitempty"` 1939 } 1940 1941 func (m *Nat44PluginEnableDisable) Reset() { *m = Nat44PluginEnableDisable{} } 1942 func (*Nat44PluginEnableDisable) GetMessageName() string { return "nat44_plugin_enable_disable" } 1943 func (*Nat44PluginEnableDisable) GetCrcString() string { return "dea0d501" } 1944 func (*Nat44PluginEnableDisable) GetMessageType() api.MessageType { 1945 return api.RequestMessage 1946 } 1947 1948 func (m *Nat44PluginEnableDisable) Size() (size int) { 1949 if m == nil { 1950 return 0 1951 } 1952 size += 4 // m.InsideVrf 1953 size += 4 // m.OutsideVrf 1954 size += 4 // m.Users 1955 size += 4 // m.UserMemory 1956 size += 4 // m.Sessions 1957 size += 4 // m.SessionMemory 1958 size += 4 // m.UserSessions 1959 size += 1 // m.Enable 1960 size += 1 // m.Flags 1961 return size 1962 } 1963 func (m *Nat44PluginEnableDisable) Marshal(b []byte) ([]byte, error) { 1964 if b == nil { 1965 b = make([]byte, m.Size()) 1966 } 1967 buf := codec.NewBuffer(b) 1968 buf.EncodeUint32(m.InsideVrf) 1969 buf.EncodeUint32(m.OutsideVrf) 1970 buf.EncodeUint32(m.Users) 1971 buf.EncodeUint32(m.UserMemory) 1972 buf.EncodeUint32(m.Sessions) 1973 buf.EncodeUint32(m.SessionMemory) 1974 buf.EncodeUint32(m.UserSessions) 1975 buf.EncodeBool(m.Enable) 1976 buf.EncodeUint8(uint8(m.Flags)) 1977 return buf.Bytes(), nil 1978 } 1979 func (m *Nat44PluginEnableDisable) Unmarshal(b []byte) error { 1980 buf := codec.NewBuffer(b) 1981 m.InsideVrf = buf.DecodeUint32() 1982 m.OutsideVrf = buf.DecodeUint32() 1983 m.Users = buf.DecodeUint32() 1984 m.UserMemory = buf.DecodeUint32() 1985 m.Sessions = buf.DecodeUint32() 1986 m.SessionMemory = buf.DecodeUint32() 1987 m.UserSessions = buf.DecodeUint32() 1988 m.Enable = buf.DecodeBool() 1989 m.Flags = Nat44ConfigFlags(buf.DecodeUint8()) 1990 return nil 1991 } 1992 1993 // Nat44PluginEnableDisableReply defines message 'nat44_plugin_enable_disable_reply'. 1994 // Deprecated: the message will be removed in the future versions 1995 type Nat44PluginEnableDisableReply struct { 1996 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1997 } 1998 1999 func (m *Nat44PluginEnableDisableReply) Reset() { *m = Nat44PluginEnableDisableReply{} } 2000 func (*Nat44PluginEnableDisableReply) GetMessageName() string { 2001 return "nat44_plugin_enable_disable_reply" 2002 } 2003 func (*Nat44PluginEnableDisableReply) GetCrcString() string { return "e8d4e804" } 2004 func (*Nat44PluginEnableDisableReply) GetMessageType() api.MessageType { 2005 return api.ReplyMessage 2006 } 2007 2008 func (m *Nat44PluginEnableDisableReply) Size() (size int) { 2009 if m == nil { 2010 return 0 2011 } 2012 size += 4 // m.Retval 2013 return size 2014 } 2015 func (m *Nat44PluginEnableDisableReply) Marshal(b []byte) ([]byte, error) { 2016 if b == nil { 2017 b = make([]byte, m.Size()) 2018 } 2019 buf := codec.NewBuffer(b) 2020 buf.EncodeInt32(m.Retval) 2021 return buf.Bytes(), nil 2022 } 2023 func (m *Nat44PluginEnableDisableReply) Unmarshal(b []byte) error { 2024 buf := codec.NewBuffer(b) 2025 m.Retval = buf.DecodeInt32() 2026 return nil 2027 } 2028 2029 // Nat44SessionCleanup defines message 'nat44_session_cleanup'. 2030 // Deprecated: the message will be removed in the future versions 2031 type Nat44SessionCleanup struct{} 2032 2033 func (m *Nat44SessionCleanup) Reset() { *m = Nat44SessionCleanup{} } 2034 func (*Nat44SessionCleanup) GetMessageName() string { return "nat44_session_cleanup" } 2035 func (*Nat44SessionCleanup) GetCrcString() string { return "51077d14" } 2036 func (*Nat44SessionCleanup) GetMessageType() api.MessageType { 2037 return api.RequestMessage 2038 } 2039 2040 func (m *Nat44SessionCleanup) Size() (size int) { 2041 if m == nil { 2042 return 0 2043 } 2044 return size 2045 } 2046 func (m *Nat44SessionCleanup) Marshal(b []byte) ([]byte, error) { 2047 if b == nil { 2048 b = make([]byte, m.Size()) 2049 } 2050 buf := codec.NewBuffer(b) 2051 return buf.Bytes(), nil 2052 } 2053 func (m *Nat44SessionCleanup) Unmarshal(b []byte) error { 2054 return nil 2055 } 2056 2057 // Nat44SessionCleanupReply defines message 'nat44_session_cleanup_reply'. 2058 // Deprecated: the message will be removed in the future versions 2059 type Nat44SessionCleanupReply struct { 2060 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2061 } 2062 2063 func (m *Nat44SessionCleanupReply) Reset() { *m = Nat44SessionCleanupReply{} } 2064 func (*Nat44SessionCleanupReply) GetMessageName() string { return "nat44_session_cleanup_reply" } 2065 func (*Nat44SessionCleanupReply) GetCrcString() string { return "e8d4e804" } 2066 func (*Nat44SessionCleanupReply) GetMessageType() api.MessageType { 2067 return api.ReplyMessage 2068 } 2069 2070 func (m *Nat44SessionCleanupReply) Size() (size int) { 2071 if m == nil { 2072 return 0 2073 } 2074 size += 4 // m.Retval 2075 return size 2076 } 2077 func (m *Nat44SessionCleanupReply) Marshal(b []byte) ([]byte, error) { 2078 if b == nil { 2079 b = make([]byte, m.Size()) 2080 } 2081 buf := codec.NewBuffer(b) 2082 buf.EncodeInt32(m.Retval) 2083 return buf.Bytes(), nil 2084 } 2085 func (m *Nat44SessionCleanupReply) Unmarshal(b []byte) error { 2086 buf := codec.NewBuffer(b) 2087 m.Retval = buf.DecodeInt32() 2088 return nil 2089 } 2090 2091 // Nat44SetSessionLimit defines message 'nat44_set_session_limit'. 2092 type Nat44SetSessionLimit struct { 2093 SessionLimit uint32 `binapi:"u32,name=session_limit" json:"session_limit,omitempty"` 2094 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 2095 } 2096 2097 func (m *Nat44SetSessionLimit) Reset() { *m = Nat44SetSessionLimit{} } 2098 func (*Nat44SetSessionLimit) GetMessageName() string { return "nat44_set_session_limit" } 2099 func (*Nat44SetSessionLimit) GetCrcString() string { return "8899bbb1" } 2100 func (*Nat44SetSessionLimit) GetMessageType() api.MessageType { 2101 return api.RequestMessage 2102 } 2103 2104 func (m *Nat44SetSessionLimit) Size() (size int) { 2105 if m == nil { 2106 return 0 2107 } 2108 size += 4 // m.SessionLimit 2109 size += 4 // m.VrfID 2110 return size 2111 } 2112 func (m *Nat44SetSessionLimit) Marshal(b []byte) ([]byte, error) { 2113 if b == nil { 2114 b = make([]byte, m.Size()) 2115 } 2116 buf := codec.NewBuffer(b) 2117 buf.EncodeUint32(m.SessionLimit) 2118 buf.EncodeUint32(m.VrfID) 2119 return buf.Bytes(), nil 2120 } 2121 func (m *Nat44SetSessionLimit) Unmarshal(b []byte) error { 2122 buf := codec.NewBuffer(b) 2123 m.SessionLimit = buf.DecodeUint32() 2124 m.VrfID = buf.DecodeUint32() 2125 return nil 2126 } 2127 2128 // Nat44SetSessionLimitReply defines message 'nat44_set_session_limit_reply'. 2129 type Nat44SetSessionLimitReply struct { 2130 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2131 } 2132 2133 func (m *Nat44SetSessionLimitReply) Reset() { *m = Nat44SetSessionLimitReply{} } 2134 func (*Nat44SetSessionLimitReply) GetMessageName() string { return "nat44_set_session_limit_reply" } 2135 func (*Nat44SetSessionLimitReply) GetCrcString() string { return "e8d4e804" } 2136 func (*Nat44SetSessionLimitReply) GetMessageType() api.MessageType { 2137 return api.ReplyMessage 2138 } 2139 2140 func (m *Nat44SetSessionLimitReply) Size() (size int) { 2141 if m == nil { 2142 return 0 2143 } 2144 size += 4 // m.Retval 2145 return size 2146 } 2147 func (m *Nat44SetSessionLimitReply) Marshal(b []byte) ([]byte, error) { 2148 if b == nil { 2149 b = make([]byte, m.Size()) 2150 } 2151 buf := codec.NewBuffer(b) 2152 buf.EncodeInt32(m.Retval) 2153 return buf.Bytes(), nil 2154 } 2155 func (m *Nat44SetSessionLimitReply) Unmarshal(b []byte) error { 2156 buf := codec.NewBuffer(b) 2157 m.Retval = buf.DecodeInt32() 2158 return nil 2159 } 2160 2161 // Nat44ShowRunningConfig defines message 'nat44_show_running_config'. 2162 // InProgress: the message form may change in the future versions 2163 type Nat44ShowRunningConfig struct{} 2164 2165 func (m *Nat44ShowRunningConfig) Reset() { *m = Nat44ShowRunningConfig{} } 2166 func (*Nat44ShowRunningConfig) GetMessageName() string { return "nat44_show_running_config" } 2167 func (*Nat44ShowRunningConfig) GetCrcString() string { return "51077d14" } 2168 func (*Nat44ShowRunningConfig) GetMessageType() api.MessageType { 2169 return api.RequestMessage 2170 } 2171 2172 func (m *Nat44ShowRunningConfig) Size() (size int) { 2173 if m == nil { 2174 return 0 2175 } 2176 return size 2177 } 2178 func (m *Nat44ShowRunningConfig) Marshal(b []byte) ([]byte, error) { 2179 if b == nil { 2180 b = make([]byte, m.Size()) 2181 } 2182 buf := codec.NewBuffer(b) 2183 return buf.Bytes(), nil 2184 } 2185 func (m *Nat44ShowRunningConfig) Unmarshal(b []byte) error { 2186 return nil 2187 } 2188 2189 // Nat44ShowRunningConfigReply defines message 'nat44_show_running_config_reply'. 2190 // InProgress: the message form may change in the future versions 2191 type Nat44ShowRunningConfigReply struct { 2192 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2193 InsideVrf uint32 `binapi:"u32,name=inside_vrf" json:"inside_vrf,omitempty"` 2194 OutsideVrf uint32 `binapi:"u32,name=outside_vrf" json:"outside_vrf,omitempty"` 2195 Users uint32 `binapi:"u32,name=users" json:"users,omitempty"` 2196 Sessions uint32 `binapi:"u32,name=sessions" json:"sessions,omitempty"` 2197 UserSessions uint32 `binapi:"u32,name=user_sessions" json:"user_sessions,omitempty"` 2198 UserBuckets uint32 `binapi:"u32,name=user_buckets" json:"user_buckets,omitempty"` 2199 TranslationBuckets uint32 `binapi:"u32,name=translation_buckets" json:"translation_buckets,omitempty"` 2200 ForwardingEnabled bool `binapi:"bool,name=forwarding_enabled" json:"forwarding_enabled,omitempty"` 2201 IpfixLoggingEnabled bool `binapi:"bool,name=ipfix_logging_enabled" json:"ipfix_logging_enabled,omitempty"` 2202 Timeouts nat_types.NatTimeouts `binapi:"nat_timeouts,name=timeouts" json:"timeouts,omitempty"` 2203 LogLevel nat_types.NatLogLevel `binapi:"nat_log_level,name=log_level" json:"log_level,omitempty"` 2204 Flags Nat44ConfigFlags `binapi:"nat44_config_flags,name=flags" json:"flags,omitempty"` 2205 } 2206 2207 func (m *Nat44ShowRunningConfigReply) Reset() { *m = Nat44ShowRunningConfigReply{} } 2208 func (*Nat44ShowRunningConfigReply) GetMessageName() string { return "nat44_show_running_config_reply" } 2209 func (*Nat44ShowRunningConfigReply) GetCrcString() string { return "93d8e267" } 2210 func (*Nat44ShowRunningConfigReply) GetMessageType() api.MessageType { 2211 return api.ReplyMessage 2212 } 2213 2214 func (m *Nat44ShowRunningConfigReply) Size() (size int) { 2215 if m == nil { 2216 return 0 2217 } 2218 size += 4 // m.Retval 2219 size += 4 // m.InsideVrf 2220 size += 4 // m.OutsideVrf 2221 size += 4 // m.Users 2222 size += 4 // m.Sessions 2223 size += 4 // m.UserSessions 2224 size += 4 // m.UserBuckets 2225 size += 4 // m.TranslationBuckets 2226 size += 1 // m.ForwardingEnabled 2227 size += 1 // m.IpfixLoggingEnabled 2228 size += 4 // m.Timeouts.UDP 2229 size += 4 // m.Timeouts.TCPEstablished 2230 size += 4 // m.Timeouts.TCPTransitory 2231 size += 4 // m.Timeouts.ICMP 2232 size += 1 // m.LogLevel 2233 size += 1 // m.Flags 2234 return size 2235 } 2236 func (m *Nat44ShowRunningConfigReply) Marshal(b []byte) ([]byte, error) { 2237 if b == nil { 2238 b = make([]byte, m.Size()) 2239 } 2240 buf := codec.NewBuffer(b) 2241 buf.EncodeInt32(m.Retval) 2242 buf.EncodeUint32(m.InsideVrf) 2243 buf.EncodeUint32(m.OutsideVrf) 2244 buf.EncodeUint32(m.Users) 2245 buf.EncodeUint32(m.Sessions) 2246 buf.EncodeUint32(m.UserSessions) 2247 buf.EncodeUint32(m.UserBuckets) 2248 buf.EncodeUint32(m.TranslationBuckets) 2249 buf.EncodeBool(m.ForwardingEnabled) 2250 buf.EncodeBool(m.IpfixLoggingEnabled) 2251 buf.EncodeUint32(m.Timeouts.UDP) 2252 buf.EncodeUint32(m.Timeouts.TCPEstablished) 2253 buf.EncodeUint32(m.Timeouts.TCPTransitory) 2254 buf.EncodeUint32(m.Timeouts.ICMP) 2255 buf.EncodeUint8(uint8(m.LogLevel)) 2256 buf.EncodeUint8(uint8(m.Flags)) 2257 return buf.Bytes(), nil 2258 } 2259 func (m *Nat44ShowRunningConfigReply) Unmarshal(b []byte) error { 2260 buf := codec.NewBuffer(b) 2261 m.Retval = buf.DecodeInt32() 2262 m.InsideVrf = buf.DecodeUint32() 2263 m.OutsideVrf = buf.DecodeUint32() 2264 m.Users = buf.DecodeUint32() 2265 m.Sessions = buf.DecodeUint32() 2266 m.UserSessions = buf.DecodeUint32() 2267 m.UserBuckets = buf.DecodeUint32() 2268 m.TranslationBuckets = buf.DecodeUint32() 2269 m.ForwardingEnabled = buf.DecodeBool() 2270 m.IpfixLoggingEnabled = buf.DecodeBool() 2271 m.Timeouts.UDP = buf.DecodeUint32() 2272 m.Timeouts.TCPEstablished = buf.DecodeUint32() 2273 m.Timeouts.TCPTransitory = buf.DecodeUint32() 2274 m.Timeouts.ICMP = buf.DecodeUint32() 2275 m.LogLevel = nat_types.NatLogLevel(buf.DecodeUint8()) 2276 m.Flags = Nat44ConfigFlags(buf.DecodeUint8()) 2277 return nil 2278 } 2279 2280 // Nat44StaticMappingDetails defines message 'nat44_static_mapping_details'. 2281 type Nat44StaticMappingDetails struct { 2282 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 2283 LocalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=local_ip_address" json:"local_ip_address,omitempty"` 2284 ExternalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=external_ip_address" json:"external_ip_address,omitempty"` 2285 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` 2286 LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"` 2287 ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"` 2288 ExternalSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=external_sw_if_index" json:"external_sw_if_index,omitempty"` 2289 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 2290 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 2291 } 2292 2293 func (m *Nat44StaticMappingDetails) Reset() { *m = Nat44StaticMappingDetails{} } 2294 func (*Nat44StaticMappingDetails) GetMessageName() string { return "nat44_static_mapping_details" } 2295 func (*Nat44StaticMappingDetails) GetCrcString() string { return "06cb40b2" } 2296 func (*Nat44StaticMappingDetails) GetMessageType() api.MessageType { 2297 return api.ReplyMessage 2298 } 2299 2300 func (m *Nat44StaticMappingDetails) Size() (size int) { 2301 if m == nil { 2302 return 0 2303 } 2304 size += 1 // m.Flags 2305 size += 1 * 4 // m.LocalIPAddress 2306 size += 1 * 4 // m.ExternalIPAddress 2307 size += 1 // m.Protocol 2308 size += 2 // m.LocalPort 2309 size += 2 // m.ExternalPort 2310 size += 4 // m.ExternalSwIfIndex 2311 size += 4 // m.VrfID 2312 size += 64 // m.Tag 2313 return size 2314 } 2315 func (m *Nat44StaticMappingDetails) Marshal(b []byte) ([]byte, error) { 2316 if b == nil { 2317 b = make([]byte, m.Size()) 2318 } 2319 buf := codec.NewBuffer(b) 2320 buf.EncodeUint8(uint8(m.Flags)) 2321 buf.EncodeBytes(m.LocalIPAddress[:], 4) 2322 buf.EncodeBytes(m.ExternalIPAddress[:], 4) 2323 buf.EncodeUint8(m.Protocol) 2324 buf.EncodeUint16(m.LocalPort) 2325 buf.EncodeUint16(m.ExternalPort) 2326 buf.EncodeUint32(uint32(m.ExternalSwIfIndex)) 2327 buf.EncodeUint32(m.VrfID) 2328 buf.EncodeString(m.Tag, 64) 2329 return buf.Bytes(), nil 2330 } 2331 func (m *Nat44StaticMappingDetails) Unmarshal(b []byte) error { 2332 buf := codec.NewBuffer(b) 2333 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 2334 copy(m.LocalIPAddress[:], buf.DecodeBytes(4)) 2335 copy(m.ExternalIPAddress[:], buf.DecodeBytes(4)) 2336 m.Protocol = buf.DecodeUint8() 2337 m.LocalPort = buf.DecodeUint16() 2338 m.ExternalPort = buf.DecodeUint16() 2339 m.ExternalSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2340 m.VrfID = buf.DecodeUint32() 2341 m.Tag = buf.DecodeString(64) 2342 return nil 2343 } 2344 2345 // Nat44StaticMappingDump defines message 'nat44_static_mapping_dump'. 2346 type Nat44StaticMappingDump struct{} 2347 2348 func (m *Nat44StaticMappingDump) Reset() { *m = Nat44StaticMappingDump{} } 2349 func (*Nat44StaticMappingDump) GetMessageName() string { return "nat44_static_mapping_dump" } 2350 func (*Nat44StaticMappingDump) GetCrcString() string { return "51077d14" } 2351 func (*Nat44StaticMappingDump) GetMessageType() api.MessageType { 2352 return api.RequestMessage 2353 } 2354 2355 func (m *Nat44StaticMappingDump) Size() (size int) { 2356 if m == nil { 2357 return 0 2358 } 2359 return size 2360 } 2361 func (m *Nat44StaticMappingDump) Marshal(b []byte) ([]byte, error) { 2362 if b == nil { 2363 b = make([]byte, m.Size()) 2364 } 2365 buf := codec.NewBuffer(b) 2366 return buf.Bytes(), nil 2367 } 2368 func (m *Nat44StaticMappingDump) Unmarshal(b []byte) error { 2369 return nil 2370 } 2371 2372 // Nat44UserDetails defines message 'nat44_user_details'. 2373 type Nat44UserDetails struct { 2374 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 2375 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 2376 Nsessions uint32 `binapi:"u32,name=nsessions" json:"nsessions,omitempty"` 2377 Nstaticsessions uint32 `binapi:"u32,name=nstaticsessions" json:"nstaticsessions,omitempty"` 2378 } 2379 2380 func (m *Nat44UserDetails) Reset() { *m = Nat44UserDetails{} } 2381 func (*Nat44UserDetails) GetMessageName() string { return "nat44_user_details" } 2382 func (*Nat44UserDetails) GetCrcString() string { return "355896c2" } 2383 func (*Nat44UserDetails) GetMessageType() api.MessageType { 2384 return api.ReplyMessage 2385 } 2386 2387 func (m *Nat44UserDetails) Size() (size int) { 2388 if m == nil { 2389 return 0 2390 } 2391 size += 4 // m.VrfID 2392 size += 1 * 4 // m.IPAddress 2393 size += 4 // m.Nsessions 2394 size += 4 // m.Nstaticsessions 2395 return size 2396 } 2397 func (m *Nat44UserDetails) Marshal(b []byte) ([]byte, error) { 2398 if b == nil { 2399 b = make([]byte, m.Size()) 2400 } 2401 buf := codec.NewBuffer(b) 2402 buf.EncodeUint32(m.VrfID) 2403 buf.EncodeBytes(m.IPAddress[:], 4) 2404 buf.EncodeUint32(m.Nsessions) 2405 buf.EncodeUint32(m.Nstaticsessions) 2406 return buf.Bytes(), nil 2407 } 2408 func (m *Nat44UserDetails) Unmarshal(b []byte) error { 2409 buf := codec.NewBuffer(b) 2410 m.VrfID = buf.DecodeUint32() 2411 copy(m.IPAddress[:], buf.DecodeBytes(4)) 2412 m.Nsessions = buf.DecodeUint32() 2413 m.Nstaticsessions = buf.DecodeUint32() 2414 return nil 2415 } 2416 2417 // Nat44UserDump defines message 'nat44_user_dump'. 2418 type Nat44UserDump struct{} 2419 2420 func (m *Nat44UserDump) Reset() { *m = Nat44UserDump{} } 2421 func (*Nat44UserDump) GetMessageName() string { return "nat44_user_dump" } 2422 func (*Nat44UserDump) GetCrcString() string { return "51077d14" } 2423 func (*Nat44UserDump) GetMessageType() api.MessageType { 2424 return api.RequestMessage 2425 } 2426 2427 func (m *Nat44UserDump) Size() (size int) { 2428 if m == nil { 2429 return 0 2430 } 2431 return size 2432 } 2433 func (m *Nat44UserDump) Marshal(b []byte) ([]byte, error) { 2434 if b == nil { 2435 b = make([]byte, m.Size()) 2436 } 2437 buf := codec.NewBuffer(b) 2438 return buf.Bytes(), nil 2439 } 2440 func (m *Nat44UserDump) Unmarshal(b []byte) error { 2441 return nil 2442 } 2443 2444 // Nat44UserSessionDetails defines message 'nat44_user_session_details'. 2445 type Nat44UserSessionDetails struct { 2446 OutsideIPAddress ip_types.IP4Address `binapi:"ip4_address,name=outside_ip_address" json:"outside_ip_address,omitempty"` 2447 OutsidePort uint16 `binapi:"u16,name=outside_port" json:"outside_port,omitempty"` 2448 InsideIPAddress ip_types.IP4Address `binapi:"ip4_address,name=inside_ip_address" json:"inside_ip_address,omitempty"` 2449 InsidePort uint16 `binapi:"u16,name=inside_port" json:"inside_port,omitempty"` 2450 Protocol uint16 `binapi:"u16,name=protocol" json:"protocol,omitempty"` 2451 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` 2452 LastHeard uint64 `binapi:"u64,name=last_heard" json:"last_heard,omitempty"` 2453 TotalBytes uint64 `binapi:"u64,name=total_bytes" json:"total_bytes,omitempty"` 2454 TotalPkts uint32 `binapi:"u32,name=total_pkts" json:"total_pkts,omitempty"` 2455 ExtHostAddress ip_types.IP4Address `binapi:"ip4_address,name=ext_host_address" json:"ext_host_address,omitempty"` 2456 ExtHostPort uint16 `binapi:"u16,name=ext_host_port" json:"ext_host_port,omitempty"` 2457 ExtHostNatAddress ip_types.IP4Address `binapi:"ip4_address,name=ext_host_nat_address" json:"ext_host_nat_address,omitempty"` 2458 ExtHostNatPort uint16 `binapi:"u16,name=ext_host_nat_port" json:"ext_host_nat_port,omitempty"` 2459 } 2460 2461 func (m *Nat44UserSessionDetails) Reset() { *m = Nat44UserSessionDetails{} } 2462 func (*Nat44UserSessionDetails) GetMessageName() string { return "nat44_user_session_details" } 2463 func (*Nat44UserSessionDetails) GetCrcString() string { return "2cf6e16d" } 2464 func (*Nat44UserSessionDetails) GetMessageType() api.MessageType { 2465 return api.ReplyMessage 2466 } 2467 2468 func (m *Nat44UserSessionDetails) Size() (size int) { 2469 if m == nil { 2470 return 0 2471 } 2472 size += 1 * 4 // m.OutsideIPAddress 2473 size += 2 // m.OutsidePort 2474 size += 1 * 4 // m.InsideIPAddress 2475 size += 2 // m.InsidePort 2476 size += 2 // m.Protocol 2477 size += 1 // m.Flags 2478 size += 8 // m.LastHeard 2479 size += 8 // m.TotalBytes 2480 size += 4 // m.TotalPkts 2481 size += 1 * 4 // m.ExtHostAddress 2482 size += 2 // m.ExtHostPort 2483 size += 1 * 4 // m.ExtHostNatAddress 2484 size += 2 // m.ExtHostNatPort 2485 return size 2486 } 2487 func (m *Nat44UserSessionDetails) Marshal(b []byte) ([]byte, error) { 2488 if b == nil { 2489 b = make([]byte, m.Size()) 2490 } 2491 buf := codec.NewBuffer(b) 2492 buf.EncodeBytes(m.OutsideIPAddress[:], 4) 2493 buf.EncodeUint16(m.OutsidePort) 2494 buf.EncodeBytes(m.InsideIPAddress[:], 4) 2495 buf.EncodeUint16(m.InsidePort) 2496 buf.EncodeUint16(m.Protocol) 2497 buf.EncodeUint8(uint8(m.Flags)) 2498 buf.EncodeUint64(m.LastHeard) 2499 buf.EncodeUint64(m.TotalBytes) 2500 buf.EncodeUint32(m.TotalPkts) 2501 buf.EncodeBytes(m.ExtHostAddress[:], 4) 2502 buf.EncodeUint16(m.ExtHostPort) 2503 buf.EncodeBytes(m.ExtHostNatAddress[:], 4) 2504 buf.EncodeUint16(m.ExtHostNatPort) 2505 return buf.Bytes(), nil 2506 } 2507 func (m *Nat44UserSessionDetails) Unmarshal(b []byte) error { 2508 buf := codec.NewBuffer(b) 2509 copy(m.OutsideIPAddress[:], buf.DecodeBytes(4)) 2510 m.OutsidePort = buf.DecodeUint16() 2511 copy(m.InsideIPAddress[:], buf.DecodeBytes(4)) 2512 m.InsidePort = buf.DecodeUint16() 2513 m.Protocol = buf.DecodeUint16() 2514 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8()) 2515 m.LastHeard = buf.DecodeUint64() 2516 m.TotalBytes = buf.DecodeUint64() 2517 m.TotalPkts = buf.DecodeUint32() 2518 copy(m.ExtHostAddress[:], buf.DecodeBytes(4)) 2519 m.ExtHostPort = buf.DecodeUint16() 2520 copy(m.ExtHostNatAddress[:], buf.DecodeBytes(4)) 2521 m.ExtHostNatPort = buf.DecodeUint16() 2522 return nil 2523 } 2524 2525 // Nat44UserSessionDump defines message 'nat44_user_session_dump'. 2526 type Nat44UserSessionDump struct { 2527 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 2528 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 2529 } 2530 2531 func (m *Nat44UserSessionDump) Reset() { *m = Nat44UserSessionDump{} } 2532 func (*Nat44UserSessionDump) GetMessageName() string { return "nat44_user_session_dump" } 2533 func (*Nat44UserSessionDump) GetCrcString() string { return "e1899c98" } 2534 func (*Nat44UserSessionDump) GetMessageType() api.MessageType { 2535 return api.RequestMessage 2536 } 2537 2538 func (m *Nat44UserSessionDump) Size() (size int) { 2539 if m == nil { 2540 return 0 2541 } 2542 size += 1 * 4 // m.IPAddress 2543 size += 4 // m.VrfID 2544 return size 2545 } 2546 func (m *Nat44UserSessionDump) Marshal(b []byte) ([]byte, error) { 2547 if b == nil { 2548 b = make([]byte, m.Size()) 2549 } 2550 buf := codec.NewBuffer(b) 2551 buf.EncodeBytes(m.IPAddress[:], 4) 2552 buf.EncodeUint32(m.VrfID) 2553 return buf.Bytes(), nil 2554 } 2555 func (m *Nat44UserSessionDump) Unmarshal(b []byte) error { 2556 buf := codec.NewBuffer(b) 2557 copy(m.IPAddress[:], buf.DecodeBytes(4)) 2558 m.VrfID = buf.DecodeUint32() 2559 return nil 2560 } 2561 2562 // NatControlPing defines message 'nat_control_ping'. 2563 // Deprecated: the message will be removed in the future versions 2564 type NatControlPing struct{} 2565 2566 func (m *NatControlPing) Reset() { *m = NatControlPing{} } 2567 func (*NatControlPing) GetMessageName() string { return "nat_control_ping" } 2568 func (*NatControlPing) GetCrcString() string { return "51077d14" } 2569 func (*NatControlPing) GetMessageType() api.MessageType { 2570 return api.RequestMessage 2571 } 2572 2573 func (m *NatControlPing) Size() (size int) { 2574 if m == nil { 2575 return 0 2576 } 2577 return size 2578 } 2579 func (m *NatControlPing) Marshal(b []byte) ([]byte, error) { 2580 if b == nil { 2581 b = make([]byte, m.Size()) 2582 } 2583 buf := codec.NewBuffer(b) 2584 return buf.Bytes(), nil 2585 } 2586 func (m *NatControlPing) Unmarshal(b []byte) error { 2587 return nil 2588 } 2589 2590 // NatControlPingReply defines message 'nat_control_ping_reply'. 2591 // Deprecated: the message will be removed in the future versions 2592 type NatControlPingReply struct { 2593 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2594 ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"` 2595 VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"` 2596 } 2597 2598 func (m *NatControlPingReply) Reset() { *m = NatControlPingReply{} } 2599 func (*NatControlPingReply) GetMessageName() string { return "nat_control_ping_reply" } 2600 func (*NatControlPingReply) GetCrcString() string { return "f6b0b8ca" } 2601 func (*NatControlPingReply) GetMessageType() api.MessageType { 2602 return api.ReplyMessage 2603 } 2604 2605 func (m *NatControlPingReply) Size() (size int) { 2606 if m == nil { 2607 return 0 2608 } 2609 size += 4 // m.Retval 2610 size += 4 // m.ClientIndex 2611 size += 4 // m.VpePID 2612 return size 2613 } 2614 func (m *NatControlPingReply) Marshal(b []byte) ([]byte, error) { 2615 if b == nil { 2616 b = make([]byte, m.Size()) 2617 } 2618 buf := codec.NewBuffer(b) 2619 buf.EncodeInt32(m.Retval) 2620 buf.EncodeUint32(m.ClientIndex) 2621 buf.EncodeUint32(m.VpePID) 2622 return buf.Bytes(), nil 2623 } 2624 func (m *NatControlPingReply) Unmarshal(b []byte) error { 2625 buf := codec.NewBuffer(b) 2626 m.Retval = buf.DecodeInt32() 2627 m.ClientIndex = buf.DecodeUint32() 2628 m.VpePID = buf.DecodeUint32() 2629 return nil 2630 } 2631 2632 // NatGetAddrAndPortAllocAlg defines message 'nat_get_addr_and_port_alloc_alg'. 2633 type NatGetAddrAndPortAllocAlg struct{} 2634 2635 func (m *NatGetAddrAndPortAllocAlg) Reset() { *m = NatGetAddrAndPortAllocAlg{} } 2636 func (*NatGetAddrAndPortAllocAlg) GetMessageName() string { return "nat_get_addr_and_port_alloc_alg" } 2637 func (*NatGetAddrAndPortAllocAlg) GetCrcString() string { return "51077d14" } 2638 func (*NatGetAddrAndPortAllocAlg) GetMessageType() api.MessageType { 2639 return api.RequestMessage 2640 } 2641 2642 func (m *NatGetAddrAndPortAllocAlg) Size() (size int) { 2643 if m == nil { 2644 return 0 2645 } 2646 return size 2647 } 2648 func (m *NatGetAddrAndPortAllocAlg) Marshal(b []byte) ([]byte, error) { 2649 if b == nil { 2650 b = make([]byte, m.Size()) 2651 } 2652 buf := codec.NewBuffer(b) 2653 return buf.Bytes(), nil 2654 } 2655 func (m *NatGetAddrAndPortAllocAlg) Unmarshal(b []byte) error { 2656 return nil 2657 } 2658 2659 // NatGetAddrAndPortAllocAlgReply defines message 'nat_get_addr_and_port_alloc_alg_reply'. 2660 type NatGetAddrAndPortAllocAlgReply struct { 2661 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2662 Alg uint8 `binapi:"u8,name=alg" json:"alg,omitempty"` 2663 PsidOffset uint8 `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"` 2664 PsidLength uint8 `binapi:"u8,name=psid_length" json:"psid_length,omitempty"` 2665 Psid uint16 `binapi:"u16,name=psid" json:"psid,omitempty"` 2666 StartPort uint16 `binapi:"u16,name=start_port" json:"start_port,omitempty"` 2667 EndPort uint16 `binapi:"u16,name=end_port" json:"end_port,omitempty"` 2668 } 2669 2670 func (m *NatGetAddrAndPortAllocAlgReply) Reset() { *m = NatGetAddrAndPortAllocAlgReply{} } 2671 func (*NatGetAddrAndPortAllocAlgReply) GetMessageName() string { 2672 return "nat_get_addr_and_port_alloc_alg_reply" 2673 } 2674 func (*NatGetAddrAndPortAllocAlgReply) GetCrcString() string { return "3607a7d0" } 2675 func (*NatGetAddrAndPortAllocAlgReply) GetMessageType() api.MessageType { 2676 return api.ReplyMessage 2677 } 2678 2679 func (m *NatGetAddrAndPortAllocAlgReply) Size() (size int) { 2680 if m == nil { 2681 return 0 2682 } 2683 size += 4 // m.Retval 2684 size += 1 // m.Alg 2685 size += 1 // m.PsidOffset 2686 size += 1 // m.PsidLength 2687 size += 2 // m.Psid 2688 size += 2 // m.StartPort 2689 size += 2 // m.EndPort 2690 return size 2691 } 2692 func (m *NatGetAddrAndPortAllocAlgReply) Marshal(b []byte) ([]byte, error) { 2693 if b == nil { 2694 b = make([]byte, m.Size()) 2695 } 2696 buf := codec.NewBuffer(b) 2697 buf.EncodeInt32(m.Retval) 2698 buf.EncodeUint8(m.Alg) 2699 buf.EncodeUint8(m.PsidOffset) 2700 buf.EncodeUint8(m.PsidLength) 2701 buf.EncodeUint16(m.Psid) 2702 buf.EncodeUint16(m.StartPort) 2703 buf.EncodeUint16(m.EndPort) 2704 return buf.Bytes(), nil 2705 } 2706 func (m *NatGetAddrAndPortAllocAlgReply) Unmarshal(b []byte) error { 2707 buf := codec.NewBuffer(b) 2708 m.Retval = buf.DecodeInt32() 2709 m.Alg = buf.DecodeUint8() 2710 m.PsidOffset = buf.DecodeUint8() 2711 m.PsidLength = buf.DecodeUint8() 2712 m.Psid = buf.DecodeUint16() 2713 m.StartPort = buf.DecodeUint16() 2714 m.EndPort = buf.DecodeUint16() 2715 return nil 2716 } 2717 2718 // NatGetMssClamping defines message 'nat_get_mss_clamping'. 2719 type NatGetMssClamping struct{} 2720 2721 func (m *NatGetMssClamping) Reset() { *m = NatGetMssClamping{} } 2722 func (*NatGetMssClamping) GetMessageName() string { return "nat_get_mss_clamping" } 2723 func (*NatGetMssClamping) GetCrcString() string { return "51077d14" } 2724 func (*NatGetMssClamping) GetMessageType() api.MessageType { 2725 return api.RequestMessage 2726 } 2727 2728 func (m *NatGetMssClamping) Size() (size int) { 2729 if m == nil { 2730 return 0 2731 } 2732 return size 2733 } 2734 func (m *NatGetMssClamping) Marshal(b []byte) ([]byte, error) { 2735 if b == nil { 2736 b = make([]byte, m.Size()) 2737 } 2738 buf := codec.NewBuffer(b) 2739 return buf.Bytes(), nil 2740 } 2741 func (m *NatGetMssClamping) Unmarshal(b []byte) error { 2742 return nil 2743 } 2744 2745 // NatGetMssClampingReply defines message 'nat_get_mss_clamping_reply'. 2746 type NatGetMssClampingReply struct { 2747 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2748 MssValue uint16 `binapi:"u16,name=mss_value" json:"mss_value,omitempty"` 2749 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 2750 } 2751 2752 func (m *NatGetMssClampingReply) Reset() { *m = NatGetMssClampingReply{} } 2753 func (*NatGetMssClampingReply) GetMessageName() string { return "nat_get_mss_clamping_reply" } 2754 func (*NatGetMssClampingReply) GetCrcString() string { return "1c0b2a78" } 2755 func (*NatGetMssClampingReply) GetMessageType() api.MessageType { 2756 return api.ReplyMessage 2757 } 2758 2759 func (m *NatGetMssClampingReply) Size() (size int) { 2760 if m == nil { 2761 return 0 2762 } 2763 size += 4 // m.Retval 2764 size += 2 // m.MssValue 2765 size += 1 // m.Enable 2766 return size 2767 } 2768 func (m *NatGetMssClampingReply) Marshal(b []byte) ([]byte, error) { 2769 if b == nil { 2770 b = make([]byte, m.Size()) 2771 } 2772 buf := codec.NewBuffer(b) 2773 buf.EncodeInt32(m.Retval) 2774 buf.EncodeUint16(m.MssValue) 2775 buf.EncodeBool(m.Enable) 2776 return buf.Bytes(), nil 2777 } 2778 func (m *NatGetMssClampingReply) Unmarshal(b []byte) error { 2779 buf := codec.NewBuffer(b) 2780 m.Retval = buf.DecodeInt32() 2781 m.MssValue = buf.DecodeUint16() 2782 m.Enable = buf.DecodeBool() 2783 return nil 2784 } 2785 2786 // NatGetTimeouts defines message 'nat_get_timeouts'. 2787 // Deprecated: the message will be removed in the future versions 2788 type NatGetTimeouts struct{} 2789 2790 func (m *NatGetTimeouts) Reset() { *m = NatGetTimeouts{} } 2791 func (*NatGetTimeouts) GetMessageName() string { return "nat_get_timeouts" } 2792 func (*NatGetTimeouts) GetCrcString() string { return "51077d14" } 2793 func (*NatGetTimeouts) GetMessageType() api.MessageType { 2794 return api.RequestMessage 2795 } 2796 2797 func (m *NatGetTimeouts) Size() (size int) { 2798 if m == nil { 2799 return 0 2800 } 2801 return size 2802 } 2803 func (m *NatGetTimeouts) Marshal(b []byte) ([]byte, error) { 2804 if b == nil { 2805 b = make([]byte, m.Size()) 2806 } 2807 buf := codec.NewBuffer(b) 2808 return buf.Bytes(), nil 2809 } 2810 func (m *NatGetTimeouts) Unmarshal(b []byte) error { 2811 return nil 2812 } 2813 2814 // NatGetTimeoutsReply defines message 'nat_get_timeouts_reply'. 2815 // Deprecated: the message will be removed in the future versions 2816 type NatGetTimeoutsReply struct { 2817 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2818 UDP uint32 `binapi:"u32,name=udp" json:"udp,omitempty"` 2819 TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"` 2820 TCPTransitory uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"` 2821 ICMP uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"` 2822 } 2823 2824 func (m *NatGetTimeoutsReply) Reset() { *m = NatGetTimeoutsReply{} } 2825 func (*NatGetTimeoutsReply) GetMessageName() string { return "nat_get_timeouts_reply" } 2826 func (*NatGetTimeoutsReply) GetCrcString() string { return "3c4df4e1" } 2827 func (*NatGetTimeoutsReply) GetMessageType() api.MessageType { 2828 return api.ReplyMessage 2829 } 2830 2831 func (m *NatGetTimeoutsReply) Size() (size int) { 2832 if m == nil { 2833 return 0 2834 } 2835 size += 4 // m.Retval 2836 size += 4 // m.UDP 2837 size += 4 // m.TCPEstablished 2838 size += 4 // m.TCPTransitory 2839 size += 4 // m.ICMP 2840 return size 2841 } 2842 func (m *NatGetTimeoutsReply) Marshal(b []byte) ([]byte, error) { 2843 if b == nil { 2844 b = make([]byte, m.Size()) 2845 } 2846 buf := codec.NewBuffer(b) 2847 buf.EncodeInt32(m.Retval) 2848 buf.EncodeUint32(m.UDP) 2849 buf.EncodeUint32(m.TCPEstablished) 2850 buf.EncodeUint32(m.TCPTransitory) 2851 buf.EncodeUint32(m.ICMP) 2852 return buf.Bytes(), nil 2853 } 2854 func (m *NatGetTimeoutsReply) Unmarshal(b []byte) error { 2855 buf := codec.NewBuffer(b) 2856 m.Retval = buf.DecodeInt32() 2857 m.UDP = buf.DecodeUint32() 2858 m.TCPEstablished = buf.DecodeUint32() 2859 m.TCPTransitory = buf.DecodeUint32() 2860 m.ICMP = buf.DecodeUint32() 2861 return nil 2862 } 2863 2864 // NatHaFlush defines message 'nat_ha_flush'. 2865 type NatHaFlush struct{} 2866 2867 func (m *NatHaFlush) Reset() { *m = NatHaFlush{} } 2868 func (*NatHaFlush) GetMessageName() string { return "nat_ha_flush" } 2869 func (*NatHaFlush) GetCrcString() string { return "51077d14" } 2870 func (*NatHaFlush) GetMessageType() api.MessageType { 2871 return api.RequestMessage 2872 } 2873 2874 func (m *NatHaFlush) Size() (size int) { 2875 if m == nil { 2876 return 0 2877 } 2878 return size 2879 } 2880 func (m *NatHaFlush) Marshal(b []byte) ([]byte, error) { 2881 if b == nil { 2882 b = make([]byte, m.Size()) 2883 } 2884 buf := codec.NewBuffer(b) 2885 return buf.Bytes(), nil 2886 } 2887 func (m *NatHaFlush) Unmarshal(b []byte) error { 2888 return nil 2889 } 2890 2891 // NatHaFlushReply defines message 'nat_ha_flush_reply'. 2892 type NatHaFlushReply struct { 2893 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2894 } 2895 2896 func (m *NatHaFlushReply) Reset() { *m = NatHaFlushReply{} } 2897 func (*NatHaFlushReply) GetMessageName() string { return "nat_ha_flush_reply" } 2898 func (*NatHaFlushReply) GetCrcString() string { return "e8d4e804" } 2899 func (*NatHaFlushReply) GetMessageType() api.MessageType { 2900 return api.ReplyMessage 2901 } 2902 2903 func (m *NatHaFlushReply) Size() (size int) { 2904 if m == nil { 2905 return 0 2906 } 2907 size += 4 // m.Retval 2908 return size 2909 } 2910 func (m *NatHaFlushReply) Marshal(b []byte) ([]byte, error) { 2911 if b == nil { 2912 b = make([]byte, m.Size()) 2913 } 2914 buf := codec.NewBuffer(b) 2915 buf.EncodeInt32(m.Retval) 2916 return buf.Bytes(), nil 2917 } 2918 func (m *NatHaFlushReply) Unmarshal(b []byte) error { 2919 buf := codec.NewBuffer(b) 2920 m.Retval = buf.DecodeInt32() 2921 return nil 2922 } 2923 2924 // NatHaGetFailover defines message 'nat_ha_get_failover'. 2925 type NatHaGetFailover struct{} 2926 2927 func (m *NatHaGetFailover) Reset() { *m = NatHaGetFailover{} } 2928 func (*NatHaGetFailover) GetMessageName() string { return "nat_ha_get_failover" } 2929 func (*NatHaGetFailover) GetCrcString() string { return "51077d14" } 2930 func (*NatHaGetFailover) GetMessageType() api.MessageType { 2931 return api.RequestMessage 2932 } 2933 2934 func (m *NatHaGetFailover) Size() (size int) { 2935 if m == nil { 2936 return 0 2937 } 2938 return size 2939 } 2940 func (m *NatHaGetFailover) Marshal(b []byte) ([]byte, error) { 2941 if b == nil { 2942 b = make([]byte, m.Size()) 2943 } 2944 buf := codec.NewBuffer(b) 2945 return buf.Bytes(), nil 2946 } 2947 func (m *NatHaGetFailover) Unmarshal(b []byte) error { 2948 return nil 2949 } 2950 2951 // NatHaGetFailoverReply defines message 'nat_ha_get_failover_reply'. 2952 type NatHaGetFailoverReply struct { 2953 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2954 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 2955 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` 2956 SessionRefreshInterval uint32 `binapi:"u32,name=session_refresh_interval" json:"session_refresh_interval,omitempty"` 2957 } 2958 2959 func (m *NatHaGetFailoverReply) Reset() { *m = NatHaGetFailoverReply{} } 2960 func (*NatHaGetFailoverReply) GetMessageName() string { return "nat_ha_get_failover_reply" } 2961 func (*NatHaGetFailoverReply) GetCrcString() string { return "a67d8752" } 2962 func (*NatHaGetFailoverReply) GetMessageType() api.MessageType { 2963 return api.ReplyMessage 2964 } 2965 2966 func (m *NatHaGetFailoverReply) Size() (size int) { 2967 if m == nil { 2968 return 0 2969 } 2970 size += 4 // m.Retval 2971 size += 1 * 4 // m.IPAddress 2972 size += 2 // m.Port 2973 size += 4 // m.SessionRefreshInterval 2974 return size 2975 } 2976 func (m *NatHaGetFailoverReply) Marshal(b []byte) ([]byte, error) { 2977 if b == nil { 2978 b = make([]byte, m.Size()) 2979 } 2980 buf := codec.NewBuffer(b) 2981 buf.EncodeInt32(m.Retval) 2982 buf.EncodeBytes(m.IPAddress[:], 4) 2983 buf.EncodeUint16(m.Port) 2984 buf.EncodeUint32(m.SessionRefreshInterval) 2985 return buf.Bytes(), nil 2986 } 2987 func (m *NatHaGetFailoverReply) Unmarshal(b []byte) error { 2988 buf := codec.NewBuffer(b) 2989 m.Retval = buf.DecodeInt32() 2990 copy(m.IPAddress[:], buf.DecodeBytes(4)) 2991 m.Port = buf.DecodeUint16() 2992 m.SessionRefreshInterval = buf.DecodeUint32() 2993 return nil 2994 } 2995 2996 // NatHaGetListener defines message 'nat_ha_get_listener'. 2997 type NatHaGetListener struct{} 2998 2999 func (m *NatHaGetListener) Reset() { *m = NatHaGetListener{} } 3000 func (*NatHaGetListener) GetMessageName() string { return "nat_ha_get_listener" } 3001 func (*NatHaGetListener) GetCrcString() string { return "51077d14" } 3002 func (*NatHaGetListener) GetMessageType() api.MessageType { 3003 return api.RequestMessage 3004 } 3005 3006 func (m *NatHaGetListener) Size() (size int) { 3007 if m == nil { 3008 return 0 3009 } 3010 return size 3011 } 3012 func (m *NatHaGetListener) Marshal(b []byte) ([]byte, error) { 3013 if b == nil { 3014 b = make([]byte, m.Size()) 3015 } 3016 buf := codec.NewBuffer(b) 3017 return buf.Bytes(), nil 3018 } 3019 func (m *NatHaGetListener) Unmarshal(b []byte) error { 3020 return nil 3021 } 3022 3023 // NatHaGetListenerReply defines message 'nat_ha_get_listener_reply'. 3024 type NatHaGetListenerReply struct { 3025 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3026 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 3027 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` 3028 PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"` 3029 } 3030 3031 func (m *NatHaGetListenerReply) Reset() { *m = NatHaGetListenerReply{} } 3032 func (*NatHaGetListenerReply) GetMessageName() string { return "nat_ha_get_listener_reply" } 3033 func (*NatHaGetListenerReply) GetCrcString() string { return "123ea41f" } 3034 func (*NatHaGetListenerReply) GetMessageType() api.MessageType { 3035 return api.ReplyMessage 3036 } 3037 3038 func (m *NatHaGetListenerReply) Size() (size int) { 3039 if m == nil { 3040 return 0 3041 } 3042 size += 4 // m.Retval 3043 size += 1 * 4 // m.IPAddress 3044 size += 2 // m.Port 3045 size += 4 // m.PathMtu 3046 return size 3047 } 3048 func (m *NatHaGetListenerReply) Marshal(b []byte) ([]byte, error) { 3049 if b == nil { 3050 b = make([]byte, m.Size()) 3051 } 3052 buf := codec.NewBuffer(b) 3053 buf.EncodeInt32(m.Retval) 3054 buf.EncodeBytes(m.IPAddress[:], 4) 3055 buf.EncodeUint16(m.Port) 3056 buf.EncodeUint32(m.PathMtu) 3057 return buf.Bytes(), nil 3058 } 3059 func (m *NatHaGetListenerReply) Unmarshal(b []byte) error { 3060 buf := codec.NewBuffer(b) 3061 m.Retval = buf.DecodeInt32() 3062 copy(m.IPAddress[:], buf.DecodeBytes(4)) 3063 m.Port = buf.DecodeUint16() 3064 m.PathMtu = buf.DecodeUint32() 3065 return nil 3066 } 3067 3068 // NatHaResync defines message 'nat_ha_resync'. 3069 type NatHaResync struct { 3070 WantResyncEvent uint8 `binapi:"u8,name=want_resync_event" json:"want_resync_event,omitempty"` 3071 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` 3072 } 3073 3074 func (m *NatHaResync) Reset() { *m = NatHaResync{} } 3075 func (*NatHaResync) GetMessageName() string { return "nat_ha_resync" } 3076 func (*NatHaResync) GetCrcString() string { return "c8ab9e03" } 3077 func (*NatHaResync) GetMessageType() api.MessageType { 3078 return api.RequestMessage 3079 } 3080 3081 func (m *NatHaResync) Size() (size int) { 3082 if m == nil { 3083 return 0 3084 } 3085 size += 1 // m.WantResyncEvent 3086 size += 4 // m.PID 3087 return size 3088 } 3089 func (m *NatHaResync) Marshal(b []byte) ([]byte, error) { 3090 if b == nil { 3091 b = make([]byte, m.Size()) 3092 } 3093 buf := codec.NewBuffer(b) 3094 buf.EncodeUint8(m.WantResyncEvent) 3095 buf.EncodeUint32(m.PID) 3096 return buf.Bytes(), nil 3097 } 3098 func (m *NatHaResync) Unmarshal(b []byte) error { 3099 buf := codec.NewBuffer(b) 3100 m.WantResyncEvent = buf.DecodeUint8() 3101 m.PID = buf.DecodeUint32() 3102 return nil 3103 } 3104 3105 // NatHaResyncCompletedEvent defines message 'nat_ha_resync_completed_event'. 3106 type NatHaResyncCompletedEvent struct { 3107 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` 3108 MissedCount uint32 `binapi:"u32,name=missed_count" json:"missed_count,omitempty"` 3109 } 3110 3111 func (m *NatHaResyncCompletedEvent) Reset() { *m = NatHaResyncCompletedEvent{} } 3112 func (*NatHaResyncCompletedEvent) GetMessageName() string { return "nat_ha_resync_completed_event" } 3113 func (*NatHaResyncCompletedEvent) GetCrcString() string { return "fdc598fb" } 3114 func (*NatHaResyncCompletedEvent) GetMessageType() api.MessageType { 3115 return api.EventMessage 3116 } 3117 3118 func (m *NatHaResyncCompletedEvent) Size() (size int) { 3119 if m == nil { 3120 return 0 3121 } 3122 size += 4 // m.PID 3123 size += 4 // m.MissedCount 3124 return size 3125 } 3126 func (m *NatHaResyncCompletedEvent) Marshal(b []byte) ([]byte, error) { 3127 if b == nil { 3128 b = make([]byte, m.Size()) 3129 } 3130 buf := codec.NewBuffer(b) 3131 buf.EncodeUint32(m.PID) 3132 buf.EncodeUint32(m.MissedCount) 3133 return buf.Bytes(), nil 3134 } 3135 func (m *NatHaResyncCompletedEvent) Unmarshal(b []byte) error { 3136 buf := codec.NewBuffer(b) 3137 m.PID = buf.DecodeUint32() 3138 m.MissedCount = buf.DecodeUint32() 3139 return nil 3140 } 3141 3142 // NatHaResyncReply defines message 'nat_ha_resync_reply'. 3143 type NatHaResyncReply struct { 3144 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3145 } 3146 3147 func (m *NatHaResyncReply) Reset() { *m = NatHaResyncReply{} } 3148 func (*NatHaResyncReply) GetMessageName() string { return "nat_ha_resync_reply" } 3149 func (*NatHaResyncReply) GetCrcString() string { return "e8d4e804" } 3150 func (*NatHaResyncReply) GetMessageType() api.MessageType { 3151 return api.ReplyMessage 3152 } 3153 3154 func (m *NatHaResyncReply) Size() (size int) { 3155 if m == nil { 3156 return 0 3157 } 3158 size += 4 // m.Retval 3159 return size 3160 } 3161 func (m *NatHaResyncReply) Marshal(b []byte) ([]byte, error) { 3162 if b == nil { 3163 b = make([]byte, m.Size()) 3164 } 3165 buf := codec.NewBuffer(b) 3166 buf.EncodeInt32(m.Retval) 3167 return buf.Bytes(), nil 3168 } 3169 func (m *NatHaResyncReply) Unmarshal(b []byte) error { 3170 buf := codec.NewBuffer(b) 3171 m.Retval = buf.DecodeInt32() 3172 return nil 3173 } 3174 3175 // NatHaSetFailover defines message 'nat_ha_set_failover'. 3176 type NatHaSetFailover struct { 3177 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 3178 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` 3179 SessionRefreshInterval uint32 `binapi:"u32,name=session_refresh_interval" json:"session_refresh_interval,omitempty"` 3180 } 3181 3182 func (m *NatHaSetFailover) Reset() { *m = NatHaSetFailover{} } 3183 func (*NatHaSetFailover) GetMessageName() string { return "nat_ha_set_failover" } 3184 func (*NatHaSetFailover) GetCrcString() string { return "718246af" } 3185 func (*NatHaSetFailover) GetMessageType() api.MessageType { 3186 return api.RequestMessage 3187 } 3188 3189 func (m *NatHaSetFailover) Size() (size int) { 3190 if m == nil { 3191 return 0 3192 } 3193 size += 1 * 4 // m.IPAddress 3194 size += 2 // m.Port 3195 size += 4 // m.SessionRefreshInterval 3196 return size 3197 } 3198 func (m *NatHaSetFailover) Marshal(b []byte) ([]byte, error) { 3199 if b == nil { 3200 b = make([]byte, m.Size()) 3201 } 3202 buf := codec.NewBuffer(b) 3203 buf.EncodeBytes(m.IPAddress[:], 4) 3204 buf.EncodeUint16(m.Port) 3205 buf.EncodeUint32(m.SessionRefreshInterval) 3206 return buf.Bytes(), nil 3207 } 3208 func (m *NatHaSetFailover) Unmarshal(b []byte) error { 3209 buf := codec.NewBuffer(b) 3210 copy(m.IPAddress[:], buf.DecodeBytes(4)) 3211 m.Port = buf.DecodeUint16() 3212 m.SessionRefreshInterval = buf.DecodeUint32() 3213 return nil 3214 } 3215 3216 // NatHaSetFailoverReply defines message 'nat_ha_set_failover_reply'. 3217 type NatHaSetFailoverReply struct { 3218 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3219 } 3220 3221 func (m *NatHaSetFailoverReply) Reset() { *m = NatHaSetFailoverReply{} } 3222 func (*NatHaSetFailoverReply) GetMessageName() string { return "nat_ha_set_failover_reply" } 3223 func (*NatHaSetFailoverReply) GetCrcString() string { return "e8d4e804" } 3224 func (*NatHaSetFailoverReply) GetMessageType() api.MessageType { 3225 return api.ReplyMessage 3226 } 3227 3228 func (m *NatHaSetFailoverReply) Size() (size int) { 3229 if m == nil { 3230 return 0 3231 } 3232 size += 4 // m.Retval 3233 return size 3234 } 3235 func (m *NatHaSetFailoverReply) Marshal(b []byte) ([]byte, error) { 3236 if b == nil { 3237 b = make([]byte, m.Size()) 3238 } 3239 buf := codec.NewBuffer(b) 3240 buf.EncodeInt32(m.Retval) 3241 return buf.Bytes(), nil 3242 } 3243 func (m *NatHaSetFailoverReply) Unmarshal(b []byte) error { 3244 buf := codec.NewBuffer(b) 3245 m.Retval = buf.DecodeInt32() 3246 return nil 3247 } 3248 3249 // NatHaSetListener defines message 'nat_ha_set_listener'. 3250 type NatHaSetListener struct { 3251 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 3252 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` 3253 PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"` 3254 } 3255 3256 func (m *NatHaSetListener) Reset() { *m = NatHaSetListener{} } 3257 func (*NatHaSetListener) GetMessageName() string { return "nat_ha_set_listener" } 3258 func (*NatHaSetListener) GetCrcString() string { return "e4a8cb4e" } 3259 func (*NatHaSetListener) GetMessageType() api.MessageType { 3260 return api.RequestMessage 3261 } 3262 3263 func (m *NatHaSetListener) Size() (size int) { 3264 if m == nil { 3265 return 0 3266 } 3267 size += 1 * 4 // m.IPAddress 3268 size += 2 // m.Port 3269 size += 4 // m.PathMtu 3270 return size 3271 } 3272 func (m *NatHaSetListener) Marshal(b []byte) ([]byte, error) { 3273 if b == nil { 3274 b = make([]byte, m.Size()) 3275 } 3276 buf := codec.NewBuffer(b) 3277 buf.EncodeBytes(m.IPAddress[:], 4) 3278 buf.EncodeUint16(m.Port) 3279 buf.EncodeUint32(m.PathMtu) 3280 return buf.Bytes(), nil 3281 } 3282 func (m *NatHaSetListener) Unmarshal(b []byte) error { 3283 buf := codec.NewBuffer(b) 3284 copy(m.IPAddress[:], buf.DecodeBytes(4)) 3285 m.Port = buf.DecodeUint16() 3286 m.PathMtu = buf.DecodeUint32() 3287 return nil 3288 } 3289 3290 // NatHaSetListenerReply defines message 'nat_ha_set_listener_reply'. 3291 type NatHaSetListenerReply struct { 3292 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3293 } 3294 3295 func (m *NatHaSetListenerReply) Reset() { *m = NatHaSetListenerReply{} } 3296 func (*NatHaSetListenerReply) GetMessageName() string { return "nat_ha_set_listener_reply" } 3297 func (*NatHaSetListenerReply) GetCrcString() string { return "e8d4e804" } 3298 func (*NatHaSetListenerReply) GetMessageType() api.MessageType { 3299 return api.ReplyMessage 3300 } 3301 3302 func (m *NatHaSetListenerReply) Size() (size int) { 3303 if m == nil { 3304 return 0 3305 } 3306 size += 4 // m.Retval 3307 return size 3308 } 3309 func (m *NatHaSetListenerReply) Marshal(b []byte) ([]byte, error) { 3310 if b == nil { 3311 b = make([]byte, m.Size()) 3312 } 3313 buf := codec.NewBuffer(b) 3314 buf.EncodeInt32(m.Retval) 3315 return buf.Bytes(), nil 3316 } 3317 func (m *NatHaSetListenerReply) Unmarshal(b []byte) error { 3318 buf := codec.NewBuffer(b) 3319 m.Retval = buf.DecodeInt32() 3320 return nil 3321 } 3322 3323 // NatIpfixEnableDisable defines message 'nat_ipfix_enable_disable'. 3324 // Deprecated: the message will be removed in the future versions 3325 type NatIpfixEnableDisable struct { 3326 DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"` 3327 SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"` 3328 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 3329 } 3330 3331 func (m *NatIpfixEnableDisable) Reset() { *m = NatIpfixEnableDisable{} } 3332 func (*NatIpfixEnableDisable) GetMessageName() string { return "nat_ipfix_enable_disable" } 3333 func (*NatIpfixEnableDisable) GetCrcString() string { return "9af4a2d2" } 3334 func (*NatIpfixEnableDisable) GetMessageType() api.MessageType { 3335 return api.RequestMessage 3336 } 3337 3338 func (m *NatIpfixEnableDisable) Size() (size int) { 3339 if m == nil { 3340 return 0 3341 } 3342 size += 4 // m.DomainID 3343 size += 2 // m.SrcPort 3344 size += 1 // m.Enable 3345 return size 3346 } 3347 func (m *NatIpfixEnableDisable) Marshal(b []byte) ([]byte, error) { 3348 if b == nil { 3349 b = make([]byte, m.Size()) 3350 } 3351 buf := codec.NewBuffer(b) 3352 buf.EncodeUint32(m.DomainID) 3353 buf.EncodeUint16(m.SrcPort) 3354 buf.EncodeBool(m.Enable) 3355 return buf.Bytes(), nil 3356 } 3357 func (m *NatIpfixEnableDisable) Unmarshal(b []byte) error { 3358 buf := codec.NewBuffer(b) 3359 m.DomainID = buf.DecodeUint32() 3360 m.SrcPort = buf.DecodeUint16() 3361 m.Enable = buf.DecodeBool() 3362 return nil 3363 } 3364 3365 // NatIpfixEnableDisableReply defines message 'nat_ipfix_enable_disable_reply'. 3366 // Deprecated: the message will be removed in the future versions 3367 type NatIpfixEnableDisableReply struct { 3368 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3369 } 3370 3371 func (m *NatIpfixEnableDisableReply) Reset() { *m = NatIpfixEnableDisableReply{} } 3372 func (*NatIpfixEnableDisableReply) GetMessageName() string { return "nat_ipfix_enable_disable_reply" } 3373 func (*NatIpfixEnableDisableReply) GetCrcString() string { return "e8d4e804" } 3374 func (*NatIpfixEnableDisableReply) GetMessageType() api.MessageType { 3375 return api.ReplyMessage 3376 } 3377 3378 func (m *NatIpfixEnableDisableReply) Size() (size int) { 3379 if m == nil { 3380 return 0 3381 } 3382 size += 4 // m.Retval 3383 return size 3384 } 3385 func (m *NatIpfixEnableDisableReply) Marshal(b []byte) ([]byte, error) { 3386 if b == nil { 3387 b = make([]byte, m.Size()) 3388 } 3389 buf := codec.NewBuffer(b) 3390 buf.EncodeInt32(m.Retval) 3391 return buf.Bytes(), nil 3392 } 3393 func (m *NatIpfixEnableDisableReply) Unmarshal(b []byte) error { 3394 buf := codec.NewBuffer(b) 3395 m.Retval = buf.DecodeInt32() 3396 return nil 3397 } 3398 3399 // NatSetAddrAndPortAllocAlg defines message 'nat_set_addr_and_port_alloc_alg'. 3400 type NatSetAddrAndPortAllocAlg struct { 3401 Alg uint8 `binapi:"u8,name=alg" json:"alg,omitempty"` 3402 PsidOffset uint8 `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"` 3403 PsidLength uint8 `binapi:"u8,name=psid_length" json:"psid_length,omitempty"` 3404 Psid uint16 `binapi:"u16,name=psid" json:"psid,omitempty"` 3405 StartPort uint16 `binapi:"u16,name=start_port" json:"start_port,omitempty"` 3406 EndPort uint16 `binapi:"u16,name=end_port" json:"end_port,omitempty"` 3407 } 3408 3409 func (m *NatSetAddrAndPortAllocAlg) Reset() { *m = NatSetAddrAndPortAllocAlg{} } 3410 func (*NatSetAddrAndPortAllocAlg) GetMessageName() string { return "nat_set_addr_and_port_alloc_alg" } 3411 func (*NatSetAddrAndPortAllocAlg) GetCrcString() string { return "deeb746f" } 3412 func (*NatSetAddrAndPortAllocAlg) GetMessageType() api.MessageType { 3413 return api.RequestMessage 3414 } 3415 3416 func (m *NatSetAddrAndPortAllocAlg) Size() (size int) { 3417 if m == nil { 3418 return 0 3419 } 3420 size += 1 // m.Alg 3421 size += 1 // m.PsidOffset 3422 size += 1 // m.PsidLength 3423 size += 2 // m.Psid 3424 size += 2 // m.StartPort 3425 size += 2 // m.EndPort 3426 return size 3427 } 3428 func (m *NatSetAddrAndPortAllocAlg) Marshal(b []byte) ([]byte, error) { 3429 if b == nil { 3430 b = make([]byte, m.Size()) 3431 } 3432 buf := codec.NewBuffer(b) 3433 buf.EncodeUint8(m.Alg) 3434 buf.EncodeUint8(m.PsidOffset) 3435 buf.EncodeUint8(m.PsidLength) 3436 buf.EncodeUint16(m.Psid) 3437 buf.EncodeUint16(m.StartPort) 3438 buf.EncodeUint16(m.EndPort) 3439 return buf.Bytes(), nil 3440 } 3441 func (m *NatSetAddrAndPortAllocAlg) Unmarshal(b []byte) error { 3442 buf := codec.NewBuffer(b) 3443 m.Alg = buf.DecodeUint8() 3444 m.PsidOffset = buf.DecodeUint8() 3445 m.PsidLength = buf.DecodeUint8() 3446 m.Psid = buf.DecodeUint16() 3447 m.StartPort = buf.DecodeUint16() 3448 m.EndPort = buf.DecodeUint16() 3449 return nil 3450 } 3451 3452 // NatSetAddrAndPortAllocAlgReply defines message 'nat_set_addr_and_port_alloc_alg_reply'. 3453 type NatSetAddrAndPortAllocAlgReply struct { 3454 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3455 } 3456 3457 func (m *NatSetAddrAndPortAllocAlgReply) Reset() { *m = NatSetAddrAndPortAllocAlgReply{} } 3458 func (*NatSetAddrAndPortAllocAlgReply) GetMessageName() string { 3459 return "nat_set_addr_and_port_alloc_alg_reply" 3460 } 3461 func (*NatSetAddrAndPortAllocAlgReply) GetCrcString() string { return "e8d4e804" } 3462 func (*NatSetAddrAndPortAllocAlgReply) GetMessageType() api.MessageType { 3463 return api.ReplyMessage 3464 } 3465 3466 func (m *NatSetAddrAndPortAllocAlgReply) Size() (size int) { 3467 if m == nil { 3468 return 0 3469 } 3470 size += 4 // m.Retval 3471 return size 3472 } 3473 func (m *NatSetAddrAndPortAllocAlgReply) Marshal(b []byte) ([]byte, error) { 3474 if b == nil { 3475 b = make([]byte, m.Size()) 3476 } 3477 buf := codec.NewBuffer(b) 3478 buf.EncodeInt32(m.Retval) 3479 return buf.Bytes(), nil 3480 } 3481 func (m *NatSetAddrAndPortAllocAlgReply) Unmarshal(b []byte) error { 3482 buf := codec.NewBuffer(b) 3483 m.Retval = buf.DecodeInt32() 3484 return nil 3485 } 3486 3487 // NatSetLogLevel defines message 'nat_set_log_level'. 3488 // Deprecated: the message will be removed in the future versions 3489 type NatSetLogLevel struct { 3490 LogLevel nat_types.NatLogLevel `binapi:"nat_log_level,name=log_level" json:"log_level,omitempty"` 3491 } 3492 3493 func (m *NatSetLogLevel) Reset() { *m = NatSetLogLevel{} } 3494 func (*NatSetLogLevel) GetMessageName() string { return "nat_set_log_level" } 3495 func (*NatSetLogLevel) GetCrcString() string { return "70076bfe" } 3496 func (*NatSetLogLevel) GetMessageType() api.MessageType { 3497 return api.RequestMessage 3498 } 3499 3500 func (m *NatSetLogLevel) Size() (size int) { 3501 if m == nil { 3502 return 0 3503 } 3504 size += 1 // m.LogLevel 3505 return size 3506 } 3507 func (m *NatSetLogLevel) Marshal(b []byte) ([]byte, error) { 3508 if b == nil { 3509 b = make([]byte, m.Size()) 3510 } 3511 buf := codec.NewBuffer(b) 3512 buf.EncodeUint8(uint8(m.LogLevel)) 3513 return buf.Bytes(), nil 3514 } 3515 func (m *NatSetLogLevel) Unmarshal(b []byte) error { 3516 buf := codec.NewBuffer(b) 3517 m.LogLevel = nat_types.NatLogLevel(buf.DecodeUint8()) 3518 return nil 3519 } 3520 3521 // NatSetLogLevelReply defines message 'nat_set_log_level_reply'. 3522 // Deprecated: the message will be removed in the future versions 3523 type NatSetLogLevelReply struct { 3524 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3525 } 3526 3527 func (m *NatSetLogLevelReply) Reset() { *m = NatSetLogLevelReply{} } 3528 func (*NatSetLogLevelReply) GetMessageName() string { return "nat_set_log_level_reply" } 3529 func (*NatSetLogLevelReply) GetCrcString() string { return "e8d4e804" } 3530 func (*NatSetLogLevelReply) GetMessageType() api.MessageType { 3531 return api.ReplyMessage 3532 } 3533 3534 func (m *NatSetLogLevelReply) Size() (size int) { 3535 if m == nil { 3536 return 0 3537 } 3538 size += 4 // m.Retval 3539 return size 3540 } 3541 func (m *NatSetLogLevelReply) Marshal(b []byte) ([]byte, error) { 3542 if b == nil { 3543 b = make([]byte, m.Size()) 3544 } 3545 buf := codec.NewBuffer(b) 3546 buf.EncodeInt32(m.Retval) 3547 return buf.Bytes(), nil 3548 } 3549 func (m *NatSetLogLevelReply) Unmarshal(b []byte) error { 3550 buf := codec.NewBuffer(b) 3551 m.Retval = buf.DecodeInt32() 3552 return nil 3553 } 3554 3555 // NatSetMssClamping defines message 'nat_set_mss_clamping'. 3556 type NatSetMssClamping struct { 3557 MssValue uint16 `binapi:"u16,name=mss_value" json:"mss_value,omitempty"` 3558 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 3559 } 3560 3561 func (m *NatSetMssClamping) Reset() { *m = NatSetMssClamping{} } 3562 func (*NatSetMssClamping) GetMessageName() string { return "nat_set_mss_clamping" } 3563 func (*NatSetMssClamping) GetCrcString() string { return "25e90abb" } 3564 func (*NatSetMssClamping) GetMessageType() api.MessageType { 3565 return api.RequestMessage 3566 } 3567 3568 func (m *NatSetMssClamping) Size() (size int) { 3569 if m == nil { 3570 return 0 3571 } 3572 size += 2 // m.MssValue 3573 size += 1 // m.Enable 3574 return size 3575 } 3576 func (m *NatSetMssClamping) Marshal(b []byte) ([]byte, error) { 3577 if b == nil { 3578 b = make([]byte, m.Size()) 3579 } 3580 buf := codec.NewBuffer(b) 3581 buf.EncodeUint16(m.MssValue) 3582 buf.EncodeBool(m.Enable) 3583 return buf.Bytes(), nil 3584 } 3585 func (m *NatSetMssClamping) Unmarshal(b []byte) error { 3586 buf := codec.NewBuffer(b) 3587 m.MssValue = buf.DecodeUint16() 3588 m.Enable = buf.DecodeBool() 3589 return nil 3590 } 3591 3592 // NatSetMssClampingReply defines message 'nat_set_mss_clamping_reply'. 3593 type NatSetMssClampingReply struct { 3594 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3595 } 3596 3597 func (m *NatSetMssClampingReply) Reset() { *m = NatSetMssClampingReply{} } 3598 func (*NatSetMssClampingReply) GetMessageName() string { return "nat_set_mss_clamping_reply" } 3599 func (*NatSetMssClampingReply) GetCrcString() string { return "e8d4e804" } 3600 func (*NatSetMssClampingReply) GetMessageType() api.MessageType { 3601 return api.ReplyMessage 3602 } 3603 3604 func (m *NatSetMssClampingReply) Size() (size int) { 3605 if m == nil { 3606 return 0 3607 } 3608 size += 4 // m.Retval 3609 return size 3610 } 3611 func (m *NatSetMssClampingReply) Marshal(b []byte) ([]byte, error) { 3612 if b == nil { 3613 b = make([]byte, m.Size()) 3614 } 3615 buf := codec.NewBuffer(b) 3616 buf.EncodeInt32(m.Retval) 3617 return buf.Bytes(), nil 3618 } 3619 func (m *NatSetMssClampingReply) Unmarshal(b []byte) error { 3620 buf := codec.NewBuffer(b) 3621 m.Retval = buf.DecodeInt32() 3622 return nil 3623 } 3624 3625 // NatSetTimeouts defines message 'nat_set_timeouts'. 3626 // Deprecated: the message will be removed in the future versions 3627 type NatSetTimeouts struct { 3628 UDP uint32 `binapi:"u32,name=udp" json:"udp,omitempty"` 3629 TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"` 3630 TCPTransitory uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"` 3631 ICMP uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"` 3632 } 3633 3634 func (m *NatSetTimeouts) Reset() { *m = NatSetTimeouts{} } 3635 func (*NatSetTimeouts) GetMessageName() string { return "nat_set_timeouts" } 3636 func (*NatSetTimeouts) GetCrcString() string { return "d4746b16" } 3637 func (*NatSetTimeouts) GetMessageType() api.MessageType { 3638 return api.RequestMessage 3639 } 3640 3641 func (m *NatSetTimeouts) Size() (size int) { 3642 if m == nil { 3643 return 0 3644 } 3645 size += 4 // m.UDP 3646 size += 4 // m.TCPEstablished 3647 size += 4 // m.TCPTransitory 3648 size += 4 // m.ICMP 3649 return size 3650 } 3651 func (m *NatSetTimeouts) Marshal(b []byte) ([]byte, error) { 3652 if b == nil { 3653 b = make([]byte, m.Size()) 3654 } 3655 buf := codec.NewBuffer(b) 3656 buf.EncodeUint32(m.UDP) 3657 buf.EncodeUint32(m.TCPEstablished) 3658 buf.EncodeUint32(m.TCPTransitory) 3659 buf.EncodeUint32(m.ICMP) 3660 return buf.Bytes(), nil 3661 } 3662 func (m *NatSetTimeouts) Unmarshal(b []byte) error { 3663 buf := codec.NewBuffer(b) 3664 m.UDP = buf.DecodeUint32() 3665 m.TCPEstablished = buf.DecodeUint32() 3666 m.TCPTransitory = buf.DecodeUint32() 3667 m.ICMP = buf.DecodeUint32() 3668 return nil 3669 } 3670 3671 // NatSetTimeoutsReply defines message 'nat_set_timeouts_reply'. 3672 // Deprecated: the message will be removed in the future versions 3673 type NatSetTimeoutsReply struct { 3674 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3675 } 3676 3677 func (m *NatSetTimeoutsReply) Reset() { *m = NatSetTimeoutsReply{} } 3678 func (*NatSetTimeoutsReply) GetMessageName() string { return "nat_set_timeouts_reply" } 3679 func (*NatSetTimeoutsReply) GetCrcString() string { return "e8d4e804" } 3680 func (*NatSetTimeoutsReply) GetMessageType() api.MessageType { 3681 return api.ReplyMessage 3682 } 3683 3684 func (m *NatSetTimeoutsReply) Size() (size int) { 3685 if m == nil { 3686 return 0 3687 } 3688 size += 4 // m.Retval 3689 return size 3690 } 3691 func (m *NatSetTimeoutsReply) Marshal(b []byte) ([]byte, error) { 3692 if b == nil { 3693 b = make([]byte, m.Size()) 3694 } 3695 buf := codec.NewBuffer(b) 3696 buf.EncodeInt32(m.Retval) 3697 return buf.Bytes(), nil 3698 } 3699 func (m *NatSetTimeoutsReply) Unmarshal(b []byte) error { 3700 buf := codec.NewBuffer(b) 3701 m.Retval = buf.DecodeInt32() 3702 return nil 3703 } 3704 3705 // NatSetWorkers defines message 'nat_set_workers'. 3706 type NatSetWorkers struct { 3707 WorkerMask uint64 `binapi:"u64,name=worker_mask" json:"worker_mask,omitempty"` 3708 } 3709 3710 func (m *NatSetWorkers) Reset() { *m = NatSetWorkers{} } 3711 func (*NatSetWorkers) GetMessageName() string { return "nat_set_workers" } 3712 func (*NatSetWorkers) GetCrcString() string { return "da926638" } 3713 func (*NatSetWorkers) GetMessageType() api.MessageType { 3714 return api.RequestMessage 3715 } 3716 3717 func (m *NatSetWorkers) Size() (size int) { 3718 if m == nil { 3719 return 0 3720 } 3721 size += 8 // m.WorkerMask 3722 return size 3723 } 3724 func (m *NatSetWorkers) Marshal(b []byte) ([]byte, error) { 3725 if b == nil { 3726 b = make([]byte, m.Size()) 3727 } 3728 buf := codec.NewBuffer(b) 3729 buf.EncodeUint64(m.WorkerMask) 3730 return buf.Bytes(), nil 3731 } 3732 func (m *NatSetWorkers) Unmarshal(b []byte) error { 3733 buf := codec.NewBuffer(b) 3734 m.WorkerMask = buf.DecodeUint64() 3735 return nil 3736 } 3737 3738 // NatSetWorkersReply defines message 'nat_set_workers_reply'. 3739 type NatSetWorkersReply struct { 3740 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3741 } 3742 3743 func (m *NatSetWorkersReply) Reset() { *m = NatSetWorkersReply{} } 3744 func (*NatSetWorkersReply) GetMessageName() string { return "nat_set_workers_reply" } 3745 func (*NatSetWorkersReply) GetCrcString() string { return "e8d4e804" } 3746 func (*NatSetWorkersReply) GetMessageType() api.MessageType { 3747 return api.ReplyMessage 3748 } 3749 3750 func (m *NatSetWorkersReply) Size() (size int) { 3751 if m == nil { 3752 return 0 3753 } 3754 size += 4 // m.Retval 3755 return size 3756 } 3757 func (m *NatSetWorkersReply) Marshal(b []byte) ([]byte, error) { 3758 if b == nil { 3759 b = make([]byte, m.Size()) 3760 } 3761 buf := codec.NewBuffer(b) 3762 buf.EncodeInt32(m.Retval) 3763 return buf.Bytes(), nil 3764 } 3765 func (m *NatSetWorkersReply) Unmarshal(b []byte) error { 3766 buf := codec.NewBuffer(b) 3767 m.Retval = buf.DecodeInt32() 3768 return nil 3769 } 3770 3771 // NatShowConfig defines message 'nat_show_config'. 3772 // Deprecated: the message will be removed in the future versions 3773 type NatShowConfig struct{} 3774 3775 func (m *NatShowConfig) Reset() { *m = NatShowConfig{} } 3776 func (*NatShowConfig) GetMessageName() string { return "nat_show_config" } 3777 func (*NatShowConfig) GetCrcString() string { return "51077d14" } 3778 func (*NatShowConfig) GetMessageType() api.MessageType { 3779 return api.RequestMessage 3780 } 3781 3782 func (m *NatShowConfig) Size() (size int) { 3783 if m == nil { 3784 return 0 3785 } 3786 return size 3787 } 3788 func (m *NatShowConfig) Marshal(b []byte) ([]byte, error) { 3789 if b == nil { 3790 b = make([]byte, m.Size()) 3791 } 3792 buf := codec.NewBuffer(b) 3793 return buf.Bytes(), nil 3794 } 3795 func (m *NatShowConfig) Unmarshal(b []byte) error { 3796 return nil 3797 } 3798 3799 // NatShowConfig2 defines message 'nat_show_config_2'. 3800 // Deprecated: the message will be removed in the future versions 3801 type NatShowConfig2 struct{} 3802 3803 func (m *NatShowConfig2) Reset() { *m = NatShowConfig2{} } 3804 func (*NatShowConfig2) GetMessageName() string { return "nat_show_config_2" } 3805 func (*NatShowConfig2) GetCrcString() string { return "51077d14" } 3806 func (*NatShowConfig2) GetMessageType() api.MessageType { 3807 return api.RequestMessage 3808 } 3809 3810 func (m *NatShowConfig2) Size() (size int) { 3811 if m == nil { 3812 return 0 3813 } 3814 return size 3815 } 3816 func (m *NatShowConfig2) Marshal(b []byte) ([]byte, error) { 3817 if b == nil { 3818 b = make([]byte, m.Size()) 3819 } 3820 buf := codec.NewBuffer(b) 3821 return buf.Bytes(), nil 3822 } 3823 func (m *NatShowConfig2) Unmarshal(b []byte) error { 3824 return nil 3825 } 3826 3827 // NatShowConfig2Reply defines message 'nat_show_config_2_reply'. 3828 // Deprecated: the message will be removed in the future versions 3829 type NatShowConfig2Reply struct { 3830 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3831 StaticMappingOnly bool `binapi:"bool,name=static_mapping_only" json:"static_mapping_only,omitempty"` 3832 StaticMappingConnectionTracking bool `binapi:"bool,name=static_mapping_connection_tracking" json:"static_mapping_connection_tracking,omitempty"` 3833 Deterministic bool `binapi:"bool,name=deterministic" json:"deterministic,omitempty"` 3834 EndpointDependent bool `binapi:"bool,name=endpoint_dependent" json:"endpoint_dependent,omitempty"` 3835 Out2inDpo bool `binapi:"bool,name=out2in_dpo" json:"out2in_dpo,omitempty"` 3836 DsliteCe bool `binapi:"bool,name=dslite_ce" json:"dslite_ce,omitempty"` 3837 TranslationBuckets uint32 `binapi:"u32,name=translation_buckets" json:"translation_buckets,omitempty"` 3838 TranslationMemorySize uint64 `binapi:"u64,name=translation_memory_size" json:"translation_memory_size,omitempty"` 3839 UserBuckets uint32 `binapi:"u32,name=user_buckets" json:"user_buckets,omitempty"` 3840 UserMemorySize uint64 `binapi:"u64,name=user_memory_size" json:"user_memory_size,omitempty"` 3841 MaxTranslationsPerUser uint32 `binapi:"u32,name=max_translations_per_user" json:"max_translations_per_user,omitempty"` 3842 OutsideVrfID uint32 `binapi:"u32,name=outside_vrf_id" json:"outside_vrf_id,omitempty"` 3843 InsideVrfID uint32 `binapi:"u32,name=inside_vrf_id" json:"inside_vrf_id,omitempty"` 3844 Nat64BibBuckets uint32 `binapi:"u32,name=nat64_bib_buckets" json:"nat64_bib_buckets,omitempty"` 3845 Nat64BibMemorySize uint64 `binapi:"u64,name=nat64_bib_memory_size" json:"nat64_bib_memory_size,omitempty"` 3846 Nat64StBuckets uint32 `binapi:"u32,name=nat64_st_buckets" json:"nat64_st_buckets,omitempty"` 3847 Nat64StMemorySize uint64 `binapi:"u64,name=nat64_st_memory_size" json:"nat64_st_memory_size,omitempty"` 3848 MaxTranslationsPerThread uint32 `binapi:"u32,name=max_translations_per_thread" json:"max_translations_per_thread,omitempty"` 3849 MaxUsersPerThread uint32 `binapi:"u32,name=max_users_per_thread" json:"max_users_per_thread,omitempty"` 3850 } 3851 3852 func (m *NatShowConfig2Reply) Reset() { *m = NatShowConfig2Reply{} } 3853 func (*NatShowConfig2Reply) GetMessageName() string { return "nat_show_config_2_reply" } 3854 func (*NatShowConfig2Reply) GetCrcString() string { return "0404a5b4" } 3855 func (*NatShowConfig2Reply) GetMessageType() api.MessageType { 3856 return api.ReplyMessage 3857 } 3858 3859 func (m *NatShowConfig2Reply) Size() (size int) { 3860 if m == nil { 3861 return 0 3862 } 3863 size += 4 // m.Retval 3864 size += 1 // m.StaticMappingOnly 3865 size += 1 // m.StaticMappingConnectionTracking 3866 size += 1 // m.Deterministic 3867 size += 1 // m.EndpointDependent 3868 size += 1 // m.Out2inDpo 3869 size += 1 // m.DsliteCe 3870 size += 4 // m.TranslationBuckets 3871 size += 8 // m.TranslationMemorySize 3872 size += 4 // m.UserBuckets 3873 size += 8 // m.UserMemorySize 3874 size += 4 // m.MaxTranslationsPerUser 3875 size += 4 // m.OutsideVrfID 3876 size += 4 // m.InsideVrfID 3877 size += 4 // m.Nat64BibBuckets 3878 size += 8 // m.Nat64BibMemorySize 3879 size += 4 // m.Nat64StBuckets 3880 size += 8 // m.Nat64StMemorySize 3881 size += 4 // m.MaxTranslationsPerThread 3882 size += 4 // m.MaxUsersPerThread 3883 return size 3884 } 3885 func (m *NatShowConfig2Reply) Marshal(b []byte) ([]byte, error) { 3886 if b == nil { 3887 b = make([]byte, m.Size()) 3888 } 3889 buf := codec.NewBuffer(b) 3890 buf.EncodeInt32(m.Retval) 3891 buf.EncodeBool(m.StaticMappingOnly) 3892 buf.EncodeBool(m.StaticMappingConnectionTracking) 3893 buf.EncodeBool(m.Deterministic) 3894 buf.EncodeBool(m.EndpointDependent) 3895 buf.EncodeBool(m.Out2inDpo) 3896 buf.EncodeBool(m.DsliteCe) 3897 buf.EncodeUint32(m.TranslationBuckets) 3898 buf.EncodeUint64(m.TranslationMemorySize) 3899 buf.EncodeUint32(m.UserBuckets) 3900 buf.EncodeUint64(m.UserMemorySize) 3901 buf.EncodeUint32(m.MaxTranslationsPerUser) 3902 buf.EncodeUint32(m.OutsideVrfID) 3903 buf.EncodeUint32(m.InsideVrfID) 3904 buf.EncodeUint32(m.Nat64BibBuckets) 3905 buf.EncodeUint64(m.Nat64BibMemorySize) 3906 buf.EncodeUint32(m.Nat64StBuckets) 3907 buf.EncodeUint64(m.Nat64StMemorySize) 3908 buf.EncodeUint32(m.MaxTranslationsPerThread) 3909 buf.EncodeUint32(m.MaxUsersPerThread) 3910 return buf.Bytes(), nil 3911 } 3912 func (m *NatShowConfig2Reply) Unmarshal(b []byte) error { 3913 buf := codec.NewBuffer(b) 3914 m.Retval = buf.DecodeInt32() 3915 m.StaticMappingOnly = buf.DecodeBool() 3916 m.StaticMappingConnectionTracking = buf.DecodeBool() 3917 m.Deterministic = buf.DecodeBool() 3918 m.EndpointDependent = buf.DecodeBool() 3919 m.Out2inDpo = buf.DecodeBool() 3920 m.DsliteCe = buf.DecodeBool() 3921 m.TranslationBuckets = buf.DecodeUint32() 3922 m.TranslationMemorySize = buf.DecodeUint64() 3923 m.UserBuckets = buf.DecodeUint32() 3924 m.UserMemorySize = buf.DecodeUint64() 3925 m.MaxTranslationsPerUser = buf.DecodeUint32() 3926 m.OutsideVrfID = buf.DecodeUint32() 3927 m.InsideVrfID = buf.DecodeUint32() 3928 m.Nat64BibBuckets = buf.DecodeUint32() 3929 m.Nat64BibMemorySize = buf.DecodeUint64() 3930 m.Nat64StBuckets = buf.DecodeUint32() 3931 m.Nat64StMemorySize = buf.DecodeUint64() 3932 m.MaxTranslationsPerThread = buf.DecodeUint32() 3933 m.MaxUsersPerThread = buf.DecodeUint32() 3934 return nil 3935 } 3936 3937 // NatShowConfigReply defines message 'nat_show_config_reply'. 3938 // Deprecated: the message will be removed in the future versions 3939 type NatShowConfigReply struct { 3940 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3941 StaticMappingOnly bool `binapi:"bool,name=static_mapping_only" json:"static_mapping_only,omitempty"` 3942 StaticMappingConnectionTracking bool `binapi:"bool,name=static_mapping_connection_tracking" json:"static_mapping_connection_tracking,omitempty"` 3943 Deterministic bool `binapi:"bool,name=deterministic" json:"deterministic,omitempty"` 3944 EndpointDependent bool `binapi:"bool,name=endpoint_dependent" json:"endpoint_dependent,omitempty"` 3945 Out2inDpo bool `binapi:"bool,name=out2in_dpo" json:"out2in_dpo,omitempty"` 3946 DsliteCe bool `binapi:"bool,name=dslite_ce" json:"dslite_ce,omitempty"` 3947 TranslationBuckets uint32 `binapi:"u32,name=translation_buckets" json:"translation_buckets,omitempty"` 3948 TranslationMemorySize uint32 `binapi:"u32,name=translation_memory_size" json:"translation_memory_size,omitempty"` 3949 UserBuckets uint32 `binapi:"u32,name=user_buckets" json:"user_buckets,omitempty"` 3950 UserMemorySize uint64 `binapi:"u64,name=user_memory_size" json:"user_memory_size,omitempty"` 3951 MaxTranslationsPerUser uint32 `binapi:"u32,name=max_translations_per_user" json:"max_translations_per_user,omitempty"` 3952 OutsideVrfID uint32 `binapi:"u32,name=outside_vrf_id" json:"outside_vrf_id,omitempty"` 3953 InsideVrfID uint32 `binapi:"u32,name=inside_vrf_id" json:"inside_vrf_id,omitempty"` 3954 Nat64BibBuckets uint32 `binapi:"u32,name=nat64_bib_buckets" json:"nat64_bib_buckets,omitempty"` 3955 Nat64BibMemorySize uint64 `binapi:"u64,name=nat64_bib_memory_size" json:"nat64_bib_memory_size,omitempty"` 3956 Nat64StBuckets uint32 `binapi:"u32,name=nat64_st_buckets" json:"nat64_st_buckets,omitempty"` 3957 Nat64StMemorySize uint64 `binapi:"u64,name=nat64_st_memory_size" json:"nat64_st_memory_size,omitempty"` 3958 } 3959 3960 func (m *NatShowConfigReply) Reset() { *m = NatShowConfigReply{} } 3961 func (*NatShowConfigReply) GetMessageName() string { return "nat_show_config_reply" } 3962 func (*NatShowConfigReply) GetCrcString() string { return "7903ef06" } 3963 func (*NatShowConfigReply) GetMessageType() api.MessageType { 3964 return api.ReplyMessage 3965 } 3966 3967 func (m *NatShowConfigReply) Size() (size int) { 3968 if m == nil { 3969 return 0 3970 } 3971 size += 4 // m.Retval 3972 size += 1 // m.StaticMappingOnly 3973 size += 1 // m.StaticMappingConnectionTracking 3974 size += 1 // m.Deterministic 3975 size += 1 // m.EndpointDependent 3976 size += 1 // m.Out2inDpo 3977 size += 1 // m.DsliteCe 3978 size += 4 // m.TranslationBuckets 3979 size += 4 // m.TranslationMemorySize 3980 size += 4 // m.UserBuckets 3981 size += 8 // m.UserMemorySize 3982 size += 4 // m.MaxTranslationsPerUser 3983 size += 4 // m.OutsideVrfID 3984 size += 4 // m.InsideVrfID 3985 size += 4 // m.Nat64BibBuckets 3986 size += 8 // m.Nat64BibMemorySize 3987 size += 4 // m.Nat64StBuckets 3988 size += 8 // m.Nat64StMemorySize 3989 return size 3990 } 3991 func (m *NatShowConfigReply) Marshal(b []byte) ([]byte, error) { 3992 if b == nil { 3993 b = make([]byte, m.Size()) 3994 } 3995 buf := codec.NewBuffer(b) 3996 buf.EncodeInt32(m.Retval) 3997 buf.EncodeBool(m.StaticMappingOnly) 3998 buf.EncodeBool(m.StaticMappingConnectionTracking) 3999 buf.EncodeBool(m.Deterministic) 4000 buf.EncodeBool(m.EndpointDependent) 4001 buf.EncodeBool(m.Out2inDpo) 4002 buf.EncodeBool(m.DsliteCe) 4003 buf.EncodeUint32(m.TranslationBuckets) 4004 buf.EncodeUint32(m.TranslationMemorySize) 4005 buf.EncodeUint32(m.UserBuckets) 4006 buf.EncodeUint64(m.UserMemorySize) 4007 buf.EncodeUint32(m.MaxTranslationsPerUser) 4008 buf.EncodeUint32(m.OutsideVrfID) 4009 buf.EncodeUint32(m.InsideVrfID) 4010 buf.EncodeUint32(m.Nat64BibBuckets) 4011 buf.EncodeUint64(m.Nat64BibMemorySize) 4012 buf.EncodeUint32(m.Nat64StBuckets) 4013 buf.EncodeUint64(m.Nat64StMemorySize) 4014 return buf.Bytes(), nil 4015 } 4016 func (m *NatShowConfigReply) Unmarshal(b []byte) error { 4017 buf := codec.NewBuffer(b) 4018 m.Retval = buf.DecodeInt32() 4019 m.StaticMappingOnly = buf.DecodeBool() 4020 m.StaticMappingConnectionTracking = buf.DecodeBool() 4021 m.Deterministic = buf.DecodeBool() 4022 m.EndpointDependent = buf.DecodeBool() 4023 m.Out2inDpo = buf.DecodeBool() 4024 m.DsliteCe = buf.DecodeBool() 4025 m.TranslationBuckets = buf.DecodeUint32() 4026 m.TranslationMemorySize = buf.DecodeUint32() 4027 m.UserBuckets = buf.DecodeUint32() 4028 m.UserMemorySize = buf.DecodeUint64() 4029 m.MaxTranslationsPerUser = buf.DecodeUint32() 4030 m.OutsideVrfID = buf.DecodeUint32() 4031 m.InsideVrfID = buf.DecodeUint32() 4032 m.Nat64BibBuckets = buf.DecodeUint32() 4033 m.Nat64BibMemorySize = buf.DecodeUint64() 4034 m.Nat64StBuckets = buf.DecodeUint32() 4035 m.Nat64StMemorySize = buf.DecodeUint64() 4036 return nil 4037 } 4038 4039 // NatWorkerDetails defines message 'nat_worker_details'. 4040 type NatWorkerDetails struct { 4041 WorkerIndex uint32 `binapi:"u32,name=worker_index" json:"worker_index,omitempty"` 4042 LcoreID uint32 `binapi:"u32,name=lcore_id" json:"lcore_id,omitempty"` 4043 Name string `binapi:"string[64],name=name" json:"name,omitempty"` 4044 } 4045 4046 func (m *NatWorkerDetails) Reset() { *m = NatWorkerDetails{} } 4047 func (*NatWorkerDetails) GetMessageName() string { return "nat_worker_details" } 4048 func (*NatWorkerDetails) GetCrcString() string { return "84bf06fc" } 4049 func (*NatWorkerDetails) GetMessageType() api.MessageType { 4050 return api.ReplyMessage 4051 } 4052 4053 func (m *NatWorkerDetails) Size() (size int) { 4054 if m == nil { 4055 return 0 4056 } 4057 size += 4 // m.WorkerIndex 4058 size += 4 // m.LcoreID 4059 size += 64 // m.Name 4060 return size 4061 } 4062 func (m *NatWorkerDetails) Marshal(b []byte) ([]byte, error) { 4063 if b == nil { 4064 b = make([]byte, m.Size()) 4065 } 4066 buf := codec.NewBuffer(b) 4067 buf.EncodeUint32(m.WorkerIndex) 4068 buf.EncodeUint32(m.LcoreID) 4069 buf.EncodeString(m.Name, 64) 4070 return buf.Bytes(), nil 4071 } 4072 func (m *NatWorkerDetails) Unmarshal(b []byte) error { 4073 buf := codec.NewBuffer(b) 4074 m.WorkerIndex = buf.DecodeUint32() 4075 m.LcoreID = buf.DecodeUint32() 4076 m.Name = buf.DecodeString(64) 4077 return nil 4078 } 4079 4080 // NatWorkerDump defines message 'nat_worker_dump'. 4081 type NatWorkerDump struct{} 4082 4083 func (m *NatWorkerDump) Reset() { *m = NatWorkerDump{} } 4084 func (*NatWorkerDump) GetMessageName() string { return "nat_worker_dump" } 4085 func (*NatWorkerDump) GetCrcString() string { return "51077d14" } 4086 func (*NatWorkerDump) GetMessageType() api.MessageType { 4087 return api.RequestMessage 4088 } 4089 4090 func (m *NatWorkerDump) Size() (size int) { 4091 if m == nil { 4092 return 0 4093 } 4094 return size 4095 } 4096 func (m *NatWorkerDump) Marshal(b []byte) ([]byte, error) { 4097 if b == nil { 4098 b = make([]byte, m.Size()) 4099 } 4100 buf := codec.NewBuffer(b) 4101 return buf.Bytes(), nil 4102 } 4103 func (m *NatWorkerDump) Unmarshal(b []byte) error { 4104 return nil 4105 } 4106 4107 func init() { file_nat44_ed_binapi_init() } 4108 func file_nat44_ed_binapi_init() { 4109 api.RegisterMessage((*Nat44AddDelAddressRange)(nil), "nat44_add_del_address_range_6f2b8055") 4110 api.RegisterMessage((*Nat44AddDelAddressRangeReply)(nil), "nat44_add_del_address_range_reply_e8d4e804") 4111 api.RegisterMessage((*Nat44AddDelIdentityMapping)(nil), "nat44_add_del_identity_mapping_02faaa22") 4112 api.RegisterMessage((*Nat44AddDelIdentityMappingReply)(nil), "nat44_add_del_identity_mapping_reply_e8d4e804") 4113 api.RegisterMessage((*Nat44AddDelInterfaceAddr)(nil), "nat44_add_del_interface_addr_4aed50c0") 4114 api.RegisterMessage((*Nat44AddDelInterfaceAddrReply)(nil), "nat44_add_del_interface_addr_reply_e8d4e804") 4115 api.RegisterMessage((*Nat44AddDelLbStaticMapping)(nil), "nat44_add_del_lb_static_mapping_4f68ee9d") 4116 api.RegisterMessage((*Nat44AddDelLbStaticMappingReply)(nil), "nat44_add_del_lb_static_mapping_reply_e8d4e804") 4117 api.RegisterMessage((*Nat44AddDelStaticMapping)(nil), "nat44_add_del_static_mapping_5ae5f03e") 4118 api.RegisterMessage((*Nat44AddDelStaticMappingReply)(nil), "nat44_add_del_static_mapping_reply_e8d4e804") 4119 api.RegisterMessage((*Nat44AddDelStaticMappingV2)(nil), "nat44_add_del_static_mapping_v2_5e205f1a") 4120 api.RegisterMessage((*Nat44AddDelStaticMappingV2Reply)(nil), "nat44_add_del_static_mapping_v2_reply_e8d4e804") 4121 api.RegisterMessage((*Nat44AddressDetails)(nil), "nat44_address_details_0d1beac1") 4122 api.RegisterMessage((*Nat44AddressDump)(nil), "nat44_address_dump_51077d14") 4123 api.RegisterMessage((*Nat44DelSession)(nil), "nat44_del_session_15a5bf8c") 4124 api.RegisterMessage((*Nat44DelSessionReply)(nil), "nat44_del_session_reply_e8d4e804") 4125 api.RegisterMessage((*Nat44DelUser)(nil), "nat44_del_user_99a9f998") 4126 api.RegisterMessage((*Nat44DelUserReply)(nil), "nat44_del_user_reply_e8d4e804") 4127 api.RegisterMessage((*Nat44EdPluginEnableDisable)(nil), "nat44_ed_plugin_enable_disable_be17f8dd") 4128 api.RegisterMessage((*Nat44EdPluginEnableDisableReply)(nil), "nat44_ed_plugin_enable_disable_reply_e8d4e804") 4129 api.RegisterMessage((*Nat44EdSetFqOptions)(nil), "nat44_ed_set_fq_options_2399bd71") 4130 api.RegisterMessage((*Nat44EdSetFqOptionsReply)(nil), "nat44_ed_set_fq_options_reply_e8d4e804") 4131 api.RegisterMessage((*Nat44EdShowFqOptions)(nil), "nat44_ed_show_fq_options_51077d14") 4132 api.RegisterMessage((*Nat44EdShowFqOptionsReply)(nil), "nat44_ed_show_fq_options_reply_7213b545") 4133 api.RegisterMessage((*Nat44ForwardingEnableDisable)(nil), "nat44_forwarding_enable_disable_b3e225d2") 4134 api.RegisterMessage((*Nat44ForwardingEnableDisableReply)(nil), "nat44_forwarding_enable_disable_reply_e8d4e804") 4135 api.RegisterMessage((*Nat44ForwardingIsEnabled)(nil), "nat44_forwarding_is_enabled_51077d14") 4136 api.RegisterMessage((*Nat44ForwardingIsEnabledReply)(nil), "nat44_forwarding_is_enabled_reply_46924a06") 4137 api.RegisterMessage((*Nat44IdentityMappingDetails)(nil), "nat44_identity_mapping_details_2a52a030") 4138 api.RegisterMessage((*Nat44IdentityMappingDump)(nil), "nat44_identity_mapping_dump_51077d14") 4139 api.RegisterMessage((*Nat44InterfaceAddDelFeature)(nil), "nat44_interface_add_del_feature_f3699b83") 4140 api.RegisterMessage((*Nat44InterfaceAddDelFeatureReply)(nil), "nat44_interface_add_del_feature_reply_e8d4e804") 4141 api.RegisterMessage((*Nat44InterfaceAddDelOutputFeature)(nil), "nat44_interface_add_del_output_feature_f3699b83") 4142 api.RegisterMessage((*Nat44InterfaceAddDelOutputFeatureReply)(nil), "nat44_interface_add_del_output_feature_reply_e8d4e804") 4143 api.RegisterMessage((*Nat44InterfaceAddrDetails)(nil), "nat44_interface_addr_details_e4aca9ca") 4144 api.RegisterMessage((*Nat44InterfaceAddrDump)(nil), "nat44_interface_addr_dump_51077d14") 4145 api.RegisterMessage((*Nat44InterfaceDetails)(nil), "nat44_interface_details_5d286289") 4146 api.RegisterMessage((*Nat44InterfaceDump)(nil), "nat44_interface_dump_51077d14") 4147 api.RegisterMessage((*Nat44InterfaceOutputFeatureDetails)(nil), "nat44_interface_output_feature_details_5d286289") 4148 api.RegisterMessage((*Nat44InterfaceOutputFeatureDump)(nil), "nat44_interface_output_feature_dump_51077d14") 4149 api.RegisterMessage((*Nat44LbStaticMappingAddDelLocal)(nil), "nat44_lb_static_mapping_add_del_local_7ca47547") 4150 api.RegisterMessage((*Nat44LbStaticMappingAddDelLocalReply)(nil), "nat44_lb_static_mapping_add_del_local_reply_e8d4e804") 4151 api.RegisterMessage((*Nat44LbStaticMappingDetails)(nil), "nat44_lb_static_mapping_details_ed5ce876") 4152 api.RegisterMessage((*Nat44LbStaticMappingDump)(nil), "nat44_lb_static_mapping_dump_51077d14") 4153 api.RegisterMessage((*Nat44PluginEnableDisable)(nil), "nat44_plugin_enable_disable_dea0d501") 4154 api.RegisterMessage((*Nat44PluginEnableDisableReply)(nil), "nat44_plugin_enable_disable_reply_e8d4e804") 4155 api.RegisterMessage((*Nat44SessionCleanup)(nil), "nat44_session_cleanup_51077d14") 4156 api.RegisterMessage((*Nat44SessionCleanupReply)(nil), "nat44_session_cleanup_reply_e8d4e804") 4157 api.RegisterMessage((*Nat44SetSessionLimit)(nil), "nat44_set_session_limit_8899bbb1") 4158 api.RegisterMessage((*Nat44SetSessionLimitReply)(nil), "nat44_set_session_limit_reply_e8d4e804") 4159 api.RegisterMessage((*Nat44ShowRunningConfig)(nil), "nat44_show_running_config_51077d14") 4160 api.RegisterMessage((*Nat44ShowRunningConfigReply)(nil), "nat44_show_running_config_reply_93d8e267") 4161 api.RegisterMessage((*Nat44StaticMappingDetails)(nil), "nat44_static_mapping_details_06cb40b2") 4162 api.RegisterMessage((*Nat44StaticMappingDump)(nil), "nat44_static_mapping_dump_51077d14") 4163 api.RegisterMessage((*Nat44UserDetails)(nil), "nat44_user_details_355896c2") 4164 api.RegisterMessage((*Nat44UserDump)(nil), "nat44_user_dump_51077d14") 4165 api.RegisterMessage((*Nat44UserSessionDetails)(nil), "nat44_user_session_details_2cf6e16d") 4166 api.RegisterMessage((*Nat44UserSessionDump)(nil), "nat44_user_session_dump_e1899c98") 4167 api.RegisterMessage((*NatControlPing)(nil), "nat_control_ping_51077d14") 4168 api.RegisterMessage((*NatControlPingReply)(nil), "nat_control_ping_reply_f6b0b8ca") 4169 api.RegisterMessage((*NatGetAddrAndPortAllocAlg)(nil), "nat_get_addr_and_port_alloc_alg_51077d14") 4170 api.RegisterMessage((*NatGetAddrAndPortAllocAlgReply)(nil), "nat_get_addr_and_port_alloc_alg_reply_3607a7d0") 4171 api.RegisterMessage((*NatGetMssClamping)(nil), "nat_get_mss_clamping_51077d14") 4172 api.RegisterMessage((*NatGetMssClampingReply)(nil), "nat_get_mss_clamping_reply_1c0b2a78") 4173 api.RegisterMessage((*NatGetTimeouts)(nil), "nat_get_timeouts_51077d14") 4174 api.RegisterMessage((*NatGetTimeoutsReply)(nil), "nat_get_timeouts_reply_3c4df4e1") 4175 api.RegisterMessage((*NatHaFlush)(nil), "nat_ha_flush_51077d14") 4176 api.RegisterMessage((*NatHaFlushReply)(nil), "nat_ha_flush_reply_e8d4e804") 4177 api.RegisterMessage((*NatHaGetFailover)(nil), "nat_ha_get_failover_51077d14") 4178 api.RegisterMessage((*NatHaGetFailoverReply)(nil), "nat_ha_get_failover_reply_a67d8752") 4179 api.RegisterMessage((*NatHaGetListener)(nil), "nat_ha_get_listener_51077d14") 4180 api.RegisterMessage((*NatHaGetListenerReply)(nil), "nat_ha_get_listener_reply_123ea41f") 4181 api.RegisterMessage((*NatHaResync)(nil), "nat_ha_resync_c8ab9e03") 4182 api.RegisterMessage((*NatHaResyncCompletedEvent)(nil), "nat_ha_resync_completed_event_fdc598fb") 4183 api.RegisterMessage((*NatHaResyncReply)(nil), "nat_ha_resync_reply_e8d4e804") 4184 api.RegisterMessage((*NatHaSetFailover)(nil), "nat_ha_set_failover_718246af") 4185 api.RegisterMessage((*NatHaSetFailoverReply)(nil), "nat_ha_set_failover_reply_e8d4e804") 4186 api.RegisterMessage((*NatHaSetListener)(nil), "nat_ha_set_listener_e4a8cb4e") 4187 api.RegisterMessage((*NatHaSetListenerReply)(nil), "nat_ha_set_listener_reply_e8d4e804") 4188 api.RegisterMessage((*NatIpfixEnableDisable)(nil), "nat_ipfix_enable_disable_9af4a2d2") 4189 api.RegisterMessage((*NatIpfixEnableDisableReply)(nil), "nat_ipfix_enable_disable_reply_e8d4e804") 4190 api.RegisterMessage((*NatSetAddrAndPortAllocAlg)(nil), "nat_set_addr_and_port_alloc_alg_deeb746f") 4191 api.RegisterMessage((*NatSetAddrAndPortAllocAlgReply)(nil), "nat_set_addr_and_port_alloc_alg_reply_e8d4e804") 4192 api.RegisterMessage((*NatSetLogLevel)(nil), "nat_set_log_level_70076bfe") 4193 api.RegisterMessage((*NatSetLogLevelReply)(nil), "nat_set_log_level_reply_e8d4e804") 4194 api.RegisterMessage((*NatSetMssClamping)(nil), "nat_set_mss_clamping_25e90abb") 4195 api.RegisterMessage((*NatSetMssClampingReply)(nil), "nat_set_mss_clamping_reply_e8d4e804") 4196 api.RegisterMessage((*NatSetTimeouts)(nil), "nat_set_timeouts_d4746b16") 4197 api.RegisterMessage((*NatSetTimeoutsReply)(nil), "nat_set_timeouts_reply_e8d4e804") 4198 api.RegisterMessage((*NatSetWorkers)(nil), "nat_set_workers_da926638") 4199 api.RegisterMessage((*NatSetWorkersReply)(nil), "nat_set_workers_reply_e8d4e804") 4200 api.RegisterMessage((*NatShowConfig)(nil), "nat_show_config_51077d14") 4201 api.RegisterMessage((*NatShowConfig2)(nil), "nat_show_config_2_51077d14") 4202 api.RegisterMessage((*NatShowConfig2Reply)(nil), "nat_show_config_2_reply_0404a5b4") 4203 api.RegisterMessage((*NatShowConfigReply)(nil), "nat_show_config_reply_7903ef06") 4204 api.RegisterMessage((*NatWorkerDetails)(nil), "nat_worker_details_84bf06fc") 4205 api.RegisterMessage((*NatWorkerDump)(nil), "nat_worker_dump_51077d14") 4206 } 4207 4208 // Messages returns list of all messages in this module. 4209 func AllMessages() []api.Message { 4210 return []api.Message{ 4211 (*Nat44AddDelAddressRange)(nil), 4212 (*Nat44AddDelAddressRangeReply)(nil), 4213 (*Nat44AddDelIdentityMapping)(nil), 4214 (*Nat44AddDelIdentityMappingReply)(nil), 4215 (*Nat44AddDelInterfaceAddr)(nil), 4216 (*Nat44AddDelInterfaceAddrReply)(nil), 4217 (*Nat44AddDelLbStaticMapping)(nil), 4218 (*Nat44AddDelLbStaticMappingReply)(nil), 4219 (*Nat44AddDelStaticMapping)(nil), 4220 (*Nat44AddDelStaticMappingReply)(nil), 4221 (*Nat44AddDelStaticMappingV2)(nil), 4222 (*Nat44AddDelStaticMappingV2Reply)(nil), 4223 (*Nat44AddressDetails)(nil), 4224 (*Nat44AddressDump)(nil), 4225 (*Nat44DelSession)(nil), 4226 (*Nat44DelSessionReply)(nil), 4227 (*Nat44DelUser)(nil), 4228 (*Nat44DelUserReply)(nil), 4229 (*Nat44EdPluginEnableDisable)(nil), 4230 (*Nat44EdPluginEnableDisableReply)(nil), 4231 (*Nat44EdSetFqOptions)(nil), 4232 (*Nat44EdSetFqOptionsReply)(nil), 4233 (*Nat44EdShowFqOptions)(nil), 4234 (*Nat44EdShowFqOptionsReply)(nil), 4235 (*Nat44ForwardingEnableDisable)(nil), 4236 (*Nat44ForwardingEnableDisableReply)(nil), 4237 (*Nat44ForwardingIsEnabled)(nil), 4238 (*Nat44ForwardingIsEnabledReply)(nil), 4239 (*Nat44IdentityMappingDetails)(nil), 4240 (*Nat44IdentityMappingDump)(nil), 4241 (*Nat44InterfaceAddDelFeature)(nil), 4242 (*Nat44InterfaceAddDelFeatureReply)(nil), 4243 (*Nat44InterfaceAddDelOutputFeature)(nil), 4244 (*Nat44InterfaceAddDelOutputFeatureReply)(nil), 4245 (*Nat44InterfaceAddrDetails)(nil), 4246 (*Nat44InterfaceAddrDump)(nil), 4247 (*Nat44InterfaceDetails)(nil), 4248 (*Nat44InterfaceDump)(nil), 4249 (*Nat44InterfaceOutputFeatureDetails)(nil), 4250 (*Nat44InterfaceOutputFeatureDump)(nil), 4251 (*Nat44LbStaticMappingAddDelLocal)(nil), 4252 (*Nat44LbStaticMappingAddDelLocalReply)(nil), 4253 (*Nat44LbStaticMappingDetails)(nil), 4254 (*Nat44LbStaticMappingDump)(nil), 4255 (*Nat44PluginEnableDisable)(nil), 4256 (*Nat44PluginEnableDisableReply)(nil), 4257 (*Nat44SessionCleanup)(nil), 4258 (*Nat44SessionCleanupReply)(nil), 4259 (*Nat44SetSessionLimit)(nil), 4260 (*Nat44SetSessionLimitReply)(nil), 4261 (*Nat44ShowRunningConfig)(nil), 4262 (*Nat44ShowRunningConfigReply)(nil), 4263 (*Nat44StaticMappingDetails)(nil), 4264 (*Nat44StaticMappingDump)(nil), 4265 (*Nat44UserDetails)(nil), 4266 (*Nat44UserDump)(nil), 4267 (*Nat44UserSessionDetails)(nil), 4268 (*Nat44UserSessionDump)(nil), 4269 (*NatControlPing)(nil), 4270 (*NatControlPingReply)(nil), 4271 (*NatGetAddrAndPortAllocAlg)(nil), 4272 (*NatGetAddrAndPortAllocAlgReply)(nil), 4273 (*NatGetMssClamping)(nil), 4274 (*NatGetMssClampingReply)(nil), 4275 (*NatGetTimeouts)(nil), 4276 (*NatGetTimeoutsReply)(nil), 4277 (*NatHaFlush)(nil), 4278 (*NatHaFlushReply)(nil), 4279 (*NatHaGetFailover)(nil), 4280 (*NatHaGetFailoverReply)(nil), 4281 (*NatHaGetListener)(nil), 4282 (*NatHaGetListenerReply)(nil), 4283 (*NatHaResync)(nil), 4284 (*NatHaResyncCompletedEvent)(nil), 4285 (*NatHaResyncReply)(nil), 4286 (*NatHaSetFailover)(nil), 4287 (*NatHaSetFailoverReply)(nil), 4288 (*NatHaSetListener)(nil), 4289 (*NatHaSetListenerReply)(nil), 4290 (*NatIpfixEnableDisable)(nil), 4291 (*NatIpfixEnableDisableReply)(nil), 4292 (*NatSetAddrAndPortAllocAlg)(nil), 4293 (*NatSetAddrAndPortAllocAlgReply)(nil), 4294 (*NatSetLogLevel)(nil), 4295 (*NatSetLogLevelReply)(nil), 4296 (*NatSetMssClamping)(nil), 4297 (*NatSetMssClampingReply)(nil), 4298 (*NatSetTimeouts)(nil), 4299 (*NatSetTimeoutsReply)(nil), 4300 (*NatSetWorkers)(nil), 4301 (*NatSetWorkersReply)(nil), 4302 (*NatShowConfig)(nil), 4303 (*NatShowConfig2)(nil), 4304 (*NatShowConfig2Reply)(nil), 4305 (*NatShowConfigReply)(nil), 4306 (*NatWorkerDetails)(nil), 4307 (*NatWorkerDump)(nil), 4308 } 4309 }