summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/option_4rd.go
diff options
context:
space:
mode:
authorChris Koch <chrisko@google.com>2023-02-18 14:41:32 -0800
committerChris K <c@chrisko.ch>2023-02-18 23:57:24 -0800
commitb606c2152e1b91a556c42f126d5279348678682d (patch)
treea621015fb6b48c48ae4130beb49760328e15a039 /dhcpv6/option_4rd.go
parent573052511f5790667b95f4a801f7ed0680a66a83 (diff)
Recursive pretty-printing with indentation
Signed-off-by: Chris Koch <chrisko@google.com>
Diffstat (limited to 'dhcpv6/option_4rd.go')
-rw-r--r--dhcpv6/option_4rd.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/dhcpv6/option_4rd.go b/dhcpv6/option_4rd.go
index 317f13a..2faea25 100644
--- a/dhcpv6/option_4rd.go
+++ b/dhcpv6/option_4rd.go
@@ -27,6 +27,11 @@ func (op *Opt4RD) String() string {
return fmt.Sprintf("%s: {Options=%v}", op.Code(), op.Options)
}
+// LongString returns a multi-line human-readable representation of the option
+func (op *Opt4RD) LongString(indentSpace int) string {
+ return fmt.Sprintf("%s: Options=%v", op.Code(), op.Options.LongString(indentSpace))
+}
+
// ParseOpt4RD builds an Opt4RD structure from a sequence of bytes.
// The input data does not include option code and length bytes
func ParseOpt4RD(data []byte) (*Opt4RD, error) {