icmp

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 checks for bad checksums, and that's all that Ruby's net-ruby checks as well. I'm debugging ...

Listen for ICMP packets in C#

I have a SIP application that needs to send UDP packets to set up the SIP calls. SIP has a timeout mechanism to cope with delivery failures. An additional thing I would like to be able to do is detect whether a UDP socket is closed in order having to wait the 32s retransmit interval SIP uses. The cases I am referring to are when an atte...

Receiving an ICMP packet in the context of a service on 2008

When we send a packet from a udp port we receive an exception if the network returns an ICMP host unreachable. The exception doesn't tell us anything useful (like the contents of the ICMP packet). No problem, we'll just listen for ICMP and that will give us the info we need, while ignoring the exception on the UDP port. So, open a raw s...

ICMP in C#, SocketException - Forbidden by access permissions

Hello, I'm trying to get the ICMP code found here to work. However on this line: Socket = new System.Net.Sockets.Socket(System.Net.Sockets.AddressFamily.InterNetwork, System.Net.Sockets.SocketType.Raw, System.Net.Sockets.ProtocolType.Icmp); I get SocketExcep...

Receiving Data on an ICMP socket

When receiving on an ICMP socket, (SOCK_RAW with IPPROTO_ICMP), since there is no concept of "port" in the ICMP protocol, how can an application determine that a received packet is not part of some other TCP/UDP/whatever socket transmission that is also happening at the same time? For example, suppose you have an application with 2 thre...

python non-privileged ICMP

While trying to figure out the best method to ping (ICMP) something from python, I came across these questions: How can I perform a ping or traceroute in python, accessing the output as it is produced? ping a site in python How can I perform a ping or traceroute using native python? The answers generally boil down to "use this third ...

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 comprehend list of whole traffic that does not go through Winsock? MSDN is bit messy about that....

Smart methods for an Embedded Linux device to detect Internet connectivity

Our team is developing a Internet Media device based on Linux 2.6. Currently we detect whether Internet connectivity is established (via a wired Ethernet i/f) by pinging www.google.com Some networks we have tested the device on do not support ICMP packet forwarding so our application code mistakenly reports the Internet as unavailable ...

C# Socket and ICMP

Hello. I'd like to know how to use sockets in .NET3.5 to send ICMP request. When I try to create my socket using this line : Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.Icmp); It doesn't works and send me an error (SocketException). Does anyone know how to do this using sockets? Thanks ...

Measuring network performance tool in c#

Dear community. I am about to develop a Network measurement tool. The objective is to make a tool, which can measure the responsetime in between a client and a server machine (from the client side). It is s side-application to a main application - If the main applicaiton experiences that the responsetime from the server is above a certa...

IcmpSendEcho and setting MTU size ?

Does anyone know if its possible to adjust the MTU while sending an ICMP echo packet (with IcmpSendEcho)? I'm trying to do this under Windows using the IcmpSendEcho() function. ...

Trace Routing for a Certain port

Dear Network Gurus Before saying anything let me tell you that i am not well educated int networks related subjects. I am a software developer and I have written and exposed a Service on HTTPS at port 8000. Now i want to know that if there is any kind of software that can help me to trace if there is any kind of port blocking from one...

Problem with asyn icmp ping

I'm writing service in python that async ping domains. So it must be able to ping many ip's at the same time. I wrote it on epoll ioloop, but have problem with packets loss. When there are many simultaneous ICMP requests much part of replies on them didn't reach my servise. What may cause this situation and how i can make my service ping...

Sending out Ping Requests

Using WinpCap and trying to generate my own ping requests. On both machines I see the ping request and the only differences between the ones I've generated the ones Windows has generated is my checksum is 0 (been told that's ok) and the identified is 100 instead of an ever increasing value like Windows uses. (I increase each time I try ...

How to determine the subnet mask of a network using the minimum number of ICMP echo requests?

How to determine the subnet mask of a network using the minimum number of ICMP echo requests? ...

ICMP - TTL - Traceroute

Given the following situation: PC --- |aa RTR1 bb| --- |aa RTR2 bb| --- |aa RTR3 bb| etc Each of the |aa rtr bb| is meant to be a router with two ports aa and bb. My question is this. When you do a trace route from PC which router port address should respond with time to live exceeded in transit message? I seem to remember b...

How to to icmps and traceroutes in Java

For some reason i cannot even phantom, Java does not have primitives for ICMPs and traceroute. Any idea how to overcome this? Basically im building code that should run in *nix and windows, and need a piece of code that will run in both platforms.. Thanks! ...

How to capture ICMP packets in FreeBSD 7.0-RELEASE-p3 using libpcap?

How to fix the following error while trying to capture ICMP packets in FreeBSD 7.0-RELEASE-p3 using libpcap? /usr/include/netinet/ip_icmp.h:71: error: expected specifier-qualifier-list before 'n_short' /usr/include/netinet/ip_icmp.h:78: error: expected specifier-qualifier-list before 'n_short' /usr/include/netinet/ip_icmp.h:100: error: ...

Pinging servers in Python

In Python, is there a way to ping a server through ICMP and return TRUE if the server responds, or FALSE if there is no response? ...

How to get my client to ping server?

Hello, I'm trying to figure a way where my clients can ping my server via php, and then retrieve the results into format like this "15 MS". I ended up finding a way where servers can ping servers. However I want to be able to have the remote user somehow ping the server, or maybe have the server ping the client possibly? function trac...