Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/benjojo/sping
/ functions
Functions
137 in github.com/benjojo/sping
⨍
Functions
137
◇
Types & classes
29
↓ 15 callers
Method
Close
Close closes the endpoint.
icmp/endpoint.go:73
↓ 9 callers
Method
Marshal
Marshal returns the binary encoding of ICMP extension. The provided proto must be either the ICMPv4 or ICMPv6 protocol number.
icmp/extension.go:24
↓ 9 callers
Method
ok
()
icmp/endpoint.go:26
↓ 7 callers
Method
Len
Len returns the length of ICMP extension. The provided proto must be either the ICMPv4 or ICMPv6 protocol number.
icmp/extension.go:19
↓ 6 callers
Method
WriteTo
WriteTo writes the ICMP message b to dst. The provided dst must be net.UDPAddr when c is a non-privileged datagram-oriented ICMP endpoint. Otherwise i
icmp/endpoint.go:65
↓ 6 callers
Function
dumpExtensions
(gotExts, wantExts []icmp.Extension)
icmp/multipart_test.go:386
↓ 5 callers
Function
multipartMessageBodyDataLen
multipartMessageBodyDataLen takes b as an original datagram and exts as extensions, and returns a required length for message body and a required leng
icmp/multipart.go:11
↓ 5 callers
Function
timeNowCorrected
()
timecorrection.go:23
↓ 4 callers
Method
ReadFrom
ReadFrom reads an ICMP message from the connection.
icmp/endpoint.go:47
↓ 4 callers
Method
marshal
(proto int, b []byte)
icmp/mpls.go:43
↓ 4 callers
Function
marshalMultipartMessageBody
marshalMultipartMessageBody takes data as an original datagram and exts as extesnsions, and returns a binary encoding of message body. It can be used
icmp/multipart.go:59
↓ 4 callers
Function
parseMultipartMessageBody
parseMultipartMessageBody parses b as either a non-multipart message body or a multipart message body.
icmp/multipart.go:106
↓ 4 callers
Function
validExtensions
(typ Type, exts []Extension)
icmp/extension.go:116
↓ 3 callers
Method
Protocol
()
icmp/message.go:57
↓ 3 callers
Method
attrsAndLen
(proto int)
icmp/interface.go:40
↓ 3 callers
Function
checksum
(b []byte)
icmp/message.go:41
↓ 3 callers
Function
doDiag
(dt diagTest, seq int)
icmp/diag_test.go:147
↓ 3 callers
Function
dumbLastAckSearchForID
(targetID uint8, LastAcks [32]pingInfo)
main.go:408
↓ 3 callers
Function
parseExtensions
parseExtensions parses b as a list of ICMP extensions. The length attribute l must be the length attribute field in received icmp messages. It will r
icmp/extension.go:48
↓ 3 callers
Function
validExtensionHeader
(b []byte)
icmp/extension.go:29
↓ 2 callers
Method
Len
Len implements the Len method of Extension interface.
icmp/interface.go:251
↓ 2 callers
Method
Len
Len implements the Len method of Extension interface.
icmp/mpls.go:30
↓ 2 callers
Method
Marshal
Marshal returns the binary encoding of the ICMP message m. For an ICMPv4 message, the returned message always contains the calculated checksum field.
icmp/message.go:77
↓ 2 callers
Method
SetReadDeadline
SetReadDeadline sets the read deadline associated with the endpoint.
icmp/endpoint.go:99
↓ 2 callers
Function
getStats
(timeRX time.Time, rx pingStruct, ses *session)
main.go:357
↓ 2 callers
Function
getTimeOffset
()
timecorrection.go:11
↓ 2 callers
Method
nameLen
()
icmp/interface.go:32
↓ 2 callers
Method
parseName
(b []byte)
icmp/interface.go:168
↓ 2 callers
Method
sendPackets
()
main.go:176
↓ 2 callers
Function
supportsNonPrivilegedICMP
()
icmp/diag_test.go:275
↓ 2 callers
Function
waitForPPSPulse
()
pps_other.go:11
↓ 1 callers
Method
IPv6PacketConn
IPv6PacketConn returns the ipv6.PacketConn of c. It returns nil when c is not created as the endpoint for ICMPv6.
icmp/endpoint.go:39
↓ 1 callers
Method
Len
Len implements the Len method of MessageBody interface.
icmp/paramprob.go:21
↓ 1 callers
Function
ListenPacket
for now only darwin supports this option ListenPacket listens for incoming ICMP packets addressed to address. See net.Dial for the syntax of address.
icmp/listen_posix.go:43
↓ 1 callers
Method
LocalAddr
LocalAddr returns the local network address.
icmp/endpoint.go:81
↓ 1 callers
Function
ParseIPv4Header
ParseIPv4Header returns the IPv4 header of the IPv4 packet that triggered an ICMP error message. This is found in the Data field of the ICMP error mes
icmp/ipv4.go:30
↓ 1 callers
Function
ParseMessage
ParseMessage parses b as an ICMP message. The provided proto must be either the ICMPv4 or ICMPv6 protocol number.
icmp/message.go:141
↓ 1 callers
Function
Ping
(addr string, seq int)
icmp-timestap-pinger/main.go:18
↓ 1 callers
Function
calibrateAgainstApple
Returns out offset against apple's NTP (+ GPS) servers
ntp.go:118
↓ 1 callers
Function
getLoss
(rx pingStruct, ses *session)
main.go:377
↓ 1 callers
Method
getNextAckSlot
()
main.go:167
↓ 1 callers
Function
googleAddr
(c *icmp.PacketConn, protocol int)
icmp/diag_test.go:215
↓ 1 callers
Function
handleInboundHandshake
(buf []byte, rxAddr *net.UDPAddr, lSocket net.PacketConn)
main.go:306
↓ 1 callers
Function
handlePacket
(buf []byte, rxAddr *net.UDPAddr, lSocket net.PacketConn)
main.go:245
↓ 1 callers
Function
handlePrometheus
()
prom.go:17
↓ 1 callers
Function
handleTCPconnection
(conn net.Conn)
sessionhandle.go:165
↓ 1 callers
Function
last
(s string, b byte)
icmp/helper_posix.go:67
↓ 1 callers
Function
listenAndRoute
()
main.go:220
↓ 1 callers
Function
listenOnTCP
()
sessionhandle.go:142
↓ 1 callers
Method
marshal
(proto int, b []byte, attrs, l int)
icmp/interface.go:87
↓ 1 callers
Method
marshal
(proto int, b []byte)
icmp/interface.go:277
↓ 1 callers
Method
marshalIPAddr
(proto int, b []byte)
icmp/interface.go:122
↓ 1 callers
Method
marshalIfIndex
(proto int, b []byte)
icmp/interface.go:109
↓ 1 callers
Method
marshalMTU
(proto int, b []byte)
icmp/interface.go:182
↓ 1 callers
Method
marshalName
(proto int, b []byte)
icmp/interface.go:161
↓ 1 callers
Method
measure
()
prom.go:91
↓ 1 callers
Function
multipartMessageOrigDatagramLen
multipartMessageOrigDatagramLen takes b as an original datagram, and returns a required length for a padded orignal datagram in wire format.
icmp/multipart.go:36
↓ 1 callers
Function
newSessionID
()
sessionhandle.go:222
↓ 1 callers
Function
ntpTriplePoll
(server string)
ntp.go:178
↓ 1 callers
Method
parseIPAddr
(b []byte)
icmp/interface.go:136
↓ 1 callers
Method
parseIfIndex
(b []byte)
icmp/interface.go:114
↓ 1 callers
Function
parseInterfaceIdent
(b []byte)
icmp/interface.go:294
↓ 1 callers
Function
parseInterfaceInfo
(b []byte)
icmp/interface.go:195
↓ 1 callers
Function
parseMPLSLabelStack
(b []byte)
icmp/mpls.go:60
↓ 1 callers
Method
parseMTU
(b []byte)
icmp/interface.go:187
↓ 1 callers
Function
parseRawBody
parseRawBody parses b as an ICMP message body.
icmp/messagebody.go:43
↓ 1 callers
Function
ppsClockTicker
()
main.go:70
↓ 1 callers
Method
sendUDPHandshake
sendUDPHandshake is called by session.startSession to send UDP handshakes in the background the actual handshake is RX'd elsewhere, decoded and this f
sessionhandle.go:101
↓ 1 callers
Function
sessionGC
()
main.go:119
↓ 1 callers
Function
setupPPS
()
pps_other.go:7
↓ 1 callers
Function
setupPPS
()
pps_linux.go:15
↓ 1 callers
Function
sockaddr
(family int, address string)
icmp/helper_posix.go:15
↓ 1 callers
Function
startSession
(ip net.IP)
sessionhandle.go:16
↓ 1 callers
Function
sysClockTicker
()
main.go:94
↓ 1 callers
Method
waitForHandshake
()
sessionhandle.go:200
↓ 1 callers
Function
zoneToUint32
(zone string)
icmp/helper_posix.go:53
Method
Collect
Collect implements the prometheus.Collector interface.
prom.go:62
Method
Describe
Describe implements the prometheus.Collector interface.
prom.go:56
Function
ExamplePacketConn_nonPrivilegedPing
()
icmp/example_test.go:17
Method
IPv4PacketConn
IPv4PacketConn returns the ipv4.PacketConn of c. It returns nil when c is not created as the endpoint for ICMPv4.
icmp/endpoint.go:30
Function
IPv6PseudoHeader
IPv6PseudoHeader returns an IPv6 pseudo header for checksum calculation.
icmp/ipv6.go:15
Method
Len
()
ntp.go:93
Method
Len
()
ntp.go:105
Method
Len
Len implements the Len method of MessageBody interface.
icmp/timestamp.go:21
Method
Len
Len implements the Len method of MessageBody interface.
icmp/packettoobig.go:16
Method
Len
Len implements the Len method of Extension interface.
icmp/interface.go:72
Method
Len
Len returns the length of ICMP message body. The provided proto must be either the ICMPv4 or ICMPv6 protocol number.
icmp/messagebody.go:12
Method
Len
Len implements the Len method of MessageBody interface.
icmp/messagebody.go:30
Method
Len
Len implements the Len method of MessageBody interface.
icmp/timeexceeded.go:19
Method
Len
Len implements the Len method of Extension interface.
icmp/extension.go:160
Method
Len
Len implements the Len method of MessageBody interface.
icmp/echo.go:22
Method
Len
Len implements the Len method of MessageBody interface.
icmp/echo.go:62
Method
Len
Len implements the Len method of MessageBody interface.
icmp/echo.go:126
Method
Len
Len implements the Len method of MessageBody interface.
icmp/dstunreach.go:20
Method
Less
(i, j int)
ntp.go:99
Method
Less
(i, j int)
ntp.go:111
Function
ListenPacket
ListenPacket listens for incoming ICMP packets addressed to address. See net.Dial for the syntax of address. For non-privileged datagram-oriented ICM
icmp/listen_stub.go:31
Method
Marshal
Marshal implements the Marshal method of MessageBody interface.
icmp/timestamp.go:29
Method
Marshal
Marshal implements the Marshal method of MessageBody interface.
icmp/packettoobig.go:24
Method
Marshal
Marshal implements the Marshal method of Extension interface.
icmp/interface.go:78
next →
1–100 of 137, ranked by callers