Solved

ICMP packets

Posted on 1998-10-28
13
517 Views
Last Modified: 2010-04-06
Hi,

I'm trying to make application to catch every ICMP
echo request (ping) ,before my kernel(?!?) echo reply on it or even right after that (i need source IPaddr,packet_len) , i've browsed 'icmp.dll' info and didn't understand how to recieve them from this way . i hope someone already found
solution or saw interesting source codes (deplhi,c).

Jecksom
0
Comment
Question by:jecksom
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 2
13 Comments
 
LVL 4

Expert Comment

by:dwwang
ID: 1344722
Go to this site and you will get exactly what you want, there is a ping implementation in Delphi.

http://www.rtfm.be/fpiette/indexuk.htm
0
 
LVL 1

Author Comment

by:jecksom
ID: 1344723
Hi dwwang !

You gave me opposite answer that i asked (i already have ics) and it's only
receiving echo reply after i've post echo request to remote host. I need to
catch icmp packet then anyone pinging me ! O'coz if you'll show source how
to detect incoming ping in this way i'll rise points to 250 :).

Jecksom

PS: bytheway, icmp.pas from ics using 'icmp.dll' ;)

0
 
LVL 1

Author Comment

by:jecksom
ID: 1344724
Adjusted points to 230
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:dwwang
ID: 1344725
Hi, I have a app run under linux/C, named ENDE. It has the ability processing incoming ICMP packets. How ever I wonder if it could help, due to the difference between network implementation in Linux and Win95.

If you think it may help, I can e-mail it to you.

Of course I will ask no points if it does not help.
0
 
LVL 1

Author Comment

by:jecksom
ID: 1344726
Hi ,
nope  , i don't think it could help, networking mechanisms too different (i know how to
do this under Linux :) ) .

Thanx you anyway .
Jecksom

PS : don't forget this question . If you'll find something looks like solution, even if it's far
from main point of question.
(Sorry for my bad English)

0
 
LVL 4

Expert Comment

by:dwwang
ID: 1344727
Well, how about this site?

http://www.sockets.com/ch16.htm
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1344728
euhm, what does ICMP means?
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1344729
this may come in handy :

"You can only listen on this port if you have the Microsoft network stuff disabled (there can only be one program listening to a socket at one time). If this is the case just create a listening socket on port 139, set it to asynchronous and each time you get data on this check with the ioctlsocket (command SIOCATMARK) if there's any OOB data on this port."

Zif.

0
 
LVL 1

Author Comment

by:jecksom
ID: 1344730
Hi Zif !

ICMP - Internet Control Message Protocol, ecupsulating into IP - Internet protocol, utilized
for some different tasks like echo request/reply (ping,traceroute) .

I'm tring to intercept every ping that my box receiving (from different interfaces in NT case).
ICMP doesn't using PORT's as is , so 139 - NBD port not an answer, bcoz it's TCP port
(btw 137,138 NB  UDP ports ).

I guess Dwwang showed my right direction to search , only problem SOCK_RAW , raw
sockets only suppurted from 2.0 versions of winsock.

Thanx ,
        Jecksom.

0
 
LVL 4

Expert Comment

by:dwwang
ID: 1344731
Hi, jecksom

Good luck.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1344732
How are things going?
0
 
LVL 4

Accepted Solution

by:
dwwang earned 230 total points
ID: 1344733
Hi, I finally find this site, talking about and showing full source code(C++) for programming RAW Socket. Hope this could be an answer. :)

http://www.cyberport.com/~tangent/programming/winsock/
0
 
LVL 1

Author Comment

by:jecksom
ID: 1344734
Hi dwwang!

So answer is : no , you can't do this , unless you'll write NDIS driver .
I accept , this answer, since it's correct , there no chance to do this using Delphi only.

Thanx ,
Jecksom

PS : the only question when Inprise would supply us with VXD coding stuff (at least TASM32
include files) :(
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question