From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Clubley Newsgroups: comp.lang.ada Subject: Re: UDP Send gets NETWORK_IS_UNREACHABLE Date: Fri, 6 Jul 2018 18:46:39 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <10ab697c-0f8d-4896-bf4e-44d01f685139@googlegroups.com> <14e32fbe-c090-480b-8f04-d6675834efbd@googlegroups.com> <45524b25-450f-4d66-a260-ae9a94adeffd@googlegroups.com> Injection-Date: Fri, 6 Jul 2018 18:46:39 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="ac173bfdecdd1818e388dab3d7d299b7"; logging-data="17298"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//oL8jwX8UTEqtcVPJL2YIPuRvV6SGrds=" User-Agent: slrn/0.9.8.1 (VMS/Multinet) Cancel-Lock: sha1:Y8C1YWrjiRZ953M4JR6vQlhu+9A= Xref: reader02.eternal-september.org comp.lang.ada:53699 Date: 2018-07-06T18:46:39+00:00 List-Id: On 2018-07-06, Petter Fryklund wrote: > Sorry, I got all mixed up. The socket that will send is created by > getting it's IP from Get_Host_By_Name index 1. In this case > 127.0.0.1:33333. Then when we try to broadcast to 192.168.255.255 we get > the NETWORK_IS_UNREACHABLE, maybe because Linux doesn't know which > interface to use. So we need to supply the correct IP, 192.168.0.20 > somewhere in our class hierarchy, some 5 levels deep. > Are you sure that 192.168.255.255 is correct ? 192.168.x.y is by default a class C network (or maybe even smaller if CIDR is active), not a class B. As such, I wonder if 192.168.0.255 is the correct broadcast address, given the IP address you give above ? It may be possible to turn 192.168.x.y into a class B, but I have never seen it done. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world