[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: the error connection of socket in kernel(new)
From:       Neo-Vortex <root () Neo-Vortex ! net>
Date:       2005-05-31 12:35:48
Message-ID: 20050531223353.T88620 () Neo-Vortex ! net
[Download RAW message or body]



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
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic