summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/bsdp
diff options
context:
space:
mode:
authorSean Karlage <skarlage@fb.com>2018-10-01 09:26:25 -0700
committerSean Karlage <skarlage@fb.com>2018-10-01 09:26:25 -0700
commitba3b7482ed35104b7a7d0d55eab3df02762a8aad (patch)
tree1b05f2f64e31e08ae79c64e7182caceffb571f46 /dhcpv4/bsdp
parentfafee2841d9aa4218f5de9506d45b1255ded393b (diff)
add comment
Diffstat (limited to 'dhcpv4/bsdp')
-rw-r--r--dhcpv4/bsdp/bsdp.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/dhcpv4/bsdp/bsdp.go b/dhcpv4/bsdp/bsdp.go
index 8c843d3..172399b 100644
--- a/dhcpv4/bsdp/bsdp.go
+++ b/dhcpv4/bsdp/bsdp.go
@@ -51,6 +51,9 @@ func needsReplyPort(replyPort uint16) bool {
return replyPort != 0 && replyPort != dhcpv4.ClientPort
}
+// MessageTypeFromPacket extracts the BSDP message type (LIST, SELECT) from the
+// vendor-specific options and returns it. If the message type option cannot be
+// found, returns false.
func MessageTypeFromPacket(packet *dhcpv4.DHCPv4) (MessageType, bool) {
var (
messageType MessageType