MCPcopy Create free account
hub / github.com/danderson/netboot / String

Method String

dhcp4/packet.go:44–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42)
43
44func (mt MessageType) String() string {
45 switch mt {
46 case MsgDiscover:
47 return "DHCPDISCOVER"
48 case MsgOffer:
49 return "DHCPOFFER"
50 case MsgRequest:
51 return "DHCPREQUEST"
52 case MsgDecline:
53 return "DHCPDECLINE"
54 case MsgAck:
55 return "DHCPACK"
56 case MsgNack:
57 return "DHCPNAK"
58 case MsgRelease:
59 return "DHCPRELEASE"
60 case MsgInform:
61 return "DHCPINFORM"
62 default:
63 return fmt.Sprintf("<unknown DHCP message type %d>", mt)
64 }
65}
66
67// Packet represents a DHCP packet.
68type Packet struct {

Callers 1

DebugStringMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected