Documentation ¶
Overview ¶
Package sniffer parses the output of the ioctl hook.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection is a connection to the sniffer hook.
func (Connection) ReadHookOutput ¶
func (c Connection) ReadHookOutput(ctx context.Context) *Results
ReadHookOutput reads the output of the ioctl hook until an EOF is reached.
func (*Connection) ReadIoctlProto ¶
ReadIoctlProto reads a single ioctl proto from this connection. Our format is:
- 8 byte little endian uint64 containing the size of the proto.
- The proto bytes.
This should match the format in sniffer_bridge.h.
type Ioctl ¶
type Ioctl struct {
// contains filtered or unexported fields
}
Ioctl contains the parsed ioctl protobuf information.
func ParseIoctlOutput ¶
ParseIoctlOutput parses an ioctl protobuf from the ioctl hook.
func (Ioctl) IsSupported ¶
IsSupported returns true if the ioctl is supported by nvproxy.
type Results ¶
type Results struct {
// contains filtered or unexported fields
}
Results contains the list of unsupported ioctls.
func (*Results) AddUnsupportedIoctl ¶
AddUnsupportedIoctl adds an unsupported ioctl to the results.
func (*Results) HasUnsupportedIoctl ¶
HasUnsupportedIoctl returns true if there are any unsupported ioctls.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a server that accepts connections from the sniffer hook. It reads ioctl protos from each connection and sends them to the results channel.
func (*Server) AllResults ¶
AllResults blocks until all connections have closed and returns an aggregate of all the results.