MCPcopy
hub / github.com/cloudflare/cloudflared / PacketRouter

Struct PacketRouter

ingress/packet_router.go:24–31  ·  view source on GitHub ↗

PacketRouter routes packets between Upstream and ICMPRouter. Currently it rejects all other type of ICMP packets

Source from the content-addressed store, hash-verified

22
23// PacketRouter routes packets between Upstream and ICMPRouter. Currently it rejects all other type of ICMP packets
24type PacketRouter struct {
25 icmpRouter ICMPRouter
26 muxer muxer
27 connIndex uint8
28 logger *zerolog.Logger
29 encoder *packet.Encoder
30 decoder *packet.ICMPDecoder
31}
32
33// NewPacketRouter creates a PacketRouter that handles ICMP packets. Packets are read from muxer but dropped if globalConfig is nil.
34func NewPacketRouter(icmpRouter ICMPRouter, muxer muxer, connIndex uint8, logger *zerolog.Logger) *PacketRouter {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected