begin adding packet capture functionality

This commit is contained in:
soypat
2025-06-01 13:04:43 -03:00
parent a29bad9ac9
commit 55bc765d92
4 changed files with 428 additions and 2 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ func (tfrm Frame) SetOffsetAndFlags(offset uint8, flags Flags) {
// HeaderLength uses Offset field to calculate the total length of
// the TCP header including options. Performs no validation.
func (tfrm Frame) HeaderLength() (tcpWords int) {
func (tfrm Frame) HeaderLength() (lengthInBytes int) {
offset, _ := tfrm.OffsetAndFlags()
return 4 * int(offset)
}