Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Feb 2000 18:01:13 -0800 (PST)
From:      dhesi@rahul.net (Rahul Dhesi)
To:        freebsd-stable@freebsd.org
Subject:   Re: divert(4) non-working code example
Message-ID:  <20000301020113.1767999DFA@waltz.rahul.net>
References:  <freebsd-stable.20000228165005.A7247@relay.ucb.crimea.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Ruslan Ermilov <ru@ucb.crimea.ua> writes:

>> 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.

I see now that natd does use htons().

However, natd does the conversion between host order and network order
in places that are far away from the actual assignment to and from
fields in a socket structure.  Hard to follow and easy to miss.
-- 
Rahul Dhesi <dhesi@email.rahul.net> (spam-filtered with RSS and ORBS)
   See my ORBS faq:
      http://www.rahul.net/dhesi/orbs.faq.txt


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000301020113.1767999DFA>