mirror of
https://github.com/soypat/lneto.git
synced 2026-08-19 22:24:03 +00:00
begin adding packet capture functionality
This commit is contained in:
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user