Documentation ¶
Index ¶
- Constants
- func AddDecapStatistics(statName string, pkts uint64, bytes uint64, unixSeconds int64)
- func ComputeICV(buf []byte, icvKey []byte) []byte
- func CraftAndSendLispPacket(pktBuf []byte, capLen uint32, timeStamp time.Time, hash32 uint32, ...)
- func DeleteMapCacheEntry(iid uint32, eid net.IP)
- func FlushMapCache()
- func GenerateIVByteArray(ivHigh uint32, ivLow uint64, ivArray []byte) []byte
- func GenerateRandToken(max int64) int64
- func GetEidMaps() []dptypes.EIDEntry
- func GetEtrNatPort() int32
- func GetIPv4UplinkAddr() net.IP
- func GetIPv6UplinkAddr() net.IP
- func GetIVArray(itrLocalData *dptypes.ITRLocalData, ivArray []byte) []byte
- func GetIfaceEIDs() []string
- func GetInterfaces() []string
- func GetItrCryptoPort() uint
- func GetLispIID(hdr []byte) uint32
- func GetLispKeyId(hdr []byte) byte
- func GetLispNonce(hdr []byte) uint32
- func IfaceGetEids(name string) []net.IP
- func InitDecapTable()
- func InitIfaceMaps()
- func InitItrCryptoPort()
- func InitMapCache(debugFlag bool, lispDir string)
- func LookupAndAdd(iid uint32, eid net.IP, timeStamp time.Time) (*dptypes.MapCacheEntry, bool)
- func LookupAndUpdate(iid uint32, eid net.IP, rlocs []dptypes.Rloc) *dptypes.MapCacheEntry
- func LookupDecapKeys(ip net.IP) *dptypes.DecapKeys
- func LookupIfaceEids(iid uint32) []net.IP
- func LookupIfaceIID(name string) uint32
- func MapcacheScrubThread()
- func NewEIDMap() *dptypes.EIDMap
- func NewIfaceMap() *dptypes.InterfaceMap
- func PrintHexBytes(data []byte) string
- func PublishLispInfoStatus(ctx *dptypes.DataplaneContext)
- func PublishLispMetrics(ctx *dptypes.DataplaneContext, encapStatistics *dptypes.LispStatistics, ...)
- func PutItrCryptoPort(port uint)
- func SetLispIID(hdr []byte, iid uint32)
- func SetLispKeyId(hdr []byte, keyId byte)
- func SetLispNonce(hdr []byte, nonce uint32)
- func SetUplinkAddrs(ipv4 net.IP, ipv6 net.IP)
- func ShowDecapKeys()
- func ShowIfaceEIDs()
- func ShowIfaceIIDs()
- func ShowMapCacheEntries()
- func StatsThread(puntChannel chan []byte, ctx *dptypes.DataplaneContext)
- func StoreEtrNatPort(port int32)
- func UpdateDecapKeys(entry *dptypes.DecapKeys)
- func UpdateIfaceEids(eidEntries []dptypes.EIDEntry)
- func UpdateIfaceIIDs(interfaces []dptypes.Interface)
- func UpdateMapCacheEntry(iid uint32, eid net.IP, rlocs []dptypes.Rloc)
Constants ¶
const DATABASEWRITEFILE = "/show-ztr"
const SCRUBTHRESHOLD = 5 * 60
5 minutes scrub threshold
const STATSPUNTINTERVAL = 10
Variables ¶
This section is empty.
Functions ¶
func AddDecapStatistics ¶
func ComputeICV ¶
func CraftAndSendLispPacket ¶
func CraftAndSendLispPacket( pktBuf []byte, capLen uint32, timeStamp time.Time, hash32 uint32, mapEntry *dptypes.MapCacheEntry, iid uint32, itrLocalData *dptypes.ITRLocalData)
func DeleteMapCacheEntry ¶
func FlushMapCache ¶
func FlushMapCache()
This function will delete all map-cache entries that we have.
func GenerateIVByteArray ¶
func GenerateRandToken ¶
func GetEidMaps ¶
func GetEtrNatPort ¶
func GetEtrNatPort() int32
func GetIPv4UplinkAddr ¶
func GetIPv6UplinkAddr ¶
func GetIVArray ¶
func GetIVArray(itrLocalData *dptypes.ITRLocalData, ivArray []byte) []byte
Get IV as a byte array
func GetIfaceEIDs ¶
func GetIfaceEIDs() []string
func GetInterfaces ¶
func GetInterfaces() []string
func GetItrCryptoPort ¶
func GetItrCryptoPort() uint
func GetLispIID ¶
func GetLispKeyId ¶
func GetLispNonce ¶
func IfaceGetEids ¶
func InitDecapTable ¶
func InitDecapTable()
func InitIfaceMaps ¶
func InitIfaceMaps()
func InitItrCryptoPort ¶
func InitItrCryptoPort()
func InitMapCache ¶
func LookupAndAdd ¶
Do a lookup into map cache database. If a resolved entry is not found, create and add an un-resolved entry for buffering packets.
func LookupAndUpdate ¶
Add/update map cache entry. Look at the comments inside this function to understand more about what it does.
func LookupIfaceEids ¶
func LookupIfaceIID ¶
func MapcacheScrubThread ¶
func MapcacheScrubThread()
This thread wakes up every minute, to find the map cache entries that are in resolve state for more than 5 minutes. Resolve entries that are older than 5 minutes will be deleted.
func NewIfaceMap ¶
func NewIfaceMap() *dptypes.InterfaceMap
func PublishLispInfoStatus ¶
func PublishLispInfoStatus(ctx *dptypes.DataplaneContext)
func PublishLispMetrics ¶
func PublishLispMetrics(ctx *dptypes.DataplaneContext, encapStatistics *dptypes.LispStatistics, decapStatistics *dptypes.DecapStatistics)
func PutItrCryptoPort ¶
func PutItrCryptoPort(port uint)
func SetLispIID ¶
func SetLispKeyId ¶
func SetLispNonce ¶
func SetUplinkAddrs ¶
Control thread looks for changes to /var/run/zedrouter/DeviceNetworkStatus/global.json and selects uplinks for ipv4 & ipv6 addresses. We store these uplink addresses at a global location. ITR threads will make READ accesses for uplink addresses simultaneously. Control thread can change these uplink addresses any time. Since it is not possible to change all the fields of UpLinkAddress structure, we allocate a new structure (initialize it) and then atomically change the global pointer such that it points to the newly allocated data structure.
At the same time ITR threads atomically load the pointer to global location. Atomic read ensures that the pointer value is loaded from memory location rather from local storage (register).
func ShowDecapKeys ¶
func ShowDecapKeys()
func ShowIfaceEIDs ¶
func ShowIfaceEIDs()
func ShowIfaceIIDs ¶
func ShowIfaceIIDs()
func ShowMapCacheEntries ¶
func ShowMapCacheEntries()
func StatsThread ¶
func StatsThread(puntChannel chan []byte, ctx *dptypes.DataplaneContext)
Stats thread starts every STATSPUNTINTERVAL seconds and punts map cache statistics to lispers.net.
func StoreEtrNatPort ¶
func StoreEtrNatPort(port int32)
func UpdateDecapKeys ¶
func UpdateIfaceEids ¶
func UpdateIfaceIIDs ¶
Types ¶
This section is empty.