comp.lang.ada
 help / color / mirror / Atom feed
From: douty.chris@gmail.com
Subject: Re: Broadcasting UDP
Date: Fri, 29 Apr 2016 16:35:32 -0700 (PDT)
Date: 2016-04-29T16:35:32-07:00	[thread overview]
Message-ID: <d95757f8-572d-4f79-b790-702865c7b2bc@googlegroups.com> (raw)
In-Reply-To: <276b8c43-7280-48ad-94be-c8324c6ae326@googlegroups.com>

On Sunday, April 24, 2016 at 9:31:49 AM UTC-7, ahlan.m...@gmail.com wrote:
[cut]
> If there is no Ada way of iterating over the ethernet adapters then I will have to do a separate implementation for each platform.
> In which case I would be grateful if anyone could tell me how I can iterate my adapters under Linux and OSX.
> 
> Best wishes,
> Ahlan

Dmitry and other have shown you good code, but networking in general and your requirement in particular are inherently platform-specific. You will need to consult your target OS documentation to learn how to discover available network interfaces. You might create some generic Ada wrapper over this, but each OS will have its own method of enumerating interfaces.

Honestly I don't remember how to do it on Linux. Take a look at SIOCGIFCONF in the netdevice(7) man page on Linux or netintro(4) man page on OS X. I don't have a Windows machine.

Good luck,
Chris


      parent reply	other threads:[~2016-04-29 23:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-24 16:31 Broadcasting UDP ahlan.marriott
2016-04-24 17:22 ` Dmitry A. Kazakov
2016-04-25 14:18   ` ahlan
2016-04-25 14:51     ` Dmitry A. Kazakov
2016-04-25 17:11       ` ahlan.marriott
2016-04-26 16:21         ` ahlan
2016-04-29 23:35 ` douty.chris [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox