Re: How to receive UDP and ICMP packet using one UDP socket, (Path MTUD)
From: Andrew Keith (andrew_at_jukenworld.com)
Date: Sun, 30 May 2004 02:19:45 +0800
i think you cant ..
since UDP and ICMP are really different binds, i dont think you can
make a socket from both at the same time. (SOCKET_UDP, SOCKET_RAW)
"Rajat" <email@example.com> wrote in message
> Dear All,
> Can we configure one socket to receive two different protocols packet.
> Like how can we made a UDP socket to receive udp as well as icmp
> Actually I am implementing Path MTUD, so for that I sent some udp
> probs to destination host, now I want that the same socket at client
> side must be able to receive both udp response and icmp error
> messages(like host unreachable, port unreachable etc).
> Another approach is that, we will use two sockets for both source and
> destination, form source we will send udp probs(through udp socket)
> while at destination host, after receiving that prob(through udp
> socket), application will make an icmp packet and sent it back to the
> source host (using ICMP socket). And here at source host, that message
> and other icmp error messages will be received by icmp socket.
> But this approch dosen't look efficient to me, what u people say? If
> Any one has another approch plz let me know.
> Eagerly waiting for some +ve pings.