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.
5 // +build dragonfly freebsd netbsd
9 func (w *wireFormat) parseInterfaceAnnounceMessage(_ RIBType, b []byte) (Message, error) {
10 if len(b) < w.bodyOff {
11 return nil, errMessageTooShort
13 l := int(nativeEndian.Uint16(b[:2]))
15 return nil, errInvalidMessage
17 m := &InterfaceAnnounceMessage{
20 Index: int(nativeEndian.Uint16(b[4:6])),
21 What: int(nativeEndian.Uint16(b[22:24])),
24 for i := 0; i < 16; i++ {
28 m.Name = string(b[6 : 6+i])