Source file
src/syscall/route_freebsd_64bit.go
1
2
3
4
5
6
7 package syscall
8
9 import "unsafe"
10
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]}
14 }
15
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]}
19 }
20
View as plain text