Documentation
¶
Overview ¶
Package vppcalls contains wrappers over VPP binary APIs for L3 FIBs.
Index ¶
- Constants
- Variables
- func AddProxyArpRange(firstIP, lastIP []byte, vppChan govppapi.Channel, log logging.Logger, ...) error
- func DeleteProxyArpRange(firstIP, lastIP []byte, vppChan govppapi.Channel, log logging.Logger, ...) error
- func DisableProxyArpInterface(swIfIdx uint32, vppChan govppapi.Channel, log logging.Logger, ...) error
- func EnableProxyArpInterface(swIfIdx uint32, vppChan govppapi.Channel, log logging.Logger, ...) error
- func VppAddArp(entry *ArpEntry, vppChan govppapi.Channel, stopwatch *measure.Stopwatch) error
- func VppAddRoute(route *Route, vppChan govppapi.Channel, stopwatch *measure.Stopwatch) error
- func VppDelArp(entry *ArpEntry, vppChan govppapi.Channel, stopwatch *measure.Stopwatch) error
- func VppDelRoute(route *Route, vppChan govppapi.Channel, stopwatch *measure.Stopwatch) error
- type ArpEntry
- type Route
Constants ¶
const ( // NextHopViaLabelUnset constant has to be assigned into the field next hop // via label in ip_add_del_route binary message if next hop via label is not defined. // Equals to MPLS_LABEL_INVALID defined in VPP NextHopViaLabelUnset uint32 = 0xfffff + 1 // ClassifyTableIndexUnset is a default value for field classify_table_index in ip_add_del_route binary message. ClassifyTableIndexUnset = ^uint32(0) // NextHopOutgoingIfUnset constant has to be assigned into the field next_hop_outgoing_interface // in ip_add_del_route binary message if outgoing interface for next hop is not defined. NextHopOutgoingIfUnset = ^uint32(0) )
Variables ¶
var ArpMessages = []govppapi.Message{ &ip.IPNeighborAddDel{}, &ip.IPNeighborAddDelReply{}, }
ArpMessages is list of used VPP messages for compatibility check
var ProxyArpMessages = []govppapi.Message{ &ip.ProxyArpIntfcEnableDisable{}, &ip.ProxyArpIntfcEnableDisableReply{}, &ip.ProxyArpAddDel{}, &ip.ProxyArpAddDelReply{}, }
ProxyArpMessages is list of used VPP messages for compatibility check
var RouteMessages = []govppapi.Message{ &ip.IPAddDelRoute{}, &ip.IPAddDelRouteReply{}, &ip.IPFibDump{}, &ip.IPFibDetails{}, &ip.IP6FibDump{}, &ip.IP6FibDetails{}, }
Functions ¶
func AddProxyArpRange ¶
func AddProxyArpRange(firstIP, lastIP []byte, vppChan govppapi.Channel, log logging.Logger, stopwatch *measure.Stopwatch) error
AddProxyArpRange adds new IP range for proxy ARP
func DeleteProxyArpRange ¶
func DeleteProxyArpRange(firstIP, lastIP []byte, vppChan govppapi.Channel, log logging.Logger, stopwatch *measure.Stopwatch) error
DeleteProxyArpRange removes proxy ARP IP range
func DisableProxyArpInterface ¶
func DisableProxyArpInterface(swIfIdx uint32, vppChan govppapi.Channel, log logging.Logger, stopwatch *measure.Stopwatch) error
DisableProxyArpInterface disables interface for proxy ARP
func EnableProxyArpInterface ¶
func EnableProxyArpInterface(swIfIdx uint32, vppChan govppapi.Channel, log logging.Logger, stopwatch *measure.Stopwatch) error
EnableProxyArpInterface enables interface for proxy ARP
func VppAddArp ¶
VppAddArp adds ARP entry according to provided input
func VppAddRoute ¶
VppAddRoute adds new route, according to provided input. Every route has to contain VRF ID (default is 0).
func VppDelArp ¶
VppDelArp removes old ARP entry according to provided input
Types ¶
type ArpEntry ¶
ArpEntry represents ARP entry for interface
type Route ¶
type Route struct {
VrfID uint32 `json:"vrf_id"`
TableName string `json:"table_name"`
DstAddr net.IPNet `json:"dst_addr"`
NextHopAddr net.IP `json:"next_hop_addr"`
OutIface uint32 `json:"out_iface"`
Weight uint32 `json:"weight"`
Preference uint32 `json:"preference"`
}
Route represents a forward IP route entry with the parameters of gateway to which packets should be forwarded when a given routing table entry is applied.
Source Files
¶
- arp_vppcalls.go
- doc.go
- proxyarp_vppcalls.go
- route_vppcalls.go