Hi again,
What I have done so far is to use the natd daemon as an example but I have a
problem. The divert seems to work but the problem is that I can´t get the
packets in my userspace program. Is there some specific port that I should
use for the divert socket? This is not very clear in the natd code. I can´t
find where the port is set and if it is a special port reserved for the
divert sockets.
<< Urban
> -----Original Message-----
> From: Bjoern Fischer [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 3:31 PM
> To: Urban Olsson
> Cc: [EMAIL PROTECTED]
> Subject: Re: modified FreeBSD gateway
>
>
> Hello Urban,
>
> > I have a question regarding modification of a FreeBSD
> gateway (the Internet
> > gateway for a LAN). What I want to do is to have the
> gateway pick up the
> > packets, modify the IP-header and resend the packet onto
> the network. This
> > is a little bit like a NAT but I want to be able to do it
> differently and on
> > my own terms. I guess that this means that I would be
> forced to rewrite the
> > gateway source-code so it behaves as I want it to.
>
> You can do this entirely in userspace. All you need is a
> divert socket.
> See the manpage divert(4).
>
> Björn Fischer
>
> --
> -----BEGIN GEEK CODE BLOCK-----
> GCS d--(+) s++: a- C+++(-) UB++++OSI++++$ P+++(-) L---(++) !E
> W- N+ o>+
> K- !w !O !M !V PS++ PE- PGP++ t+++ !5 X++ tv- b+++ D++ G
> e+ h-- y+
> ------END GEEK CODE BLOCK------
>
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message