diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-08-08 22:38:41 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-08-08 22:39:58 -0700 |
commit | 4e171f7590284c1f4cedf90c92204873961b2e97 (patch) | |
tree | 98fef86694288ce258985ce7ff4772ee23566874 /pkg/tcpip/stack/nic.go | |
parent | 48b5b35b2bd46ecd043f95d5f470da71046af760 (diff) |
Basic support for ip link/addr and ifconfig
Closes #94
PiperOrigin-RevId: 207997580
Change-Id: I19b426f1586b5ec12f8b0cd5884d5b401d334924
Diffstat (limited to 'pkg/tcpip/stack/nic.go')
-rw-r--r-- | pkg/tcpip/stack/nic.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/tcpip/stack/nic.go b/pkg/tcpip/stack/nic.go index c1480f97b..592006a32 100644 --- a/pkg/tcpip/stack/nic.go +++ b/pkg/tcpip/stack/nic.go @@ -67,6 +67,13 @@ func (n *NIC) setPromiscuousMode(enable bool) { n.mu.Unlock() } +func (n *NIC) isPromiscuousMode() bool { + n.mu.RLock() + rv := n.promiscuous + n.mu.RUnlock() + return rv +} + // setSpoofing enables or disables address spoofing. func (n *NIC) setSpoofing(enable bool) { n.mu.Lock() |