{"modulePath":"github.com/emnify/vpp-agent","version":"v1.4.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package l3plugin\n\n## Types\n\n```go\ntype LinuxArpConfigurator struct {\n\tLog logging.Logger\n\n\tNsHandler *nsplugin.NsHandler\n\n\tLinuxIfIdx ifaceidx.LinuxIfIndexRW\n\tArpIdxSeq  uint32\n\n\t// Time measurement\n\tStopwatch *measure.Stopwatch // timer used to measure and store time\n\t// contains filtered or unexported fields\n}\n```\nLinuxArpConfigurator watches for any changes in the configuration of static ARPs as modelled by the proto file \"model/l3/l3.proto\" and stored in ETCD under the key \"/vnf-agent/{vnf-agent}/linux/config/v1/arp\". Updates received from the northbound API are compared with the Linux network configuration and differences are applied through the Netlink AP\n\n```go\nfunc (plugin *LinuxArpConfigurator) Close() error\n```\nClose closes all goroutines started during Init\n\n```go\nfunc (plugin *LinuxArpConfigurator) ConfigureLinuxStaticArpEntry(arpEntry *l3.LinuxStaticArpEntries_ArpEntry) error\n```\nConfigureLinuxStaticArpEntry reacts to a new northbound Linux ARP entry config by creating and configuring the entry in the host network stack through Netlink API.\n\n```go\nfunc (plugin *LinuxArpConfigurator) DeleteLinuxStaticArpEntry(arpEntry *l3.LinuxStaticArpEntries_ArpEntry) (err error)\n```\nDeleteLinuxStaticArpEntry reacts to a removed NB configuration of a Linux ARP entry.\n\n```go\nfunc (plugin *LinuxArpConfigurator) Init(arpIndexes l3idx.LinuxARPIndexRW) error\n```\nInit initializes ARP configurator and starts goroutines\n\n```go\nfunc (plugin *LinuxArpConfigurator) LookupLinuxArpEntries() error\n```\nLookupLinuxArpEntries reads all ARP entries from all interfaces and registers them if needed\n\n```go\nfunc (plugin *LinuxArpConfigurator) ModifyLinuxStaticArpEntry(newArpEntry *l3.LinuxStaticArpEntries_ArpEntry, oldArpEntry *l3.LinuxStaticArpEntries_ArpEntry) (err error)\n```\nModifyLinuxStaticArpEntry applies changes in the NB configuration of a Linux ARP through Netlink API.\n\n```go\nfunc (plugin *LinuxArpConfigurator) ResolveCreatedInterface(ifName string, ifIdx uint32) error\n```\nResolveCreatedInterface resolves a new linux interface from ARP perspective\n\n```go\nfunc (plugin *LinuxArpConfigurator) ResolveDeletedInterface(ifName string, ifIdx uint32) error\n```\nResolveDeletedInterface resolves removed linux interface from ARP perspective\n\n```go\nfunc (plugin *LinuxArpConfigurator) Resync(arpEntries []*l3.LinuxStaticArpEntries_ArpEntry) (errs []error)\n```\nResync configures an initial set of ARPs. Existing Linux ARPs are registered and potentially re-configured.\n\n```go\ntype LinuxRouteConfigurator struct {\n\tLog logging.Logger\n\n\tNsHandler *nsplugin.NsHandler\n\n\tLinuxIfIdx  ifaceidx.LinuxIfIndexRW\n\tRouteIdxSeq uint32\n\n\t// Time measurement\n\tStopwatch *measure.Stopwatch // timer used to measure and store time\n\t// contains filtered or unexported fields\n}\n```\nLinuxRouteConfigurator watches for any changes in the configuration of static routes as modelled by the proto file \"model/l3/l3.proto\" and stored in ETCD under the key \"/vnf-agent/{vnf-agent}/linux/config/v1/route\". Updates received from the northbound API are compared with the Linux network configuration and differences are applied through the Netlink AP\n\n```go\nfunc (plugin *LinuxRouteConfigurator) Close() error\n```\nClose closes all goroutines started during Init\n\n```go\nfunc (plugin *LinuxRouteConfigurator) ConfigureLinuxStaticRoute(route *l3.LinuxStaticRoutes_Route) error\n```\nConfigureLinuxStaticRoute reacts to a new northbound Linux static route config by creating and configuring the route in the host network stack through Netlink API.\n\n```go\nfunc (plugin *LinuxRouteConfigurator) DeleteLinuxStaticRoute(route *l3.LinuxStaticRoutes_Route) error\n```\nDeleteLinuxStaticRoute reacts to a removed NB configuration of a Linux static route entry.\n\n```go\nfunc (plugin *LinuxRouteConfigurator) Init(rtIndices, rtAutoIndices, rtCachedIndexes l3idx.LinuxRouteIndexRW) error\n```\nInit initializes static route configurator and starts goroutines\n\n```go\nfunc (plugin *LinuxRouteConfigurator) ModifyLinuxStaticRoute(newRoute *l3.LinuxStaticRoutes_Route, oldRoute *l3.LinuxStaticRoutes_Route) error\n```\nModifyLinuxStaticRoute applies changes in the NB configuration of a Linux static route into the host network stack through Netlink API.\n\n```go\nfunc (plugin *LinuxRouteConfigurator) ResolveCreatedInterface(name string, index uint32) error\n```\nResolveCreatedInterface manages static routes for new interface. Linux interface also creates its own route which can make other routes accessible and ready to create - the case is also resolved here.\n\n```go\nfunc (plugin *LinuxRouteConfigurator) ResolveDeletedInterface(name string, index uint32) error\n```\nResolveDeletedInterface manages static routes for removed interface\n\n```go\nfunc (plugin *LinuxRouteConfigurator) Resync(nbRoutes []*l3.LinuxStaticRoutes_Route) (errs []error)\n```\nResync configures an initial set of static routes. Existing Linux static routes are registered and potentially re-configured. Resync does not remove any linux route.\n\n","path":"github.com/emnify/vpp-agent/plugins/linuxplugin/l3plugin","name":"l3plugin","synopsis":"","isRedistributable":true}
