diff --git a/cmd/agentctl/impl/interfaces.go b/cmd/agentctl/impl/interfaces.go index f940a8986d..fe4ba30df6 100644 --- a/cmd/agentctl/impl/interfaces.go +++ b/cmd/agentctl/impl/interfaces.go @@ -65,7 +65,7 @@ func PutEthernet(endpoints []string, label string) { // PutLoopback creates a loopback type interface. func PutLoopback(endpoints []string, label string) { found, key, ifc, db := utils.GetInterfaceKeyAndValue(endpoints, label, ifCommonFields.Name) - processCommonIfFlags(found, interfaces.InterfaceType_TAP_INTERFACE, ifc) + processCommonIfFlags(found, interfaces.InterfaceType_SOFTWARE_LOOPBACK, ifc) utils.WriteInterfaceToDb(db, key, ifc) } diff --git a/docker/dev/logs.conf b/docker/dev/logs.conf index 2c19e10a4d..2852605185 100644 --- a/docker/dev/logs.conf +++ b/docker/dev/logs.conf @@ -1 +1 @@ -defaultLevel: debug \ No newline at end of file +default-level: debug \ No newline at end of file diff --git a/plugins/vpp/binapi/interfaces/interfaces.ba.go b/plugins/vpp/binapi/interfaces/interfaces.ba.go index e00fc55f31..73a4a52575 100644 --- a/plugins/vpp/binapi/interfaces/interfaces.ba.go +++ b/plugins/vpp/binapi/interfaces/interfaces.ba.go @@ -696,7 +696,7 @@ func (*WantInterfaceEventsReply) GetMessageType() api.MessageType { // "link_duplex" // ], // [ -// "u8", +// "u32", // "link_speed" // ], // [ @@ -792,7 +792,7 @@ func (*WantInterfaceEventsReply) GetMessageType() api.MessageType { // "i_sid" // ], // { -// "crc": "0x09b4b510" +// "crc": "0xe4ee7eb6" // } // type SwInterfaceDetails struct { @@ -804,7 +804,7 @@ type SwInterfaceDetails struct { AdminUpDown uint8 LinkUpDown uint8 LinkDuplex uint8 - LinkSpeed uint8 + LinkSpeed uint32 LinkMtu uint16 Mtu []uint32 `struc:"[4]uint32"` SubID uint32 @@ -833,7 +833,7 @@ func (*SwInterfaceDetails) GetMessageName() string { return "sw_interface_details" } func (*SwInterfaceDetails) GetCrcString() string { - return "09b4b510" + return "e4ee7eb6" } func (*SwInterfaceDetails) GetMessageType() api.MessageType { return api.ReplyMessage diff --git a/plugins/vpp/binapi/ip/ip.ba.go b/plugins/vpp/binapi/ip/ip.ba.go index e0eb787ff9..0aaca8084e 100644 --- a/plugins/vpp/binapi/ip/ip.ba.go +++ b/plugins/vpp/binapi/ip/ip.ba.go @@ -5,11 +5,11 @@ Package ip is a generated from VPP binary API module 'ip'. It contains following objects: - 89 messages - 10 types + 91 messages + 13 types 1 enum 1 union - 43 services + 44 services */ package ip @@ -186,6 +186,60 @@ func (*Mprefix) GetCrcString() string { return "1c4cba05" } +// IP6Prefix represents the VPP binary API type 'ip6_prefix'. +// +// "ip6_prefix", +// [ +// "vl_api_ip6_address_t", +// "prefix" +// ], +// [ +// "u8", +// "len" +// ], +// { +// "crc": "0x779fd64f" +// } +// +type IP6Prefix struct { + Prefix IP6Address + Len uint8 +} + +func (*IP6Prefix) GetTypeName() string { + return "ip6_prefix" +} +func (*IP6Prefix) GetCrcString() string { + return "779fd64f" +} + +// IP4Prefix represents the VPP binary API type 'ip4_prefix'. +// +// "ip4_prefix", +// [ +// "vl_api_ip4_address_t", +// "prefix" +// ], +// [ +// "u8", +// "len" +// ], +// { +// "crc": "0xea8dc11d" +// } +// +type IP4Prefix struct { + Prefix IP4Address + Len uint8 +} + +func (*IP4Prefix) GetTypeName() string { + return "ip4_prefix" +} +func (*IP4Prefix) GetCrcString() string { + return "ea8dc11d" +} + // FibMplsLabel represents the VPP binary API type 'fib_mpls_label'. // // "fib_mpls_label", @@ -365,6 +419,38 @@ func (*MacAddress) GetCrcString() string { return "efdbdddc" } +// PuntRedirect represents the VPP binary API type 'punt_redirect'. +// +// "punt_redirect", +// [ +// "u32", +// "rx_sw_if_index" +// ], +// [ +// "u32", +// "tx_sw_if_index" +// ], +// [ +// "vl_api_address_t", +// "nh" +// ], +// { +// "crc": "0x3e7a801f" +// } +// +type PuntRedirect struct { + RxSwIfIndex uint32 + TxSwIfIndex uint32 + Nh Address +} + +func (*PuntRedirect) GetTypeName() string { + return "punt_redirect" +} +func (*PuntRedirect) GetCrcString() string { + return "3e7a801f" +} + // IP6RaPrefixInfo represents the VPP binary API type 'ip6_ra_prefix_info'. // // "ip6_ra_prefix_info", @@ -1036,26 +1122,31 @@ func (*IPNeighborAddDelReply) GetMessageType() api.MessageType { // "u8", // "reverse" // ], +// [ +// "u8", +// "symmetric" +// ], // { -// "crc": "0x32ebf737" +// "crc": "0xa9084bfb" // } // type SetIPFlowHash struct { - VrfID uint32 - IsIPv6 uint8 - Src uint8 - Dst uint8 - Sport uint8 - Dport uint8 - Proto uint8 - Reverse uint8 + VrfID uint32 + IsIPv6 uint8 + Src uint8 + Dst uint8 + Sport uint8 + Dport uint8 + Proto uint8 + Reverse uint8 + Symmetric uint8 } func (*SetIPFlowHash) GetMessageName() string { return "set_ip_flow_hash" } func (*SetIPFlowHash) GetCrcString() string { - return "32ebf737" + return "a9084bfb" } func (*SetIPFlowHash) GetMessageType() api.MessageType { return api.RequestMessage @@ -1671,82 +1762,6 @@ func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage } -// SwInterfaceIP6SetLinkLocalAddress represents the VPP binary API message 'sw_interface_ip6_set_link_local_address'. -// -// "sw_interface_ip6_set_link_local_address", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "address", -// 16 -// ], -// { -// "crc": "0xd73bf1ab" -// } -// -type SwInterfaceIP6SetLinkLocalAddress struct { - SwIfIndex uint32 - Address []byte `struc:"[16]byte"` -} - -func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string { - return "sw_interface_ip6_set_link_local_address" -} -func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { - return "d73bf1ab" -} -func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// SwInterfaceIP6SetLinkLocalAddressReply represents the VPP binary API message 'sw_interface_ip6_set_link_local_address_reply'. -// -// "sw_interface_ip6_set_link_local_address_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SwInterfaceIP6SetLinkLocalAddressReply struct { - Retval int32 -} - -func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string { - return "sw_interface_ip6_set_link_local_address_reply" -} -func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { - return "e8d4e804" -} -func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} - // IPAddDelRoute represents the VPP binary API message 'ip_add_del_route'. // // "ip_add_del_route", @@ -2734,43 +2749,27 @@ func (*IPPuntPoliceReply) GetMessageType() api.MessageType { // "context" // ], // [ -// "u32", -// "rx_sw_if_index" -// ], -// [ -// "u32", -// "tx_sw_if_index" +// "vl_api_punt_redirect_t", +// "punt" // ], // [ // "u8", // "is_add" // ], -// [ -// "u8", -// "is_ip6" -// ], -// [ -// "u8", -// "nh", -// 16 -// ], // { -// "crc": "0x996b6603" +// "crc": "0xa953495b" // } // type IPPuntRedirect struct { - RxSwIfIndex uint32 - TxSwIfIndex uint32 - IsAdd uint8 - IsIP6 uint8 - Nh []byte `struc:"[16]byte"` + Punt PuntRedirect + IsAdd uint8 } func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" } func (*IPPuntRedirect) GetCrcString() string { - return "996b6603" + return "a953495b" } func (*IPPuntRedirect) GetMessageType() api.MessageType { return api.RequestMessage @@ -2809,6 +2808,81 @@ func (*IPPuntRedirectReply) GetMessageType() api.MessageType { return api.ReplyMessage } +// IPPuntRedirectDump represents the VPP binary API message 'ip_punt_redirect_dump'. +// +// "ip_punt_redirect_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// { +// "crc": "0x6b7bcd0a" +// } +// +type IPPuntRedirectDump struct { + SwIfIndex uint32 + IsIPv6 uint8 +} + +func (*IPPuntRedirectDump) GetMessageName() string { + return "ip_punt_redirect_dump" +} +func (*IPPuntRedirectDump) GetCrcString() string { + return "6b7bcd0a" +} +func (*IPPuntRedirectDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +// IPPuntRedirectDetails represents the VPP binary API message 'ip_punt_redirect_details'. +// +// "ip_punt_redirect_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "vl_api_punt_redirect_t", +// "punt" +// ], +// { +// "crc": "0xa47f70da" +// } +// +type IPPuntRedirectDetails struct { + Punt PuntRedirect +} + +func (*IPPuntRedirectDetails) GetMessageName() string { + return "ip_punt_redirect_details" +} +func (*IPPuntRedirectDetails) GetCrcString() string { + return "a47f70da" +} +func (*IPPuntRedirectDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + // IPContainerProxyAddDel represents the VPP binary API message 'ip_container_proxy_add_del'. // // "ip_container_proxy_add_del", @@ -3172,6 +3246,86 @@ func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.Messa return api.ReplyMessage } +// IPSourceCheckInterfaceAddDel represents the VPP binary API message 'ip_source_check_interface_add_del'. +// +// "ip_source_check_interface_add_del", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "is_add" +// ], +// [ +// "u8", +// "loose" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0x0a60152a" +// } +// +type IPSourceCheckInterfaceAddDel struct { + IsAdd uint8 + Loose uint8 + SwIfIndex uint32 +} + +func (*IPSourceCheckInterfaceAddDel) GetMessageName() string { + return "ip_source_check_interface_add_del" +} +func (*IPSourceCheckInterfaceAddDel) GetCrcString() string { + return "0a60152a" +} +func (*IPSourceCheckInterfaceAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} + +// IPSourceCheckInterfaceAddDelReply represents the VPP binary API message 'ip_source_check_interface_add_del_reply'. +// +// "ip_source_check_interface_add_del_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IPSourceCheckInterfaceAddDelReply struct { + Retval int32 +} + +func (*IPSourceCheckInterfaceAddDelReply) GetMessageName() string { + return "ip_source_check_interface_add_del_reply" +} +func (*IPSourceCheckInterfaceAddDelReply) GetCrcString() string { + return "e8d4e804" +} +func (*IPSourceCheckInterfaceAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + // IPScanNeighborEnableDisable represents the VPP binary API message 'ip_scan_neighbor_enable_disable'. // // "ip_scan_neighbor_enable_disable", @@ -4634,6 +4788,7 @@ type Services interface { DumpIPFib(*IPFibDump) (*IPFibDetails, error) DumpIPMfib(*IPMfibDump) (*IPMfibDetails, error) DumpIPNeighbor(*IPNeighborDump) (*IPNeighborDetails, error) + DumpIPPuntRedirect(*IPPuntRedirectDump) (*IPPuntRedirectDetails, error) DumpIPUnnumbered(*IPUnnumberedDump) (*IPUnnumberedDetails, error) DumpMfibSignal(*MfibSignalDump) (*MfibSignalDetails, error) DumpProxyArp(*ProxyArpDump) (*ProxyArpDetails, error) @@ -4655,6 +4810,7 @@ type Services interface { IPScanNeighborEnableDisable(*IPScanNeighborEnableDisable) (*IPScanNeighborEnableDisableReply, error) IPSourceAndPortRangeCheckAddDel(*IPSourceAndPortRangeCheckAddDel) (*IPSourceAndPortRangeCheckAddDelReply, error) IPSourceAndPortRangeCheckInterfaceAddDel(*IPSourceAndPortRangeCheckInterfaceAddDel) (*IPSourceAndPortRangeCheckInterfaceAddDelReply, error) + IPSourceCheckInterfaceAddDel(*IPSourceCheckInterfaceAddDel) (*IPSourceCheckInterfaceAddDelReply, error) IPTableAddDel(*IPTableAddDel) (*IPTableAddDelReply, error) ProxyArpAddDel(*ProxyArpAddDel) (*ProxyArpAddDelReply, error) ProxyArpIntfcEnableDisable(*ProxyArpIntfcEnableDisable) (*ProxyArpIntfcEnableDisableReply, error) @@ -4662,7 +4818,6 @@ type Services interface { SetArpNeighborLimit(*SetArpNeighborLimit) (*SetArpNeighborLimitReply, error) SetIPFlowHash(*SetIPFlowHash) (*SetIPFlowHashReply, error) SwInterfaceIP6EnableDisable(*SwInterfaceIP6EnableDisable) (*SwInterfaceIP6EnableDisableReply, error) - SwInterfaceIP6SetLinkLocalAddress(*SwInterfaceIP6SetLinkLocalAddress) (*SwInterfaceIP6SetLinkLocalAddressReply, error) SwInterfaceIP6ndRaConfig(*SwInterfaceIP6ndRaConfig) (*SwInterfaceIP6ndRaConfigReply, error) SwInterfaceIP6ndRaPrefix(*SwInterfaceIP6ndRaPrefix) (*SwInterfaceIP6ndRaPrefixReply, error) WantIP4ArpEvents(*WantIP4ArpEvents) (*WantIP4ArpEventsReply, error) @@ -4695,8 +4850,6 @@ func init() { api.RegisterMessage((*IP6ndSendRouterSolicitationReply)(nil), "ip.IP6ndSendRouterSolicitationReply") api.RegisterMessage((*SwInterfaceIP6EnableDisable)(nil), "ip.SwInterfaceIP6EnableDisable") api.RegisterMessage((*SwInterfaceIP6EnableDisableReply)(nil), "ip.SwInterfaceIP6EnableDisableReply") - api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "ip.SwInterfaceIP6SetLinkLocalAddress") - api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "ip.SwInterfaceIP6SetLinkLocalAddressReply") api.RegisterMessage((*IPAddDelRoute)(nil), "ip.IPAddDelRoute") api.RegisterMessage((*IPAddDelRouteReply)(nil), "ip.IPAddDelRouteReply") api.RegisterMessage((*IPMrouteAddDel)(nil), "ip.IPMrouteAddDel") @@ -4717,6 +4870,8 @@ func init() { api.RegisterMessage((*IPPuntPoliceReply)(nil), "ip.IPPuntPoliceReply") api.RegisterMessage((*IPPuntRedirect)(nil), "ip.IPPuntRedirect") api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip.IPPuntRedirectReply") + api.RegisterMessage((*IPPuntRedirectDump)(nil), "ip.IPPuntRedirectDump") + api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip.IPPuntRedirectDetails") api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip.IPContainerProxyAddDel") api.RegisterMessage((*IPContainerProxyAddDelReply)(nil), "ip.IPContainerProxyAddDelReply") api.RegisterMessage((*IPContainerProxyDump)(nil), "ip.IPContainerProxyDump") @@ -4725,6 +4880,8 @@ func init() { api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip.IPSourceAndPortRangeCheckAddDelReply") api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip.IPSourceAndPortRangeCheckInterfaceAddDel") api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip.IPSourceAndPortRangeCheckInterfaceAddDelReply") + api.RegisterMessage((*IPSourceCheckInterfaceAddDel)(nil), "ip.IPSourceCheckInterfaceAddDel") + api.RegisterMessage((*IPSourceCheckInterfaceAddDelReply)(nil), "ip.IPSourceCheckInterfaceAddDelReply") api.RegisterMessage((*IPScanNeighborEnableDisable)(nil), "ip.IPScanNeighborEnableDisable") api.RegisterMessage((*IPScanNeighborEnableDisableReply)(nil), "ip.IPScanNeighborEnableDisableReply") api.RegisterMessage((*IPProbeNeighbor)(nil), "ip.IPProbeNeighbor") diff --git a/plugins/vpp/binapi/ipsec/ipsec.ba.go b/plugins/vpp/binapi/ipsec/ipsec.ba.go index ad9b683567..28480bd9fd 100644 --- a/plugins/vpp/binapi/ipsec/ipsec.ba.go +++ b/plugins/vpp/binapi/ipsec/ipsec.ba.go @@ -5,8 +5,8 @@ Package ipsec is a generated from VPP binary API module 'ipsec'. It contains following objects: - 48 messages - 24 services + 54 messages + 27 services */ package ipsec @@ -1875,6 +1875,86 @@ func (*IpsecSpdDetails) GetMessageType() api.MessageType { return api.ReplyMessage } +// IpsecSpdInterfaceDump represents the VPP binary API message 'ipsec_spd_interface_dump'. +// +// "ipsec_spd_interface_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "spd_index" +// ], +// [ +// "u8", +// "spd_index_valid" +// ], +// { +// "crc": "0x8971de19" +// } +// +type IpsecSpdInterfaceDump struct { + SpdIndex uint32 + SpdIndexValid uint8 +} + +func (*IpsecSpdInterfaceDump) GetMessageName() string { + return "ipsec_spd_interface_dump" +} +func (*IpsecSpdInterfaceDump) GetCrcString() string { + return "8971de19" +} +func (*IpsecSpdInterfaceDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +// IpsecSpdInterfaceDetails represents the VPP binary API message 'ipsec_spd_interface_details'. +// +// "ipsec_spd_interface_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "spd_index" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0x2c54296d" +// } +// +type IpsecSpdInterfaceDetails struct { + SpdIndex uint32 + SwIfIndex uint32 +} + +func (*IpsecSpdInterfaceDetails) GetMessageName() string { + return "ipsec_spd_interface_details" +} +func (*IpsecSpdInterfaceDetails) GetCrcString() string { + return "2c54296d" +} +func (*IpsecSpdInterfaceDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + // IpsecTunnelIfAddDel represents the VPP binary API message 'ipsec_tunnel_if_add_del'. // // "ipsec_tunnel_if_add_del", @@ -2396,11 +2476,168 @@ func (*IpsecTunnelIfSetSaReply) GetMessageType() api.MessageType { return api.ReplyMessage } +// IpsecBackendDump represents the VPP binary API message 'ipsec_backend_dump'. +// +// "ipsec_backend_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type IpsecBackendDump struct{} + +func (*IpsecBackendDump) GetMessageName() string { + return "ipsec_backend_dump" +} +func (*IpsecBackendDump) GetCrcString() string { + return "51077d14" +} +func (*IpsecBackendDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +// IpsecBackendDetails represents the VPP binary API message 'ipsec_backend_details'. +// +// "ipsec_backend_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "name", +// 128 +// ], +// [ +// "u8", +// "protocol" +// ], +// [ +// "u8", +// "index" +// ], +// [ +// "u8", +// "active" +// ], +// { +// "crc": "0x3ba4d642" +// } +// +type IpsecBackendDetails struct { + Name []byte `struc:"[128]byte"` + Protocol uint8 + Index uint8 + Active uint8 +} + +func (*IpsecBackendDetails) GetMessageName() string { + return "ipsec_backend_details" +} +func (*IpsecBackendDetails) GetCrcString() string { + return "3ba4d642" +} +func (*IpsecBackendDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +// IpsecSelectBackend represents the VPP binary API message 'ipsec_select_backend'. +// +// "ipsec_select_backend", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "protocol" +// ], +// [ +// "u8", +// "index" +// ], +// { +// "crc": "0xf2cc2b47" +// } +// +type IpsecSelectBackend struct { + Protocol uint8 + Index uint8 +} + +func (*IpsecSelectBackend) GetMessageName() string { + return "ipsec_select_backend" +} +func (*IpsecSelectBackend) GetCrcString() string { + return "f2cc2b47" +} +func (*IpsecSelectBackend) GetMessageType() api.MessageType { + return api.RequestMessage +} + +// IpsecSelectBackendReply represents the VPP binary API message 'ipsec_select_backend_reply'. +// +// "ipsec_select_backend_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IpsecSelectBackendReply struct { + Retval int32 +} + +func (*IpsecSelectBackendReply) GetMessageName() string { + return "ipsec_select_backend_reply" +} +func (*IpsecSelectBackendReply) GetCrcString() string { + return "e8d4e804" +} +func (*IpsecSelectBackendReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + /* Services */ type Services interface { + DumpIpsecBackend(*IpsecBackendDump) (*IpsecBackendDetails, error) DumpIpsecSa(*IpsecSaDump) (*IpsecSaDetails, error) DumpIpsecSpd(*IpsecSpdDump) (*IpsecSpdDetails, error) + DumpIpsecSpdInterface(*IpsecSpdInterfaceDump) (*IpsecSpdInterfaceDetails, error) DumpIpsecSpds(*IpsecSpdsDump) (*IpsecSpdsDetails, error) Ikev2InitiateDelChildSa(*Ikev2InitiateDelChildSa) (*Ikev2InitiateDelChildSaReply, error) Ikev2InitiateDelIkeSa(*Ikev2InitiateDelIkeSa) (*Ikev2InitiateDelIkeSaReply, error) @@ -2418,6 +2655,7 @@ type Services interface { IpsecInterfaceAddDelSpd(*IpsecInterfaceAddDelSpd) (*IpsecInterfaceAddDelSpdReply, error) IpsecSaSetKey(*IpsecSaSetKey) (*IpsecSaSetKeyReply, error) IpsecSadAddDelEntry(*IpsecSadAddDelEntry) (*IpsecSadAddDelEntryReply, error) + IpsecSelectBackend(*IpsecSelectBackend) (*IpsecSelectBackendReply, error) IpsecSpdAddDel(*IpsecSpdAddDel) (*IpsecSpdAddDelReply, error) IpsecSpdAddDelEntry(*IpsecSpdAddDelEntry) (*IpsecSpdAddDelEntryReply, error) IpsecTunnelIfAddDel(*IpsecTunnelIfAddDel) (*IpsecTunnelIfAddDelReply, error) @@ -2466,6 +2704,8 @@ func init() { api.RegisterMessage((*IpsecSpdsDetails)(nil), "ipsec.IpsecSpdsDetails") api.RegisterMessage((*IpsecSpdDump)(nil), "ipsec.IpsecSpdDump") api.RegisterMessage((*IpsecSpdDetails)(nil), "ipsec.IpsecSpdDetails") + api.RegisterMessage((*IpsecSpdInterfaceDump)(nil), "ipsec.IpsecSpdInterfaceDump") + api.RegisterMessage((*IpsecSpdInterfaceDetails)(nil), "ipsec.IpsecSpdInterfaceDetails") api.RegisterMessage((*IpsecTunnelIfAddDel)(nil), "ipsec.IpsecTunnelIfAddDel") api.RegisterMessage((*IpsecTunnelIfAddDelReply)(nil), "ipsec.IpsecTunnelIfAddDelReply") api.RegisterMessage((*IpsecSaDump)(nil), "ipsec.IpsecSaDump") @@ -2474,4 +2714,8 @@ func init() { api.RegisterMessage((*IpsecTunnelIfSetKeyReply)(nil), "ipsec.IpsecTunnelIfSetKeyReply") api.RegisterMessage((*IpsecTunnelIfSetSa)(nil), "ipsec.IpsecTunnelIfSetSa") api.RegisterMessage((*IpsecTunnelIfSetSaReply)(nil), "ipsec.IpsecTunnelIfSetSaReply") + api.RegisterMessage((*IpsecBackendDump)(nil), "ipsec.IpsecBackendDump") + api.RegisterMessage((*IpsecBackendDetails)(nil), "ipsec.IpsecBackendDetails") + api.RegisterMessage((*IpsecSelectBackend)(nil), "ipsec.IpsecSelectBackend") + api.RegisterMessage((*IpsecSelectBackendReply)(nil), "ipsec.IpsecSelectBackendReply") } diff --git a/plugins/vpp/binapi/l2/l2.ba.go b/plugins/vpp/binapi/l2/l2.ba.go index 7d1aef8575..08f7757838 100644 --- a/plugins/vpp/binapi/l2/l2.ba.go +++ b/plugins/vpp/binapi/l2/l2.ba.go @@ -6,8 +6,9 @@ It contains following objects: 45 messages - 2 types - 2 enums + 10 types + 3 enums + 1 union 22 services */ @@ -24,6 +25,28 @@ var _ = bytes.NewBuffer /* Enums */ +// AddressFamily represents the VPP binary API enum 'address_family'. +// +// "address_family", +// [ +// "ADDRESS_IP4", +// 0 +// ], +// [ +// "ADDRESS_IP6", +// 1 +// ], +// { +// "enumtype": "u32" +// } +// +type AddressFamily uint32 + +const ( + ADDRESS_IP4 AddressFamily = 0 + ADDRESS_IP6 AddressFamily = 1 +) + // BdFlags represents the VPP binary API enum 'bd_flags'. // // "bd_flags", @@ -90,6 +113,220 @@ const ( /* Types */ +// IP4Address represents the VPP binary API type 'ip4_address'. +// +// "ip4_address", +// [ +// "u8", +// "address", +// 4 +// ], +// { +// "crc": "0xfc4baa28" +// } +// +type IP4Address struct { + Address []byte `struc:"[4]byte"` +} + +func (*IP4Address) GetTypeName() string { + return "ip4_address" +} +func (*IP4Address) GetCrcString() string { + return "fc4baa28" +} + +// IP6Address represents the VPP binary API type 'ip6_address'. +// +// "ip6_address", +// [ +// "u8", +// "address", +// 16 +// ], +// { +// "crc": "0xad99ccc2" +// } +// +type IP6Address struct { + Address []byte `struc:"[16]byte"` +} + +func (*IP6Address) GetTypeName() string { + return "ip6_address" +} +func (*IP6Address) GetCrcString() string { + return "ad99ccc2" +} + +// Address represents the VPP binary API type 'address'. +// +// "address", +// [ +// "vl_api_address_family_t", +// "af" +// ], +// [ +// "vl_api_address_union_t", +// "un" +// ], +// { +// "crc": "0x09f11671" +// } +// +type Address struct { + Af AddressFamily + Un AddressUnion +} + +func (*Address) GetTypeName() string { + return "address" +} +func (*Address) GetCrcString() string { + return "09f11671" +} + +// Prefix represents the VPP binary API type 'prefix'. +// +// "prefix", +// [ +// "vl_api_address_t", +// "address" +// ], +// [ +// "u8", +// "address_length" +// ], +// { +// "crc": "0x0403aebc" +// } +// +type Prefix struct { + Address Address + AddressLength uint8 +} + +func (*Prefix) GetTypeName() string { + return "prefix" +} +func (*Prefix) GetCrcString() string { + return "0403aebc" +} + +// Mprefix represents the VPP binary API type 'mprefix'. +// +// "mprefix", +// [ +// "vl_api_address_family_t", +// "af" +// ], +// [ +// "u16", +// "grp_address_length" +// ], +// [ +// "vl_api_address_union_t", +// "grp_address" +// ], +// [ +// "vl_api_address_union_t", +// "src_address" +// ], +// { +// "crc": "0x1c4cba05" +// } +// +type Mprefix struct { + Af AddressFamily + GrpAddressLength uint16 + GrpAddress AddressUnion + SrcAddress AddressUnion +} + +func (*Mprefix) GetTypeName() string { + return "mprefix" +} +func (*Mprefix) GetCrcString() string { + return "1c4cba05" +} + +// IP6Prefix represents the VPP binary API type 'ip6_prefix'. +// +// "ip6_prefix", +// [ +// "vl_api_ip6_address_t", +// "prefix" +// ], +// [ +// "u8", +// "len" +// ], +// { +// "crc": "0x779fd64f" +// } +// +type IP6Prefix struct { + Prefix IP6Address + Len uint8 +} + +func (*IP6Prefix) GetTypeName() string { + return "ip6_prefix" +} +func (*IP6Prefix) GetCrcString() string { + return "779fd64f" +} + +// IP4Prefix represents the VPP binary API type 'ip4_prefix'. +// +// "ip4_prefix", +// [ +// "vl_api_ip4_address_t", +// "prefix" +// ], +// [ +// "u8", +// "len" +// ], +// { +// "crc": "0xea8dc11d" +// } +// +type IP4Prefix struct { + Prefix IP4Address + Len uint8 +} + +func (*IP4Prefix) GetTypeName() string { + return "ip4_prefix" +} +func (*IP4Prefix) GetCrcString() string { + return "ea8dc11d" +} + +// MacAddress represents the VPP binary API type 'mac_address'. +// +// "mac_address", +// [ +// "u8", +// "bytes", +// 6 +// ], +// { +// "crc": "0xefdbdddc" +// } +// +type MacAddress struct { + Bytes []byte `struc:"[6]byte"` +} + +func (*MacAddress) GetTypeName() string { + return "mac_address" +} +func (*MacAddress) GetCrcString() string { + return "efdbdddc" +} + // MacEntry represents the VPP binary API type 'mac_entry'. // // "mac_entry", @@ -160,6 +397,60 @@ func (*BridgeDomainSwIf) GetCrcString() string { return "a06dd426" } +/* Unions */ + +// AddressUnion represents the VPP binary API union 'address_union'. +// +// "address_union", +// [ +// "vl_api_ip4_address_t", +// "ip4" +// ], +// [ +// "vl_api_ip6_address_t", +// "ip6" +// ], +// { +// "crc": "0xd68a2fb4" +// } +// +type AddressUnion struct { + Union_data [16]byte +} + +func (*AddressUnion) GetTypeName() string { + return "address_union" +} +func (*AddressUnion) GetCrcString() string { + return "d68a2fb4" +} + +func (u *AddressUnion) SetIP4(a IP4Address) { + var b = new(bytes.Buffer) + if err := struc.Pack(b, &a); err != nil { + return + } + copy(u.Union_data[:], b.Bytes()) +} +func (u *AddressUnion) GetIP4() (a IP4Address) { + var b = bytes.NewReader(u.Union_data[:]) + struc.Unpack(b, &a) + return +} + +func (u *AddressUnion) SetIP6(a IP6Address) { + var b = new(bytes.Buffer) + if err := struc.Pack(b, &a); err != nil { + return + } + copy(u.Union_data[:], b.Bytes()) +} +func (u *AddressUnion) GetIP6() (a IP6Address) { + var b = bytes.NewReader(u.Union_data[:]) + struc.Unpack(b, &a) + return +} + /* Messages */ // L2XconnectDetails represents the VPP binary API message 'l2_xconnect_details'. @@ -1781,36 +2072,29 @@ func (*SwInterfaceSetL2BridgeReply) GetMessageType() api.MessageType { // "is_add" // ], // [ -// "u8", -// "is_ipv6" -// ], -// [ -// "u8", -// "ip_address", -// 16 +// "vl_api_address_t", +// "ip" // ], // [ -// "u8", -// "mac_address", -// 6 +// "vl_api_mac_address_t", +// "mac" // ], // { -// "crc": "0x79f42817" +// "crc": "0xfb873902" // } // type BdIPMacAddDel struct { - BdID uint32 - IsAdd uint8 - IsIPv6 uint8 - IPAddress []byte `struc:"[16]byte"` - MacAddress []byte `struc:"[6]byte"` + BdID uint32 + IsAdd uint8 + IP Address + Mac MacAddress } func (*BdIPMacAddDel) GetMessageName() string { return "bd_ip_mac_add_del" } func (*BdIPMacAddDel) GetCrcString() string { - return "79f42817" + return "fb873902" } func (*BdIPMacAddDel) GetMessageType() api.MessageType { return api.RequestMessage diff --git a/plugins/vpp/binapi/session/session.ba.go b/plugins/vpp/binapi/session/session.ba.go index d5f268c9e7..9292d8551c 100644 --- a/plugins/vpp/binapi/session/session.ba.go +++ b/plugins/vpp/binapi/session/session.ba.go @@ -116,8 +116,16 @@ func (*ApplicationAttach) GetMessageType() api.MessageType { // "segment_name", // 128 // ], +// [ +// "u32", +// "app_index" +// ], +// [ +// "u64", +// "segment_handle" +// ], // { -// "crc": "0x8d501943" +// "crc": "0x581866e8" // } // type ApplicationAttachReply struct { @@ -128,13 +136,15 @@ type ApplicationAttachReply struct { SegmentSize uint32 SegmentNameLength uint8 SegmentName []byte `struc:"[128]byte"` + AppIndex uint32 + SegmentHandle uint64 } func (*ApplicationAttachReply) GetMessageName() string { return "application_attach_reply" } func (*ApplicationAttachReply) GetCrcString() string { - return "8d501943" + return "581866e8" } func (*ApplicationAttachReply) GetMessageType() api.MessageType { return api.ReplyMessage @@ -396,21 +406,26 @@ func (*ApplicationDetachReply) GetMessageType() api.MessageType { // "segment_name", // 128 // ], +// [ +// "u64", +// "segment_handle" +// ], // { -// "crc": "0x2b743078" +// "crc": "0xdc2d630b" // } // type MapAnotherSegment struct { - FdFlags uint8 - SegmentSize uint32 - SegmentName []byte `struc:"[128]byte"` + FdFlags uint8 + SegmentSize uint32 + SegmentName []byte `struc:"[128]byte"` + SegmentHandle uint64 } func (*MapAnotherSegment) GetMessageName() string { return "map_another_segment" } func (*MapAnotherSegment) GetCrcString() string { - return "2b743078" + return "dc2d630b" } func (*MapAnotherSegment) GetMessageType() api.MessageType { return api.RequestMessage @@ -465,23 +480,22 @@ func (*MapAnotherSegmentReply) GetMessageType() api.MessageType { // "context" // ], // [ -// "u8", -// "segment_name", -// 128 +// "u64", +// "segment_handle" // ], // { -// "crc": "0x15ffd8c6" +// "crc": "0xf77096f6" // } // type UnmapSegment struct { - SegmentName []byte `struc:"[128]byte"` + SegmentHandle uint64 } func (*UnmapSegment) GetMessageName() string { return "unmap_segment" } func (*UnmapSegment) GetCrcString() string { - return "15ffd8c6" + return "f77096f6" } func (*UnmapSegment) GetMessageType() api.MessageType { return api.RequestMessage @@ -1627,7 +1641,7 @@ func (*AppCutThroughRegistrationAddReply) GetMessageType() api.MessageType { // ], // [ // "u32", -// "app_api_index" +// "app_index" // ], // [ // "u32", @@ -1638,20 +1652,20 @@ func (*AppCutThroughRegistrationAddReply) GetMessageType() api.MessageType { // "is_add" // ], // { -// "crc": "0x8cd304f4" +// "crc": "0x6d2b2279" // } // type AppWorkerAddDel struct { - AppAPIIndex uint32 - WrkIndex uint32 - IsAdd uint8 + AppIndex uint32 + WrkIndex uint32 + IsAdd uint8 } func (*AppWorkerAddDel) GetMessageName() string { return "app_worker_add_del" } func (*AppWorkerAddDel) GetCrcString() string { - return "8cd304f4" + return "6d2b2279" } func (*AppWorkerAddDel) GetMessageType() api.MessageType { return api.RequestMessage @@ -1698,11 +1712,15 @@ func (*AppWorkerAddDel) GetMessageType() api.MessageType { // 128 // ], // [ +// "u64", +// "segment_handle" +// ], +// [ // "u8", // "is_add" // ], // { -// "crc": "0xd5297212" +// "crc": "0x56b21abc" // } // type AppWorkerAddDelReply struct { @@ -1713,6 +1731,7 @@ type AppWorkerAddDelReply struct { FdFlags uint8 SegmentNameLength uint8 SegmentName []byte `struc:"[128]byte"` + SegmentHandle uint64 IsAdd uint8 } @@ -1720,7 +1739,7 @@ func (*AppWorkerAddDelReply) GetMessageName() string { return "app_worker_add_del_reply" } func (*AppWorkerAddDelReply) GetCrcString() string { - return "d5297212" + return "56b21abc" } func (*AppWorkerAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage diff --git a/plugins/vpp/l2plugin/vppcalls/arp_term_vppcalls.go b/plugins/vpp/l2plugin/vppcalls/arp_term_vppcalls.go index cf35a687a6..79a31de129 100644 --- a/plugins/vpp/l2plugin/vppcalls/arp_term_vppcalls.go +++ b/plugins/vpp/l2plugin/vppcalls/arp_term_vppcalls.go @@ -33,19 +33,26 @@ func (h *BridgeDomainVppHandler) callBdIPMacAddDel(isAdd bool, bdID uint32, mac if err != nil { return err } - req.MacAddress = macAddr + req.Mac = l2ba.MacAddress{Bytes: macAddr} isIpv6, err := addrs.IsIPv6(ip) if err != nil { return err } - ipAddr := net.ParseIP(ip) + parsedIP := net.ParseIP(ip) + var ipAddress [16]byte if isIpv6 { - req.IsIPv6 = 1 - req.IPAddress = []byte(ipAddr.To16()) + copy(ipAddress[:], []byte(parsedIP.To16())) + req.IP = l2ba.Address{ + Af: l2ba.ADDRESS_IP6, + Un: l2ba.AddressUnion{Union_data: ipAddress}, + } } else { - req.IsIPv6 = 0 - req.IPAddress = []byte(ipAddr.To4()) + copy(ipAddress[:], []byte(parsedIP.To4())) + req.IP = l2ba.Address{ + Af: l2ba.ADDRESS_IP4, + Un: l2ba.AddressUnion{Union_data: ipAddress}, + } } reply := &l2ba.BdIPMacAddDelReply{} diff --git a/plugins/vpp/l2plugin/vppcalls/arp_term_vppcalls_test.go b/plugins/vpp/l2plugin/vppcalls/arp_term_vppcalls_test.go index 5024e353c5..a9c2f5868f 100644 --- a/plugins/vpp/l2plugin/vppcalls/arp_term_vppcalls_test.go +++ b/plugins/vpp/l2plugin/vppcalls/arp_term_vppcalls_test.go @@ -32,11 +32,13 @@ func TestVppAddArpTerminationTableEntry(t *testing.T) { Expect(err).ShouldNot(HaveOccurred()) Expect(ctx.MockChannel.Msg).To(Equal(&l2ba.BdIPMacAddDel{ - BdID: 4, - IsAdd: 1, - IsIPv6: 0, - IPAddress: []byte{192, 168, 4, 4}, - MacAddress: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, + BdID: 4, + IsAdd: 1, + IP: l2ba.Address{ + Af: l2ba.ADDRESS_IP4, + Un: l2ba.AddressUnion{Union_data: [16]byte{192, 168, 4, 4}}, + }, + Mac: l2ba.MacAddress{Bytes: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}}, })) } @@ -50,11 +52,13 @@ func TestVppAddArpTerminationTableEntryIPv6(t *testing.T) { Expect(err).ShouldNot(HaveOccurred()) Expect(ctx.MockChannel.Msg).To(Equal(&l2ba.BdIPMacAddDel{ - BdID: 4, - IsAdd: 1, - IsIPv6: 1, - IPAddress: []byte{32, 1, 13, 185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84}, - MacAddress: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, + BdID: 4, + IsAdd: 1, + IP: l2ba.Address{ + Af: l2ba.ADDRESS_IP6, + Un: l2ba.AddressUnion{Union_data: [16]byte{32, 1, 13, 185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84}}, + }, + Mac: l2ba.MacAddress{Bytes: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}}, })) } @@ -68,11 +72,13 @@ func TestVppRemoveArpTerminationTableEntry(t *testing.T) { Expect(err).ShouldNot(HaveOccurred()) Expect(ctx.MockChannel.Msg).To(Equal(&l2ba.BdIPMacAddDel{ - BdID: 4, - IsAdd: 0, - IsIPv6: 0, - IPAddress: []byte{192, 168, 4, 4}, - MacAddress: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, + BdID: 4, + IsAdd: 0, + IP: l2ba.Address{ + Af: l2ba.ADDRESS_IP4, + Un: l2ba.AddressUnion{Union_data: [16]byte{192, 168, 4, 4}}, + }, + Mac: l2ba.MacAddress{Bytes: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}}, })) } diff --git a/vpp.env b/vpp.env index a823040d6c..f9f4389e38 100644 --- a/vpp.env +++ b/vpp.env @@ -1,2 +1,2 @@ VPP_REPO_URL=https://github.com/FDio/vpp.git -VPP_COMMIT=2322798bea16ff4092e2361423af6fd451fd1669 # v19.01-rc0-80-g2322798b +VPP_COMMIT=6b4a32ded6d3db56d886e79154e8329bdfc0ed2a # v19.01-rc0~394-g6b4a32de