diff options
Diffstat (limited to 'dhcpv4/types.go')
-rw-r--r-- | dhcpv4/types.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dhcpv4/types.go b/dhcpv4/types.go index 46ec3c6..6214dbd 100644 --- a/dhcpv4/types.go +++ b/dhcpv4/types.go @@ -13,6 +13,11 @@ import ( // The TransactionID is used to match DHCP replies to their original request. type TransactionID [4]byte +// String prints a hex transaction ID. +func (xid TransactionID) String() string { + return fmt.Sprintf("0x%x", xid[:]) +} + // MessageType represents the possible DHCP message types - DISCOVER, OFFER, etc type MessageType byte |