Documentation
¶
Index ¶
- Constants
- func GetColorByLatency(latency float64) tablewriter.Colors
- func GetColorByLoss(loss float32) tablewriter.Colors
- func GetHash(src net.IP, dst net.IP, srcPort uint16, dstPort uint16, proto uint16) string
- type ICMPHeader
- type RecvMetric
- type SendMetric
- type ServerRecord
- type StatsDB
- type TCPHeader
- type TraceRoute
- func (t *TraceRoute) BuildIPv4ICMP(ttl uint8, id, seq uint16, tos int) (*ipv4.Header, []byte)
- func (t *TraceRoute) BuildIPv4TCPPRST(srcPort uint16, dstPort uint16, ttl uint8, seq uint32, tos int) (*ipv4.Header, []byte)
- func (t *TraceRoute) BuildIPv4TCPSYN(srcPort uint16, dstPort uint16, ttl uint8, seq uint32, tos int) (*ipv4.Header, []byte)
- func (t *TraceRoute) BuildIPv4UDPkt(srcPort uint16, dstPort uint16, ttl uint8, id uint16, tos int) (*ipv4.Header, []byte)
- func (t *TraceRoute) IPv4TCPPing(key string, seq uint32, dport uint16)
- func (t *TraceRoute) IPv4TCPProbe(dport uint16)
- func (t *TraceRoute) ListenIPv4ICMP()
- func (t *TraceRoute) ListenIPv4TCP()
- func (t *TraceRoute) ListenIPv4TCP_ICMP()
- func (t *TraceRoute) ListenIPv4UDP()
- func (t *TraceRoute) NewServerRecord(ipaddr string, ttl uint8, key string) *ServerRecord
- func (t *TraceRoute) Print()
- func (t *TraceRoute) PrintRow(table *tablewriter.Table, id int) string
- func (t *TraceRoute) ProbeTCP()
- func (t *TraceRoute) Report(freq time.Duration)
- func (t *TraceRoute) SendIPv4ICMP()
- func (t *TraceRoute) SendIPv4TCP(dport uint16)
- func (t *TraceRoute) SendIPv4UDP()
- func (t *TraceRoute) Start()
- func (t *TraceRoute) Stats()
- func (t *TraceRoute) Stop()
- func (t *TraceRoute) TraceICMP()
- func (t *TraceRoute) TraceTCP()
- func (t *TraceRoute) TraceUDP()
- func (t *TraceRoute) VerifyCfg()
- type UDPHeader
Constants ¶
View Source
const ( TCP_FIN = 1 << 0 TCP_SYN = 1 << 1 TCP_RST = 1 << 2 TCP_PSH = 1 << 3 TCP_ACK = 1 << 4 TCP_URG = 1 << 5 )
Variables ¶
This section is empty.
Functions ¶
func GetColorByLatency ¶
func GetColorByLatency(latency float64) tablewriter.Colors
func GetColorByLoss ¶
func GetColorByLoss(loss float32) tablewriter.Colors
Types ¶
type ICMPHeader ¶
type RecvMetric ¶
type ServerRecord ¶
type ServerRecord struct { TTL uint8 Addr string Name string Session string GeoLocation geoip.GeoLocation LatencyDescribe *describe.Item Quantile *quantile.Stream RecvCnt uint64 Lock *sync.Mutex }
func (*ServerRecord) LookUPAddr ¶
func (s *ServerRecord) LookUPAddr()
type StatsDB ¶
func NewStatsDB ¶
type TraceRoute ¶
type TraceRoute struct { SrcAddr string Dest string TCPDPort uint16 TCPProbePorts []uint16 MaxPath int MaxTTL uint8 Protocol string PacketRate float32 //pps SendChan chan *SendMetric RecvChan chan *RecvMetric WideMode bool PortOffset int32 //stats DB sync.Map Metric []map[string]*ServerRecord Latitude float64 Longitude float64 Lock *sync.RWMutex // contains filtered or unexported fields }
func (*TraceRoute) BuildIPv4ICMP ¶
func (*TraceRoute) BuildIPv4TCPPRST ¶
func (*TraceRoute) BuildIPv4TCPSYN ¶
func (*TraceRoute) BuildIPv4UDPkt ¶
func (*TraceRoute) IPv4TCPPing ¶
func (t *TraceRoute) IPv4TCPPing(key string, seq uint32, dport uint16)
func (*TraceRoute) IPv4TCPProbe ¶
func (t *TraceRoute) IPv4TCPProbe(dport uint16)
func (*TraceRoute) ListenIPv4ICMP ¶
func (t *TraceRoute) ListenIPv4ICMP()
func (*TraceRoute) ListenIPv4TCP ¶
func (t *TraceRoute) ListenIPv4TCP()
TODO add more on ICMP handle logic
func (*TraceRoute) ListenIPv4TCP_ICMP ¶
func (t *TraceRoute) ListenIPv4TCP_ICMP()
func (*TraceRoute) ListenIPv4UDP ¶
func (t *TraceRoute) ListenIPv4UDP()
func (*TraceRoute) NewServerRecord ¶
func (t *TraceRoute) NewServerRecord(ipaddr string, ttl uint8, key string) *ServerRecord
func (*TraceRoute) Print ¶
func (t *TraceRoute) Print()
func (*TraceRoute) PrintRow ¶
func (t *TraceRoute) PrintRow(table *tablewriter.Table, id int) string
func (*TraceRoute) ProbeTCP ¶
func (t *TraceRoute) ProbeTCP()
func (*TraceRoute) Report ¶
func (t *TraceRoute) Report(freq time.Duration)
func (*TraceRoute) SendIPv4ICMP ¶
func (t *TraceRoute) SendIPv4ICMP()
func (*TraceRoute) SendIPv4TCP ¶
func (t *TraceRoute) SendIPv4TCP(dport uint16)
func (*TraceRoute) SendIPv4UDP ¶
func (t *TraceRoute) SendIPv4UDP()
func (*TraceRoute) Start ¶
func (t *TraceRoute) Start()
func (*TraceRoute) Stats ¶
func (t *TraceRoute) Stats()
func (*TraceRoute) Stop ¶
func (t *TraceRoute) Stop()
func (*TraceRoute) TraceICMP ¶
func (t *TraceRoute) TraceICMP()
func (*TraceRoute) TraceTCP ¶
func (t *TraceRoute) TraceTCP()
func (*TraceRoute) TraceUDP ¶
func (t *TraceRoute) TraceUDP()
func (*TraceRoute) VerifyCfg ¶
func (t *TraceRoute) VerifyCfg()
Directories
¶
Path | Synopsis |
---|---|
stats
|
|
quantile
Package quantile computes approximate quantiles over an unbounded data stream within low memory and CPU bounds.
|
Package quantile computes approximate quantiles over an unbounded data stream within low memory and CPU bounds. |
Package tsyncmap : a timeout based syncmap
|
Package tsyncmap : a timeout based syncmap |
Click to show internal directories.
Click to hide internal directories.