• 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: Daniel Sumorok <email@hidden>
  • Date: Tue, 28 Jun 2005 12:02:18 -0400 (EDT)

Did you check if that code catches a ping?
Also, have you tried running tcpdump to make sure your router is indeed
sending the packets you expect?

	sudo tcpdump -nnexi en0 icmp

	(replace "en0" with the interface you want to listen on)

	-Dan

On Tue, 28 Jun 2005, Chase wrote:

Scratch that last question. I've read a lot since yesterday on ICMP and that question really didn't make any sense, now that I understand a little more about it.

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

PS: Anyone know of a higher volume list where I could ask these questions? I'm practically the only poster for almost two straight days.



_______________________________________________
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
_______________________________________________
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


References: 
 >attached gateways (From: Chase <email@hidden>)
 >Re: attached gateways (From: Daniel Sumorok <email@hidden>)
 >Re: attached gateways (From: Chase <email@hidden>)
 >Re: attached gateways (From: Daniel Sumorok <email@hidden>)
 >Re: [RESOLUTION-IN-SIGHT] attached gateways (From: Chase <email@hidden>)
 >Re: attached gateways [MORE_QUESTIONS...] (From: Chase <email@hidden>)
 >Re: attached gateways [MORE_QUESTIONS...] (From: Chase <email@hidden>)
 >Re: attached gateways (From: Chase <email@hidden>)

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