This commit is contained in:
Adam Ierymenko 2019-09-20 21:00:54 -07:00
commit fbf74d3baa
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
5 changed files with 52 additions and 11 deletions

View file

@ -38,6 +38,18 @@ type nativeTap struct {
multicastGroupHandlersLock sync.Mutex
}
var _ Tap = &nativeTap{}
// Type returns a human-readable description of this tap implementation
func (t *nativeTap) Type() string {
return "native"
}
// Error gets this tap device's error status
func (t *nativeTap) Error() (int, string) {
return 0, ""
}
// SetEnabled sets this tap's enabled state
func (t *nativeTap) SetEnabled(enabled bool) {
if enabled && atomic.SwapUint32(&t.enabled, 1) == 0 {