add Bridge.Interface()

This commit is contained in:
Matthias Radestock committed 2016-01-13 13:50:18 +00:00
1 parent f12ec3b295
commit e5c256daa1
3 files changed
+17

No files matched your search

+9
View File
@@ -1,5 +1,9 @@
package router
import (
"net"
)
// Interface to packet handling on the local virtual bridge
type Bridge interface {
// Inject a packet to be delivered locally
@@ -9,6 +13,7 @@ type Bridge interface {
// should not be included.
StartConsumingPackets(BridgeConsumer) error
Interface() *net.Interface
String() string
Stats() map[string]int
}
@@ -26,6 +31,10 @@ func (NullBridge) StartConsumingPackets(BridgeConsumer) error {
return nil
}
func (NullBridge) Interface() *net.Interface {
return nil
}
func (NullBridge) String() string {
return "<no bridge networking>"
}