hi,
is it possible to use a Socket (proto_udp) and recieve icmp messages ?
what i want to do is, send a datagram to a remote host/port and check if
the host replies with port_unreachable (i think icmp type 3).
is this possible with a udp Socket and the RecieveFrom() method ?.
another approach would be (at least thats what i think) to use a raw
socket with proto_udp.
is this a wrong way to go ?
thanks 3 1378
Bernd schrieb: hi,
is it possible to use a Socket (proto_udp) and recieve icmp messages ? what i want to do is, send a datagram to a remote host/port and check if the host replies with port_unreachable (i think icmp type 3). is this possible with a udp Socket and the RecieveFrom() method ?. another approach would be (at least thats what i think) to use a raw socket with proto_udp. is this a wrong way to go ?
thanks
Hi,
hhmmm, I think ICMP messages are not sent through UDP. So, I'm not sure
but I think its not possible to do that with a UDP Socket.
Yours sincerely
Andy
Andy Schmidt schrieb: Bernd schrieb:
hi,
is it possible to use a Socket (proto_udp) and recieve icmp messages ? what i want to do is, send a datagram to a remote host/port and check if the host replies with port_unreachable (i think icmp type 3). is this possible with a udp Socket and the RecieveFrom() method ?. another approach would be (at least thats what i think) to use a raw socket with proto_udp. is this a wrong way to go ?
thanks
Hi,
hhmmm, I think ICMP messages are not sent through UDP. So, I'm not sure but I think its not possible to do that with a UDP Socket.
Yours sincerely
Andy
ok, thanks for your answer. and yes you are right, icmp is not sent
through udp.
would it be possible to work with 2 sockets ? lets say i create an udp
socket, send a dgram and recieve the reply with a raw socket
proto_type_icmp ?
thanks
Bernd schrieb:
Andy Schmidt schrieb:
Bernd schrieb:
hi,
is it possible to use a Socket (proto_udp) and recieve icmp messages ? what i want to do is, send a datagram to a remote host/port and check if the host replies with port_unreachable (i think icmp type 3). is this possible with a udp Socket and the RecieveFrom() method ?. another approach would be (at least thats what i think) to use a raw socket with proto_udp. is this a wrong way to go ?
thanks
Hi,
hhmmm, I think ICMP messages are not sent through UDP. So, I'm not sure but I think its not possible to do that with a UDP Socket.
Yours sincerely
Andy ok, thanks for your answer. and yes you are right, icmp is not sent through udp. would it be possible to work with 2 sockets ? lets say i create an udp socket, send a dgram and recieve the reply with a raw socket proto_type_icmp ?
thanks
Hi,
ok, I've looked in W. Richard Stevens book "TCP/IP Volume 1" and found
out, that you can use the UDP Socket to receive the ICMP reply of your
sent datagram. In the ICMP message the IP-Header and the first 8 bytes
of the IP-Data are transmitted. And Stevens wrote: the ICMP module can
assiciate with this information an UDP Port and respectivly a process
with the ICMP reply.
Yours sincerely
Andy This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Chris |
last post by:
Hi All,
I've been puzzling over this, but can't find a satisfactory answer
anywhere. I'm not sure if the problem is in my code, or if it's
something to do with the PHP/Apache set-up (probably...
|
by: Dr.Kadzija |
last post by:
i have a client-server application. client and server should communicate via
tcp sockets. ok, so i use Sockets, PrintWriter and BufferedReader. the
problem is that: both client and server will send...
|
by: Richard L Rosenheim |
last post by:
I'm playing around with setting up a multicast socket. I can create a
socket for sending, and I can one that receives. Is it possible to create
one socket that can do both?
The code I've been...
|
by: 0to60 |
last post by:
I have a question about socket programming in general.
Exactly what happens behind the scenes when I one socket connects to a
different socket in listen mode? Using the dotnet framework, I...
|
by: Eternal Snow |
last post by:
Hello.
For some reason I need to send an IP package to myself (dest address is one
of my ip addresses). (IP, not TCP/UDP)
I've save the package datagram in byte array i(), included head and...
|
by: ZorpiedoMan |
last post by:
I'm new to the world of sockets, and this question is not VB specific:
If multiple clients access the same server on the same port, and the server
is set up to do some async communication, does...
|
by: Silby |
last post by:
I've been messing around with sockets for a bit and i got most of it down (i
think).
The server side is an asynchronous tcp socket listener with sits and waits
for data.
The client side uses...
|
by: Brian Henry |
last post by:
Hello,
I was tring to learn socket's (being i never used them before) and have a
simple question. I want to create a listner that will get any data recieved
and print it out. I've been able to...
|
by: djc |
last post by:
I read a network programming book (based on framework 1.1) which indicated
that you should 'never' use the RecieveTimeout or the SendTimeout 'socket
options' on TCP sockets or you may loose data. I...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |