Questions tagged [icmp]

Internet Control Message Protocol, designed for control and diagnostic messages. Used by common diagnostic tools like ping or traceroute.

583 questions
2
votes
1 answer

How to fetch address mask with ICMP

RFC 950, page 11: A gateway receiving an address mask request should return it with the address mask field set to the 32-bit mask of the bits identifying the subnet and network, for the subnet on which the request was received. I want to fetch…
hel
  • 581
  • 10
  • 26
2
votes
1 answer

Should I close a handle with IcmpCloseHandle?

I try to write a ping thread searching for connected devices to a local network. I need to avoid indy because it works on an administration account in windows. I translated c++ example of msdn. Should I use IcmpCloseHandle? If so why should I close…
JO SeongGng
  • 567
  • 3
  • 18
2
votes
1 answer

Arduino Pinging an IP

I'm trying to make and arduino project that pings a static ip for my phone and up receiving a response, opens my door. I've managed to a library (available here) that allows for this, but it, along with the default ethernet library are both based on…
Snicfn711
  • 151
  • 1
  • 7
2
votes
3 answers

Java: Threads won't ping at the same time

I'm writing a simple network surviliance tool in Java. It basicly just has to ping a variable address range and save the answers in a database. At first, I used the java.net library, but since it just uses an echo command, printers, routers and some…
Sebowski
  • 37
  • 2
2
votes
2 answers

How to check return packet contents in ICMP Ping / Echo?

When validating ping echo's, it seems that utilities / libraries often only check the checksum of the packet, and don't actually confirm that the payload sent out matches the payload that was returned. For instance, Wireshark's ICMP parser only…
HanClinto
  • 9,423
  • 3
  • 30
  • 31
2
votes
1 answer

simple icmp traceroute implementation in C

OK, so I tried to write a simple ICMP traceroute using materials from my lecturer which were echo_request and icmp_receive programs which I wanted to merge to achieve my goal but it kind of doesn't work. You can see code of these programs and…
Octothorp
  • 135
  • 1
  • 13
2
votes
0 answers

Getting ICMP message content at application level via unprivileged sockets

Is it possible to obtain the content of received ICMP messages via unprivileged sockets on Linux systems ? I'm interested in knowing if it is possible to do so with UDP DGRAM sockets, TCP STREAM sockets and/or ICMP DGRAM sockets. TCP sockets I…
jean-loup
  • 580
  • 4
  • 17
2
votes
1 answer

ICMP pinger application in Python - error: operation not permitted?

I am trying to run this ICMP pinger application (Python 2.7). It is giving me this error message. Traceback (most recent call last): line 125, in ping("www.poly.edu") line 120, in ping delay = doOnePing(dest, timeout) line 104, in…
Braithe Warnock
  • 37
  • 1
  • 10
2
votes
2 answers

ping and arp for ios development

Hello I'm an ios developer, and I'm trying to programming network socket program. First I'm trying to find a way for get arp table, and icmp action such as a ping. I found many of good network scanners at apple appstores, but I really don't know…
2
votes
2 answers

cannot access AWS redshift (EC2-classic) from SQL workbench in local computer despite all open Security Group

This question is NOT the same as: AWS EC2 and Redshift Security group connection error i am trying to access my RedShift (using EC2-classic and not using VPC) from SQL workbench in my local computer. The EC2 security group used in my redshift…
Rakib
  • 12,376
  • 16
  • 77
  • 113
2
votes
2 answers

Should I write id to icmphdr id field when using icmp sockets?

I'm writing simple program that sends icmp echo requests. I'm using ping sockets (to be able to send without suid). This is how i open the socket: int fd=socket(PF_INET,SOCK_DGRAM,IPPROTO_ICMP); And this is how i construct icmp datagram: struct…
cereal
  • 23
  • 4
2
votes
0 answers

implement ICMP with C#

I have written a program about ICMP protcol,which implements the PING command.Though everything runs well,i still have some questions. There are two variables.One is "ep" which is an object of EndPoint class and the other is "iep" which is an…
Dean Ding
  • 21
  • 3
2
votes
0 answers

Python; Pinging a /24; works in winXP but in win7 requests are delayed for 3 seconds randomly

Edit: Added new information below. I am using the attached ping.py to send ICMP echo requests to a /24 subnet I am part of. I am doing this so that a ARP resolution request will be sent for each host and those which are alive will show up as valid…
pteek
  • 43
  • 4
2
votes
4 answers

C sockets send UDP and process ICMP reply from router

I'm trying to send a UDP packet to a router with a time to live of 1, to then receive an ICMP time exceeded reply. So far I'm able to send the packet, but when my program gets to the recv part of the execution, it just hangs. I have an error check…
Hugo
  • 2,186
  • 8
  • 28
  • 44
2
votes
0 answers

C sockets listen for ICMP Time Exceeded packets

I'm trying to listen for ICMP Time Exceeded packets from nodes for which I don't know the IP address. After looking at some code online I've seen people supplying NULL for the last two parameters of recvfrom(), so I tried it: if…
Hugo
  • 2,186
  • 8
  • 28
  • 44