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//go:build darwin || dragonfly || freebsd || netbsd || openbsd 6// +build darwin dragonfly freebsd netbsd openbsd 7 8package route 9 10// An InterfaceMessage represents an interface message. 11type InterfaceMessage struct { 12 Version int // message version 13 Type int // message type 14 Flags int // interface flags 15 Index int // interface index 16 Name string // interface name 17 Addrs []Addr // addresses 18 19 extOff int // offset of header extension 20 raw []byte // raw message 21} 22 23// An InterfaceAddrMessage represents an interface address message. 24type InterfaceAddrMessage struct { 25 Version int // message version 26 Type int // message type 27 Flags int // interface flags 28 Index int // interface index 29 Addrs []Addr // addresses 30 31 raw []byte // raw message 32} 33 34// Sys implements the Sys method of Message interface. 35func (m *InterfaceAddrMessage) Sys() []Sys { return nil } 36 37// An InterfaceMulticastAddrMessage represents an interface multicast 38// address message. 39type InterfaceMulticastAddrMessage struct { 40 Version int // message version 41 Type int // message type 42 Flags int // interface flags 43 Index int // interface index 44 Addrs []Addr // addresses 45 46 raw []byte // raw message 47} 48 49// Sys implements the Sys method of Message interface. 50func (m *InterfaceMulticastAddrMessage) Sys() []Sys { return nil } 51 52// An InterfaceAnnounceMessage represents an interface announcement 53// message. 54type InterfaceAnnounceMessage struct { 55 Version int // message version 56 Type int // message type 57 Index int // interface index 58 Name string // interface name 59 What int // what type of announcement 60 61 raw []byte // raw message 62} 63 64// Sys implements the Sys method of Message interface. 65func (m *InterfaceAnnounceMessage) Sys() []Sys { return nil } 66