Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ZiffyHexa signs zi(0xff)y PTP packets ZiffyHexa = 0xff // Ipv6HeaderSize is ipv6 header size Ipv6HeaderSize = 40 // UDPHeaderSize is udp header size UDPHeaderSize = 8 // ICMPHeaderSize is icmp ipv6 header size ICMPHeaderSize = 8 // PTPUnusedSize received from sender PTPUnusedSize = 10 )
View Source
const ( // Promiscuous sets the pcap handle promiscuous flag Promiscuous = false // RecvTimeout sets the resolution for the listener RecvTimeout = 1 * time.Microsecond // SnapshotLen sets max length of packets SnapshotLen = 1024 )
View Source
const ( // RackMaskBits identifies the rack ipv6 prefix RackMaskBits = 64 // FaceHexaTop is the upper byte of 0xface FaceHexaTop = 0xfa // FaceHexaBot is the lower byte of 0xface FaceHexaBot = 0xce // LLDPTypeStr Ether type string LLDPTypeStr = "0x88cc" )
Variables ¶
This section is empty.
Functions ¶
func CsvPrint ¶
func CsvPrint(c *Config, routes []*PathInfo, path string, cfThreshold ptp.Correction)
CsvPrint outputs the data in a csv file
func PrettyPrint ¶
func PrettyPrint(c *Config, routes []*PathInfo, cfThreshold ptp.Correction)
PrettyPrint formats and prints the output to stdout
Types ¶
type Config ¶
type Config struct { Mode string LogLevel string Device string CsvFile string DestinationAddress string DestinationPort int SourcePort int PortCount int HopMax int HopMin int PacketsPerHop int IPCount int DSCP int PTPRecvHandlers int ContReached bool IcmpTimeout time.Duration MessageType ptp.MessageType LLDPWaitTime time.Duration IcmpReplyTime time.Duration Raw bool // QueueCap used to store ICMP messages. Capacity is the number of late messages // stored until the queue is cleared. After each traceRoute, sender clears the queue. // For worst case scenario maximum capacity should be (HopMax - HopMin + 1) * PortCount * IPCount QueueCap int }
Config is the Ziffy config struct
type PathInfo ¶
type PathInfo struct {
// contains filtered or unexported fields
}
PathInfo contains the list of switches in a path
type Sender ¶
type Sender struct { Config *Config // contains filtered or unexported fields }
Sender sweeps the network with PTP packets
type SwitchPrintInfo ¶
type SwitchPrintInfo struct {
// contains filtered or unexported fields
}
SwitchPrintInfo contains print information for switches
type SwitchTrafficInfo ¶
type SwitchTrafficInfo struct {
// contains filtered or unexported fields
}
SwitchTrafficInfo contains information about a switch
Click to show internal directories.
Click to hide internal directories.