Solved

ICMP packets

Posted on 1998-10-28
13
493 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
  • 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
delphi prevent click fast 2 215
Delphi XE10 Round Image 2 126
CheckListBox usage 3 58
RESTRequest Parameter 4 30
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

776 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