Define generic adapter type, rename tunDevice to tunAdapter

This commit is contained in:
Neil Alexander 2018-12-14 18:21:08 +00:00
parent f28360ce4d
commit 8045cb4dc3
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
8 changed files with 25 additions and 24 deletions

View file

@ -24,7 +24,7 @@ type macAddress [6]byte
const len_ETHER = 14
type icmpv6 struct {
tun *tunDevice
tun *tunAdapter
mylladdr net.IP
mymac macAddress
peermacs map[address]neighbor
@ -57,7 +57,7 @@ func ipv6Header_Marshal(h *ipv6.Header) ([]byte, error) {
// Initialises the ICMPv6 module by assigning our link-local IPv6 address and
// our MAC address. ICMPv6 messages will always appear to originate from these
// addresses.
func (i *icmpv6) init(t *tunDevice) {
func (i *icmpv6) init(t *tunAdapter) {
i.tun = t
i.peermacs = make(map[address]neighbor)