divert sock api q
Giorgos Keramidas
keramida at freebsd.org
Tue Jun 7 22:17:27 GMT 2005
On 2005-06-07 11:27, Christian Kuhtz <christian at kuhtz.com> wrote:
> I'm using the DIVERT socket API for a proof of concept lab setup here,
> and I could use some help..
>
> Two boxes are involved, packets traverse both in series. The first one,
> lets call her A, is taking the UDP packet off the wire, inserts a few
> bytes after the UDP header, and sticks it back on the wire. The second
> machine, lets call her B, grabs the packet as it comes in, strips the
> bytes we inserted, and sticks it back on the wire.
>
> Or so goes the theory.
>
> What I'm running into is the following.. When I sendto() the modified
> frame on A, the size is correctly reported as what the frame was
> modified to be. When the frame arrives on B, I only recvfrom() as many
> bytes as the virgin packet used to be when it entered A prior to the
> modification.
Maybe this is a silly question, as it's been a long while since I last
worked with DUMMYNET, but are you also updating the IP header ip_len?
More information about the freebsd-net
mailing list