MCPcopy
hub / github.com/vishvananda/netlink / Serialize

Method Serialize

socket_linux.go:81–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79}
80
81func (r *unixSocketRequest) Serialize() []byte {
82 b := writeBuffer{Bytes: make([]byte, sizeofUnixSocketRequest)}
83 b.Write(r.Family)
84 b.Write(r.Protocol)
85 native.PutUint16(b.Next(2), r.pad)
86 native.PutUint32(b.Next(4), r.States)
87 native.PutUint32(b.Next(4), r.INode)
88 native.PutUint32(b.Next(4), r.Show)
89 native.PutUint32(b.Next(4), r.Cookie[0])
90 native.PutUint32(b.Next(4), r.Cookie[1])
91 return b.Bytes
92}
93
94func (r *unixSocketRequest) Len() int { return sizeofUnixSocketRequest }
95

Callers

nothing calls this directly

Calls 2

WriteMethod · 0.95
NextMethod · 0.95

Tested by

no test coverage detected