Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/cloudflare/cloudflared
/ NewEncoder
Function
NewEncoder
packet/encoder.go:24–28 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
22
}
23
24
func
NewEncoder() *Encoder {
25
return
&Encoder{
26
buf: gopacket.NewSerializeBuffer(),
27
}
28
}
29
30
func
(e *Encoder) Encode(packet Packet) (RawPacket, error) {
31
encodedLayers, err := packet.EncodeLayers()
Callers
15
NewPacketRouter
Function · 0.92
nextPacket
Method · 0.92
TestFunnelIdleTimeout
Function · 0.92
TestReuseFunnel
Function · 0.92
testICMPRouterEcho
Function · 0.92
TestTraceICMPRouterEcho
Function · 0.92
TestConcurrentRequestsToSameDst
Function · 0.92
testICMPRouterRejectNotEcho
Function · 0.92
assertTTLExceed
Function · 0.92
testDatagram
Function · 0.92
newICMPDatagram
Function · 0.92
NewDatagramConn
Function · 0.92
Calls
no outgoing calls
Tested by
13
TestFunnelIdleTimeout
Function · 0.74
TestReuseFunnel
Function · 0.74
testICMPRouterEcho
Function · 0.74
TestTraceICMPRouterEcho
Function · 0.74
TestConcurrentRequestsToSameDst
Function · 0.74
testICMPRouterRejectNotEcho
Function · 0.74
assertTTLExceed
Function · 0.74
testDatagram
Function · 0.74
newICMPDatagram
Function · 0.74
assertTTLExceedPacket
Function · 0.68
TestChecksum
Function · 0.68
TestDecodeIP
Function · 0.68