• 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
ICMP Router Discovery
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ICMP Router Discovery


  • Subject: ICMP Router Discovery
  • From: Chase <email@hidden>
  • Date: Tue, 28 Jun 2005 10:58:42 -0500

[This is a cross-post. It was originally posted on the macnetworkprog list, but it's been VERY quiet for a few days, so I'm hoping for a little more activity on this list.]

I'm trying to learn about ICMP Router Discovery...

But, this little code snippet I found in an online tutorial isn't catching any ICMP packets:

int main() {
    char buffer[8192];
    int fd = socket (PF_INET, SOCK_RAW, IPPROTO_ICMP);
    printf("\nHere we go...\n");
    while (read (fd, buffer, 8192) > 0) {
        printf("Caught ICMP Packet\n");
    }
    return 0;
}


It compiles and runs fine, but never catches anything. It just sits on the read() line, waiting indefinitely.


I tried unplugging/replugging routers to force them to send ICMP router advertisements, but still nothing shows up.

Any ideas?

Thanks.

- Chase

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


  • Follow-Ups:
    • Re: ICMP Router Discovery
      • From: "Justin C. Walker" <email@hidden>
  • Prev by Date: Re: we were opensource, once
  • Next by Date: Re: ICMP Router Discovery
  • Previous by thread: access to IOFrameBuffer
  • Next by thread: Re: ICMP Router Discovery
  • Index(es):
    • Date
    • Thread