summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/buffer
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-02-21 23:46:09 +0000
committergVisor bot <gvisor-bot@google.com>2020-02-21 23:46:09 +0000
commitc9bfc173aa5b829cb52b25008a9550d3469c86e8 (patch)
tree8909aa286658b57fcbd8b4445d3e1054036f4595 /pkg/tcpip/buffer
parent3385b688b8f2fd91fba4b1956e7d7b1c5925d842 (diff)
parentb8f56c79be40d9c75f4e2f279c9d821d1c1c3569 (diff)
Merge release-20200211.0-65-gb8f56c7 (automated)
Diffstat (limited to 'pkg/tcpip/buffer')
-rw-r--r--pkg/tcpip/buffer/view.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/tcpip/buffer/view.go b/pkg/tcpip/buffer/view.go
index 150310c11..17e94c562 100644
--- a/pkg/tcpip/buffer/view.go
+++ b/pkg/tcpip/buffer/view.go
@@ -156,3 +156,9 @@ func (vv *VectorisedView) Append(vv2 VectorisedView) {
vv.views = append(vv.views, vv2.views...)
vv.size += vv2.size
}
+
+// AppendView appends the given view into this vectorised view.
+func (vv *VectorisedView) AppendView(v View) {
+ vv.views = append(vv.views, v)
+ vv.size += len(v)
+}