Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 May 2005 22:35:48 +1000 (EST)
From:      Neo-Vortex <root@Neo-Vortex.net>
To:        shiner chen <shiner_chen@yahoo.com.cn>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: the error connection of socket in kernel(new)
Message-ID:  <20050531223353.T88620@Neo-Vortex.net>
In-Reply-To: <20050531075739.38574.qmail@web15501.mail.cnb.yahoo.com>
References:  <20050531075739.38574.qmail@web15501.mail.cnb.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Tue, 31 May 2005, shiner chen wrote:

>        sa_in.sin_port = htons(21);
>        /*this is my computer ip:172.19.11.8*/
>        sa_in.sin_addr.s_addr = htonl((((((172 << 8) | 19) << 8) | 11) << 8) | 48);

Can't help much with your question, but that last line quoted could be
made much simpler (and less prone to errors) by using the inet_addr()
function... half asleep at the moment... will re-look over your actual
question later :)

~Neo-Vortex



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