From fbf020d6a0258275a68573032bea225a1f5396ab Mon Sep 17 00:00:00 2001 From: Ghanan Gowripalan Date: Fri, 27 Aug 2021 11:12:08 -0700 Subject: Add LinkEndpoint.WriteRawPacket with stubs ...returning unsupported errors. PiperOrigin-RevId: 393388991 --- pkg/tcpip/network/internal/testutil/testutil.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkg/tcpip/network') diff --git a/pkg/tcpip/network/internal/testutil/testutil.go b/pkg/tcpip/network/internal/testutil/testutil.go index 605e9ef8d..4d4d98caf 100644 --- a/pkg/tcpip/network/internal/testutil/testutil.go +++ b/pkg/tcpip/network/internal/testutil/testutil.go @@ -101,6 +101,11 @@ func (*MockLinkEndpoint) ARPHardwareType() header.ARPHardwareType { return heade func (*MockLinkEndpoint) AddHeader(_, _ tcpip.LinkAddress, _ tcpip.NetworkProtocolNumber, _ *stack.PacketBuffer) { } +// WriteRawPacket implements stack.LinkEndpoint. +func (*MockLinkEndpoint) WriteRawPacket(*stack.PacketBuffer) tcpip.Error { + return &tcpip.ErrNotSupported{} +} + // MakeRandPkt generates a randomized packet. transportHeaderLength indicates // how many random bytes will be copied in the Transport Header. // extraHeaderReserveLength indicates how much extra space will be reserved for -- cgit v1.2.3