pcap: add subfield formatting

This commit is contained in:
Patricio Whittingslow
2026-01-26 10:30:45 -03:00
parent 4cffe26c30
commit e8afc09a73
4 changed files with 206 additions and 22 deletions
+1 -1
View File
@@ -122,7 +122,7 @@ func (frm Frame) ClearHeader() {
// ForEachOption iterates over all DHCPv4 options returning an error on a malformed option or when user provided callback returns an error.
// If the user provided callback is nil then only option buffer validation is performed.
func (frm Frame) ForEachOption(fn func(off int, op OptNum, data []byte) error) error {
func (frm Frame) ForEachOption(fn func(off int, opt OptNum, data []byte) error) error {
// Parse DHCP options.
ptr := OptionsOffset
if ptr > len(frm.buf) {