summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/network
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@google.com>2018-09-14 16:38:45 -0700
committerShentubot <shentubot@google.com>2018-09-14 16:39:56 -0700
commit75c66f871b56a8f4e83dc9ccec29cf3d2c38fea4 (patch)
tree137a5e51dcc786e76bc96e34ac36be8fdb5ac304 /pkg/tcpip/network
parent3aa50f18a4102429aa40f5d0e518357ceaed2373 (diff)
Remove buffer.Prependable.UsedBytes
It is the same as buffer.Prependable.View. PiperOrigin-RevId: 213064166 Change-Id: Ib33b8a2c4da864209d9a0be0a1c113be10b520d3
Diffstat (limited to 'pkg/tcpip/network')
-rw-r--r--pkg/tcpip/network/ip_test.go4
-rw-r--r--pkg/tcpip/network/ipv6/icmp_test.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/pkg/tcpip/network/ip_test.go b/pkg/tcpip/network/ip_test.go
index b381c7214..e3c7af1f9 100644
--- a/pkg/tcpip/network/ip_test.go
+++ b/pkg/tcpip/network/ip_test.go
@@ -151,13 +151,13 @@ func (t *testObject) WritePacket(_ *stack.Route, hdr buffer.Prependable, payload
var dstAddr tcpip.Address
if t.v4 {
- h := header.IPv4(hdr.UsedBytes())
+ h := header.IPv4(hdr.View())
prot = tcpip.TransportProtocolNumber(h.Protocol())
srcAddr = h.SourceAddress()
dstAddr = h.DestinationAddress()
} else {
- h := header.IPv6(hdr.UsedBytes())
+ h := header.IPv6(hdr.View())
prot = tcpip.TransportProtocolNumber(h.NextHeader())
srcAddr = h.SourceAddress()
dstAddr = h.DestinationAddress()
diff --git a/pkg/tcpip/network/ipv6/icmp_test.go b/pkg/tcpip/network/ipv6/icmp_test.go
index c48859be3..0a0563964 100644
--- a/pkg/tcpip/network/ipv6/icmp_test.go
+++ b/pkg/tcpip/network/ipv6/icmp_test.go
@@ -187,7 +187,7 @@ func TestLinkResolution(t *testing.T) {
pkt := header.ICMPv6(hdr.Prepend(header.ICMPv6EchoMinimumSize))
pkt.SetType(header.ICMPv6EchoRequest)
pkt.SetChecksum(icmpChecksum(pkt, r.LocalAddress, r.RemoteAddress, buffer.VectorisedView{}))
- payload := tcpip.SlicePayload(hdr.UsedBytes())
+ payload := tcpip.SlicePayload(hdr.View())
// We can't send our payload directly over the route because that
// doesn't provoke NDP discovery.