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

Python Raw Socket cannot recieve ICMP messages; show up in Wireshark

I am trying to implement a python traceroute that sends UDP messages and receives the ICMP responses via raw sockets. I've run into an issue where the ICMP packets seem to avoid capture at all cost. The ICMP responses show up in wireshark as exactly…
mao47
  • 967
  • 10
  • 25
2
votes
1 answer

What type of network traffic does not use Winsock in Windows?

I am developing some low-level stuff (LSP) and found out, that SMB traffic does not go through LSP, because SMB does not use Winsock. There is a paragraph in MSDN about it, but this is in part of MSDN dedicated to Windows CE. So, is there any…
smok1
  • 2,940
  • 26
  • 35
2
votes
1 answer

get ICMPv6 header from IPv6 packet

Hi i'm stuck on getting ICMPv6 header from IPv6 packet. size = sizeof(sockaddr_in6); if ((lenght = recvfrom(socd, buffer, BUFSIZE, 0, (sockaddr *)&receiveSockAddr, &size)) < 0) { cerr << "recvfrom error" << endl; …
Petr Přikryl
  • 1,641
  • 4
  • 22
  • 34
2
votes
2 answers

How to capture ip address using jpcap in java

Here is the code to capture the ICMP packets and store in txt file, but the storing information is in the format of binary. Can any one please tell me, how to capture the ICMP packet's source address and size [if possible MAC address] in clear text…
Vinoth Kumar
  • 413
  • 6
  • 18
2
votes
1 answer

buggy behaviour in Scapy

I use Scapy's function send to send data packets that will generate ICMP packets at routers and dump those ICMP packets with tcpdump, launched as a child process. Then, I will read those ICMP packets back into my program with scapy's built-in rdpcap…
Ricky Robinson
  • 21,798
  • 42
  • 129
  • 185
2
votes
2 answers

scapy: Correct method to modify TTL of sniffed traffic

I'm playing around with Scapy and I noticed something weird. If I create a packet in order to trigger an ICMP time-exceeded error message: myPacket = IP(dst="www.google.com", ttl=3)/TCP() ... I do get the ICMP message once I send it with the…
Ricky Robinson
  • 21,798
  • 42
  • 129
  • 185
1
vote
0 answers

How to determine the process which is sending out icmp ping request under windows

By WireSharking the network traffic, I'm finding out my PC is sending out ICMP echo request to a suspicious ip address while I'm not running ping.exe explicitly. There must be some process doing this. And I want to find it out. I've looked at the…
vivimice
  • 496
  • 8
  • 9
1
vote
1 answer

Twisted and ICMP (txNetTools)

Several times I've seen mention that for asynchronous ping is good to use twisted. I written implementation on threads (like Ping a site in Python?) But on ~200 threads i have crush On page http://twistedmatrix.com/trac/wiki/ProjectsUsingTwisted i…
Echeg
  • 2,321
  • 2
  • 21
  • 26
1
vote
2 answers

C# Raw socket Receiving packets

Currently trying to implement a simple ping program to teach myself about network programming in C# and .NET. I have managed to initialize a raw socket and correctly build an ICMP echo request packet. When running my program, Wireshark confirms that…
Mr. Spice
  • 1,552
  • 1
  • 15
  • 15
1
vote
1 answer

Mac network ping source code compile error

I download the Mac OS network ping source code from Apple: http://www.opensource.apple.com/tarballs/network_cmds/network_cmds-356.8.tar.gz and compile it in xcode, but get errors in both 10.7 and 10.6, 'IP_NO_IFT_CELLULAR' undeclared (first use in…
timy
  • 501
  • 1
  • 6
  • 17
1
vote
1 answer

Replies to Ping broadcast

I'm writing a program in .NET c++. I'm sending a broadcast ping on my local network. All of my target devices are able to respond to a ping broadcast, and indeed i track all of their responses in Wireshark. My goal is to retrieve IP addresses of all…
psidemus
  • 63
  • 1
  • 5
1
vote
1 answer

ICMP / PING "Server" in Ruby

Is it possible to write an ICMP Server in Ruby? If we install this server let's say on 192.168.1.4 and a m/c on 192.168.1.6 pings 192.168.1.4 then the Custom Ruby ICMP server would send the response and not the built in ICMP Server.
Vijay
  • 21
  • 2
1
vote
2 answers

Compiling icmp related codes under cygwin (missing "icmp" struct)

I'm using cygwin to compile a network tool(iffinder). After ./configure and make i have a problem that i guess is related to struct icmp. Where is the icmp struct in header files. I searched for it in cygwin header files, but i didn't find…
masoud
  • 55,379
  • 16
  • 141
  • 208
1
vote
1 answer

Get data from ICMP package

Could you tell me please, get more detailed information about the ICMP packet? Right now I'm using some code construction: import scapy.layers.inet from scapy.all import * def gettingDataFromICMPTraffic(pkt): if…
Alex Rebell
  • 465
  • 3
  • 15
1
vote
1 answer

recv() doesn't give SOCKET_ERROR when ICMP port unreachable comes

Platform Winows 11 What I want to do I'm writing a UDP ping tool by using rfc1122 - 3.2.2.1 Destination Unreachable, which is the same method as traceroute UDP mode on Linux. Here is the procedure: Send UDP packet to target host The target host…
Defn_Lee
  • 21
  • 1
  • 5