diff options
author | Chris Koch <chrisko@google.com> | 2023-02-18 14:41:32 -0800 |
---|---|---|
committer | Chris K <c@chrisko.ch> | 2023-02-18 23:57:24 -0800 |
commit | b606c2152e1b91a556c42f126d5279348678682d (patch) | |
tree | a621015fb6b48c48ae4130beb49760328e15a039 /dhcpv6/option_relaymsg.go | |
parent | 573052511f5790667b95f4a801f7ed0680a66a83 (diff) |
Recursive pretty-printing with indentation
Signed-off-by: Chris Koch <chrisko@google.com>
Diffstat (limited to 'dhcpv6/option_relaymsg.go')
-rw-r--r-- | dhcpv6/option_relaymsg.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dhcpv6/option_relaymsg.go b/dhcpv6/option_relaymsg.go index 5e1d902..216f53b 100644 --- a/dhcpv6/option_relaymsg.go +++ b/dhcpv6/option_relaymsg.go @@ -28,6 +28,11 @@ func (op *optRelayMsg) String() string { return fmt.Sprintf("%s: %v", op.Code(), op.Msg) } +// LongString returns a multi-line string representation of the relay message data. +func (op *optRelayMsg) LongString(indent int) string { + return fmt.Sprintf("%s: %v", op.Code(), op.Msg.LongString(indent)) +} + // build an optRelayMsg structure from a sequence of bytes. // The input data does not include option code and length bytes. func parseOptRelayMsg(data []byte) (*optRelayMsg, error) { |