Date: Tue, 07 Jun 2005 11:27:39 -0400 From: Christian Kuhtz <christian@kuhtz.com> To: freebsd-net@freebsd.org Subject: divert sock api q Message-ID: <42A5BCEB.8020109@kuhtz.com> In-Reply-To: <mailman.991.1118157499.80553.freebsd-net@freebsd.org> References: <mailman.991.1118157499.80553.freebsd-net@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello, 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. Anyone have any idea what's going on here and how to fix this length mismatch? I thought the API updates the length when the frame is sent, and sendto() does report the correct length.. I apologize for being so exceptionally dense, this is driving me completely up the walls.. Regards, Christian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42A5BCEB.8020109>