OLD | NEW |
1 // Copyright 2014 The Go Authors. All rights reserved. | 1 // Copyright 2014 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // +build freebsd,amd64 | 5 // +build freebsd,amd64 |
6 | 6 |
7 package syscall | 7 package unix |
8 | 8 |
9 import "unsafe" | 9 import "unsafe" |
10 | 10 |
11 func (any *anyMessage) parseInterfaceMessage(b []byte) *InterfaceMessage { | 11 func (any *anyMessage) parseInterfaceMessage(b []byte) *InterfaceMessage { |
12 p := (*InterfaceMessage)(unsafe.Pointer(any)) | 12 p := (*InterfaceMessage)(unsafe.Pointer(any)) |
13 return &InterfaceMessage{Header: p.Header, Data: b[SizeofIfMsghdr:any.Ms
glen]} | 13 return &InterfaceMessage{Header: p.Header, Data: b[SizeofIfMsghdr:any.Ms
glen]} |
14 } | 14 } |
OLD | NEW |