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

  • Next message: Jonathan Feally: "Re: gateway/firewall script"
    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"
    

  • Next message: Jonathan Feally: "Re: gateway/firewall script"

    Relevant Pages

    • Re: school bully is a teacher.
      ... I do *not* have zero respect ... large amounts of disruption, because the teacher is a stranger, and ... that will occupy them for the whole lesson, ... prison is in the background as the ultimate threat. ...
      (uk.legal)
    • Re: Need to remove a ghost file, but cant because it doesnt exist
      ... just not removed from the disk until it was closed. ... The directory entry is deleted and the link count is decremented when the ... so this does not bring it to zero. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: Need to remove a ghost file, but cant because it doesnt exist
      ... just not removed from the disk until it was closed. ... The directory entry is deleted and the link count is decremented when the ... so this does not bring it to zero. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: Why do I bother?
      ... sequence that was not 6-bit pure and the 7-bit was ... always zero. ... I have ordered an installation set for 3.1 to see if ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • sar output : cpu idle time
      ... The output of sar shows cpu idle% to be zero when top ... Download and play hundreds of games for free on Yahoo! ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)