DHCPv4+Debug: add RawData method and improve Logging semantics with configured logger instead of default

This commit is contained in:
Patricio Whittingslow
2026-07-25 11:40:34 -03:00
parent 8873b55e5d
commit a9c9b76de7
4 changed files with 332 additions and 3 deletions
+3
View File
@@ -44,6 +44,9 @@ type Frame struct {
buf []byte
}
// RawData returns the underlying frame buffer.
func (frm Frame) RawData() []byte { return frm.buf }
// OptionsPayload returns the options portion of the DHCP frame. May be zero lengthed.
func (frm Frame) OptionsPayload() []byte {
return frm.buf[OptionsOffset:]