summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/header/icmpv4.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-10-28 02:35:11 +0000
committergVisor bot <gvisor-bot@google.com>2020-10-28 02:35:11 +0000
commit6b463fe2b71a6201db0abd052d964c59317e6f6e (patch)
treec389a5ce4b1281f0c29830a45adf2692eb5b6ce1 /pkg/tcpip/header/icmpv4.go
parent51a20bc178195f8b82d8edf7354ba1ce2a96fdf1 (diff)
parent035b1c8272b2a26f96bf4ad04330e04dba2f8ff6 (diff)
Merge release-20201019.0-76-g035b1c827 (automated)
Diffstat (limited to 'pkg/tcpip/header/icmpv4.go')
-rw-r--r--pkg/tcpip/header/icmpv4.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/tcpip/header/icmpv4.go b/pkg/tcpip/header/icmpv4.go
index 0f5fb3964..2f13dea6a 100644
--- a/pkg/tcpip/header/icmpv4.go
+++ b/pkg/tcpip/header/icmpv4.go
@@ -127,6 +127,12 @@ func (b ICMPv4) Code() ICMPv4Code { return ICMPv4Code(b[1]) }
// SetCode sets the ICMP code field.
func (b ICMPv4) SetCode(c ICMPv4Code) { b[1] = byte(c) }
+// Pointer returns the pointer field in a Parameter Problem packet.
+func (b ICMPv4) Pointer() byte { return b[icmpv4PointerOffset] }
+
+// SetPointer sets the pointer field in a Parameter Problem packet.
+func (b ICMPv4) SetPointer(c byte) { b[icmpv4PointerOffset] = c }
+
// Checksum is the ICMP checksum field.
func (b ICMPv4) Checksum() uint16 {
return binary.BigEndian.Uint16(b[icmpv4ChecksumOffset:])