Re: UDP connect: Can't assign requested address or "how to determine the outgoing IP address?"
From: Edwin Groothuis (edwin_at_mavetju.org)
Date: 10/23/03
- Previous message: Lev Walkin: "Re: UDP connect: Can't assign requested address or "how todetermine the outgoing IP address?""
- In reply to: Lev Walkin: "Re: UDP connect: Can't assign requested address or "how todetermine the outgoing IP address?""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Oct 2003 13:06:00 +1000 To: Lev Walkin <vlm@netli.com>
On Wed, Oct 22, 2003 at 07:53:10PM -0700, Lev Walkin wrote:
> Everything's fine apart from one thing: connect() does not like to
> connect to places with destination port equal to zero.
> /*
> * This will do. Note that it assumes AF_INET.
> */
> ((struct sockaddr_in *)res->ai_addr)->sin_port = htons(80);
Many many many thanks for this! You're a champ!
Edwin, will never forgot this lesson.
-- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://www.mavetju.org/weblog/weblog.php _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
- Previous message: Lev Walkin: "Re: UDP connect: Can't assign requested address or "how todetermine the outgoing IP address?""
- In reply to: Lev Walkin: "Re: UDP connect: Can't assign requested address or "how todetermine the outgoing IP address?""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|