diff options
author | Tamir Duberstein <tamird@google.com> | 2018-09-14 16:38:45 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-09-14 16:39:56 -0700 |
commit | 75c66f871b56a8f4e83dc9ccec29cf3d2c38fea4 (patch) | |
tree | 137a5e51dcc786e76bc96e34ac36be8fdb5ac304 /pkg/tcpip/link/sniffer | |
parent | 3aa50f18a4102429aa40f5d0e518357ceaed2373 (diff) |
Remove buffer.Prependable.UsedBytes
It is the same as buffer.Prependable.View.
PiperOrigin-RevId: 213064166
Change-Id: Ib33b8a2c4da864209d9a0be0a1c113be10b520d3
Diffstat (limited to 'pkg/tcpip/link/sniffer')
-rw-r--r-- | pkg/tcpip/link/sniffer/sniffer.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/link/sniffer/sniffer.go b/pkg/tcpip/link/sniffer/sniffer.go index e6ce3ee13..bfb79fd57 100644 --- a/pkg/tcpip/link/sniffer/sniffer.go +++ b/pkg/tcpip/link/sniffer/sniffer.go @@ -190,10 +190,10 @@ func (e *endpoint) LinkAddress() tcpip.LinkAddress { // the request to the lower endpoint. func (e *endpoint) WritePacket(r *stack.Route, hdr buffer.Prependable, payload buffer.VectorisedView, protocol tcpip.NetworkProtocolNumber) *tcpip.Error { if atomic.LoadUint32(&LogPackets) == 1 && e.file == nil { - logPacket("send", protocol, hdr.UsedBytes()) + logPacket("send", protocol, hdr.View()) } if e.file != nil && atomic.LoadUint32(&LogPacketsToFile) == 1 { - hdrBuf := hdr.UsedBytes() + hdrBuf := hdr.View() length := len(hdrBuf) + payload.Size() if length > int(e.maxPCAPLen) { length = int(e.maxPCAPLen) |