-
-
Notifications
You must be signed in to change notification settings - Fork 181
Description
In proto/network/snp.rs
the transmit
method passes the sum of the provided buffer length (buffer.len()
) plus the specified header_size
as BufferSize
to the protocol. In my small test program I can send valid packets (e.g. ARP) but on the wire I can also see additional (random) bytes being transmitted after my buffer.
With my reading of the spec then Buffer
passed to transmit
should already contain bytes for both header and body, and header_size
only indicates whether the protocol should manipulate the header before sending. With that I think the right value to pass on as BufferSize
would actually be just buffer.len()
.
However, the spec is inconsistent as it talks about "placeing the packet specified by Header and Buffer on the transmit queue" but I don't see any other mention of Header anywhere (certainly it's not a paramter for transmit
).