github.com/Andyfoo/golang/x/net@v0.0.0-20190901054642-57c1bf301704/route/interface.go (about) 1 // Copyright 2016 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // +build darwin dragonfly freebsd netbsd openbsd 6 7 package route 8 9 // An InterfaceMessage represents an interface message. 10 type InterfaceMessage struct { 11 Version int // message version 12 Type int // message type 13 Flags int // interface flags 14 Index int // interface index 15 Name string // interface name 16 Addrs []Addr // addresses 17 18 extOff int // offset of header extension 19 raw []byte // raw message 20 } 21 22 // An InterfaceAddrMessage represents an interface address message. 23 type InterfaceAddrMessage struct { 24 Version int // message version 25 Type int // message type 26 Flags int // interface flags 27 Index int // interface index 28 Addrs []Addr // addresses 29 30 raw []byte // raw message 31 } 32 33 // Sys implements the Sys method of Message interface. 34 func (m *InterfaceAddrMessage) Sys() []Sys { return nil } 35 36 // An InterfaceMulticastAddrMessage represents an interface multicast 37 // address message. 38 type InterfaceMulticastAddrMessage struct { 39 Version int // message version 40 Type int // message type 41 Flags int // interface flags 42 Index int // interface index 43 Addrs []Addr // addresses 44 45 raw []byte // raw message 46 } 47 48 // Sys implements the Sys method of Message interface. 49 func (m *InterfaceMulticastAddrMessage) Sys() []Sys { return nil } 50 51 // An InterfaceAnnounceMessage represents an interface announcement 52 // message. 53 type InterfaceAnnounceMessage struct { 54 Version int // message version 55 Type int // message type 56 Index int // interface index 57 Name string // interface name 58 What int // what type of announcement 59 60 raw []byte // raw message 61 } 62 63 // Sys implements the Sys method of Message interface. 64 func (m *InterfaceAnnounceMessage) Sys() []Sys { return nil }