summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/dhcpv4.go
diff options
context:
space:
mode:
authorChris Koch <chrisko@google.com>2019-06-19 08:26:31 -0700
committerinsomniac <insomniacslk@users.noreply.github.com>2019-06-19 22:56:41 +0100
commit797593413f957bdc1ac7896a3cfc99333ec1bc00 (patch)
treecd3be8150ae38cb5f45cb48ef070045c27ad319c /dhcpv4/dhcpv4.go
parent20fbc1249065b90fb5b010c5af18a321f66199ce (diff)
dhcpv4: make the short stringer more useful
Nobody gives a hoot about the hardware type. Signed-off-by: Chris Koch <chrisko@google.com>
Diffstat (limited to 'dhcpv4/dhcpv4.go')
-rw-r--r--dhcpv4/dhcpv4.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/dhcpv4/dhcpv4.go b/dhcpv4/dhcpv4.go
index 42c62cd..a6085d5 100644
--- a/dhcpv4/dhcpv4.go
+++ b/dhcpv4/dhcpv4.go
@@ -374,8 +374,8 @@ func (d *DHCPv4) UpdateOption(opt Option) {
// String implements fmt.Stringer.
func (d *DHCPv4) String() string {
- return fmt.Sprintf("DHCPv4(opcode=%s xid=%s hwtype=%s hwaddr=%s)",
- d.OpCode, d.TransactionID, d.HWType, d.ClientHWAddr)
+ return fmt.Sprintf("DHCPv4(xid=%s hwaddr=%s msg_type=%s, your_ip=%s, server_ip=%s)",
+ d.TransactionID, d.ClientHWAddr, d.MessageType(), d.YourIPAddr, d.ServerIPAddr)
}
// SummaryWithVendor prints a summary of the packet, interpreting the