summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/waitable/waitable.go
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2019-11-14 10:14:07 -0800
committergVisor bot <gvisor-bot@google.com>2019-11-14 10:15:38 -0800
commit3f7d9370909a598cf83dfa07a1e87545a66e182f (patch)
treeb348ff082a8fabc584694b19c1d812541eb9e12b /pkg/tcpip/link/waitable/waitable.go
parent1e55eb3800a60c1a1118b84f2534b78481702f38 (diff)
Use PacketBuffers for outgoing packets.
PiperOrigin-RevId: 280455453
Diffstat (limited to 'pkg/tcpip/link/waitable/waitable.go')
-rw-r--r--pkg/tcpip/link/waitable/waitable.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/tcpip/link/waitable/waitable.go b/pkg/tcpip/link/waitable/waitable.go
index b440970e0..12e7c1932 100644
--- a/pkg/tcpip/link/waitable/waitable.go
+++ b/pkg/tcpip/link/waitable/waitable.go
@@ -99,12 +99,12 @@ func (e *Endpoint) LinkAddress() tcpip.LinkAddress {
// WritePacket implements stack.LinkEndpoint.WritePacket. It is called by
// higher-level protocols to write packets. It only forwards packets to the
// lower endpoint if Wait or WaitWrite haven't been called.
-func (e *Endpoint) WritePacket(r *stack.Route, gso *stack.GSO, hdr buffer.Prependable, payload buffer.VectorisedView, protocol tcpip.NetworkProtocolNumber) *tcpip.Error {
+func (e *Endpoint) WritePacket(r *stack.Route, gso *stack.GSO, protocol tcpip.NetworkProtocolNumber, pkt tcpip.PacketBuffer) *tcpip.Error {
if !e.writeGate.Enter() {
return nil
}
- err := e.lower.WritePacket(r, gso, hdr, payload, protocol)
+ err := e.lower.WritePacket(r, gso, protocol, pkt)
e.writeGate.Leave()
return err
}
@@ -123,12 +123,12 @@ func (e *Endpoint) WritePackets(r *stack.Route, gso *stack.GSO, hdrs []stack.Pac
}
// WriteRawPacket implements stack.LinkEndpoint.WriteRawPacket.
-func (e *Endpoint) WriteRawPacket(packet buffer.VectorisedView) *tcpip.Error {
+func (e *Endpoint) WriteRawPacket(vv buffer.VectorisedView) *tcpip.Error {
if !e.writeGate.Enter() {
return nil
}
- err := e.lower.WriteRawPacket(packet)
+ err := e.lower.WriteRawPacket(vv)
e.writeGate.Leave()
return err
}