1 // Copyright 2014 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 freebsd,amd64 freebsd,arm64
11 func (any
*anyMessage
) parseRouteMessage(b
[]byte) *RouteMessage
{
12 p
:= (*RouteMessage
)(unsafe
.Pointer(any
))
13 return &RouteMessage
{Header
: p
.Header
, Data
: b
[rsaAlignOf(int(unsafe
.Offsetof(p
.Header
.Rmx
))+SizeofRtMetrics
):any
.Msglen
]}
16 func (any
*anyMessage
) parseInterfaceMessage(b
[]byte) *InterfaceMessage
{
17 p
:= (*InterfaceMessage
)(unsafe
.Pointer(any
))
18 return &InterfaceMessage
{Header
: p
.Header
, Data
: b
[int(unsafe
.Offsetof(p
.Header
.Data
))+int(p
.Header
.Data
.Datalen
) : any
.Msglen
]}