github.com/networkservicemesh/govpp@v0.0.0-20240328101142-8a444680fbba/binapi/ipsec/ipsec.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 // versions: 3 // binapi-generator: v0.10.0-dev 4 // VPP: 23.10-rc0~170-g6f1548434 5 // source: core/ipsec.api.json 6 7 // Package ipsec contains generated bindings for API file ipsec.api. 8 // 9 // Contents: 10 // - 2 structs 11 // - 56 messages 12 package ipsec 13 14 import ( 15 interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" 16 ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" 17 ipsec_types "github.com/networkservicemesh/govpp/binapi/ipsec_types" 18 tunnel_types "github.com/networkservicemesh/govpp/binapi/tunnel_types" 19 api "go.fd.io/govpp/api" 20 codec "go.fd.io/govpp/codec" 21 ) 22 23 // This is a compile-time assertion to ensure that this generated file 24 // is compatible with the GoVPP api package it is being compiled against. 25 // A compilation error at this line likely means your copy of the 26 // GoVPP api package needs to be updated. 27 const _ = api.GoVppAPIPackageIsVersion2 28 29 const ( 30 APIFile = "ipsec" 31 APIVersion = "5.0.2" 32 VersionCrc = 0x1b4ba2ec 33 ) 34 35 // IpsecItf defines type 'ipsec_itf'. 36 type IpsecItf struct { 37 UserInstance uint32 `binapi:"u32,name=user_instance,default=4294967295" json:"user_instance,omitempty"` 38 Mode tunnel_types.TunnelMode `binapi:"tunnel_mode,name=mode" json:"mode,omitempty"` 39 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 40 } 41 42 // IpsecTunnelProtect defines type 'ipsec_tunnel_protect'. 43 type IpsecTunnelProtect struct { 44 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 45 Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"` 46 SaOut uint32 `binapi:"u32,name=sa_out" json:"sa_out,omitempty"` 47 NSaIn uint8 `binapi:"u8,name=n_sa_in" json:"-"` 48 SaIn []uint32 `binapi:"u32[n_sa_in],name=sa_in" json:"sa_in,omitempty"` 49 } 50 51 // IPsec backend details 52 // - name - name of the backend 53 // - protocol - IPsec protocol (value from ipsec_protocol_t) 54 // - index - backend index 55 // - active - set to 1 if the backend is active, otherwise 0 56 // 57 // IpsecBackendDetails defines message 'ipsec_backend_details'. 58 type IpsecBackendDetails struct { 59 Name string `binapi:"string[128],name=name" json:"name,omitempty"` 60 Protocol ipsec_types.IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"` 61 Index uint8 `binapi:"u8,name=index" json:"index,omitempty"` 62 Active bool `binapi:"bool,name=active" json:"active,omitempty"` 63 } 64 65 func (m *IpsecBackendDetails) Reset() { *m = IpsecBackendDetails{} } 66 func (*IpsecBackendDetails) GetMessageName() string { return "ipsec_backend_details" } 67 func (*IpsecBackendDetails) GetCrcString() string { return "ee601c29" } 68 func (*IpsecBackendDetails) GetMessageType() api.MessageType { 69 return api.ReplyMessage 70 } 71 72 func (m *IpsecBackendDetails) Size() (size int) { 73 if m == nil { 74 return 0 75 } 76 size += 128 // m.Name 77 size += 4 // m.Protocol 78 size += 1 // m.Index 79 size += 1 // m.Active 80 return size 81 } 82 func (m *IpsecBackendDetails) Marshal(b []byte) ([]byte, error) { 83 if b == nil { 84 b = make([]byte, m.Size()) 85 } 86 buf := codec.NewBuffer(b) 87 buf.EncodeString(m.Name, 128) 88 buf.EncodeUint32(uint32(m.Protocol)) 89 buf.EncodeUint8(m.Index) 90 buf.EncodeBool(m.Active) 91 return buf.Bytes(), nil 92 } 93 func (m *IpsecBackendDetails) Unmarshal(b []byte) error { 94 buf := codec.NewBuffer(b) 95 m.Name = buf.DecodeString(128) 96 m.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32()) 97 m.Index = buf.DecodeUint8() 98 m.Active = buf.DecodeBool() 99 return nil 100 } 101 102 // Dump IPsec backends 103 // IpsecBackendDump defines message 'ipsec_backend_dump'. 104 type IpsecBackendDump struct{} 105 106 func (m *IpsecBackendDump) Reset() { *m = IpsecBackendDump{} } 107 func (*IpsecBackendDump) GetMessageName() string { return "ipsec_backend_dump" } 108 func (*IpsecBackendDump) GetCrcString() string { return "51077d14" } 109 func (*IpsecBackendDump) GetMessageType() api.MessageType { 110 return api.RequestMessage 111 } 112 113 func (m *IpsecBackendDump) Size() (size int) { 114 if m == nil { 115 return 0 116 } 117 return size 118 } 119 func (m *IpsecBackendDump) Marshal(b []byte) ([]byte, error) { 120 if b == nil { 121 b = make([]byte, m.Size()) 122 } 123 buf := codec.NewBuffer(b) 124 return buf.Bytes(), nil 125 } 126 func (m *IpsecBackendDump) Unmarshal(b []byte) error { 127 return nil 128 } 129 130 // IPsec: Add/delete SPD from interface 131 // - is_add - add security mode if non-zero, else delete 132 // - sw_if_index - index of the interface 133 // - spd_id - SPD instance id to use for lookups 134 // 135 // IpsecInterfaceAddDelSpd defines message 'ipsec_interface_add_del_spd'. 136 type IpsecInterfaceAddDelSpd struct { 137 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 138 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 139 SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"` 140 } 141 142 func (m *IpsecInterfaceAddDelSpd) Reset() { *m = IpsecInterfaceAddDelSpd{} } 143 func (*IpsecInterfaceAddDelSpd) GetMessageName() string { return "ipsec_interface_add_del_spd" } 144 func (*IpsecInterfaceAddDelSpd) GetCrcString() string { return "80f80cbb" } 145 func (*IpsecInterfaceAddDelSpd) GetMessageType() api.MessageType { 146 return api.RequestMessage 147 } 148 149 func (m *IpsecInterfaceAddDelSpd) Size() (size int) { 150 if m == nil { 151 return 0 152 } 153 size += 1 // m.IsAdd 154 size += 4 // m.SwIfIndex 155 size += 4 // m.SpdID 156 return size 157 } 158 func (m *IpsecInterfaceAddDelSpd) Marshal(b []byte) ([]byte, error) { 159 if b == nil { 160 b = make([]byte, m.Size()) 161 } 162 buf := codec.NewBuffer(b) 163 buf.EncodeBool(m.IsAdd) 164 buf.EncodeUint32(uint32(m.SwIfIndex)) 165 buf.EncodeUint32(m.SpdID) 166 return buf.Bytes(), nil 167 } 168 func (m *IpsecInterfaceAddDelSpd) Unmarshal(b []byte) error { 169 buf := codec.NewBuffer(b) 170 m.IsAdd = buf.DecodeBool() 171 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 172 m.SpdID = buf.DecodeUint32() 173 return nil 174 } 175 176 // IpsecInterfaceAddDelSpdReply defines message 'ipsec_interface_add_del_spd_reply'. 177 type IpsecInterfaceAddDelSpdReply struct { 178 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 179 } 180 181 func (m *IpsecInterfaceAddDelSpdReply) Reset() { *m = IpsecInterfaceAddDelSpdReply{} } 182 func (*IpsecInterfaceAddDelSpdReply) GetMessageName() string { 183 return "ipsec_interface_add_del_spd_reply" 184 } 185 func (*IpsecInterfaceAddDelSpdReply) GetCrcString() string { return "e8d4e804" } 186 func (*IpsecInterfaceAddDelSpdReply) GetMessageType() api.MessageType { 187 return api.ReplyMessage 188 } 189 190 func (m *IpsecInterfaceAddDelSpdReply) Size() (size int) { 191 if m == nil { 192 return 0 193 } 194 size += 4 // m.Retval 195 return size 196 } 197 func (m *IpsecInterfaceAddDelSpdReply) Marshal(b []byte) ([]byte, error) { 198 if b == nil { 199 b = make([]byte, m.Size()) 200 } 201 buf := codec.NewBuffer(b) 202 buf.EncodeInt32(m.Retval) 203 return buf.Bytes(), nil 204 } 205 func (m *IpsecInterfaceAddDelSpdReply) Unmarshal(b []byte) error { 206 buf := codec.NewBuffer(b) 207 m.Retval = buf.DecodeInt32() 208 return nil 209 } 210 211 // Create an IPSec interface 212 // IpsecItfCreate defines message 'ipsec_itf_create'. 213 type IpsecItfCreate struct { 214 Itf IpsecItf `binapi:"ipsec_itf,name=itf" json:"itf,omitempty"` 215 } 216 217 func (m *IpsecItfCreate) Reset() { *m = IpsecItfCreate{} } 218 func (*IpsecItfCreate) GetMessageName() string { return "ipsec_itf_create" } 219 func (*IpsecItfCreate) GetCrcString() string { return "6f50b3bc" } 220 func (*IpsecItfCreate) GetMessageType() api.MessageType { 221 return api.RequestMessage 222 } 223 224 func (m *IpsecItfCreate) Size() (size int) { 225 if m == nil { 226 return 0 227 } 228 size += 4 // m.Itf.UserInstance 229 size += 1 // m.Itf.Mode 230 size += 4 // m.Itf.SwIfIndex 231 return size 232 } 233 func (m *IpsecItfCreate) Marshal(b []byte) ([]byte, error) { 234 if b == nil { 235 b = make([]byte, m.Size()) 236 } 237 buf := codec.NewBuffer(b) 238 buf.EncodeUint32(m.Itf.UserInstance) 239 buf.EncodeUint8(uint8(m.Itf.Mode)) 240 buf.EncodeUint32(uint32(m.Itf.SwIfIndex)) 241 return buf.Bytes(), nil 242 } 243 func (m *IpsecItfCreate) Unmarshal(b []byte) error { 244 buf := codec.NewBuffer(b) 245 m.Itf.UserInstance = buf.DecodeUint32() 246 m.Itf.Mode = tunnel_types.TunnelMode(buf.DecodeUint8()) 247 m.Itf.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 248 return nil 249 } 250 251 // Add IPsec interface interface response 252 // - retval - return status 253 // - sw_if_index - sw_if_index of new interface (for successful add) 254 // 255 // IpsecItfCreateReply defines message 'ipsec_itf_create_reply'. 256 type IpsecItfCreateReply struct { 257 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 258 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 259 } 260 261 func (m *IpsecItfCreateReply) Reset() { *m = IpsecItfCreateReply{} } 262 func (*IpsecItfCreateReply) GetMessageName() string { return "ipsec_itf_create_reply" } 263 func (*IpsecItfCreateReply) GetCrcString() string { return "5383d31f" } 264 func (*IpsecItfCreateReply) GetMessageType() api.MessageType { 265 return api.ReplyMessage 266 } 267 268 func (m *IpsecItfCreateReply) Size() (size int) { 269 if m == nil { 270 return 0 271 } 272 size += 4 // m.Retval 273 size += 4 // m.SwIfIndex 274 return size 275 } 276 func (m *IpsecItfCreateReply) Marshal(b []byte) ([]byte, error) { 277 if b == nil { 278 b = make([]byte, m.Size()) 279 } 280 buf := codec.NewBuffer(b) 281 buf.EncodeInt32(m.Retval) 282 buf.EncodeUint32(uint32(m.SwIfIndex)) 283 return buf.Bytes(), nil 284 } 285 func (m *IpsecItfCreateReply) Unmarshal(b []byte) error { 286 buf := codec.NewBuffer(b) 287 m.Retval = buf.DecodeInt32() 288 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 289 return nil 290 } 291 292 // IpsecItfDelete defines message 'ipsec_itf_delete'. 293 type IpsecItfDelete struct { 294 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 295 } 296 297 func (m *IpsecItfDelete) Reset() { *m = IpsecItfDelete{} } 298 func (*IpsecItfDelete) GetMessageName() string { return "ipsec_itf_delete" } 299 func (*IpsecItfDelete) GetCrcString() string { return "f9e6675e" } 300 func (*IpsecItfDelete) GetMessageType() api.MessageType { 301 return api.RequestMessage 302 } 303 304 func (m *IpsecItfDelete) Size() (size int) { 305 if m == nil { 306 return 0 307 } 308 size += 4 // m.SwIfIndex 309 return size 310 } 311 func (m *IpsecItfDelete) Marshal(b []byte) ([]byte, error) { 312 if b == nil { 313 b = make([]byte, m.Size()) 314 } 315 buf := codec.NewBuffer(b) 316 buf.EncodeUint32(uint32(m.SwIfIndex)) 317 return buf.Bytes(), nil 318 } 319 func (m *IpsecItfDelete) Unmarshal(b []byte) error { 320 buf := codec.NewBuffer(b) 321 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 322 return nil 323 } 324 325 // IpsecItfDeleteReply defines message 'ipsec_itf_delete_reply'. 326 type IpsecItfDeleteReply struct { 327 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 328 } 329 330 func (m *IpsecItfDeleteReply) Reset() { *m = IpsecItfDeleteReply{} } 331 func (*IpsecItfDeleteReply) GetMessageName() string { return "ipsec_itf_delete_reply" } 332 func (*IpsecItfDeleteReply) GetCrcString() string { return "e8d4e804" } 333 func (*IpsecItfDeleteReply) GetMessageType() api.MessageType { 334 return api.ReplyMessage 335 } 336 337 func (m *IpsecItfDeleteReply) Size() (size int) { 338 if m == nil { 339 return 0 340 } 341 size += 4 // m.Retval 342 return size 343 } 344 func (m *IpsecItfDeleteReply) Marshal(b []byte) ([]byte, error) { 345 if b == nil { 346 b = make([]byte, m.Size()) 347 } 348 buf := codec.NewBuffer(b) 349 buf.EncodeInt32(m.Retval) 350 return buf.Bytes(), nil 351 } 352 func (m *IpsecItfDeleteReply) Unmarshal(b []byte) error { 353 buf := codec.NewBuffer(b) 354 m.Retval = buf.DecodeInt32() 355 return nil 356 } 357 358 // IpsecItfDetails defines message 'ipsec_itf_details'. 359 type IpsecItfDetails struct { 360 Itf IpsecItf `binapi:"ipsec_itf,name=itf" json:"itf,omitempty"` 361 } 362 363 func (m *IpsecItfDetails) Reset() { *m = IpsecItfDetails{} } 364 func (*IpsecItfDetails) GetMessageName() string { return "ipsec_itf_details" } 365 func (*IpsecItfDetails) GetCrcString() string { return "548a73b8" } 366 func (*IpsecItfDetails) GetMessageType() api.MessageType { 367 return api.ReplyMessage 368 } 369 370 func (m *IpsecItfDetails) Size() (size int) { 371 if m == nil { 372 return 0 373 } 374 size += 4 // m.Itf.UserInstance 375 size += 1 // m.Itf.Mode 376 size += 4 // m.Itf.SwIfIndex 377 return size 378 } 379 func (m *IpsecItfDetails) Marshal(b []byte) ([]byte, error) { 380 if b == nil { 381 b = make([]byte, m.Size()) 382 } 383 buf := codec.NewBuffer(b) 384 buf.EncodeUint32(m.Itf.UserInstance) 385 buf.EncodeUint8(uint8(m.Itf.Mode)) 386 buf.EncodeUint32(uint32(m.Itf.SwIfIndex)) 387 return buf.Bytes(), nil 388 } 389 func (m *IpsecItfDetails) Unmarshal(b []byte) error { 390 buf := codec.NewBuffer(b) 391 m.Itf.UserInstance = buf.DecodeUint32() 392 m.Itf.Mode = tunnel_types.TunnelMode(buf.DecodeUint8()) 393 m.Itf.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 394 return nil 395 } 396 397 // IpsecItfDump defines message 'ipsec_itf_dump'. 398 type IpsecItfDump struct { 399 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 400 } 401 402 func (m *IpsecItfDump) Reset() { *m = IpsecItfDump{} } 403 func (*IpsecItfDump) GetMessageName() string { return "ipsec_itf_dump" } 404 func (*IpsecItfDump) GetCrcString() string { return "f9e6675e" } 405 func (*IpsecItfDump) GetMessageType() api.MessageType { 406 return api.RequestMessage 407 } 408 409 func (m *IpsecItfDump) Size() (size int) { 410 if m == nil { 411 return 0 412 } 413 size += 4 // m.SwIfIndex 414 return size 415 } 416 func (m *IpsecItfDump) Marshal(b []byte) ([]byte, error) { 417 if b == nil { 418 b = make([]byte, m.Size()) 419 } 420 buf := codec.NewBuffer(b) 421 buf.EncodeUint32(uint32(m.SwIfIndex)) 422 return buf.Bytes(), nil 423 } 424 func (m *IpsecItfDump) Unmarshal(b []byte) error { 425 buf := codec.NewBuffer(b) 426 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 427 return nil 428 } 429 430 // IPsec security association database response 431 // - entry - The SA details 432 // - sw_if_index - sw_if_index of tunnel interface, policy-based SAs = ~0 433 // - salt - 4 byte salt 434 // - seq - current sequence number for outbound 435 // - seq_hi - high 32 bits of ESN for outbound 436 // - last_seq - highest sequence number received inbound 437 // - last_seq_hi - high 32 bits of highest ESN received inbound 438 // - replay_window - bit map of seq nums received relative to last_seq if using anti-replay 439 // - stat_index - index for the SA in the stats segment @ /net/ipsec/sa 440 // 441 // IpsecSaDetails defines message 'ipsec_sa_details'. 442 // Deprecated: the message will be removed in the future versions 443 type IpsecSaDetails struct { 444 Entry ipsec_types.IpsecSadEntry `binapi:"ipsec_sad_entry,name=entry" json:"entry,omitempty"` 445 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 446 Salt uint32 `binapi:"u32,name=salt" json:"salt,omitempty"` 447 SeqOutbound uint64 `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"` 448 LastSeqInbound uint64 `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"` 449 ReplayWindow uint64 `binapi:"u64,name=replay_window" json:"replay_window,omitempty"` 450 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"` 451 } 452 453 func (m *IpsecSaDetails) Reset() { *m = IpsecSaDetails{} } 454 func (*IpsecSaDetails) GetMessageName() string { return "ipsec_sa_details" } 455 func (*IpsecSaDetails) GetCrcString() string { return "345d14a7" } 456 func (*IpsecSaDetails) GetMessageType() api.MessageType { 457 return api.ReplyMessage 458 } 459 460 func (m *IpsecSaDetails) Size() (size int) { 461 if m == nil { 462 return 0 463 } 464 size += 4 // m.Entry.SadID 465 size += 4 // m.Entry.Spi 466 size += 4 // m.Entry.Protocol 467 size += 4 // m.Entry.CryptoAlgorithm 468 size += 1 // m.Entry.CryptoKey.Length 469 size += 1 * 128 // m.Entry.CryptoKey.Data 470 size += 4 // m.Entry.IntegrityAlgorithm 471 size += 1 // m.Entry.IntegrityKey.Length 472 size += 1 * 128 // m.Entry.IntegrityKey.Data 473 size += 4 // m.Entry.Flags 474 size += 1 // m.Entry.TunnelSrc.Af 475 size += 1 * 16 // m.Entry.TunnelSrc.Un 476 size += 1 // m.Entry.TunnelDst.Af 477 size += 1 * 16 // m.Entry.TunnelDst.Un 478 size += 4 // m.Entry.TxTableID 479 size += 4 // m.Entry.Salt 480 size += 2 // m.Entry.UDPSrcPort 481 size += 2 // m.Entry.UDPDstPort 482 size += 4 // m.SwIfIndex 483 size += 4 // m.Salt 484 size += 8 // m.SeqOutbound 485 size += 8 // m.LastSeqInbound 486 size += 8 // m.ReplayWindow 487 size += 4 // m.StatIndex 488 return size 489 } 490 func (m *IpsecSaDetails) Marshal(b []byte) ([]byte, error) { 491 if b == nil { 492 b = make([]byte, m.Size()) 493 } 494 buf := codec.NewBuffer(b) 495 buf.EncodeUint32(m.Entry.SadID) 496 buf.EncodeUint32(m.Entry.Spi) 497 buf.EncodeUint32(uint32(m.Entry.Protocol)) 498 buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm)) 499 buf.EncodeUint8(m.Entry.CryptoKey.Length) 500 buf.EncodeBytes(m.Entry.CryptoKey.Data, 128) 501 buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm)) 502 buf.EncodeUint8(m.Entry.IntegrityKey.Length) 503 buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128) 504 buf.EncodeUint32(uint32(m.Entry.Flags)) 505 buf.EncodeUint8(uint8(m.Entry.TunnelSrc.Af)) 506 buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16) 507 buf.EncodeUint8(uint8(m.Entry.TunnelDst.Af)) 508 buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16) 509 buf.EncodeUint32(m.Entry.TxTableID) 510 buf.EncodeUint32(m.Entry.Salt) 511 buf.EncodeUint16(m.Entry.UDPSrcPort) 512 buf.EncodeUint16(m.Entry.UDPDstPort) 513 buf.EncodeUint32(uint32(m.SwIfIndex)) 514 buf.EncodeUint32(m.Salt) 515 buf.EncodeUint64(m.SeqOutbound) 516 buf.EncodeUint64(m.LastSeqInbound) 517 buf.EncodeUint64(m.ReplayWindow) 518 buf.EncodeUint32(m.StatIndex) 519 return buf.Bytes(), nil 520 } 521 func (m *IpsecSaDetails) Unmarshal(b []byte) error { 522 buf := codec.NewBuffer(b) 523 m.Entry.SadID = buf.DecodeUint32() 524 m.Entry.Spi = buf.DecodeUint32() 525 m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32()) 526 m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32()) 527 m.Entry.CryptoKey.Length = buf.DecodeUint8() 528 m.Entry.CryptoKey.Data = make([]byte, 128) 529 copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data))) 530 m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32()) 531 m.Entry.IntegrityKey.Length = buf.DecodeUint8() 532 m.Entry.IntegrityKey.Data = make([]byte, 128) 533 copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data))) 534 m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32()) 535 m.Entry.TunnelSrc.Af = ip_types.AddressFamily(buf.DecodeUint8()) 536 copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 537 m.Entry.TunnelDst.Af = ip_types.AddressFamily(buf.DecodeUint8()) 538 copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 539 m.Entry.TxTableID = buf.DecodeUint32() 540 m.Entry.Salt = buf.DecodeUint32() 541 m.Entry.UDPSrcPort = buf.DecodeUint16() 542 m.Entry.UDPDstPort = buf.DecodeUint16() 543 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 544 m.Salt = buf.DecodeUint32() 545 m.SeqOutbound = buf.DecodeUint64() 546 m.LastSeqInbound = buf.DecodeUint64() 547 m.ReplayWindow = buf.DecodeUint64() 548 m.StatIndex = buf.DecodeUint32() 549 return nil 550 } 551 552 // Dump IPsec security association 553 // - sa_id - optional ID of an SA to dump, if ~0 dump all SAs in SAD 554 // 555 // IpsecSaDump defines message 'ipsec_sa_dump'. 556 // Deprecated: the message will be removed in the future versions 557 type IpsecSaDump struct { 558 SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"` 559 } 560 561 func (m *IpsecSaDump) Reset() { *m = IpsecSaDump{} } 562 func (*IpsecSaDump) GetMessageName() string { return "ipsec_sa_dump" } 563 func (*IpsecSaDump) GetCrcString() string { return "2076c2f4" } 564 func (*IpsecSaDump) GetMessageType() api.MessageType { 565 return api.RequestMessage 566 } 567 568 func (m *IpsecSaDump) Size() (size int) { 569 if m == nil { 570 return 0 571 } 572 size += 4 // m.SaID 573 return size 574 } 575 func (m *IpsecSaDump) Marshal(b []byte) ([]byte, error) { 576 if b == nil { 577 b = make([]byte, m.Size()) 578 } 579 buf := codec.NewBuffer(b) 580 buf.EncodeUint32(m.SaID) 581 return buf.Bytes(), nil 582 } 583 func (m *IpsecSaDump) Unmarshal(b []byte) error { 584 buf := codec.NewBuffer(b) 585 m.SaID = buf.DecodeUint32() 586 return nil 587 } 588 589 // IpsecSaV2Details defines message 'ipsec_sa_v2_details'. 590 // Deprecated: the message will be removed in the future versions 591 type IpsecSaV2Details struct { 592 Entry ipsec_types.IpsecSadEntryV2 `binapi:"ipsec_sad_entry_v2,name=entry" json:"entry,omitempty"` 593 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 594 Salt uint32 `binapi:"u32,name=salt" json:"salt,omitempty"` 595 SeqOutbound uint64 `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"` 596 LastSeqInbound uint64 `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"` 597 ReplayWindow uint64 `binapi:"u64,name=replay_window" json:"replay_window,omitempty"` 598 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"` 599 } 600 601 func (m *IpsecSaV2Details) Reset() { *m = IpsecSaV2Details{} } 602 func (*IpsecSaV2Details) GetMessageName() string { return "ipsec_sa_v2_details" } 603 func (*IpsecSaV2Details) GetCrcString() string { return "e2130051" } 604 func (*IpsecSaV2Details) GetMessageType() api.MessageType { 605 return api.ReplyMessage 606 } 607 608 func (m *IpsecSaV2Details) Size() (size int) { 609 if m == nil { 610 return 0 611 } 612 size += 4 // m.Entry.SadID 613 size += 4 // m.Entry.Spi 614 size += 4 // m.Entry.Protocol 615 size += 4 // m.Entry.CryptoAlgorithm 616 size += 1 // m.Entry.CryptoKey.Length 617 size += 1 * 128 // m.Entry.CryptoKey.Data 618 size += 4 // m.Entry.IntegrityAlgorithm 619 size += 1 // m.Entry.IntegrityKey.Length 620 size += 1 * 128 // m.Entry.IntegrityKey.Data 621 size += 4 // m.Entry.Flags 622 size += 1 // m.Entry.TunnelSrc.Af 623 size += 1 * 16 // m.Entry.TunnelSrc.Un 624 size += 1 // m.Entry.TunnelDst.Af 625 size += 1 * 16 // m.Entry.TunnelDst.Un 626 size += 1 // m.Entry.TunnelFlags 627 size += 1 // m.Entry.Dscp 628 size += 4 // m.Entry.TxTableID 629 size += 4 // m.Entry.Salt 630 size += 2 // m.Entry.UDPSrcPort 631 size += 2 // m.Entry.UDPDstPort 632 size += 4 // m.SwIfIndex 633 size += 4 // m.Salt 634 size += 8 // m.SeqOutbound 635 size += 8 // m.LastSeqInbound 636 size += 8 // m.ReplayWindow 637 size += 4 // m.StatIndex 638 return size 639 } 640 func (m *IpsecSaV2Details) Marshal(b []byte) ([]byte, error) { 641 if b == nil { 642 b = make([]byte, m.Size()) 643 } 644 buf := codec.NewBuffer(b) 645 buf.EncodeUint32(m.Entry.SadID) 646 buf.EncodeUint32(m.Entry.Spi) 647 buf.EncodeUint32(uint32(m.Entry.Protocol)) 648 buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm)) 649 buf.EncodeUint8(m.Entry.CryptoKey.Length) 650 buf.EncodeBytes(m.Entry.CryptoKey.Data, 128) 651 buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm)) 652 buf.EncodeUint8(m.Entry.IntegrityKey.Length) 653 buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128) 654 buf.EncodeUint32(uint32(m.Entry.Flags)) 655 buf.EncodeUint8(uint8(m.Entry.TunnelSrc.Af)) 656 buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16) 657 buf.EncodeUint8(uint8(m.Entry.TunnelDst.Af)) 658 buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16) 659 buf.EncodeUint8(uint8(m.Entry.TunnelFlags)) 660 buf.EncodeUint8(uint8(m.Entry.Dscp)) 661 buf.EncodeUint32(m.Entry.TxTableID) 662 buf.EncodeUint32(m.Entry.Salt) 663 buf.EncodeUint16(m.Entry.UDPSrcPort) 664 buf.EncodeUint16(m.Entry.UDPDstPort) 665 buf.EncodeUint32(uint32(m.SwIfIndex)) 666 buf.EncodeUint32(m.Salt) 667 buf.EncodeUint64(m.SeqOutbound) 668 buf.EncodeUint64(m.LastSeqInbound) 669 buf.EncodeUint64(m.ReplayWindow) 670 buf.EncodeUint32(m.StatIndex) 671 return buf.Bytes(), nil 672 } 673 func (m *IpsecSaV2Details) Unmarshal(b []byte) error { 674 buf := codec.NewBuffer(b) 675 m.Entry.SadID = buf.DecodeUint32() 676 m.Entry.Spi = buf.DecodeUint32() 677 m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32()) 678 m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32()) 679 m.Entry.CryptoKey.Length = buf.DecodeUint8() 680 m.Entry.CryptoKey.Data = make([]byte, 128) 681 copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data))) 682 m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32()) 683 m.Entry.IntegrityKey.Length = buf.DecodeUint8() 684 m.Entry.IntegrityKey.Data = make([]byte, 128) 685 copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data))) 686 m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32()) 687 m.Entry.TunnelSrc.Af = ip_types.AddressFamily(buf.DecodeUint8()) 688 copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 689 m.Entry.TunnelDst.Af = ip_types.AddressFamily(buf.DecodeUint8()) 690 copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 691 m.Entry.TunnelFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8()) 692 m.Entry.Dscp = ip_types.IPDscp(buf.DecodeUint8()) 693 m.Entry.TxTableID = buf.DecodeUint32() 694 m.Entry.Salt = buf.DecodeUint32() 695 m.Entry.UDPSrcPort = buf.DecodeUint16() 696 m.Entry.UDPDstPort = buf.DecodeUint16() 697 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 698 m.Salt = buf.DecodeUint32() 699 m.SeqOutbound = buf.DecodeUint64() 700 m.LastSeqInbound = buf.DecodeUint64() 701 m.ReplayWindow = buf.DecodeUint64() 702 m.StatIndex = buf.DecodeUint32() 703 return nil 704 } 705 706 // IpsecSaV2Dump defines message 'ipsec_sa_v2_dump'. 707 // Deprecated: the message will be removed in the future versions 708 type IpsecSaV2Dump struct { 709 SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"` 710 } 711 712 func (m *IpsecSaV2Dump) Reset() { *m = IpsecSaV2Dump{} } 713 func (*IpsecSaV2Dump) GetMessageName() string { return "ipsec_sa_v2_dump" } 714 func (*IpsecSaV2Dump) GetCrcString() string { return "2076c2f4" } 715 func (*IpsecSaV2Dump) GetMessageType() api.MessageType { 716 return api.RequestMessage 717 } 718 719 func (m *IpsecSaV2Dump) Size() (size int) { 720 if m == nil { 721 return 0 722 } 723 size += 4 // m.SaID 724 return size 725 } 726 func (m *IpsecSaV2Dump) Marshal(b []byte) ([]byte, error) { 727 if b == nil { 728 b = make([]byte, m.Size()) 729 } 730 buf := codec.NewBuffer(b) 731 buf.EncodeUint32(m.SaID) 732 return buf.Bytes(), nil 733 } 734 func (m *IpsecSaV2Dump) Unmarshal(b []byte) error { 735 buf := codec.NewBuffer(b) 736 m.SaID = buf.DecodeUint32() 737 return nil 738 } 739 740 // IpsecSaV3Details defines message 'ipsec_sa_v3_details'. 741 type IpsecSaV3Details struct { 742 Entry ipsec_types.IpsecSadEntryV3 `binapi:"ipsec_sad_entry_v3,name=entry" json:"entry,omitempty"` 743 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 744 SeqOutbound uint64 `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"` 745 LastSeqInbound uint64 `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"` 746 ReplayWindow uint64 `binapi:"u64,name=replay_window" json:"replay_window,omitempty"` 747 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"` 748 } 749 750 func (m *IpsecSaV3Details) Reset() { *m = IpsecSaV3Details{} } 751 func (*IpsecSaV3Details) GetMessageName() string { return "ipsec_sa_v3_details" } 752 func (*IpsecSaV3Details) GetCrcString() string { return "2fc991ee" } 753 func (*IpsecSaV3Details) GetMessageType() api.MessageType { 754 return api.ReplyMessage 755 } 756 757 func (m *IpsecSaV3Details) Size() (size int) { 758 if m == nil { 759 return 0 760 } 761 size += 4 // m.Entry.SadID 762 size += 4 // m.Entry.Spi 763 size += 4 // m.Entry.Protocol 764 size += 4 // m.Entry.CryptoAlgorithm 765 size += 1 // m.Entry.CryptoKey.Length 766 size += 1 * 128 // m.Entry.CryptoKey.Data 767 size += 4 // m.Entry.IntegrityAlgorithm 768 size += 1 // m.Entry.IntegrityKey.Length 769 size += 1 * 128 // m.Entry.IntegrityKey.Data 770 size += 4 // m.Entry.Flags 771 size += 4 // m.Entry.Tunnel.Instance 772 size += 1 // m.Entry.Tunnel.Src.Af 773 size += 1 * 16 // m.Entry.Tunnel.Src.Un 774 size += 1 // m.Entry.Tunnel.Dst.Af 775 size += 1 * 16 // m.Entry.Tunnel.Dst.Un 776 size += 4 // m.Entry.Tunnel.SwIfIndex 777 size += 4 // m.Entry.Tunnel.TableID 778 size += 1 // m.Entry.Tunnel.EncapDecapFlags 779 size += 1 // m.Entry.Tunnel.Mode 780 size += 1 // m.Entry.Tunnel.Flags 781 size += 1 // m.Entry.Tunnel.Dscp 782 size += 1 // m.Entry.Tunnel.HopLimit 783 size += 4 // m.Entry.Salt 784 size += 2 // m.Entry.UDPSrcPort 785 size += 2 // m.Entry.UDPDstPort 786 size += 4 // m.SwIfIndex 787 size += 8 // m.SeqOutbound 788 size += 8 // m.LastSeqInbound 789 size += 8 // m.ReplayWindow 790 size += 4 // m.StatIndex 791 return size 792 } 793 func (m *IpsecSaV3Details) Marshal(b []byte) ([]byte, error) { 794 if b == nil { 795 b = make([]byte, m.Size()) 796 } 797 buf := codec.NewBuffer(b) 798 buf.EncodeUint32(m.Entry.SadID) 799 buf.EncodeUint32(m.Entry.Spi) 800 buf.EncodeUint32(uint32(m.Entry.Protocol)) 801 buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm)) 802 buf.EncodeUint8(m.Entry.CryptoKey.Length) 803 buf.EncodeBytes(m.Entry.CryptoKey.Data, 128) 804 buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm)) 805 buf.EncodeUint8(m.Entry.IntegrityKey.Length) 806 buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128) 807 buf.EncodeUint32(uint32(m.Entry.Flags)) 808 buf.EncodeUint32(m.Entry.Tunnel.Instance) 809 buf.EncodeUint8(uint8(m.Entry.Tunnel.Src.Af)) 810 buf.EncodeBytes(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], 16) 811 buf.EncodeUint8(uint8(m.Entry.Tunnel.Dst.Af)) 812 buf.EncodeBytes(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], 16) 813 buf.EncodeUint32(uint32(m.Entry.Tunnel.SwIfIndex)) 814 buf.EncodeUint32(m.Entry.Tunnel.TableID) 815 buf.EncodeUint8(uint8(m.Entry.Tunnel.EncapDecapFlags)) 816 buf.EncodeUint8(uint8(m.Entry.Tunnel.Mode)) 817 buf.EncodeUint8(uint8(m.Entry.Tunnel.Flags)) 818 buf.EncodeUint8(uint8(m.Entry.Tunnel.Dscp)) 819 buf.EncodeUint8(m.Entry.Tunnel.HopLimit) 820 buf.EncodeUint32(m.Entry.Salt) 821 buf.EncodeUint16(m.Entry.UDPSrcPort) 822 buf.EncodeUint16(m.Entry.UDPDstPort) 823 buf.EncodeUint32(uint32(m.SwIfIndex)) 824 buf.EncodeUint64(m.SeqOutbound) 825 buf.EncodeUint64(m.LastSeqInbound) 826 buf.EncodeUint64(m.ReplayWindow) 827 buf.EncodeUint32(m.StatIndex) 828 return buf.Bytes(), nil 829 } 830 func (m *IpsecSaV3Details) Unmarshal(b []byte) error { 831 buf := codec.NewBuffer(b) 832 m.Entry.SadID = buf.DecodeUint32() 833 m.Entry.Spi = buf.DecodeUint32() 834 m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32()) 835 m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32()) 836 m.Entry.CryptoKey.Length = buf.DecodeUint8() 837 m.Entry.CryptoKey.Data = make([]byte, 128) 838 copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data))) 839 m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32()) 840 m.Entry.IntegrityKey.Length = buf.DecodeUint8() 841 m.Entry.IntegrityKey.Data = make([]byte, 128) 842 copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data))) 843 m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32()) 844 m.Entry.Tunnel.Instance = buf.DecodeUint32() 845 m.Entry.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8()) 846 copy(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 847 m.Entry.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8()) 848 copy(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 849 m.Entry.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 850 m.Entry.Tunnel.TableID = buf.DecodeUint32() 851 m.Entry.Tunnel.EncapDecapFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8()) 852 m.Entry.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8()) 853 m.Entry.Tunnel.Flags = tunnel_types.TunnelFlags(buf.DecodeUint8()) 854 m.Entry.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8()) 855 m.Entry.Tunnel.HopLimit = buf.DecodeUint8() 856 m.Entry.Salt = buf.DecodeUint32() 857 m.Entry.UDPSrcPort = buf.DecodeUint16() 858 m.Entry.UDPDstPort = buf.DecodeUint16() 859 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 860 m.SeqOutbound = buf.DecodeUint64() 861 m.LastSeqInbound = buf.DecodeUint64() 862 m.ReplayWindow = buf.DecodeUint64() 863 m.StatIndex = buf.DecodeUint32() 864 return nil 865 } 866 867 // IpsecSaV3Dump defines message 'ipsec_sa_v3_dump'. 868 type IpsecSaV3Dump struct { 869 SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"` 870 } 871 872 func (m *IpsecSaV3Dump) Reset() { *m = IpsecSaV3Dump{} } 873 func (*IpsecSaV3Dump) GetMessageName() string { return "ipsec_sa_v3_dump" } 874 func (*IpsecSaV3Dump) GetCrcString() string { return "2076c2f4" } 875 func (*IpsecSaV3Dump) GetMessageType() api.MessageType { 876 return api.RequestMessage 877 } 878 879 func (m *IpsecSaV3Dump) Size() (size int) { 880 if m == nil { 881 return 0 882 } 883 size += 4 // m.SaID 884 return size 885 } 886 func (m *IpsecSaV3Dump) Marshal(b []byte) ([]byte, error) { 887 if b == nil { 888 b = make([]byte, m.Size()) 889 } 890 buf := codec.NewBuffer(b) 891 buf.EncodeUint32(m.SaID) 892 return buf.Bytes(), nil 893 } 894 func (m *IpsecSaV3Dump) Unmarshal(b []byte) error { 895 buf := codec.NewBuffer(b) 896 m.SaID = buf.DecodeUint32() 897 return nil 898 } 899 900 // IpsecSaV4Details defines message 'ipsec_sa_v4_details'. 901 type IpsecSaV4Details struct { 902 Entry ipsec_types.IpsecSadEntryV3 `binapi:"ipsec_sad_entry_v3,name=entry" json:"entry,omitempty"` 903 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 904 SeqOutbound uint64 `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"` 905 LastSeqInbound uint64 `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"` 906 ReplayWindow uint64 `binapi:"u64,name=replay_window" json:"replay_window,omitempty"` 907 ThreadIndex uint32 `binapi:"u32,name=thread_index" json:"thread_index,omitempty"` 908 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"` 909 } 910 911 func (m *IpsecSaV4Details) Reset() { *m = IpsecSaV4Details{} } 912 func (*IpsecSaV4Details) GetMessageName() string { return "ipsec_sa_v4_details" } 913 func (*IpsecSaV4Details) GetCrcString() string { return "87a322d7" } 914 func (*IpsecSaV4Details) GetMessageType() api.MessageType { 915 return api.ReplyMessage 916 } 917 918 func (m *IpsecSaV4Details) Size() (size int) { 919 if m == nil { 920 return 0 921 } 922 size += 4 // m.Entry.SadID 923 size += 4 // m.Entry.Spi 924 size += 4 // m.Entry.Protocol 925 size += 4 // m.Entry.CryptoAlgorithm 926 size += 1 // m.Entry.CryptoKey.Length 927 size += 1 * 128 // m.Entry.CryptoKey.Data 928 size += 4 // m.Entry.IntegrityAlgorithm 929 size += 1 // m.Entry.IntegrityKey.Length 930 size += 1 * 128 // m.Entry.IntegrityKey.Data 931 size += 4 // m.Entry.Flags 932 size += 4 // m.Entry.Tunnel.Instance 933 size += 1 // m.Entry.Tunnel.Src.Af 934 size += 1 * 16 // m.Entry.Tunnel.Src.Un 935 size += 1 // m.Entry.Tunnel.Dst.Af 936 size += 1 * 16 // m.Entry.Tunnel.Dst.Un 937 size += 4 // m.Entry.Tunnel.SwIfIndex 938 size += 4 // m.Entry.Tunnel.TableID 939 size += 1 // m.Entry.Tunnel.EncapDecapFlags 940 size += 1 // m.Entry.Tunnel.Mode 941 size += 1 // m.Entry.Tunnel.Flags 942 size += 1 // m.Entry.Tunnel.Dscp 943 size += 1 // m.Entry.Tunnel.HopLimit 944 size += 4 // m.Entry.Salt 945 size += 2 // m.Entry.UDPSrcPort 946 size += 2 // m.Entry.UDPDstPort 947 size += 4 // m.SwIfIndex 948 size += 8 // m.SeqOutbound 949 size += 8 // m.LastSeqInbound 950 size += 8 // m.ReplayWindow 951 size += 4 // m.ThreadIndex 952 size += 4 // m.StatIndex 953 return size 954 } 955 func (m *IpsecSaV4Details) Marshal(b []byte) ([]byte, error) { 956 if b == nil { 957 b = make([]byte, m.Size()) 958 } 959 buf := codec.NewBuffer(b) 960 buf.EncodeUint32(m.Entry.SadID) 961 buf.EncodeUint32(m.Entry.Spi) 962 buf.EncodeUint32(uint32(m.Entry.Protocol)) 963 buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm)) 964 buf.EncodeUint8(m.Entry.CryptoKey.Length) 965 buf.EncodeBytes(m.Entry.CryptoKey.Data, 128) 966 buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm)) 967 buf.EncodeUint8(m.Entry.IntegrityKey.Length) 968 buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128) 969 buf.EncodeUint32(uint32(m.Entry.Flags)) 970 buf.EncodeUint32(m.Entry.Tunnel.Instance) 971 buf.EncodeUint8(uint8(m.Entry.Tunnel.Src.Af)) 972 buf.EncodeBytes(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], 16) 973 buf.EncodeUint8(uint8(m.Entry.Tunnel.Dst.Af)) 974 buf.EncodeBytes(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], 16) 975 buf.EncodeUint32(uint32(m.Entry.Tunnel.SwIfIndex)) 976 buf.EncodeUint32(m.Entry.Tunnel.TableID) 977 buf.EncodeUint8(uint8(m.Entry.Tunnel.EncapDecapFlags)) 978 buf.EncodeUint8(uint8(m.Entry.Tunnel.Mode)) 979 buf.EncodeUint8(uint8(m.Entry.Tunnel.Flags)) 980 buf.EncodeUint8(uint8(m.Entry.Tunnel.Dscp)) 981 buf.EncodeUint8(m.Entry.Tunnel.HopLimit) 982 buf.EncodeUint32(m.Entry.Salt) 983 buf.EncodeUint16(m.Entry.UDPSrcPort) 984 buf.EncodeUint16(m.Entry.UDPDstPort) 985 buf.EncodeUint32(uint32(m.SwIfIndex)) 986 buf.EncodeUint64(m.SeqOutbound) 987 buf.EncodeUint64(m.LastSeqInbound) 988 buf.EncodeUint64(m.ReplayWindow) 989 buf.EncodeUint32(m.ThreadIndex) 990 buf.EncodeUint32(m.StatIndex) 991 return buf.Bytes(), nil 992 } 993 func (m *IpsecSaV4Details) Unmarshal(b []byte) error { 994 buf := codec.NewBuffer(b) 995 m.Entry.SadID = buf.DecodeUint32() 996 m.Entry.Spi = buf.DecodeUint32() 997 m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32()) 998 m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32()) 999 m.Entry.CryptoKey.Length = buf.DecodeUint8() 1000 m.Entry.CryptoKey.Data = make([]byte, 128) 1001 copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data))) 1002 m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32()) 1003 m.Entry.IntegrityKey.Length = buf.DecodeUint8() 1004 m.Entry.IntegrityKey.Data = make([]byte, 128) 1005 copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data))) 1006 m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32()) 1007 m.Entry.Tunnel.Instance = buf.DecodeUint32() 1008 m.Entry.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1009 copy(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1010 m.Entry.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1011 copy(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1012 m.Entry.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1013 m.Entry.Tunnel.TableID = buf.DecodeUint32() 1014 m.Entry.Tunnel.EncapDecapFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8()) 1015 m.Entry.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8()) 1016 m.Entry.Tunnel.Flags = tunnel_types.TunnelFlags(buf.DecodeUint8()) 1017 m.Entry.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8()) 1018 m.Entry.Tunnel.HopLimit = buf.DecodeUint8() 1019 m.Entry.Salt = buf.DecodeUint32() 1020 m.Entry.UDPSrcPort = buf.DecodeUint16() 1021 m.Entry.UDPDstPort = buf.DecodeUint16() 1022 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1023 m.SeqOutbound = buf.DecodeUint64() 1024 m.LastSeqInbound = buf.DecodeUint64() 1025 m.ReplayWindow = buf.DecodeUint64() 1026 m.ThreadIndex = buf.DecodeUint32() 1027 m.StatIndex = buf.DecodeUint32() 1028 return nil 1029 } 1030 1031 // IpsecSaV4Dump defines message 'ipsec_sa_v4_dump'. 1032 type IpsecSaV4Dump struct { 1033 SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"` 1034 } 1035 1036 func (m *IpsecSaV4Dump) Reset() { *m = IpsecSaV4Dump{} } 1037 func (*IpsecSaV4Dump) GetMessageName() string { return "ipsec_sa_v4_dump" } 1038 func (*IpsecSaV4Dump) GetCrcString() string { return "2076c2f4" } 1039 func (*IpsecSaV4Dump) GetMessageType() api.MessageType { 1040 return api.RequestMessage 1041 } 1042 1043 func (m *IpsecSaV4Dump) Size() (size int) { 1044 if m == nil { 1045 return 0 1046 } 1047 size += 4 // m.SaID 1048 return size 1049 } 1050 func (m *IpsecSaV4Dump) Marshal(b []byte) ([]byte, error) { 1051 if b == nil { 1052 b = make([]byte, m.Size()) 1053 } 1054 buf := codec.NewBuffer(b) 1055 buf.EncodeUint32(m.SaID) 1056 return buf.Bytes(), nil 1057 } 1058 func (m *IpsecSaV4Dump) Unmarshal(b []byte) error { 1059 buf := codec.NewBuffer(b) 1060 m.SaID = buf.DecodeUint32() 1061 return nil 1062 } 1063 1064 // An API to bind an SAD entry to a specific worker 1065 // - sa_id - the id of the SA to bind 1066 // - worker - the worker's index to which the SA will be bound to 1067 // 1068 // IpsecSadBind defines message 'ipsec_sad_bind'. 1069 type IpsecSadBind struct { 1070 SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"` 1071 Worker uint32 `binapi:"u32,name=worker" json:"worker,omitempty"` 1072 } 1073 1074 func (m *IpsecSadBind) Reset() { *m = IpsecSadBind{} } 1075 func (*IpsecSadBind) GetMessageName() string { return "ipsec_sad_bind" } 1076 func (*IpsecSadBind) GetCrcString() string { return "0649c0d9" } 1077 func (*IpsecSadBind) GetMessageType() api.MessageType { 1078 return api.RequestMessage 1079 } 1080 1081 func (m *IpsecSadBind) Size() (size int) { 1082 if m == nil { 1083 return 0 1084 } 1085 size += 4 // m.SaID 1086 size += 4 // m.Worker 1087 return size 1088 } 1089 func (m *IpsecSadBind) Marshal(b []byte) ([]byte, error) { 1090 if b == nil { 1091 b = make([]byte, m.Size()) 1092 } 1093 buf := codec.NewBuffer(b) 1094 buf.EncodeUint32(m.SaID) 1095 buf.EncodeUint32(m.Worker) 1096 return buf.Bytes(), nil 1097 } 1098 func (m *IpsecSadBind) Unmarshal(b []byte) error { 1099 buf := codec.NewBuffer(b) 1100 m.SaID = buf.DecodeUint32() 1101 m.Worker = buf.DecodeUint32() 1102 return nil 1103 } 1104 1105 // IpsecSadBindReply defines message 'ipsec_sad_bind_reply'. 1106 type IpsecSadBindReply struct { 1107 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1108 } 1109 1110 func (m *IpsecSadBindReply) Reset() { *m = IpsecSadBindReply{} } 1111 func (*IpsecSadBindReply) GetMessageName() string { return "ipsec_sad_bind_reply" } 1112 func (*IpsecSadBindReply) GetCrcString() string { return "e8d4e804" } 1113 func (*IpsecSadBindReply) GetMessageType() api.MessageType { 1114 return api.ReplyMessage 1115 } 1116 1117 func (m *IpsecSadBindReply) Size() (size int) { 1118 if m == nil { 1119 return 0 1120 } 1121 size += 4 // m.Retval 1122 return size 1123 } 1124 func (m *IpsecSadBindReply) Marshal(b []byte) ([]byte, error) { 1125 if b == nil { 1126 b = make([]byte, m.Size()) 1127 } 1128 buf := codec.NewBuffer(b) 1129 buf.EncodeInt32(m.Retval) 1130 return buf.Bytes(), nil 1131 } 1132 func (m *IpsecSadBindReply) Unmarshal(b []byte) error { 1133 buf := codec.NewBuffer(b) 1134 m.Retval = buf.DecodeInt32() 1135 return nil 1136 } 1137 1138 // IpsecSadEntryAdd defines message 'ipsec_sad_entry_add'. 1139 type IpsecSadEntryAdd struct { 1140 Entry ipsec_types.IpsecSadEntryV3 `binapi:"ipsec_sad_entry_v3,name=entry" json:"entry,omitempty"` 1141 } 1142 1143 func (m *IpsecSadEntryAdd) Reset() { *m = IpsecSadEntryAdd{} } 1144 func (*IpsecSadEntryAdd) GetMessageName() string { return "ipsec_sad_entry_add" } 1145 func (*IpsecSadEntryAdd) GetCrcString() string { return "50229353" } 1146 func (*IpsecSadEntryAdd) GetMessageType() api.MessageType { 1147 return api.RequestMessage 1148 } 1149 1150 func (m *IpsecSadEntryAdd) Size() (size int) { 1151 if m == nil { 1152 return 0 1153 } 1154 size += 4 // m.Entry.SadID 1155 size += 4 // m.Entry.Spi 1156 size += 4 // m.Entry.Protocol 1157 size += 4 // m.Entry.CryptoAlgorithm 1158 size += 1 // m.Entry.CryptoKey.Length 1159 size += 1 * 128 // m.Entry.CryptoKey.Data 1160 size += 4 // m.Entry.IntegrityAlgorithm 1161 size += 1 // m.Entry.IntegrityKey.Length 1162 size += 1 * 128 // m.Entry.IntegrityKey.Data 1163 size += 4 // m.Entry.Flags 1164 size += 4 // m.Entry.Tunnel.Instance 1165 size += 1 // m.Entry.Tunnel.Src.Af 1166 size += 1 * 16 // m.Entry.Tunnel.Src.Un 1167 size += 1 // m.Entry.Tunnel.Dst.Af 1168 size += 1 * 16 // m.Entry.Tunnel.Dst.Un 1169 size += 4 // m.Entry.Tunnel.SwIfIndex 1170 size += 4 // m.Entry.Tunnel.TableID 1171 size += 1 // m.Entry.Tunnel.EncapDecapFlags 1172 size += 1 // m.Entry.Tunnel.Mode 1173 size += 1 // m.Entry.Tunnel.Flags 1174 size += 1 // m.Entry.Tunnel.Dscp 1175 size += 1 // m.Entry.Tunnel.HopLimit 1176 size += 4 // m.Entry.Salt 1177 size += 2 // m.Entry.UDPSrcPort 1178 size += 2 // m.Entry.UDPDstPort 1179 return size 1180 } 1181 func (m *IpsecSadEntryAdd) Marshal(b []byte) ([]byte, error) { 1182 if b == nil { 1183 b = make([]byte, m.Size()) 1184 } 1185 buf := codec.NewBuffer(b) 1186 buf.EncodeUint32(m.Entry.SadID) 1187 buf.EncodeUint32(m.Entry.Spi) 1188 buf.EncodeUint32(uint32(m.Entry.Protocol)) 1189 buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm)) 1190 buf.EncodeUint8(m.Entry.CryptoKey.Length) 1191 buf.EncodeBytes(m.Entry.CryptoKey.Data, 128) 1192 buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm)) 1193 buf.EncodeUint8(m.Entry.IntegrityKey.Length) 1194 buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128) 1195 buf.EncodeUint32(uint32(m.Entry.Flags)) 1196 buf.EncodeUint32(m.Entry.Tunnel.Instance) 1197 buf.EncodeUint8(uint8(m.Entry.Tunnel.Src.Af)) 1198 buf.EncodeBytes(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], 16) 1199 buf.EncodeUint8(uint8(m.Entry.Tunnel.Dst.Af)) 1200 buf.EncodeBytes(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], 16) 1201 buf.EncodeUint32(uint32(m.Entry.Tunnel.SwIfIndex)) 1202 buf.EncodeUint32(m.Entry.Tunnel.TableID) 1203 buf.EncodeUint8(uint8(m.Entry.Tunnel.EncapDecapFlags)) 1204 buf.EncodeUint8(uint8(m.Entry.Tunnel.Mode)) 1205 buf.EncodeUint8(uint8(m.Entry.Tunnel.Flags)) 1206 buf.EncodeUint8(uint8(m.Entry.Tunnel.Dscp)) 1207 buf.EncodeUint8(m.Entry.Tunnel.HopLimit) 1208 buf.EncodeUint32(m.Entry.Salt) 1209 buf.EncodeUint16(m.Entry.UDPSrcPort) 1210 buf.EncodeUint16(m.Entry.UDPDstPort) 1211 return buf.Bytes(), nil 1212 } 1213 func (m *IpsecSadEntryAdd) Unmarshal(b []byte) error { 1214 buf := codec.NewBuffer(b) 1215 m.Entry.SadID = buf.DecodeUint32() 1216 m.Entry.Spi = buf.DecodeUint32() 1217 m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32()) 1218 m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32()) 1219 m.Entry.CryptoKey.Length = buf.DecodeUint8() 1220 m.Entry.CryptoKey.Data = make([]byte, 128) 1221 copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data))) 1222 m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32()) 1223 m.Entry.IntegrityKey.Length = buf.DecodeUint8() 1224 m.Entry.IntegrityKey.Data = make([]byte, 128) 1225 copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data))) 1226 m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32()) 1227 m.Entry.Tunnel.Instance = buf.DecodeUint32() 1228 m.Entry.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1229 copy(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1230 m.Entry.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1231 copy(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1232 m.Entry.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1233 m.Entry.Tunnel.TableID = buf.DecodeUint32() 1234 m.Entry.Tunnel.EncapDecapFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8()) 1235 m.Entry.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8()) 1236 m.Entry.Tunnel.Flags = tunnel_types.TunnelFlags(buf.DecodeUint8()) 1237 m.Entry.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8()) 1238 m.Entry.Tunnel.HopLimit = buf.DecodeUint8() 1239 m.Entry.Salt = buf.DecodeUint32() 1240 m.Entry.UDPSrcPort = buf.DecodeUint16() 1241 m.Entry.UDPDstPort = buf.DecodeUint16() 1242 return nil 1243 } 1244 1245 // IPsec: Add/delete Security Association Database entry 1246 // - entry - Entry to add or delete 1247 // 1248 // IpsecSadEntryAddDel defines message 'ipsec_sad_entry_add_del'. 1249 // Deprecated: the message will be removed in the future versions 1250 type IpsecSadEntryAddDel struct { 1251 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 1252 Entry ipsec_types.IpsecSadEntry `binapi:"ipsec_sad_entry,name=entry" json:"entry,omitempty"` 1253 } 1254 1255 func (m *IpsecSadEntryAddDel) Reset() { *m = IpsecSadEntryAddDel{} } 1256 func (*IpsecSadEntryAddDel) GetMessageName() string { return "ipsec_sad_entry_add_del" } 1257 func (*IpsecSadEntryAddDel) GetCrcString() string { return "ab64b5c6" } 1258 func (*IpsecSadEntryAddDel) GetMessageType() api.MessageType { 1259 return api.RequestMessage 1260 } 1261 1262 func (m *IpsecSadEntryAddDel) Size() (size int) { 1263 if m == nil { 1264 return 0 1265 } 1266 size += 1 // m.IsAdd 1267 size += 4 // m.Entry.SadID 1268 size += 4 // m.Entry.Spi 1269 size += 4 // m.Entry.Protocol 1270 size += 4 // m.Entry.CryptoAlgorithm 1271 size += 1 // m.Entry.CryptoKey.Length 1272 size += 1 * 128 // m.Entry.CryptoKey.Data 1273 size += 4 // m.Entry.IntegrityAlgorithm 1274 size += 1 // m.Entry.IntegrityKey.Length 1275 size += 1 * 128 // m.Entry.IntegrityKey.Data 1276 size += 4 // m.Entry.Flags 1277 size += 1 // m.Entry.TunnelSrc.Af 1278 size += 1 * 16 // m.Entry.TunnelSrc.Un 1279 size += 1 // m.Entry.TunnelDst.Af 1280 size += 1 * 16 // m.Entry.TunnelDst.Un 1281 size += 4 // m.Entry.TxTableID 1282 size += 4 // m.Entry.Salt 1283 size += 2 // m.Entry.UDPSrcPort 1284 size += 2 // m.Entry.UDPDstPort 1285 return size 1286 } 1287 func (m *IpsecSadEntryAddDel) Marshal(b []byte) ([]byte, error) { 1288 if b == nil { 1289 b = make([]byte, m.Size()) 1290 } 1291 buf := codec.NewBuffer(b) 1292 buf.EncodeBool(m.IsAdd) 1293 buf.EncodeUint32(m.Entry.SadID) 1294 buf.EncodeUint32(m.Entry.Spi) 1295 buf.EncodeUint32(uint32(m.Entry.Protocol)) 1296 buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm)) 1297 buf.EncodeUint8(m.Entry.CryptoKey.Length) 1298 buf.EncodeBytes(m.Entry.CryptoKey.Data, 128) 1299 buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm)) 1300 buf.EncodeUint8(m.Entry.IntegrityKey.Length) 1301 buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128) 1302 buf.EncodeUint32(uint32(m.Entry.Flags)) 1303 buf.EncodeUint8(uint8(m.Entry.TunnelSrc.Af)) 1304 buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16) 1305 buf.EncodeUint8(uint8(m.Entry.TunnelDst.Af)) 1306 buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16) 1307 buf.EncodeUint32(m.Entry.TxTableID) 1308 buf.EncodeUint32(m.Entry.Salt) 1309 buf.EncodeUint16(m.Entry.UDPSrcPort) 1310 buf.EncodeUint16(m.Entry.UDPDstPort) 1311 return buf.Bytes(), nil 1312 } 1313 func (m *IpsecSadEntryAddDel) Unmarshal(b []byte) error { 1314 buf := codec.NewBuffer(b) 1315 m.IsAdd = buf.DecodeBool() 1316 m.Entry.SadID = buf.DecodeUint32() 1317 m.Entry.Spi = buf.DecodeUint32() 1318 m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32()) 1319 m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32()) 1320 m.Entry.CryptoKey.Length = buf.DecodeUint8() 1321 m.Entry.CryptoKey.Data = make([]byte, 128) 1322 copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data))) 1323 m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32()) 1324 m.Entry.IntegrityKey.Length = buf.DecodeUint8() 1325 m.Entry.IntegrityKey.Data = make([]byte, 128) 1326 copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data))) 1327 m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32()) 1328 m.Entry.TunnelSrc.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1329 copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1330 m.Entry.TunnelDst.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1331 copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1332 m.Entry.TxTableID = buf.DecodeUint32() 1333 m.Entry.Salt = buf.DecodeUint32() 1334 m.Entry.UDPSrcPort = buf.DecodeUint16() 1335 m.Entry.UDPDstPort = buf.DecodeUint16() 1336 return nil 1337 } 1338 1339 // IpsecSadEntryAddDelReply defines message 'ipsec_sad_entry_add_del_reply'. 1340 // Deprecated: the message will be removed in the future versions 1341 type IpsecSadEntryAddDelReply struct { 1342 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1343 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"` 1344 } 1345 1346 func (m *IpsecSadEntryAddDelReply) Reset() { *m = IpsecSadEntryAddDelReply{} } 1347 func (*IpsecSadEntryAddDelReply) GetMessageName() string { return "ipsec_sad_entry_add_del_reply" } 1348 func (*IpsecSadEntryAddDelReply) GetCrcString() string { return "9ffac24b" } 1349 func (*IpsecSadEntryAddDelReply) GetMessageType() api.MessageType { 1350 return api.ReplyMessage 1351 } 1352 1353 func (m *IpsecSadEntryAddDelReply) Size() (size int) { 1354 if m == nil { 1355 return 0 1356 } 1357 size += 4 // m.Retval 1358 size += 4 // m.StatIndex 1359 return size 1360 } 1361 func (m *IpsecSadEntryAddDelReply) Marshal(b []byte) ([]byte, error) { 1362 if b == nil { 1363 b = make([]byte, m.Size()) 1364 } 1365 buf := codec.NewBuffer(b) 1366 buf.EncodeInt32(m.Retval) 1367 buf.EncodeUint32(m.StatIndex) 1368 return buf.Bytes(), nil 1369 } 1370 func (m *IpsecSadEntryAddDelReply) Unmarshal(b []byte) error { 1371 buf := codec.NewBuffer(b) 1372 m.Retval = buf.DecodeInt32() 1373 m.StatIndex = buf.DecodeUint32() 1374 return nil 1375 } 1376 1377 // IpsecSadEntryAddDelV2 defines message 'ipsec_sad_entry_add_del_v2'. 1378 // Deprecated: the message will be removed in the future versions 1379 type IpsecSadEntryAddDelV2 struct { 1380 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 1381 Entry ipsec_types.IpsecSadEntryV2 `binapi:"ipsec_sad_entry_v2,name=entry" json:"entry,omitempty"` 1382 } 1383 1384 func (m *IpsecSadEntryAddDelV2) Reset() { *m = IpsecSadEntryAddDelV2{} } 1385 func (*IpsecSadEntryAddDelV2) GetMessageName() string { return "ipsec_sad_entry_add_del_v2" } 1386 func (*IpsecSadEntryAddDelV2) GetCrcString() string { return "aca78b27" } 1387 func (*IpsecSadEntryAddDelV2) GetMessageType() api.MessageType { 1388 return api.RequestMessage 1389 } 1390 1391 func (m *IpsecSadEntryAddDelV2) Size() (size int) { 1392 if m == nil { 1393 return 0 1394 } 1395 size += 1 // m.IsAdd 1396 size += 4 // m.Entry.SadID 1397 size += 4 // m.Entry.Spi 1398 size += 4 // m.Entry.Protocol 1399 size += 4 // m.Entry.CryptoAlgorithm 1400 size += 1 // m.Entry.CryptoKey.Length 1401 size += 1 * 128 // m.Entry.CryptoKey.Data 1402 size += 4 // m.Entry.IntegrityAlgorithm 1403 size += 1 // m.Entry.IntegrityKey.Length 1404 size += 1 * 128 // m.Entry.IntegrityKey.Data 1405 size += 4 // m.Entry.Flags 1406 size += 1 // m.Entry.TunnelSrc.Af 1407 size += 1 * 16 // m.Entry.TunnelSrc.Un 1408 size += 1 // m.Entry.TunnelDst.Af 1409 size += 1 * 16 // m.Entry.TunnelDst.Un 1410 size += 1 // m.Entry.TunnelFlags 1411 size += 1 // m.Entry.Dscp 1412 size += 4 // m.Entry.TxTableID 1413 size += 4 // m.Entry.Salt 1414 size += 2 // m.Entry.UDPSrcPort 1415 size += 2 // m.Entry.UDPDstPort 1416 return size 1417 } 1418 func (m *IpsecSadEntryAddDelV2) Marshal(b []byte) ([]byte, error) { 1419 if b == nil { 1420 b = make([]byte, m.Size()) 1421 } 1422 buf := codec.NewBuffer(b) 1423 buf.EncodeBool(m.IsAdd) 1424 buf.EncodeUint32(m.Entry.SadID) 1425 buf.EncodeUint32(m.Entry.Spi) 1426 buf.EncodeUint32(uint32(m.Entry.Protocol)) 1427 buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm)) 1428 buf.EncodeUint8(m.Entry.CryptoKey.Length) 1429 buf.EncodeBytes(m.Entry.CryptoKey.Data, 128) 1430 buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm)) 1431 buf.EncodeUint8(m.Entry.IntegrityKey.Length) 1432 buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128) 1433 buf.EncodeUint32(uint32(m.Entry.Flags)) 1434 buf.EncodeUint8(uint8(m.Entry.TunnelSrc.Af)) 1435 buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16) 1436 buf.EncodeUint8(uint8(m.Entry.TunnelDst.Af)) 1437 buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16) 1438 buf.EncodeUint8(uint8(m.Entry.TunnelFlags)) 1439 buf.EncodeUint8(uint8(m.Entry.Dscp)) 1440 buf.EncodeUint32(m.Entry.TxTableID) 1441 buf.EncodeUint32(m.Entry.Salt) 1442 buf.EncodeUint16(m.Entry.UDPSrcPort) 1443 buf.EncodeUint16(m.Entry.UDPDstPort) 1444 return buf.Bytes(), nil 1445 } 1446 func (m *IpsecSadEntryAddDelV2) Unmarshal(b []byte) error { 1447 buf := codec.NewBuffer(b) 1448 m.IsAdd = buf.DecodeBool() 1449 m.Entry.SadID = buf.DecodeUint32() 1450 m.Entry.Spi = buf.DecodeUint32() 1451 m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32()) 1452 m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32()) 1453 m.Entry.CryptoKey.Length = buf.DecodeUint8() 1454 m.Entry.CryptoKey.Data = make([]byte, 128) 1455 copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data))) 1456 m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32()) 1457 m.Entry.IntegrityKey.Length = buf.DecodeUint8() 1458 m.Entry.IntegrityKey.Data = make([]byte, 128) 1459 copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data))) 1460 m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32()) 1461 m.Entry.TunnelSrc.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1462 copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1463 m.Entry.TunnelDst.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1464 copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1465 m.Entry.TunnelFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8()) 1466 m.Entry.Dscp = ip_types.IPDscp(buf.DecodeUint8()) 1467 m.Entry.TxTableID = buf.DecodeUint32() 1468 m.Entry.Salt = buf.DecodeUint32() 1469 m.Entry.UDPSrcPort = buf.DecodeUint16() 1470 m.Entry.UDPDstPort = buf.DecodeUint16() 1471 return nil 1472 } 1473 1474 // IpsecSadEntryAddDelV2Reply defines message 'ipsec_sad_entry_add_del_v2_reply'. 1475 // Deprecated: the message will be removed in the future versions 1476 type IpsecSadEntryAddDelV2Reply struct { 1477 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1478 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"` 1479 } 1480 1481 func (m *IpsecSadEntryAddDelV2Reply) Reset() { *m = IpsecSadEntryAddDelV2Reply{} } 1482 func (*IpsecSadEntryAddDelV2Reply) GetMessageName() string { return "ipsec_sad_entry_add_del_v2_reply" } 1483 func (*IpsecSadEntryAddDelV2Reply) GetCrcString() string { return "9ffac24b" } 1484 func (*IpsecSadEntryAddDelV2Reply) GetMessageType() api.MessageType { 1485 return api.ReplyMessage 1486 } 1487 1488 func (m *IpsecSadEntryAddDelV2Reply) Size() (size int) { 1489 if m == nil { 1490 return 0 1491 } 1492 size += 4 // m.Retval 1493 size += 4 // m.StatIndex 1494 return size 1495 } 1496 func (m *IpsecSadEntryAddDelV2Reply) Marshal(b []byte) ([]byte, error) { 1497 if b == nil { 1498 b = make([]byte, m.Size()) 1499 } 1500 buf := codec.NewBuffer(b) 1501 buf.EncodeInt32(m.Retval) 1502 buf.EncodeUint32(m.StatIndex) 1503 return buf.Bytes(), nil 1504 } 1505 func (m *IpsecSadEntryAddDelV2Reply) Unmarshal(b []byte) error { 1506 buf := codec.NewBuffer(b) 1507 m.Retval = buf.DecodeInt32() 1508 m.StatIndex = buf.DecodeUint32() 1509 return nil 1510 } 1511 1512 // IpsecSadEntryAddDelV3 defines message 'ipsec_sad_entry_add_del_v3'. 1513 type IpsecSadEntryAddDelV3 struct { 1514 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 1515 Entry ipsec_types.IpsecSadEntryV3 `binapi:"ipsec_sad_entry_v3,name=entry" json:"entry,omitempty"` 1516 } 1517 1518 func (m *IpsecSadEntryAddDelV3) Reset() { *m = IpsecSadEntryAddDelV3{} } 1519 func (*IpsecSadEntryAddDelV3) GetMessageName() string { return "ipsec_sad_entry_add_del_v3" } 1520 func (*IpsecSadEntryAddDelV3) GetCrcString() string { return "c77ebd92" } 1521 func (*IpsecSadEntryAddDelV3) GetMessageType() api.MessageType { 1522 return api.RequestMessage 1523 } 1524 1525 func (m *IpsecSadEntryAddDelV3) Size() (size int) { 1526 if m == nil { 1527 return 0 1528 } 1529 size += 1 // m.IsAdd 1530 size += 4 // m.Entry.SadID 1531 size += 4 // m.Entry.Spi 1532 size += 4 // m.Entry.Protocol 1533 size += 4 // m.Entry.CryptoAlgorithm 1534 size += 1 // m.Entry.CryptoKey.Length 1535 size += 1 * 128 // m.Entry.CryptoKey.Data 1536 size += 4 // m.Entry.IntegrityAlgorithm 1537 size += 1 // m.Entry.IntegrityKey.Length 1538 size += 1 * 128 // m.Entry.IntegrityKey.Data 1539 size += 4 // m.Entry.Flags 1540 size += 4 // m.Entry.Tunnel.Instance 1541 size += 1 // m.Entry.Tunnel.Src.Af 1542 size += 1 * 16 // m.Entry.Tunnel.Src.Un 1543 size += 1 // m.Entry.Tunnel.Dst.Af 1544 size += 1 * 16 // m.Entry.Tunnel.Dst.Un 1545 size += 4 // m.Entry.Tunnel.SwIfIndex 1546 size += 4 // m.Entry.Tunnel.TableID 1547 size += 1 // m.Entry.Tunnel.EncapDecapFlags 1548 size += 1 // m.Entry.Tunnel.Mode 1549 size += 1 // m.Entry.Tunnel.Flags 1550 size += 1 // m.Entry.Tunnel.Dscp 1551 size += 1 // m.Entry.Tunnel.HopLimit 1552 size += 4 // m.Entry.Salt 1553 size += 2 // m.Entry.UDPSrcPort 1554 size += 2 // m.Entry.UDPDstPort 1555 return size 1556 } 1557 func (m *IpsecSadEntryAddDelV3) Marshal(b []byte) ([]byte, error) { 1558 if b == nil { 1559 b = make([]byte, m.Size()) 1560 } 1561 buf := codec.NewBuffer(b) 1562 buf.EncodeBool(m.IsAdd) 1563 buf.EncodeUint32(m.Entry.SadID) 1564 buf.EncodeUint32(m.Entry.Spi) 1565 buf.EncodeUint32(uint32(m.Entry.Protocol)) 1566 buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm)) 1567 buf.EncodeUint8(m.Entry.CryptoKey.Length) 1568 buf.EncodeBytes(m.Entry.CryptoKey.Data, 128) 1569 buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm)) 1570 buf.EncodeUint8(m.Entry.IntegrityKey.Length) 1571 buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128) 1572 buf.EncodeUint32(uint32(m.Entry.Flags)) 1573 buf.EncodeUint32(m.Entry.Tunnel.Instance) 1574 buf.EncodeUint8(uint8(m.Entry.Tunnel.Src.Af)) 1575 buf.EncodeBytes(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], 16) 1576 buf.EncodeUint8(uint8(m.Entry.Tunnel.Dst.Af)) 1577 buf.EncodeBytes(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], 16) 1578 buf.EncodeUint32(uint32(m.Entry.Tunnel.SwIfIndex)) 1579 buf.EncodeUint32(m.Entry.Tunnel.TableID) 1580 buf.EncodeUint8(uint8(m.Entry.Tunnel.EncapDecapFlags)) 1581 buf.EncodeUint8(uint8(m.Entry.Tunnel.Mode)) 1582 buf.EncodeUint8(uint8(m.Entry.Tunnel.Flags)) 1583 buf.EncodeUint8(uint8(m.Entry.Tunnel.Dscp)) 1584 buf.EncodeUint8(m.Entry.Tunnel.HopLimit) 1585 buf.EncodeUint32(m.Entry.Salt) 1586 buf.EncodeUint16(m.Entry.UDPSrcPort) 1587 buf.EncodeUint16(m.Entry.UDPDstPort) 1588 return buf.Bytes(), nil 1589 } 1590 func (m *IpsecSadEntryAddDelV3) Unmarshal(b []byte) error { 1591 buf := codec.NewBuffer(b) 1592 m.IsAdd = buf.DecodeBool() 1593 m.Entry.SadID = buf.DecodeUint32() 1594 m.Entry.Spi = buf.DecodeUint32() 1595 m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32()) 1596 m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32()) 1597 m.Entry.CryptoKey.Length = buf.DecodeUint8() 1598 m.Entry.CryptoKey.Data = make([]byte, 128) 1599 copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data))) 1600 m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32()) 1601 m.Entry.IntegrityKey.Length = buf.DecodeUint8() 1602 m.Entry.IntegrityKey.Data = make([]byte, 128) 1603 copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data))) 1604 m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32()) 1605 m.Entry.Tunnel.Instance = buf.DecodeUint32() 1606 m.Entry.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1607 copy(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1608 m.Entry.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1609 copy(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1610 m.Entry.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1611 m.Entry.Tunnel.TableID = buf.DecodeUint32() 1612 m.Entry.Tunnel.EncapDecapFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8()) 1613 m.Entry.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8()) 1614 m.Entry.Tunnel.Flags = tunnel_types.TunnelFlags(buf.DecodeUint8()) 1615 m.Entry.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8()) 1616 m.Entry.Tunnel.HopLimit = buf.DecodeUint8() 1617 m.Entry.Salt = buf.DecodeUint32() 1618 m.Entry.UDPSrcPort = buf.DecodeUint16() 1619 m.Entry.UDPDstPort = buf.DecodeUint16() 1620 return nil 1621 } 1622 1623 // IpsecSadEntryAddDelV3Reply defines message 'ipsec_sad_entry_add_del_v3_reply'. 1624 type IpsecSadEntryAddDelV3Reply struct { 1625 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1626 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"` 1627 } 1628 1629 func (m *IpsecSadEntryAddDelV3Reply) Reset() { *m = IpsecSadEntryAddDelV3Reply{} } 1630 func (*IpsecSadEntryAddDelV3Reply) GetMessageName() string { return "ipsec_sad_entry_add_del_v3_reply" } 1631 func (*IpsecSadEntryAddDelV3Reply) GetCrcString() string { return "9ffac24b" } 1632 func (*IpsecSadEntryAddDelV3Reply) GetMessageType() api.MessageType { 1633 return api.ReplyMessage 1634 } 1635 1636 func (m *IpsecSadEntryAddDelV3Reply) Size() (size int) { 1637 if m == nil { 1638 return 0 1639 } 1640 size += 4 // m.Retval 1641 size += 4 // m.StatIndex 1642 return size 1643 } 1644 func (m *IpsecSadEntryAddDelV3Reply) Marshal(b []byte) ([]byte, error) { 1645 if b == nil { 1646 b = make([]byte, m.Size()) 1647 } 1648 buf := codec.NewBuffer(b) 1649 buf.EncodeInt32(m.Retval) 1650 buf.EncodeUint32(m.StatIndex) 1651 return buf.Bytes(), nil 1652 } 1653 func (m *IpsecSadEntryAddDelV3Reply) Unmarshal(b []byte) error { 1654 buf := codec.NewBuffer(b) 1655 m.Retval = buf.DecodeInt32() 1656 m.StatIndex = buf.DecodeUint32() 1657 return nil 1658 } 1659 1660 // IpsecSadEntryAddReply defines message 'ipsec_sad_entry_add_reply'. 1661 type IpsecSadEntryAddReply struct { 1662 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1663 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"` 1664 } 1665 1666 func (m *IpsecSadEntryAddReply) Reset() { *m = IpsecSadEntryAddReply{} } 1667 func (*IpsecSadEntryAddReply) GetMessageName() string { return "ipsec_sad_entry_add_reply" } 1668 func (*IpsecSadEntryAddReply) GetCrcString() string { return "9ffac24b" } 1669 func (*IpsecSadEntryAddReply) GetMessageType() api.MessageType { 1670 return api.ReplyMessage 1671 } 1672 1673 func (m *IpsecSadEntryAddReply) Size() (size int) { 1674 if m == nil { 1675 return 0 1676 } 1677 size += 4 // m.Retval 1678 size += 4 // m.StatIndex 1679 return size 1680 } 1681 func (m *IpsecSadEntryAddReply) Marshal(b []byte) ([]byte, error) { 1682 if b == nil { 1683 b = make([]byte, m.Size()) 1684 } 1685 buf := codec.NewBuffer(b) 1686 buf.EncodeInt32(m.Retval) 1687 buf.EncodeUint32(m.StatIndex) 1688 return buf.Bytes(), nil 1689 } 1690 func (m *IpsecSadEntryAddReply) Unmarshal(b []byte) error { 1691 buf := codec.NewBuffer(b) 1692 m.Retval = buf.DecodeInt32() 1693 m.StatIndex = buf.DecodeUint32() 1694 return nil 1695 } 1696 1697 // IpsecSadEntryDel defines message 'ipsec_sad_entry_del'. 1698 type IpsecSadEntryDel struct { 1699 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"` 1700 } 1701 1702 func (m *IpsecSadEntryDel) Reset() { *m = IpsecSadEntryDel{} } 1703 func (*IpsecSadEntryDel) GetMessageName() string { return "ipsec_sad_entry_del" } 1704 func (*IpsecSadEntryDel) GetCrcString() string { return "3a91bde5" } 1705 func (*IpsecSadEntryDel) GetMessageType() api.MessageType { 1706 return api.RequestMessage 1707 } 1708 1709 func (m *IpsecSadEntryDel) Size() (size int) { 1710 if m == nil { 1711 return 0 1712 } 1713 size += 4 // m.ID 1714 return size 1715 } 1716 func (m *IpsecSadEntryDel) Marshal(b []byte) ([]byte, error) { 1717 if b == nil { 1718 b = make([]byte, m.Size()) 1719 } 1720 buf := codec.NewBuffer(b) 1721 buf.EncodeUint32(m.ID) 1722 return buf.Bytes(), nil 1723 } 1724 func (m *IpsecSadEntryDel) Unmarshal(b []byte) error { 1725 buf := codec.NewBuffer(b) 1726 m.ID = buf.DecodeUint32() 1727 return nil 1728 } 1729 1730 // IpsecSadEntryDelReply defines message 'ipsec_sad_entry_del_reply'. 1731 type IpsecSadEntryDelReply struct { 1732 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1733 } 1734 1735 func (m *IpsecSadEntryDelReply) Reset() { *m = IpsecSadEntryDelReply{} } 1736 func (*IpsecSadEntryDelReply) GetMessageName() string { return "ipsec_sad_entry_del_reply" } 1737 func (*IpsecSadEntryDelReply) GetCrcString() string { return "e8d4e804" } 1738 func (*IpsecSadEntryDelReply) GetMessageType() api.MessageType { 1739 return api.ReplyMessage 1740 } 1741 1742 func (m *IpsecSadEntryDelReply) Size() (size int) { 1743 if m == nil { 1744 return 0 1745 } 1746 size += 4 // m.Retval 1747 return size 1748 } 1749 func (m *IpsecSadEntryDelReply) Marshal(b []byte) ([]byte, error) { 1750 if b == nil { 1751 b = make([]byte, m.Size()) 1752 } 1753 buf := codec.NewBuffer(b) 1754 buf.EncodeInt32(m.Retval) 1755 return buf.Bytes(), nil 1756 } 1757 func (m *IpsecSadEntryDelReply) Unmarshal(b []byte) error { 1758 buf := codec.NewBuffer(b) 1759 m.Retval = buf.DecodeInt32() 1760 return nil 1761 } 1762 1763 // An API to update the tunnel parameters and the ports associated with an SA 1764 // 1765 // Used in the NAT-T case when the NAT data changes 1766 // - sa_id - the id of the SA to update 1767 // - is_tun - update the tunnel if non-zero, else update only the ports 1768 // - tunnel - sender context, to match reply w/ request 1769 // - udp_src_port - new src port for NAT-T. Used if different from 0xffff 1770 // - udp_dst_port - new dst port for NAT-T. Used if different from 0xffff 1771 // 1772 // IpsecSadEntryUpdate defines message 'ipsec_sad_entry_update'. 1773 type IpsecSadEntryUpdate struct { 1774 SadID uint32 `binapi:"u32,name=sad_id" json:"sad_id,omitempty"` 1775 IsTun bool `binapi:"bool,name=is_tun" json:"is_tun,omitempty"` 1776 Tunnel tunnel_types.Tunnel `binapi:"tunnel,name=tunnel" json:"tunnel,omitempty"` 1777 UDPSrcPort uint16 `binapi:"u16,name=udp_src_port,default=65535" json:"udp_src_port,omitempty"` 1778 UDPDstPort uint16 `binapi:"u16,name=udp_dst_port,default=65535" json:"udp_dst_port,omitempty"` 1779 } 1780 1781 func (m *IpsecSadEntryUpdate) Reset() { *m = IpsecSadEntryUpdate{} } 1782 func (*IpsecSadEntryUpdate) GetMessageName() string { return "ipsec_sad_entry_update" } 1783 func (*IpsecSadEntryUpdate) GetCrcString() string { return "1412af86" } 1784 func (*IpsecSadEntryUpdate) GetMessageType() api.MessageType { 1785 return api.RequestMessage 1786 } 1787 1788 func (m *IpsecSadEntryUpdate) Size() (size int) { 1789 if m == nil { 1790 return 0 1791 } 1792 size += 4 // m.SadID 1793 size += 1 // m.IsTun 1794 size += 4 // m.Tunnel.Instance 1795 size += 1 // m.Tunnel.Src.Af 1796 size += 1 * 16 // m.Tunnel.Src.Un 1797 size += 1 // m.Tunnel.Dst.Af 1798 size += 1 * 16 // m.Tunnel.Dst.Un 1799 size += 4 // m.Tunnel.SwIfIndex 1800 size += 4 // m.Tunnel.TableID 1801 size += 1 // m.Tunnel.EncapDecapFlags 1802 size += 1 // m.Tunnel.Mode 1803 size += 1 // m.Tunnel.Flags 1804 size += 1 // m.Tunnel.Dscp 1805 size += 1 // m.Tunnel.HopLimit 1806 size += 2 // m.UDPSrcPort 1807 size += 2 // m.UDPDstPort 1808 return size 1809 } 1810 func (m *IpsecSadEntryUpdate) Marshal(b []byte) ([]byte, error) { 1811 if b == nil { 1812 b = make([]byte, m.Size()) 1813 } 1814 buf := codec.NewBuffer(b) 1815 buf.EncodeUint32(m.SadID) 1816 buf.EncodeBool(m.IsTun) 1817 buf.EncodeUint32(m.Tunnel.Instance) 1818 buf.EncodeUint8(uint8(m.Tunnel.Src.Af)) 1819 buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16) 1820 buf.EncodeUint8(uint8(m.Tunnel.Dst.Af)) 1821 buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16) 1822 buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex)) 1823 buf.EncodeUint32(m.Tunnel.TableID) 1824 buf.EncodeUint8(uint8(m.Tunnel.EncapDecapFlags)) 1825 buf.EncodeUint8(uint8(m.Tunnel.Mode)) 1826 buf.EncodeUint8(uint8(m.Tunnel.Flags)) 1827 buf.EncodeUint8(uint8(m.Tunnel.Dscp)) 1828 buf.EncodeUint8(m.Tunnel.HopLimit) 1829 buf.EncodeUint16(m.UDPSrcPort) 1830 buf.EncodeUint16(m.UDPDstPort) 1831 return buf.Bytes(), nil 1832 } 1833 func (m *IpsecSadEntryUpdate) Unmarshal(b []byte) error { 1834 buf := codec.NewBuffer(b) 1835 m.SadID = buf.DecodeUint32() 1836 m.IsTun = buf.DecodeBool() 1837 m.Tunnel.Instance = buf.DecodeUint32() 1838 m.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1839 copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1840 m.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1841 copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1842 m.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1843 m.Tunnel.TableID = buf.DecodeUint32() 1844 m.Tunnel.EncapDecapFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8()) 1845 m.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8()) 1846 m.Tunnel.Flags = tunnel_types.TunnelFlags(buf.DecodeUint8()) 1847 m.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8()) 1848 m.Tunnel.HopLimit = buf.DecodeUint8() 1849 m.UDPSrcPort = buf.DecodeUint16() 1850 m.UDPDstPort = buf.DecodeUint16() 1851 return nil 1852 } 1853 1854 // IpsecSadEntryUpdateReply defines message 'ipsec_sad_entry_update_reply'. 1855 type IpsecSadEntryUpdateReply struct { 1856 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1857 } 1858 1859 func (m *IpsecSadEntryUpdateReply) Reset() { *m = IpsecSadEntryUpdateReply{} } 1860 func (*IpsecSadEntryUpdateReply) GetMessageName() string { return "ipsec_sad_entry_update_reply" } 1861 func (*IpsecSadEntryUpdateReply) GetCrcString() string { return "e8d4e804" } 1862 func (*IpsecSadEntryUpdateReply) GetMessageType() api.MessageType { 1863 return api.ReplyMessage 1864 } 1865 1866 func (m *IpsecSadEntryUpdateReply) Size() (size int) { 1867 if m == nil { 1868 return 0 1869 } 1870 size += 4 // m.Retval 1871 return size 1872 } 1873 func (m *IpsecSadEntryUpdateReply) Marshal(b []byte) ([]byte, error) { 1874 if b == nil { 1875 b = make([]byte, m.Size()) 1876 } 1877 buf := codec.NewBuffer(b) 1878 buf.EncodeInt32(m.Retval) 1879 return buf.Bytes(), nil 1880 } 1881 func (m *IpsecSadEntryUpdateReply) Unmarshal(b []byte) error { 1882 buf := codec.NewBuffer(b) 1883 m.Retval = buf.DecodeInt32() 1884 return nil 1885 } 1886 1887 // IpsecSadUnbind defines message 'ipsec_sad_unbind'. 1888 type IpsecSadUnbind struct { 1889 SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"` 1890 } 1891 1892 func (m *IpsecSadUnbind) Reset() { *m = IpsecSadUnbind{} } 1893 func (*IpsecSadUnbind) GetMessageName() string { return "ipsec_sad_unbind" } 1894 func (*IpsecSadUnbind) GetCrcString() string { return "2076c2f4" } 1895 func (*IpsecSadUnbind) GetMessageType() api.MessageType { 1896 return api.RequestMessage 1897 } 1898 1899 func (m *IpsecSadUnbind) Size() (size int) { 1900 if m == nil { 1901 return 0 1902 } 1903 size += 4 // m.SaID 1904 return size 1905 } 1906 func (m *IpsecSadUnbind) Marshal(b []byte) ([]byte, error) { 1907 if b == nil { 1908 b = make([]byte, m.Size()) 1909 } 1910 buf := codec.NewBuffer(b) 1911 buf.EncodeUint32(m.SaID) 1912 return buf.Bytes(), nil 1913 } 1914 func (m *IpsecSadUnbind) Unmarshal(b []byte) error { 1915 buf := codec.NewBuffer(b) 1916 m.SaID = buf.DecodeUint32() 1917 return nil 1918 } 1919 1920 // IpsecSadUnbindReply defines message 'ipsec_sad_unbind_reply'. 1921 type IpsecSadUnbindReply struct { 1922 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1923 } 1924 1925 func (m *IpsecSadUnbindReply) Reset() { *m = IpsecSadUnbindReply{} } 1926 func (*IpsecSadUnbindReply) GetMessageName() string { return "ipsec_sad_unbind_reply" } 1927 func (*IpsecSadUnbindReply) GetCrcString() string { return "e8d4e804" } 1928 func (*IpsecSadUnbindReply) GetMessageType() api.MessageType { 1929 return api.ReplyMessage 1930 } 1931 1932 func (m *IpsecSadUnbindReply) Size() (size int) { 1933 if m == nil { 1934 return 0 1935 } 1936 size += 4 // m.Retval 1937 return size 1938 } 1939 func (m *IpsecSadUnbindReply) Marshal(b []byte) ([]byte, error) { 1940 if b == nil { 1941 b = make([]byte, m.Size()) 1942 } 1943 buf := codec.NewBuffer(b) 1944 buf.EncodeInt32(m.Retval) 1945 return buf.Bytes(), nil 1946 } 1947 func (m *IpsecSadUnbindReply) Unmarshal(b []byte) error { 1948 buf := codec.NewBuffer(b) 1949 m.Retval = buf.DecodeInt32() 1950 return nil 1951 } 1952 1953 // Select IPsec backend 1954 // - protocol - IPsec protocol (value from ipsec_protocol_t) 1955 // - index - backend index 1956 // 1957 // IpsecSelectBackend defines message 'ipsec_select_backend'. 1958 type IpsecSelectBackend struct { 1959 Protocol ipsec_types.IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"` 1960 Index uint8 `binapi:"u8,name=index" json:"index,omitempty"` 1961 } 1962 1963 func (m *IpsecSelectBackend) Reset() { *m = IpsecSelectBackend{} } 1964 func (*IpsecSelectBackend) GetMessageName() string { return "ipsec_select_backend" } 1965 func (*IpsecSelectBackend) GetCrcString() string { return "5bcfd3b7" } 1966 func (*IpsecSelectBackend) GetMessageType() api.MessageType { 1967 return api.RequestMessage 1968 } 1969 1970 func (m *IpsecSelectBackend) Size() (size int) { 1971 if m == nil { 1972 return 0 1973 } 1974 size += 4 // m.Protocol 1975 size += 1 // m.Index 1976 return size 1977 } 1978 func (m *IpsecSelectBackend) Marshal(b []byte) ([]byte, error) { 1979 if b == nil { 1980 b = make([]byte, m.Size()) 1981 } 1982 buf := codec.NewBuffer(b) 1983 buf.EncodeUint32(uint32(m.Protocol)) 1984 buf.EncodeUint8(m.Index) 1985 return buf.Bytes(), nil 1986 } 1987 func (m *IpsecSelectBackend) Unmarshal(b []byte) error { 1988 buf := codec.NewBuffer(b) 1989 m.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32()) 1990 m.Index = buf.DecodeUint8() 1991 return nil 1992 } 1993 1994 // IpsecSelectBackendReply defines message 'ipsec_select_backend_reply'. 1995 type IpsecSelectBackendReply struct { 1996 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1997 } 1998 1999 func (m *IpsecSelectBackendReply) Reset() { *m = IpsecSelectBackendReply{} } 2000 func (*IpsecSelectBackendReply) GetMessageName() string { return "ipsec_select_backend_reply" } 2001 func (*IpsecSelectBackendReply) GetCrcString() string { return "e8d4e804" } 2002 func (*IpsecSelectBackendReply) GetMessageType() api.MessageType { 2003 return api.ReplyMessage 2004 } 2005 2006 func (m *IpsecSelectBackendReply) Size() (size int) { 2007 if m == nil { 2008 return 0 2009 } 2010 size += 4 // m.Retval 2011 return size 2012 } 2013 func (m *IpsecSelectBackendReply) Marshal(b []byte) ([]byte, error) { 2014 if b == nil { 2015 b = make([]byte, m.Size()) 2016 } 2017 buf := codec.NewBuffer(b) 2018 buf.EncodeInt32(m.Retval) 2019 return buf.Bytes(), nil 2020 } 2021 func (m *IpsecSelectBackendReply) Unmarshal(b []byte) error { 2022 buf := codec.NewBuffer(b) 2023 m.Retval = buf.DecodeInt32() 2024 return nil 2025 } 2026 2027 // IPsec Set Async mode 2028 // - async_enable - ipsec async mode on or off 2029 // 2030 // IpsecSetAsyncMode defines message 'ipsec_set_async_mode'. 2031 type IpsecSetAsyncMode struct { 2032 AsyncEnable bool `binapi:"bool,name=async_enable" json:"async_enable,omitempty"` 2033 } 2034 2035 func (m *IpsecSetAsyncMode) Reset() { *m = IpsecSetAsyncMode{} } 2036 func (*IpsecSetAsyncMode) GetMessageName() string { return "ipsec_set_async_mode" } 2037 func (*IpsecSetAsyncMode) GetCrcString() string { return "a6465f7c" } 2038 func (*IpsecSetAsyncMode) GetMessageType() api.MessageType { 2039 return api.RequestMessage 2040 } 2041 2042 func (m *IpsecSetAsyncMode) Size() (size int) { 2043 if m == nil { 2044 return 0 2045 } 2046 size += 1 // m.AsyncEnable 2047 return size 2048 } 2049 func (m *IpsecSetAsyncMode) Marshal(b []byte) ([]byte, error) { 2050 if b == nil { 2051 b = make([]byte, m.Size()) 2052 } 2053 buf := codec.NewBuffer(b) 2054 buf.EncodeBool(m.AsyncEnable) 2055 return buf.Bytes(), nil 2056 } 2057 func (m *IpsecSetAsyncMode) Unmarshal(b []byte) error { 2058 buf := codec.NewBuffer(b) 2059 m.AsyncEnable = buf.DecodeBool() 2060 return nil 2061 } 2062 2063 // IpsecSetAsyncModeReply defines message 'ipsec_set_async_mode_reply'. 2064 type IpsecSetAsyncModeReply struct { 2065 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2066 } 2067 2068 func (m *IpsecSetAsyncModeReply) Reset() { *m = IpsecSetAsyncModeReply{} } 2069 func (*IpsecSetAsyncModeReply) GetMessageName() string { return "ipsec_set_async_mode_reply" } 2070 func (*IpsecSetAsyncModeReply) GetCrcString() string { return "e8d4e804" } 2071 func (*IpsecSetAsyncModeReply) GetMessageType() api.MessageType { 2072 return api.ReplyMessage 2073 } 2074 2075 func (m *IpsecSetAsyncModeReply) Size() (size int) { 2076 if m == nil { 2077 return 0 2078 } 2079 size += 4 // m.Retval 2080 return size 2081 } 2082 func (m *IpsecSetAsyncModeReply) Marshal(b []byte) ([]byte, error) { 2083 if b == nil { 2084 b = make([]byte, m.Size()) 2085 } 2086 buf := codec.NewBuffer(b) 2087 buf.EncodeInt32(m.Retval) 2088 return buf.Bytes(), nil 2089 } 2090 func (m *IpsecSetAsyncModeReply) Unmarshal(b []byte) error { 2091 buf := codec.NewBuffer(b) 2092 m.Retval = buf.DecodeInt32() 2093 return nil 2094 } 2095 2096 // IPsec: Add/delete Security Policy Database 2097 // - is_add - add SPD if non-zero, else delete 2098 // - spd_id - SPD instance id (control plane allocated) 2099 // 2100 // IpsecSpdAddDel defines message 'ipsec_spd_add_del'. 2101 type IpsecSpdAddDel struct { 2102 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 2103 SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"` 2104 } 2105 2106 func (m *IpsecSpdAddDel) Reset() { *m = IpsecSpdAddDel{} } 2107 func (*IpsecSpdAddDel) GetMessageName() string { return "ipsec_spd_add_del" } 2108 func (*IpsecSpdAddDel) GetCrcString() string { return "20e89a95" } 2109 func (*IpsecSpdAddDel) GetMessageType() api.MessageType { 2110 return api.RequestMessage 2111 } 2112 2113 func (m *IpsecSpdAddDel) Size() (size int) { 2114 if m == nil { 2115 return 0 2116 } 2117 size += 1 // m.IsAdd 2118 size += 4 // m.SpdID 2119 return size 2120 } 2121 func (m *IpsecSpdAddDel) Marshal(b []byte) ([]byte, error) { 2122 if b == nil { 2123 b = make([]byte, m.Size()) 2124 } 2125 buf := codec.NewBuffer(b) 2126 buf.EncodeBool(m.IsAdd) 2127 buf.EncodeUint32(m.SpdID) 2128 return buf.Bytes(), nil 2129 } 2130 func (m *IpsecSpdAddDel) Unmarshal(b []byte) error { 2131 buf := codec.NewBuffer(b) 2132 m.IsAdd = buf.DecodeBool() 2133 m.SpdID = buf.DecodeUint32() 2134 return nil 2135 } 2136 2137 // IpsecSpdAddDelReply defines message 'ipsec_spd_add_del_reply'. 2138 type IpsecSpdAddDelReply struct { 2139 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2140 } 2141 2142 func (m *IpsecSpdAddDelReply) Reset() { *m = IpsecSpdAddDelReply{} } 2143 func (*IpsecSpdAddDelReply) GetMessageName() string { return "ipsec_spd_add_del_reply" } 2144 func (*IpsecSpdAddDelReply) GetCrcString() string { return "e8d4e804" } 2145 func (*IpsecSpdAddDelReply) GetMessageType() api.MessageType { 2146 return api.ReplyMessage 2147 } 2148 2149 func (m *IpsecSpdAddDelReply) Size() (size int) { 2150 if m == nil { 2151 return 0 2152 } 2153 size += 4 // m.Retval 2154 return size 2155 } 2156 func (m *IpsecSpdAddDelReply) Marshal(b []byte) ([]byte, error) { 2157 if b == nil { 2158 b = make([]byte, m.Size()) 2159 } 2160 buf := codec.NewBuffer(b) 2161 buf.EncodeInt32(m.Retval) 2162 return buf.Bytes(), nil 2163 } 2164 func (m *IpsecSpdAddDelReply) Unmarshal(b []byte) error { 2165 buf := codec.NewBuffer(b) 2166 m.Retval = buf.DecodeInt32() 2167 return nil 2168 } 2169 2170 // IPsec policy database response 2171 // 2172 // €param entry - The SPD entry. 2173 // - bytes - byte count of packets matching this policy 2174 // - packets - count of packets matching this policy 2175 // 2176 // IpsecSpdDetails defines message 'ipsec_spd_details'. 2177 type IpsecSpdDetails struct { 2178 Entry ipsec_types.IpsecSpdEntry `binapi:"ipsec_spd_entry,name=entry" json:"entry,omitempty"` 2179 } 2180 2181 func (m *IpsecSpdDetails) Reset() { *m = IpsecSpdDetails{} } 2182 func (*IpsecSpdDetails) GetMessageName() string { return "ipsec_spd_details" } 2183 func (*IpsecSpdDetails) GetCrcString() string { return "5813d7a2" } 2184 func (*IpsecSpdDetails) GetMessageType() api.MessageType { 2185 return api.ReplyMessage 2186 } 2187 2188 func (m *IpsecSpdDetails) Size() (size int) { 2189 if m == nil { 2190 return 0 2191 } 2192 size += 4 // m.Entry.SpdID 2193 size += 4 // m.Entry.Priority 2194 size += 1 // m.Entry.IsOutbound 2195 size += 4 // m.Entry.SaID 2196 size += 4 // m.Entry.Policy 2197 size += 1 // m.Entry.Protocol 2198 size += 1 // m.Entry.RemoteAddressStart.Af 2199 size += 1 * 16 // m.Entry.RemoteAddressStart.Un 2200 size += 1 // m.Entry.RemoteAddressStop.Af 2201 size += 1 * 16 // m.Entry.RemoteAddressStop.Un 2202 size += 1 // m.Entry.LocalAddressStart.Af 2203 size += 1 * 16 // m.Entry.LocalAddressStart.Un 2204 size += 1 // m.Entry.LocalAddressStop.Af 2205 size += 1 * 16 // m.Entry.LocalAddressStop.Un 2206 size += 2 // m.Entry.RemotePortStart 2207 size += 2 // m.Entry.RemotePortStop 2208 size += 2 // m.Entry.LocalPortStart 2209 size += 2 // m.Entry.LocalPortStop 2210 return size 2211 } 2212 func (m *IpsecSpdDetails) Marshal(b []byte) ([]byte, error) { 2213 if b == nil { 2214 b = make([]byte, m.Size()) 2215 } 2216 buf := codec.NewBuffer(b) 2217 buf.EncodeUint32(m.Entry.SpdID) 2218 buf.EncodeInt32(m.Entry.Priority) 2219 buf.EncodeBool(m.Entry.IsOutbound) 2220 buf.EncodeUint32(m.Entry.SaID) 2221 buf.EncodeUint32(uint32(m.Entry.Policy)) 2222 buf.EncodeUint8(m.Entry.Protocol) 2223 buf.EncodeUint8(uint8(m.Entry.RemoteAddressStart.Af)) 2224 buf.EncodeBytes(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], 16) 2225 buf.EncodeUint8(uint8(m.Entry.RemoteAddressStop.Af)) 2226 buf.EncodeBytes(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], 16) 2227 buf.EncodeUint8(uint8(m.Entry.LocalAddressStart.Af)) 2228 buf.EncodeBytes(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], 16) 2229 buf.EncodeUint8(uint8(m.Entry.LocalAddressStop.Af)) 2230 buf.EncodeBytes(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], 16) 2231 buf.EncodeUint16(m.Entry.RemotePortStart) 2232 buf.EncodeUint16(m.Entry.RemotePortStop) 2233 buf.EncodeUint16(m.Entry.LocalPortStart) 2234 buf.EncodeUint16(m.Entry.LocalPortStop) 2235 return buf.Bytes(), nil 2236 } 2237 func (m *IpsecSpdDetails) Unmarshal(b []byte) error { 2238 buf := codec.NewBuffer(b) 2239 m.Entry.SpdID = buf.DecodeUint32() 2240 m.Entry.Priority = buf.DecodeInt32() 2241 m.Entry.IsOutbound = buf.DecodeBool() 2242 m.Entry.SaID = buf.DecodeUint32() 2243 m.Entry.Policy = ipsec_types.IpsecSpdAction(buf.DecodeUint32()) 2244 m.Entry.Protocol = buf.DecodeUint8() 2245 m.Entry.RemoteAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2246 copy(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2247 m.Entry.RemoteAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2248 copy(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2249 m.Entry.LocalAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2250 copy(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2251 m.Entry.LocalAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2252 copy(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2253 m.Entry.RemotePortStart = buf.DecodeUint16() 2254 m.Entry.RemotePortStop = buf.DecodeUint16() 2255 m.Entry.LocalPortStart = buf.DecodeUint16() 2256 m.Entry.LocalPortStop = buf.DecodeUint16() 2257 return nil 2258 } 2259 2260 // Dump ipsec policy database data 2261 // - spd_id - SPD instance id 2262 // - sa_id - SA id, optional, set to ~0 to see all policies in SPD 2263 // 2264 // IpsecSpdDump defines message 'ipsec_spd_dump'. 2265 type IpsecSpdDump struct { 2266 SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"` 2267 SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"` 2268 } 2269 2270 func (m *IpsecSpdDump) Reset() { *m = IpsecSpdDump{} } 2271 func (*IpsecSpdDump) GetMessageName() string { return "ipsec_spd_dump" } 2272 func (*IpsecSpdDump) GetCrcString() string { return "afefbf7d" } 2273 func (*IpsecSpdDump) GetMessageType() api.MessageType { 2274 return api.RequestMessage 2275 } 2276 2277 func (m *IpsecSpdDump) Size() (size int) { 2278 if m == nil { 2279 return 0 2280 } 2281 size += 4 // m.SpdID 2282 size += 4 // m.SaID 2283 return size 2284 } 2285 func (m *IpsecSpdDump) Marshal(b []byte) ([]byte, error) { 2286 if b == nil { 2287 b = make([]byte, m.Size()) 2288 } 2289 buf := codec.NewBuffer(b) 2290 buf.EncodeUint32(m.SpdID) 2291 buf.EncodeUint32(m.SaID) 2292 return buf.Bytes(), nil 2293 } 2294 func (m *IpsecSpdDump) Unmarshal(b []byte) error { 2295 buf := codec.NewBuffer(b) 2296 m.SpdID = buf.DecodeUint32() 2297 m.SaID = buf.DecodeUint32() 2298 return nil 2299 } 2300 2301 // IPsec: Add/delete Security Policy Database entry 2302 // - is_add - add SPD if non-zero, else delete 2303 // - entry - Description of the entry to add/dell 2304 // 2305 // IpsecSpdEntryAddDel defines message 'ipsec_spd_entry_add_del'. 2306 // Deprecated: the message will be removed in the future versions 2307 type IpsecSpdEntryAddDel struct { 2308 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 2309 Entry ipsec_types.IpsecSpdEntry `binapi:"ipsec_spd_entry,name=entry" json:"entry,omitempty"` 2310 } 2311 2312 func (m *IpsecSpdEntryAddDel) Reset() { *m = IpsecSpdEntryAddDel{} } 2313 func (*IpsecSpdEntryAddDel) GetMessageName() string { return "ipsec_spd_entry_add_del" } 2314 func (*IpsecSpdEntryAddDel) GetCrcString() string { return "338b7411" } 2315 func (*IpsecSpdEntryAddDel) GetMessageType() api.MessageType { 2316 return api.RequestMessage 2317 } 2318 2319 func (m *IpsecSpdEntryAddDel) Size() (size int) { 2320 if m == nil { 2321 return 0 2322 } 2323 size += 1 // m.IsAdd 2324 size += 4 // m.Entry.SpdID 2325 size += 4 // m.Entry.Priority 2326 size += 1 // m.Entry.IsOutbound 2327 size += 4 // m.Entry.SaID 2328 size += 4 // m.Entry.Policy 2329 size += 1 // m.Entry.Protocol 2330 size += 1 // m.Entry.RemoteAddressStart.Af 2331 size += 1 * 16 // m.Entry.RemoteAddressStart.Un 2332 size += 1 // m.Entry.RemoteAddressStop.Af 2333 size += 1 * 16 // m.Entry.RemoteAddressStop.Un 2334 size += 1 // m.Entry.LocalAddressStart.Af 2335 size += 1 * 16 // m.Entry.LocalAddressStart.Un 2336 size += 1 // m.Entry.LocalAddressStop.Af 2337 size += 1 * 16 // m.Entry.LocalAddressStop.Un 2338 size += 2 // m.Entry.RemotePortStart 2339 size += 2 // m.Entry.RemotePortStop 2340 size += 2 // m.Entry.LocalPortStart 2341 size += 2 // m.Entry.LocalPortStop 2342 return size 2343 } 2344 func (m *IpsecSpdEntryAddDel) Marshal(b []byte) ([]byte, error) { 2345 if b == nil { 2346 b = make([]byte, m.Size()) 2347 } 2348 buf := codec.NewBuffer(b) 2349 buf.EncodeBool(m.IsAdd) 2350 buf.EncodeUint32(m.Entry.SpdID) 2351 buf.EncodeInt32(m.Entry.Priority) 2352 buf.EncodeBool(m.Entry.IsOutbound) 2353 buf.EncodeUint32(m.Entry.SaID) 2354 buf.EncodeUint32(uint32(m.Entry.Policy)) 2355 buf.EncodeUint8(m.Entry.Protocol) 2356 buf.EncodeUint8(uint8(m.Entry.RemoteAddressStart.Af)) 2357 buf.EncodeBytes(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], 16) 2358 buf.EncodeUint8(uint8(m.Entry.RemoteAddressStop.Af)) 2359 buf.EncodeBytes(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], 16) 2360 buf.EncodeUint8(uint8(m.Entry.LocalAddressStart.Af)) 2361 buf.EncodeBytes(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], 16) 2362 buf.EncodeUint8(uint8(m.Entry.LocalAddressStop.Af)) 2363 buf.EncodeBytes(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], 16) 2364 buf.EncodeUint16(m.Entry.RemotePortStart) 2365 buf.EncodeUint16(m.Entry.RemotePortStop) 2366 buf.EncodeUint16(m.Entry.LocalPortStart) 2367 buf.EncodeUint16(m.Entry.LocalPortStop) 2368 return buf.Bytes(), nil 2369 } 2370 func (m *IpsecSpdEntryAddDel) Unmarshal(b []byte) error { 2371 buf := codec.NewBuffer(b) 2372 m.IsAdd = buf.DecodeBool() 2373 m.Entry.SpdID = buf.DecodeUint32() 2374 m.Entry.Priority = buf.DecodeInt32() 2375 m.Entry.IsOutbound = buf.DecodeBool() 2376 m.Entry.SaID = buf.DecodeUint32() 2377 m.Entry.Policy = ipsec_types.IpsecSpdAction(buf.DecodeUint32()) 2378 m.Entry.Protocol = buf.DecodeUint8() 2379 m.Entry.RemoteAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2380 copy(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2381 m.Entry.RemoteAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2382 copy(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2383 m.Entry.LocalAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2384 copy(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2385 m.Entry.LocalAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2386 copy(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2387 m.Entry.RemotePortStart = buf.DecodeUint16() 2388 m.Entry.RemotePortStop = buf.DecodeUint16() 2389 m.Entry.LocalPortStart = buf.DecodeUint16() 2390 m.Entry.LocalPortStop = buf.DecodeUint16() 2391 return nil 2392 } 2393 2394 // IPsec: Reply Add/delete Security Policy Database entry 2395 // - retval - success/fail rutrun code 2396 // - stat_index - An index for the policy in the stats segment @ /net/ipec/policy 2397 // 2398 // IpsecSpdEntryAddDelReply defines message 'ipsec_spd_entry_add_del_reply'. 2399 // Deprecated: the message will be removed in the future versions 2400 type IpsecSpdEntryAddDelReply struct { 2401 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2402 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"` 2403 } 2404 2405 func (m *IpsecSpdEntryAddDelReply) Reset() { *m = IpsecSpdEntryAddDelReply{} } 2406 func (*IpsecSpdEntryAddDelReply) GetMessageName() string { return "ipsec_spd_entry_add_del_reply" } 2407 func (*IpsecSpdEntryAddDelReply) GetCrcString() string { return "9ffac24b" } 2408 func (*IpsecSpdEntryAddDelReply) GetMessageType() api.MessageType { 2409 return api.ReplyMessage 2410 } 2411 2412 func (m *IpsecSpdEntryAddDelReply) Size() (size int) { 2413 if m == nil { 2414 return 0 2415 } 2416 size += 4 // m.Retval 2417 size += 4 // m.StatIndex 2418 return size 2419 } 2420 func (m *IpsecSpdEntryAddDelReply) Marshal(b []byte) ([]byte, error) { 2421 if b == nil { 2422 b = make([]byte, m.Size()) 2423 } 2424 buf := codec.NewBuffer(b) 2425 buf.EncodeInt32(m.Retval) 2426 buf.EncodeUint32(m.StatIndex) 2427 return buf.Bytes(), nil 2428 } 2429 func (m *IpsecSpdEntryAddDelReply) Unmarshal(b []byte) error { 2430 buf := codec.NewBuffer(b) 2431 m.Retval = buf.DecodeInt32() 2432 m.StatIndex = buf.DecodeUint32() 2433 return nil 2434 } 2435 2436 // IPsec: Add/delete Security Policy Database entry v2 2437 // - is_add - add SPD if non-zero, else delete 2438 // - entry - Description of the entry to add/dell 2439 // 2440 // IpsecSpdEntryAddDelV2 defines message 'ipsec_spd_entry_add_del_v2'. 2441 type IpsecSpdEntryAddDelV2 struct { 2442 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 2443 Entry ipsec_types.IpsecSpdEntryV2 `binapi:"ipsec_spd_entry_v2,name=entry" json:"entry,omitempty"` 2444 } 2445 2446 func (m *IpsecSpdEntryAddDelV2) Reset() { *m = IpsecSpdEntryAddDelV2{} } 2447 func (*IpsecSpdEntryAddDelV2) GetMessageName() string { return "ipsec_spd_entry_add_del_v2" } 2448 func (*IpsecSpdEntryAddDelV2) GetCrcString() string { return "7bfe69fc" } 2449 func (*IpsecSpdEntryAddDelV2) GetMessageType() api.MessageType { 2450 return api.RequestMessage 2451 } 2452 2453 func (m *IpsecSpdEntryAddDelV2) Size() (size int) { 2454 if m == nil { 2455 return 0 2456 } 2457 size += 1 // m.IsAdd 2458 size += 4 // m.Entry.SpdID 2459 size += 4 // m.Entry.Priority 2460 size += 1 // m.Entry.IsOutbound 2461 size += 4 // m.Entry.SaID 2462 size += 4 // m.Entry.Policy 2463 size += 1 // m.Entry.Protocol 2464 size += 1 // m.Entry.RemoteAddressStart.Af 2465 size += 1 * 16 // m.Entry.RemoteAddressStart.Un 2466 size += 1 // m.Entry.RemoteAddressStop.Af 2467 size += 1 * 16 // m.Entry.RemoteAddressStop.Un 2468 size += 1 // m.Entry.LocalAddressStart.Af 2469 size += 1 * 16 // m.Entry.LocalAddressStart.Un 2470 size += 1 // m.Entry.LocalAddressStop.Af 2471 size += 1 * 16 // m.Entry.LocalAddressStop.Un 2472 size += 2 // m.Entry.RemotePortStart 2473 size += 2 // m.Entry.RemotePortStop 2474 size += 2 // m.Entry.LocalPortStart 2475 size += 2 // m.Entry.LocalPortStop 2476 return size 2477 } 2478 func (m *IpsecSpdEntryAddDelV2) Marshal(b []byte) ([]byte, error) { 2479 if b == nil { 2480 b = make([]byte, m.Size()) 2481 } 2482 buf := codec.NewBuffer(b) 2483 buf.EncodeBool(m.IsAdd) 2484 buf.EncodeUint32(m.Entry.SpdID) 2485 buf.EncodeInt32(m.Entry.Priority) 2486 buf.EncodeBool(m.Entry.IsOutbound) 2487 buf.EncodeUint32(m.Entry.SaID) 2488 buf.EncodeUint32(uint32(m.Entry.Policy)) 2489 buf.EncodeUint8(m.Entry.Protocol) 2490 buf.EncodeUint8(uint8(m.Entry.RemoteAddressStart.Af)) 2491 buf.EncodeBytes(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], 16) 2492 buf.EncodeUint8(uint8(m.Entry.RemoteAddressStop.Af)) 2493 buf.EncodeBytes(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], 16) 2494 buf.EncodeUint8(uint8(m.Entry.LocalAddressStart.Af)) 2495 buf.EncodeBytes(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], 16) 2496 buf.EncodeUint8(uint8(m.Entry.LocalAddressStop.Af)) 2497 buf.EncodeBytes(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], 16) 2498 buf.EncodeUint16(m.Entry.RemotePortStart) 2499 buf.EncodeUint16(m.Entry.RemotePortStop) 2500 buf.EncodeUint16(m.Entry.LocalPortStart) 2501 buf.EncodeUint16(m.Entry.LocalPortStop) 2502 return buf.Bytes(), nil 2503 } 2504 func (m *IpsecSpdEntryAddDelV2) Unmarshal(b []byte) error { 2505 buf := codec.NewBuffer(b) 2506 m.IsAdd = buf.DecodeBool() 2507 m.Entry.SpdID = buf.DecodeUint32() 2508 m.Entry.Priority = buf.DecodeInt32() 2509 m.Entry.IsOutbound = buf.DecodeBool() 2510 m.Entry.SaID = buf.DecodeUint32() 2511 m.Entry.Policy = ipsec_types.IpsecSpdAction(buf.DecodeUint32()) 2512 m.Entry.Protocol = buf.DecodeUint8() 2513 m.Entry.RemoteAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2514 copy(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2515 m.Entry.RemoteAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2516 copy(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2517 m.Entry.LocalAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2518 copy(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2519 m.Entry.LocalAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2520 copy(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2521 m.Entry.RemotePortStart = buf.DecodeUint16() 2522 m.Entry.RemotePortStop = buf.DecodeUint16() 2523 m.Entry.LocalPortStart = buf.DecodeUint16() 2524 m.Entry.LocalPortStop = buf.DecodeUint16() 2525 return nil 2526 } 2527 2528 // IPsec: Reply Add/delete Security Policy Database entry v2 2529 // - retval - success/fail rutrun code 2530 // - stat_index - An index for the policy in the stats segment @ /net/ipec/policy 2531 // 2532 // IpsecSpdEntryAddDelV2Reply defines message 'ipsec_spd_entry_add_del_v2_reply'. 2533 type IpsecSpdEntryAddDelV2Reply struct { 2534 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2535 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"` 2536 } 2537 2538 func (m *IpsecSpdEntryAddDelV2Reply) Reset() { *m = IpsecSpdEntryAddDelV2Reply{} } 2539 func (*IpsecSpdEntryAddDelV2Reply) GetMessageName() string { return "ipsec_spd_entry_add_del_v2_reply" } 2540 func (*IpsecSpdEntryAddDelV2Reply) GetCrcString() string { return "9ffac24b" } 2541 func (*IpsecSpdEntryAddDelV2Reply) GetMessageType() api.MessageType { 2542 return api.ReplyMessage 2543 } 2544 2545 func (m *IpsecSpdEntryAddDelV2Reply) Size() (size int) { 2546 if m == nil { 2547 return 0 2548 } 2549 size += 4 // m.Retval 2550 size += 4 // m.StatIndex 2551 return size 2552 } 2553 func (m *IpsecSpdEntryAddDelV2Reply) Marshal(b []byte) ([]byte, error) { 2554 if b == nil { 2555 b = make([]byte, m.Size()) 2556 } 2557 buf := codec.NewBuffer(b) 2558 buf.EncodeInt32(m.Retval) 2559 buf.EncodeUint32(m.StatIndex) 2560 return buf.Bytes(), nil 2561 } 2562 func (m *IpsecSpdEntryAddDelV2Reply) Unmarshal(b []byte) error { 2563 buf := codec.NewBuffer(b) 2564 m.Retval = buf.DecodeInt32() 2565 m.StatIndex = buf.DecodeUint32() 2566 return nil 2567 } 2568 2569 // IPsec: SPD interface response 2570 // - spd_index - SPD index 2571 // - sw_if_index - index of the interface 2572 // 2573 // IpsecSpdInterfaceDetails defines message 'ipsec_spd_interface_details'. 2574 type IpsecSpdInterfaceDetails struct { 2575 SpdIndex uint32 `binapi:"u32,name=spd_index" json:"spd_index,omitempty"` 2576 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2577 } 2578 2579 func (m *IpsecSpdInterfaceDetails) Reset() { *m = IpsecSpdInterfaceDetails{} } 2580 func (*IpsecSpdInterfaceDetails) GetMessageName() string { return "ipsec_spd_interface_details" } 2581 func (*IpsecSpdInterfaceDetails) GetCrcString() string { return "7a0bcf3e" } 2582 func (*IpsecSpdInterfaceDetails) GetMessageType() api.MessageType { 2583 return api.ReplyMessage 2584 } 2585 2586 func (m *IpsecSpdInterfaceDetails) Size() (size int) { 2587 if m == nil { 2588 return 0 2589 } 2590 size += 4 // m.SpdIndex 2591 size += 4 // m.SwIfIndex 2592 return size 2593 } 2594 func (m *IpsecSpdInterfaceDetails) Marshal(b []byte) ([]byte, error) { 2595 if b == nil { 2596 b = make([]byte, m.Size()) 2597 } 2598 buf := codec.NewBuffer(b) 2599 buf.EncodeUint32(m.SpdIndex) 2600 buf.EncodeUint32(uint32(m.SwIfIndex)) 2601 return buf.Bytes(), nil 2602 } 2603 func (m *IpsecSpdInterfaceDetails) Unmarshal(b []byte) error { 2604 buf := codec.NewBuffer(b) 2605 m.SpdIndex = buf.DecodeUint32() 2606 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2607 return nil 2608 } 2609 2610 // IPsec: Get SPD interfaces 2611 // - spd_index - SPD index 2612 // - spd_index_valid - if 1 spd_index is used to filter 2613 // spd_index's, if 0 no filtering is done 2614 // 2615 // IpsecSpdInterfaceDump defines message 'ipsec_spd_interface_dump'. 2616 type IpsecSpdInterfaceDump struct { 2617 SpdIndex uint32 `binapi:"u32,name=spd_index" json:"spd_index,omitempty"` 2618 SpdIndexValid uint8 `binapi:"u8,name=spd_index_valid" json:"spd_index_valid,omitempty"` 2619 } 2620 2621 func (m *IpsecSpdInterfaceDump) Reset() { *m = IpsecSpdInterfaceDump{} } 2622 func (*IpsecSpdInterfaceDump) GetMessageName() string { return "ipsec_spd_interface_dump" } 2623 func (*IpsecSpdInterfaceDump) GetCrcString() string { return "8971de19" } 2624 func (*IpsecSpdInterfaceDump) GetMessageType() api.MessageType { 2625 return api.RequestMessage 2626 } 2627 2628 func (m *IpsecSpdInterfaceDump) Size() (size int) { 2629 if m == nil { 2630 return 0 2631 } 2632 size += 4 // m.SpdIndex 2633 size += 1 // m.SpdIndexValid 2634 return size 2635 } 2636 func (m *IpsecSpdInterfaceDump) Marshal(b []byte) ([]byte, error) { 2637 if b == nil { 2638 b = make([]byte, m.Size()) 2639 } 2640 buf := codec.NewBuffer(b) 2641 buf.EncodeUint32(m.SpdIndex) 2642 buf.EncodeUint8(m.SpdIndexValid) 2643 return buf.Bytes(), nil 2644 } 2645 func (m *IpsecSpdInterfaceDump) Unmarshal(b []byte) error { 2646 buf := codec.NewBuffer(b) 2647 m.SpdIndex = buf.DecodeUint32() 2648 m.SpdIndexValid = buf.DecodeUint8() 2649 return nil 2650 } 2651 2652 // Dump IPsec all SPD IDs response 2653 // - spd_id - SPD instance id (control plane allocated) 2654 // - npolicies - number of policies in SPD 2655 // 2656 // IpsecSpdsDetails defines message 'ipsec_spds_details'. 2657 type IpsecSpdsDetails struct { 2658 SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"` 2659 Npolicies uint32 `binapi:"u32,name=npolicies" json:"npolicies,omitempty"` 2660 } 2661 2662 func (m *IpsecSpdsDetails) Reset() { *m = IpsecSpdsDetails{} } 2663 func (*IpsecSpdsDetails) GetMessageName() string { return "ipsec_spds_details" } 2664 func (*IpsecSpdsDetails) GetCrcString() string { return "a04bb254" } 2665 func (*IpsecSpdsDetails) GetMessageType() api.MessageType { 2666 return api.ReplyMessage 2667 } 2668 2669 func (m *IpsecSpdsDetails) Size() (size int) { 2670 if m == nil { 2671 return 0 2672 } 2673 size += 4 // m.SpdID 2674 size += 4 // m.Npolicies 2675 return size 2676 } 2677 func (m *IpsecSpdsDetails) Marshal(b []byte) ([]byte, error) { 2678 if b == nil { 2679 b = make([]byte, m.Size()) 2680 } 2681 buf := codec.NewBuffer(b) 2682 buf.EncodeUint32(m.SpdID) 2683 buf.EncodeUint32(m.Npolicies) 2684 return buf.Bytes(), nil 2685 } 2686 func (m *IpsecSpdsDetails) Unmarshal(b []byte) error { 2687 buf := codec.NewBuffer(b) 2688 m.SpdID = buf.DecodeUint32() 2689 m.Npolicies = buf.DecodeUint32() 2690 return nil 2691 } 2692 2693 // Dump IPsec all SPD IDs 2694 // IpsecSpdsDump defines message 'ipsec_spds_dump'. 2695 type IpsecSpdsDump struct{} 2696 2697 func (m *IpsecSpdsDump) Reset() { *m = IpsecSpdsDump{} } 2698 func (*IpsecSpdsDump) GetMessageName() string { return "ipsec_spds_dump" } 2699 func (*IpsecSpdsDump) GetCrcString() string { return "51077d14" } 2700 func (*IpsecSpdsDump) GetMessageType() api.MessageType { 2701 return api.RequestMessage 2702 } 2703 2704 func (m *IpsecSpdsDump) Size() (size int) { 2705 if m == nil { 2706 return 0 2707 } 2708 return size 2709 } 2710 func (m *IpsecSpdsDump) Marshal(b []byte) ([]byte, error) { 2711 if b == nil { 2712 b = make([]byte, m.Size()) 2713 } 2714 buf := codec.NewBuffer(b) 2715 return buf.Bytes(), nil 2716 } 2717 func (m *IpsecSpdsDump) Unmarshal(b []byte) error { 2718 return nil 2719 } 2720 2721 // IpsecTunnelProtectDel defines message 'ipsec_tunnel_protect_del'. 2722 type IpsecTunnelProtectDel struct { 2723 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2724 Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"` 2725 } 2726 2727 func (m *IpsecTunnelProtectDel) Reset() { *m = IpsecTunnelProtectDel{} } 2728 func (*IpsecTunnelProtectDel) GetMessageName() string { return "ipsec_tunnel_protect_del" } 2729 func (*IpsecTunnelProtectDel) GetCrcString() string { return "cd239930" } 2730 func (*IpsecTunnelProtectDel) GetMessageType() api.MessageType { 2731 return api.RequestMessage 2732 } 2733 2734 func (m *IpsecTunnelProtectDel) Size() (size int) { 2735 if m == nil { 2736 return 0 2737 } 2738 size += 4 // m.SwIfIndex 2739 size += 1 // m.Nh.Af 2740 size += 1 * 16 // m.Nh.Un 2741 return size 2742 } 2743 func (m *IpsecTunnelProtectDel) Marshal(b []byte) ([]byte, error) { 2744 if b == nil { 2745 b = make([]byte, m.Size()) 2746 } 2747 buf := codec.NewBuffer(b) 2748 buf.EncodeUint32(uint32(m.SwIfIndex)) 2749 buf.EncodeUint8(uint8(m.Nh.Af)) 2750 buf.EncodeBytes(m.Nh.Un.XXX_UnionData[:], 16) 2751 return buf.Bytes(), nil 2752 } 2753 func (m *IpsecTunnelProtectDel) Unmarshal(b []byte) error { 2754 buf := codec.NewBuffer(b) 2755 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2756 m.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2757 copy(m.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2758 return nil 2759 } 2760 2761 // IpsecTunnelProtectDelReply defines message 'ipsec_tunnel_protect_del_reply'. 2762 type IpsecTunnelProtectDelReply struct { 2763 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2764 } 2765 2766 func (m *IpsecTunnelProtectDelReply) Reset() { *m = IpsecTunnelProtectDelReply{} } 2767 func (*IpsecTunnelProtectDelReply) GetMessageName() string { return "ipsec_tunnel_protect_del_reply" } 2768 func (*IpsecTunnelProtectDelReply) GetCrcString() string { return "e8d4e804" } 2769 func (*IpsecTunnelProtectDelReply) GetMessageType() api.MessageType { 2770 return api.ReplyMessage 2771 } 2772 2773 func (m *IpsecTunnelProtectDelReply) Size() (size int) { 2774 if m == nil { 2775 return 0 2776 } 2777 size += 4 // m.Retval 2778 return size 2779 } 2780 func (m *IpsecTunnelProtectDelReply) Marshal(b []byte) ([]byte, error) { 2781 if b == nil { 2782 b = make([]byte, m.Size()) 2783 } 2784 buf := codec.NewBuffer(b) 2785 buf.EncodeInt32(m.Retval) 2786 return buf.Bytes(), nil 2787 } 2788 func (m *IpsecTunnelProtectDelReply) Unmarshal(b []byte) error { 2789 buf := codec.NewBuffer(b) 2790 m.Retval = buf.DecodeInt32() 2791 return nil 2792 } 2793 2794 // IpsecTunnelProtectDetails defines message 'ipsec_tunnel_protect_details'. 2795 type IpsecTunnelProtectDetails struct { 2796 Tun IpsecTunnelProtect `binapi:"ipsec_tunnel_protect,name=tun" json:"tun,omitempty"` 2797 } 2798 2799 func (m *IpsecTunnelProtectDetails) Reset() { *m = IpsecTunnelProtectDetails{} } 2800 func (*IpsecTunnelProtectDetails) GetMessageName() string { return "ipsec_tunnel_protect_details" } 2801 func (*IpsecTunnelProtectDetails) GetCrcString() string { return "21663a50" } 2802 func (*IpsecTunnelProtectDetails) GetMessageType() api.MessageType { 2803 return api.ReplyMessage 2804 } 2805 2806 func (m *IpsecTunnelProtectDetails) Size() (size int) { 2807 if m == nil { 2808 return 0 2809 } 2810 size += 4 // m.Tun.SwIfIndex 2811 size += 1 // m.Tun.Nh.Af 2812 size += 1 * 16 // m.Tun.Nh.Un 2813 size += 4 // m.Tun.SaOut 2814 size += 1 // m.Tun.NSaIn 2815 size += 4 * len(m.Tun.SaIn) // m.Tun.SaIn 2816 return size 2817 } 2818 func (m *IpsecTunnelProtectDetails) Marshal(b []byte) ([]byte, error) { 2819 if b == nil { 2820 b = make([]byte, m.Size()) 2821 } 2822 buf := codec.NewBuffer(b) 2823 buf.EncodeUint32(uint32(m.Tun.SwIfIndex)) 2824 buf.EncodeUint8(uint8(m.Tun.Nh.Af)) 2825 buf.EncodeBytes(m.Tun.Nh.Un.XXX_UnionData[:], 16) 2826 buf.EncodeUint32(m.Tun.SaOut) 2827 buf.EncodeUint8(uint8(len(m.Tun.SaIn))) 2828 for i := 0; i < len(m.Tun.SaIn); i++ { 2829 var x uint32 2830 if i < len(m.Tun.SaIn) { 2831 x = uint32(m.Tun.SaIn[i]) 2832 } 2833 buf.EncodeUint32(x) 2834 } 2835 return buf.Bytes(), nil 2836 } 2837 func (m *IpsecTunnelProtectDetails) Unmarshal(b []byte) error { 2838 buf := codec.NewBuffer(b) 2839 m.Tun.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2840 m.Tun.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2841 copy(m.Tun.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2842 m.Tun.SaOut = buf.DecodeUint32() 2843 m.Tun.NSaIn = buf.DecodeUint8() 2844 m.Tun.SaIn = make([]uint32, m.Tun.NSaIn) 2845 for i := 0; i < len(m.Tun.SaIn); i++ { 2846 m.Tun.SaIn[i] = buf.DecodeUint32() 2847 } 2848 return nil 2849 } 2850 2851 // * @brief Dump all tunnel protections 2852 // IpsecTunnelProtectDump defines message 'ipsec_tunnel_protect_dump'. 2853 type IpsecTunnelProtectDump struct { 2854 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2855 } 2856 2857 func (m *IpsecTunnelProtectDump) Reset() { *m = IpsecTunnelProtectDump{} } 2858 func (*IpsecTunnelProtectDump) GetMessageName() string { return "ipsec_tunnel_protect_dump" } 2859 func (*IpsecTunnelProtectDump) GetCrcString() string { return "f9e6675e" } 2860 func (*IpsecTunnelProtectDump) GetMessageType() api.MessageType { 2861 return api.RequestMessage 2862 } 2863 2864 func (m *IpsecTunnelProtectDump) Size() (size int) { 2865 if m == nil { 2866 return 0 2867 } 2868 size += 4 // m.SwIfIndex 2869 return size 2870 } 2871 func (m *IpsecTunnelProtectDump) Marshal(b []byte) ([]byte, error) { 2872 if b == nil { 2873 b = make([]byte, m.Size()) 2874 } 2875 buf := codec.NewBuffer(b) 2876 buf.EncodeUint32(uint32(m.SwIfIndex)) 2877 return buf.Bytes(), nil 2878 } 2879 func (m *IpsecTunnelProtectDump) Unmarshal(b []byte) error { 2880 buf := codec.NewBuffer(b) 2881 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2882 return nil 2883 } 2884 2885 // Add or Update Protection for a tunnel with IPSEC 2886 // 2887 // Tunnel protection directly associates an SA with all packets 2888 // ingress and egress on the tunnel. This could also be achieved by 2889 // assigning an SPD to the tunnel, but that would incur an unnessccary 2890 // SPD entry lookup. 2891 // For tunnels the ESP acts on the post-encapsulated packet. So if this 2892 // packet: 2893 // +---------+------+ 2894 // | Payload | O-IP | 2895 // +---------+------+ 2896 // where O-IP is the overlay IP addrees that was routed into the tunnel, 2897 // the resulting encapsulated packet will be: 2898 // +---------+------+------+ 2899 // | Payload | O-IP | T-IP | 2900 // +---------+------+------+ 2901 // where T-IP is the tunnel's src.dst IP addresses. 2902 // If the SAs used for protection are in transport mode then the ESP is 2903 // inserted before T-IP, i.e.: 2904 // +---------+------+-----+------+ 2905 // | Payload | O-IP | ESP | T-IP | 2906 // +---------+------+-----+------+ 2907 // If the SAs used for protection are in tunnel mode then another 2908 // encapsulation occurs, i.e.: 2909 // +---------+------+------+-----+------+ 2910 // | Payload | O-IP | T-IP | ESP | C-IP | 2911 // +---------+------+------+-----+------+ 2912 // where C-IP are the crypto endpoint IP addresses defined as the tunnel 2913 // endpoints in the SA. 2914 // The mode for the inbound and outbound SA must be the same. 2915 // - sw_id_index - Tunnel interface to protect 2916 // - nh - The peer/next-hop on the tunnel to which the traffic 2917 // should be protected. For a P2P interface set this to the 2918 // all 0s address. 2919 // - sa_in - The ID [set] of inbound SAs 2920 // - sa_out - The ID of outbound SA 2921 // 2922 // IpsecTunnelProtectUpdate defines message 'ipsec_tunnel_protect_update'. 2923 type IpsecTunnelProtectUpdate struct { 2924 Tunnel IpsecTunnelProtect `binapi:"ipsec_tunnel_protect,name=tunnel" json:"tunnel,omitempty"` 2925 } 2926 2927 func (m *IpsecTunnelProtectUpdate) Reset() { *m = IpsecTunnelProtectUpdate{} } 2928 func (*IpsecTunnelProtectUpdate) GetMessageName() string { return "ipsec_tunnel_protect_update" } 2929 func (*IpsecTunnelProtectUpdate) GetCrcString() string { return "30d5f133" } 2930 func (*IpsecTunnelProtectUpdate) GetMessageType() api.MessageType { 2931 return api.RequestMessage 2932 } 2933 2934 func (m *IpsecTunnelProtectUpdate) Size() (size int) { 2935 if m == nil { 2936 return 0 2937 } 2938 size += 4 // m.Tunnel.SwIfIndex 2939 size += 1 // m.Tunnel.Nh.Af 2940 size += 1 * 16 // m.Tunnel.Nh.Un 2941 size += 4 // m.Tunnel.SaOut 2942 size += 1 // m.Tunnel.NSaIn 2943 size += 4 * len(m.Tunnel.SaIn) // m.Tunnel.SaIn 2944 return size 2945 } 2946 func (m *IpsecTunnelProtectUpdate) Marshal(b []byte) ([]byte, error) { 2947 if b == nil { 2948 b = make([]byte, m.Size()) 2949 } 2950 buf := codec.NewBuffer(b) 2951 buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex)) 2952 buf.EncodeUint8(uint8(m.Tunnel.Nh.Af)) 2953 buf.EncodeBytes(m.Tunnel.Nh.Un.XXX_UnionData[:], 16) 2954 buf.EncodeUint32(m.Tunnel.SaOut) 2955 buf.EncodeUint8(uint8(len(m.Tunnel.SaIn))) 2956 for i := 0; i < len(m.Tunnel.SaIn); i++ { 2957 var x uint32 2958 if i < len(m.Tunnel.SaIn) { 2959 x = uint32(m.Tunnel.SaIn[i]) 2960 } 2961 buf.EncodeUint32(x) 2962 } 2963 return buf.Bytes(), nil 2964 } 2965 func (m *IpsecTunnelProtectUpdate) Unmarshal(b []byte) error { 2966 buf := codec.NewBuffer(b) 2967 m.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2968 m.Tunnel.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2969 copy(m.Tunnel.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2970 m.Tunnel.SaOut = buf.DecodeUint32() 2971 m.Tunnel.NSaIn = buf.DecodeUint8() 2972 m.Tunnel.SaIn = make([]uint32, m.Tunnel.NSaIn) 2973 for i := 0; i < len(m.Tunnel.SaIn); i++ { 2974 m.Tunnel.SaIn[i] = buf.DecodeUint32() 2975 } 2976 return nil 2977 } 2978 2979 // IpsecTunnelProtectUpdateReply defines message 'ipsec_tunnel_protect_update_reply'. 2980 type IpsecTunnelProtectUpdateReply struct { 2981 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2982 } 2983 2984 func (m *IpsecTunnelProtectUpdateReply) Reset() { *m = IpsecTunnelProtectUpdateReply{} } 2985 func (*IpsecTunnelProtectUpdateReply) GetMessageName() string { 2986 return "ipsec_tunnel_protect_update_reply" 2987 } 2988 func (*IpsecTunnelProtectUpdateReply) GetCrcString() string { return "e8d4e804" } 2989 func (*IpsecTunnelProtectUpdateReply) GetMessageType() api.MessageType { 2990 return api.ReplyMessage 2991 } 2992 2993 func (m *IpsecTunnelProtectUpdateReply) Size() (size int) { 2994 if m == nil { 2995 return 0 2996 } 2997 size += 4 // m.Retval 2998 return size 2999 } 3000 func (m *IpsecTunnelProtectUpdateReply) Marshal(b []byte) ([]byte, error) { 3001 if b == nil { 3002 b = make([]byte, m.Size()) 3003 } 3004 buf := codec.NewBuffer(b) 3005 buf.EncodeInt32(m.Retval) 3006 return buf.Bytes(), nil 3007 } 3008 func (m *IpsecTunnelProtectUpdateReply) Unmarshal(b []byte) error { 3009 buf := codec.NewBuffer(b) 3010 m.Retval = buf.DecodeInt32() 3011 return nil 3012 } 3013 3014 func init() { file_ipsec_binapi_init() } 3015 func file_ipsec_binapi_init() { 3016 api.RegisterMessage((*IpsecBackendDetails)(nil), "ipsec_backend_details_ee601c29") 3017 api.RegisterMessage((*IpsecBackendDump)(nil), "ipsec_backend_dump_51077d14") 3018 api.RegisterMessage((*IpsecInterfaceAddDelSpd)(nil), "ipsec_interface_add_del_spd_80f80cbb") 3019 api.RegisterMessage((*IpsecInterfaceAddDelSpdReply)(nil), "ipsec_interface_add_del_spd_reply_e8d4e804") 3020 api.RegisterMessage((*IpsecItfCreate)(nil), "ipsec_itf_create_6f50b3bc") 3021 api.RegisterMessage((*IpsecItfCreateReply)(nil), "ipsec_itf_create_reply_5383d31f") 3022 api.RegisterMessage((*IpsecItfDelete)(nil), "ipsec_itf_delete_f9e6675e") 3023 api.RegisterMessage((*IpsecItfDeleteReply)(nil), "ipsec_itf_delete_reply_e8d4e804") 3024 api.RegisterMessage((*IpsecItfDetails)(nil), "ipsec_itf_details_548a73b8") 3025 api.RegisterMessage((*IpsecItfDump)(nil), "ipsec_itf_dump_f9e6675e") 3026 api.RegisterMessage((*IpsecSaDetails)(nil), "ipsec_sa_details_345d14a7") 3027 api.RegisterMessage((*IpsecSaDump)(nil), "ipsec_sa_dump_2076c2f4") 3028 api.RegisterMessage((*IpsecSaV2Details)(nil), "ipsec_sa_v2_details_e2130051") 3029 api.RegisterMessage((*IpsecSaV2Dump)(nil), "ipsec_sa_v2_dump_2076c2f4") 3030 api.RegisterMessage((*IpsecSaV3Details)(nil), "ipsec_sa_v3_details_2fc991ee") 3031 api.RegisterMessage((*IpsecSaV3Dump)(nil), "ipsec_sa_v3_dump_2076c2f4") 3032 api.RegisterMessage((*IpsecSaV4Details)(nil), "ipsec_sa_v4_details_87a322d7") 3033 api.RegisterMessage((*IpsecSaV4Dump)(nil), "ipsec_sa_v4_dump_2076c2f4") 3034 api.RegisterMessage((*IpsecSadBind)(nil), "ipsec_sad_bind_0649c0d9") 3035 api.RegisterMessage((*IpsecSadBindReply)(nil), "ipsec_sad_bind_reply_e8d4e804") 3036 api.RegisterMessage((*IpsecSadEntryAdd)(nil), "ipsec_sad_entry_add_50229353") 3037 api.RegisterMessage((*IpsecSadEntryAddDel)(nil), "ipsec_sad_entry_add_del_ab64b5c6") 3038 api.RegisterMessage((*IpsecSadEntryAddDelReply)(nil), "ipsec_sad_entry_add_del_reply_9ffac24b") 3039 api.RegisterMessage((*IpsecSadEntryAddDelV2)(nil), "ipsec_sad_entry_add_del_v2_aca78b27") 3040 api.RegisterMessage((*IpsecSadEntryAddDelV2Reply)(nil), "ipsec_sad_entry_add_del_v2_reply_9ffac24b") 3041 api.RegisterMessage((*IpsecSadEntryAddDelV3)(nil), "ipsec_sad_entry_add_del_v3_c77ebd92") 3042 api.RegisterMessage((*IpsecSadEntryAddDelV3Reply)(nil), "ipsec_sad_entry_add_del_v3_reply_9ffac24b") 3043 api.RegisterMessage((*IpsecSadEntryAddReply)(nil), "ipsec_sad_entry_add_reply_9ffac24b") 3044 api.RegisterMessage((*IpsecSadEntryDel)(nil), "ipsec_sad_entry_del_3a91bde5") 3045 api.RegisterMessage((*IpsecSadEntryDelReply)(nil), "ipsec_sad_entry_del_reply_e8d4e804") 3046 api.RegisterMessage((*IpsecSadEntryUpdate)(nil), "ipsec_sad_entry_update_1412af86") 3047 api.RegisterMessage((*IpsecSadEntryUpdateReply)(nil), "ipsec_sad_entry_update_reply_e8d4e804") 3048 api.RegisterMessage((*IpsecSadUnbind)(nil), "ipsec_sad_unbind_2076c2f4") 3049 api.RegisterMessage((*IpsecSadUnbindReply)(nil), "ipsec_sad_unbind_reply_e8d4e804") 3050 api.RegisterMessage((*IpsecSelectBackend)(nil), "ipsec_select_backend_5bcfd3b7") 3051 api.RegisterMessage((*IpsecSelectBackendReply)(nil), "ipsec_select_backend_reply_e8d4e804") 3052 api.RegisterMessage((*IpsecSetAsyncMode)(nil), "ipsec_set_async_mode_a6465f7c") 3053 api.RegisterMessage((*IpsecSetAsyncModeReply)(nil), "ipsec_set_async_mode_reply_e8d4e804") 3054 api.RegisterMessage((*IpsecSpdAddDel)(nil), "ipsec_spd_add_del_20e89a95") 3055 api.RegisterMessage((*IpsecSpdAddDelReply)(nil), "ipsec_spd_add_del_reply_e8d4e804") 3056 api.RegisterMessage((*IpsecSpdDetails)(nil), "ipsec_spd_details_5813d7a2") 3057 api.RegisterMessage((*IpsecSpdDump)(nil), "ipsec_spd_dump_afefbf7d") 3058 api.RegisterMessage((*IpsecSpdEntryAddDel)(nil), "ipsec_spd_entry_add_del_338b7411") 3059 api.RegisterMessage((*IpsecSpdEntryAddDelReply)(nil), "ipsec_spd_entry_add_del_reply_9ffac24b") 3060 api.RegisterMessage((*IpsecSpdEntryAddDelV2)(nil), "ipsec_spd_entry_add_del_v2_7bfe69fc") 3061 api.RegisterMessage((*IpsecSpdEntryAddDelV2Reply)(nil), "ipsec_spd_entry_add_del_v2_reply_9ffac24b") 3062 api.RegisterMessage((*IpsecSpdInterfaceDetails)(nil), "ipsec_spd_interface_details_7a0bcf3e") 3063 api.RegisterMessage((*IpsecSpdInterfaceDump)(nil), "ipsec_spd_interface_dump_8971de19") 3064 api.RegisterMessage((*IpsecSpdsDetails)(nil), "ipsec_spds_details_a04bb254") 3065 api.RegisterMessage((*IpsecSpdsDump)(nil), "ipsec_spds_dump_51077d14") 3066 api.RegisterMessage((*IpsecTunnelProtectDel)(nil), "ipsec_tunnel_protect_del_cd239930") 3067 api.RegisterMessage((*IpsecTunnelProtectDelReply)(nil), "ipsec_tunnel_protect_del_reply_e8d4e804") 3068 api.RegisterMessage((*IpsecTunnelProtectDetails)(nil), "ipsec_tunnel_protect_details_21663a50") 3069 api.RegisterMessage((*IpsecTunnelProtectDump)(nil), "ipsec_tunnel_protect_dump_f9e6675e") 3070 api.RegisterMessage((*IpsecTunnelProtectUpdate)(nil), "ipsec_tunnel_protect_update_30d5f133") 3071 api.RegisterMessage((*IpsecTunnelProtectUpdateReply)(nil), "ipsec_tunnel_protect_update_reply_e8d4e804") 3072 } 3073 3074 // Messages returns list of all messages in this module. 3075 func AllMessages() []api.Message { 3076 return []api.Message{ 3077 (*IpsecBackendDetails)(nil), 3078 (*IpsecBackendDump)(nil), 3079 (*IpsecInterfaceAddDelSpd)(nil), 3080 (*IpsecInterfaceAddDelSpdReply)(nil), 3081 (*IpsecItfCreate)(nil), 3082 (*IpsecItfCreateReply)(nil), 3083 (*IpsecItfDelete)(nil), 3084 (*IpsecItfDeleteReply)(nil), 3085 (*IpsecItfDetails)(nil), 3086 (*IpsecItfDump)(nil), 3087 (*IpsecSaDetails)(nil), 3088 (*IpsecSaDump)(nil), 3089 (*IpsecSaV2Details)(nil), 3090 (*IpsecSaV2Dump)(nil), 3091 (*IpsecSaV3Details)(nil), 3092 (*IpsecSaV3Dump)(nil), 3093 (*IpsecSaV4Details)(nil), 3094 (*IpsecSaV4Dump)(nil), 3095 (*IpsecSadBind)(nil), 3096 (*IpsecSadBindReply)(nil), 3097 (*IpsecSadEntryAdd)(nil), 3098 (*IpsecSadEntryAddDel)(nil), 3099 (*IpsecSadEntryAddDelReply)(nil), 3100 (*IpsecSadEntryAddDelV2)(nil), 3101 (*IpsecSadEntryAddDelV2Reply)(nil), 3102 (*IpsecSadEntryAddDelV3)(nil), 3103 (*IpsecSadEntryAddDelV3Reply)(nil), 3104 (*IpsecSadEntryAddReply)(nil), 3105 (*IpsecSadEntryDel)(nil), 3106 (*IpsecSadEntryDelReply)(nil), 3107 (*IpsecSadEntryUpdate)(nil), 3108 (*IpsecSadEntryUpdateReply)(nil), 3109 (*IpsecSadUnbind)(nil), 3110 (*IpsecSadUnbindReply)(nil), 3111 (*IpsecSelectBackend)(nil), 3112 (*IpsecSelectBackendReply)(nil), 3113 (*IpsecSetAsyncMode)(nil), 3114 (*IpsecSetAsyncModeReply)(nil), 3115 (*IpsecSpdAddDel)(nil), 3116 (*IpsecSpdAddDelReply)(nil), 3117 (*IpsecSpdDetails)(nil), 3118 (*IpsecSpdDump)(nil), 3119 (*IpsecSpdEntryAddDel)(nil), 3120 (*IpsecSpdEntryAddDelReply)(nil), 3121 (*IpsecSpdEntryAddDelV2)(nil), 3122 (*IpsecSpdEntryAddDelV2Reply)(nil), 3123 (*IpsecSpdInterfaceDetails)(nil), 3124 (*IpsecSpdInterfaceDump)(nil), 3125 (*IpsecSpdsDetails)(nil), 3126 (*IpsecSpdsDump)(nil), 3127 (*IpsecTunnelProtectDel)(nil), 3128 (*IpsecTunnelProtectDelReply)(nil), 3129 (*IpsecTunnelProtectDetails)(nil), 3130 (*IpsecTunnelProtectDump)(nil), 3131 (*IpsecTunnelProtectUpdate)(nil), 3132 (*IpsecTunnelProtectUpdateReply)(nil), 3133 } 3134 }