From 12d9cf6fabb53d18da3602564f45ff6fbbf032d6 Mon Sep 17 00:00:00 2001 From: Googler Date: Tue, 26 Feb 2019 14:57:27 -0800 Subject: Adds a WriteRawPacket method to the InjectableLinkEndpoint interface. Also exposes ipv4.MaxTotalSize since it is a generally useful constant. PiperOrigin-RevId: 235799755 Change-Id: I1fa8d5294bf355acf5527cfdf274b3687d3c8b13 --- pkg/tcpip/stack/registration.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkg/tcpip/stack') diff --git a/pkg/tcpip/stack/registration.go b/pkg/tcpip/stack/registration.go index 010d51886..5accffa1b 100644 --- a/pkg/tcpip/stack/registration.go +++ b/pkg/tcpip/stack/registration.go @@ -260,6 +260,11 @@ type InjectableLinkEndpoint interface { // Inject injects an inbound packet. Inject(protocol tcpip.NetworkProtocolNumber, vv buffer.VectorisedView) + + // WriteRawPacket writes a fully formed outbound packet directly to the link. + // + // dest is used by endpoints with multiple raw destinations. + WriteRawPacket(dest tcpip.Address, packet []byte) *tcpip.Error } // A LinkAddressResolver is an extension to a NetworkProtocol that -- cgit v1.2.3