Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GetDSCP = DSCPSlice{ DSCPBeLow, DSCPBeHigh, DSCPBulkLow, DSCPBulkHigh, DSCPTier2Low, DSCPTier2High, DSCPTier1Low, DSCPTier1High, DSCPTier0Low, DSCPNc6, DSCPNc7, }
GetDSCP holds all the DSCP values in a slice.
Functions ¶
func GetIPHeaderLayer ¶
func GetIPHeaderLayer(af int, tos DSCPValue, tcpLen uint16, srcIP net.IP, dstIP net.IP) (gopacket.NetworkLayer, error)
GetIPHeaderLayer returns the appriately versioned gopacket IP layer
func GetIPLayerOptions ¶
func GetIPLayerOptions() gopacket.SerializeOptions
GetIPLayerOptions returns the gopacket options for serialization specific to Linux. In linux, gopacket correctly computes the ip Header lengths and checksum.
Types ¶
type Conn ¶
type Conn struct { SrcAddr net.IP AF int ListenPort layers.TCPPort // contains filtered or unexported fields }
Conn represents the underlying functionality to send and recv Arachne echo requests.
func NewConn ¶
func NewConn(af int, listenPort layers.TCPPort, intf string, srcAddr net.IP, logger *log.Logger) *Conn
NewConn returns a raw socket connection to send and receive packets.
func (*Conn) Close ¶
Close is used to close a Conn's send file descriptor and recv source file desciptor.
func (*Conn) NextPacket ¶
NextPacket gets bytes of next available packet, and returns them in a decoded gopacket.Packet
type DSCPValue ¶
type DSCPValue uint8
DSCPValue represents a QoS DSCP value.
const ( DSCPBeLow DSCPValue = 0 // 000000 BE DSCPBeHigh DSCPValue = 4 // 000001 BE DSCPBulkLow DSCPValue = 40 // 001010 AF11 DSCPBulkHigh DSCPValue = 56 // 001110 AF13 DSCPTier2Low DSCPValue = 72 // 010010 AF21 DSCPTier2High DSCPValue = 88 // 010110 AF23 DSCPTier1Low DSCPValue = 104 // 011010 AF31 DSCPTier1High DSCPValue = 120 // 011110 AF33 DSCPTier0Low DSCPValue = 160 // 101000 EF DSCPNc6 DSCPValue = 192 // 110000 CS6 DSCPNc7 DSCPValue = 224 // 111000 CS7 )
QoS DSCP values mapped to TOS.