afinetrawsocket

package
v10.267.5+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RawSocketMark is the mark asserted on all packet sent out of this socket
	RawSocketMark = 0x63
	// NetworkRawSocketMark is the mark on packet egressing
	//the raw socket coming in from network
	NetworkRawSocketMark = 0x40000063
	//ApplicationRawSocketMark is the mark on packet egressing
	//the raw socket coming from application
	ApplicationRawSocketMark = 0x40000062
)

Variables

This section is empty.

Functions

func IsIpv6Supported

func IsIpv6Supported() bool

IsIpv6Supported returns true if the system supports ipv6 else returns false

Types

type PacketMetadata

type PacketMetadata struct {
}

PacketMetadata is platform-specific data about the packet

type SocketWriter

type SocketWriter interface {
	WriteSocket(buf []byte, version packet.IPver, data *PacketMetadata) error
}

SocketWriter interface exposes an interface to write and close sockets

func CreateSocket

func CreateSocket(mark int, deviceName string) (SocketWriter, error)

CreateSocket returns a handle to SocketWriter interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL