• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: attached gateways
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: attached gateways


  • Subject: Re: attached gateways
  • From: Dalton Hamilton <email@hidden>
  • Date: Tue, 28 Jun 2005 19:15:02 +0200

Listen, if you really want to dynamically discover all available routers in a broadcast domain then you're going to need to use the method you were heading down. You need to join the multicast group and then read from the socket. However, if you're testing, you need to make IRDP is enabled on the router -- otherwise, you'll never receive anything.....



On Jun 28, 2005, at 6:55 PM, Chase wrote:

fd = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);

Here is what the code to read from it looks like:

struct sockaddr_in from;
socklen_t len;
char buf[8192];
int result;

result = recvfrom(fd, buf, 8192, 0, (struct sockaddr *)&from, &len);

Hope this helps,


Thanks. It yields the same net effect, unfortunately.



Before I travel too far down this tangent (and drag you all with me), let me go back to the simple goal I'm trying to achieve:

My application simply needs to know the addresses of **all** of the routers attached to the computer's various networking interfaces.

For example, on my ibook, I have an airport connection to one router (192.168.0.250) and a cat5 connection to another router (192.168.1.250).

When I open system prefs, click "Network", and look at the TCP/IP section of Airport, I see "Router: 192.168.0.250".

When I look at the TCP/IP section for Built-in Ethernet, I see "Router: 192.168.1.250".


What is the simplest way to get that exact same information?

That's all I want.

- Chase


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: attached gateways
      • From: "Jamie Wood" <email@hidden>
References: 
 >Re: attached gateways (From: "Jamie Wood" <email@hidden>)
 >Re: attached gateways (From: Chase <email@hidden>)

  • Prev by Date: Re: attached gateways
  • Next by Date: Re: attached gateways
  • Previous by thread: Re: attached gateways
  • Next by thread: Re: attached gateways
  • Index(es):
    • Date
    • Thread