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 darwin dragonfly freebsd netbsd openbsd
12 nativeEndian binaryByteOrder
14 wireFormats map[int]*wireFormat
19 b := (*[4]byte)(unsafe.Pointer(&i))
21 nativeEndian = littleEndian
23 nativeEndian = bigEndian
25 kernelAlign, wireFormats = probeRoutingStack()
28 func roundup(l int) int {
32 return (l + kernelAlign - 1) & ^(kernelAlign - 1)
35 type wireFormat struct {
36 extOff int // offset of header extension
37 bodyOff int // offset of message body
38 parse func(RIBType, []byte) (Message, error)