add pcap stats to weave report

Closes #1185.
This commit is contained in:
Matthias Radestock committed 2015-08-11 12:57:52 +01:00
1 parent f3ad81d554
commit c1d799a06c
3 files changed
+21

No files matched your search

+3
View File
@@ -47,12 +47,14 @@ type Router struct {
gossipLock sync.RWMutex
gossipChannels GossipChannels
TopologyGossip Gossip
PacketSource PacketSource
UDPListener *net.UDPConn
acceptLimiter *TokenBucket
}
type PacketSource interface {
ReadPacket() ([]byte, error)
Stats() map[string]int
}
type PacketSink interface {
@@ -102,6 +104,7 @@ func (router *Router) Start() {
router.UDPListener = router.listenUDP(router.Port, po)
router.listenTCP(router.Port)
if pio != nil {
router.PacketSource = pio
router.sniff(pio)
}
}