Documentation ¶
Index ¶
Constants ¶
View Source
const SNAPLENGTH = 65536
Variables ¶
This section is empty.
Functions ¶
func LookupAndSend ¶
func LookupAndSend( pktBuf []byte, capLen uint32, timeStamp time.Time, iid uint32, hash32 uint32, ifname string, srcAddr net.IP, dstAddr net.IP, puntChannel chan []byte, itrLocalData *dptypes.ITRLocalData)
This function expects the parameter pktBuf to be a statically allocated buffer longer than the original packet length. We currently use a buffer of length 64K bytes.
Perform lookup into mapcache database and forward if the lookup succeeds. If not, buffer the packet and send a punt request to lispers.net for resolution. Look for comments inside the function to understand more about what it does.
func SetupPacketCapture ¶
// Opens up the pfing on interface and sets up packet capture.
func SetupPacketCapture(ifname string, snapLen uint32) *pfring.Ring { // create a new pf_ring to capture packets from our interface ring, err := pfring.NewRing(ifname, SNAPLENGTH, pfring.FlagPromisc)
func StartItrThread ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.