MCPcopy 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
24func NewEncoder() *Encoder {
25 return &Encoder{
26 buf: gopacket.NewSerializeBuffer(),
27 }
28}
29
30func (e *Encoder) Encode(packet Packet) (RawPacket, error) {
31 encodedLayers, err := packet.EncodeLayers()

Callers 15

NewPacketRouterFunction · 0.92
nextPacketMethod · 0.92
TestFunnelIdleTimeoutFunction · 0.92
TestReuseFunnelFunction · 0.92
testICMPRouterEchoFunction · 0.92
TestTraceICMPRouterEchoFunction · 0.92
assertTTLExceedFunction · 0.92
testDatagramFunction · 0.92
newICMPDatagramFunction · 0.92
NewDatagramConnFunction · 0.92

Calls

no outgoing calls

Tested by 13

TestFunnelIdleTimeoutFunction · 0.74
TestReuseFunnelFunction · 0.74
testICMPRouterEchoFunction · 0.74
TestTraceICMPRouterEchoFunction · 0.74
assertTTLExceedFunction · 0.74
testDatagramFunction · 0.74
newICMPDatagramFunction · 0.74
assertTTLExceedPacketFunction · 0.68
TestChecksumFunction · 0.68
TestDecodeIPFunction · 0.68