Date: Sun, 16 Jul 2000 12:01:14 +0100 (BST) From: Jan Grant <Jan.Grant@bristol.ac.uk> To: nimrodm@email.com Cc: freebsd-questions@freebsd.org Subject: Re: DIVERT sockets Message-ID: <Pine.GHP.4.21.0007161159100.196-100000@mail.ilrt.bris.ac.uk> In-Reply-To: <20000715184427.A1771@localhost.bsd.net.il>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 15 Jul 2000, Nimrod Mesika wrote: > In my program I use the following code (taken from natd) to receive the > packets: > > divertInOut = socket (PF_INET, SOCK_RAW, IPPROTO_DIVERT); > addr.sin_family = AF_INET; > addr.sin_addr.s_addr= INADDR_ANY; > addr.sin_port = DIVERT_PORT; I don't know what DIVERT_PORT is defined as, but you may need htons(DIVERT_PORT) (and strictly speaking, htonl(INADDR_ANY) if memory serves) - have you checked what socket the process appears to be listening on when it runs? -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287163 Fax +44 (0)117 9287112 RFC822 jan.grant@bris.ac.uk Goedel would be proud - I'm both inconsistent _and_ incomplete. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GHP.4.21.0007161159100.196-100000>