Re: How to receive UDP and ICMP packet using one UDP socket, (Path MTUD)

From: Andrew Keith (andrew_at_jukenworld.com)
Date: 05/29/04


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)

Andrew

"Rajat" <myself_rajat@yahoo.com> wrote in message
news:b49ef75a.0405262228.133b8a92@posting.google.com...
> 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
> messages.
>
> 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.



Relevant Pages

  • Re: Interesting packets
    ... Really ICMP has many types, but ICMP is encapsulated in IP datagrams. ... Transportīs headers (UDP or TCP) are included in ICMP error messages. ... > find that ur host x.x.x.4 tried trace route or (some other type of ICMP ... > and tracking system please see: http://aris.securityfocus.com ...
    (Incidents)
  • Re: UDP dont fragment bit
    ... >> fragments or let the routers generate the fragments. ... we don't generate UDP with the IP DF bit set. ... > there's no real reporting of the resulting ICMP MTU messages to UDP ... > recent ICMP received state on the socket. ...
    (freebsd-net)
  • How to receive UDP and ICMP packet using one UDP socket, (Path MTUD)
    ... 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 ... messages(like host unreachable, port unreachable etc). ...
    (comp.os.linux.networking)
  • RE: Interesting packets
    ... ICMP have many types some of them are UDP packets, ... find that ur host x.x.x.4 tried trace route or (some other type of ICMP ...
    (Incidents)
  • Re: UDP dont fragment bit
    ... a raw ... >> socket is used, which allows the direct frobbing the the IP DF bit. ... >> retrieve useful reporting on the ICMP errors associated with needing ... > tester (also as a support app for an UDP file transfer utility) The ...
    (freebsd-net)