From owner-freebsd-stable Mon Feb 28 6:50:38 2000 Delivered-To: freebsd-stable@freebsd.org Received: from relay.ucb.crimea.ua (UCB-Async4-CRISCO.CRIS.NET [212.110.129.130]) by hub.freebsd.org (Postfix) with ESMTP id ED1E837B875 for ; Mon, 28 Feb 2000 06:50:29 -0800 (PST) (envelope-from ru@ucb.crimea.ua) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.9.3/8.9.3/UCB) id QAA12460; Mon, 28 Feb 2000 16:50:05 +0200 (EET) (envelope-from ru) Date: Mon, 28 Feb 2000 16:50:05 +0200 From: Ruslan Ermilov To: Rahul Dhesi Cc: freebsd-stable@FreeBSD.ORG Subject: Re: divert(4) non-working code example Message-ID: <20000228165005.A7247@relay.ucb.crimea.ua> Mail-Followup-To: Rahul Dhesi , freebsd-stable@FreeBSD.ORG References: <20000228140450.4471C99DE4@waltz.rahul.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: <20000228140450.4471C99DE4@waltz.rahul.net>; from Rahul Dhesi on Mon, Feb 28, 2000 at 06:04:49AM -0800 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Feb 28, 2000 at 06:04:49AM -0800, Rahul Dhesi wrote: > I wrote: > > > The following is a relatively simple program that should read and write > > divert-ed packets, without modifying them. But it never returns from the > > recvfrom() system call. Any suggestions? > > Never mind! I searched old mailing list archives and found that > I needed to do htons(port). What threw me off was that I was > consulting the natd(8) sources and they didn't bother doing so. > Why do you spread such misinformation? See StrToPort() function in natd(8) sources. -- Ruslan Ermilov Sysadmin and DBA of the ru@ucb.crimea.ua United Commercial Bank, ru@FreeBSD.org FreeBSD committer, +380.652.247.647 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message