MCPcopy Index your code
hub / github.com/google/gvisor / NetworkHeader

Method NetworkHeader

pkg/tcpip/stack/packet_buffer.go:243–248  ·  view source on GitHub ↗

NetworkHeader returns the handle to network-layer header.

()

Source from the content-addressed store, hash-verified

241
242// NetworkHeader returns the handle to network-layer header.
243func (pk *PacketBuffer) NetworkHeader() PacketHeader {
244 return PacketHeader{
245 pk: pk,
246 typ: networkHeader,
247 }
248}
249
250// TransportHeader returns the handle to transport-layer header.
251func (pk *PacketBuffer) TransportHeader() PacketHeader {

Callers 15

TestSimpleSendFunction · 0.95
testWritePacketFunction · 0.95
TestICMPInclusionSizeFunction · 0.95
TestInvalidIPv6FragmentsFunction · 0.95
handleICMPMethod · 0.95
HandlePacketMethod · 0.95
sendARPRequestMethod · 0.95
makeIPv4PacketFunction · 0.95
makeIPv6PacketFunction · 0.95

Calls

no outgoing calls

Tested by 15

TestSimpleSendFunction · 0.76
testWritePacketFunction · 0.76
TestICMPInclusionSizeFunction · 0.76
TestInvalidIPv6FragmentsFunction · 0.76
makeIPv4PacketFunction · 0.76
makeIPv6PacketFunction · 0.76
genTCPPacketFunction · 0.76