netdev
[Top] [All Lists]

Re: sendto problem

To: netdev@xxxxxxxxxxx
Subject: Re: sendto problem
From: Phoemphun Oothongsap <poothon@xxxxxxxxxxxxxxx>
Date: Thu, 01 Jun 2000 11:46:33 -0400
Organization: Advanced Networking Group
Sender: owner-netdev@xxxxxxxxxxx
Hi

- I try the same experiment with sun OS. Instead of sending a udp packet
to Linux machine, I send a udp packet to sun machine. But the result is
different.There is connection refused. Every packet goes thru. Why?

- if system receive ICMP unreachable message, will the kernel
actually       deliver it to the UDP port I am listening? 

Regards,
Phoemphun


Chandru Sargor wrote:
> 
> Phoemphun,
> 
> Is there someone listening to the UDP port you are sending
> to at the destination? Otherwise, the remote system will send
> an ICMP error back to your machine and the next time u
> try to send a packet, u will get connection refused.... probably
> it resets the error status each time - so alternate packets
> can go thru.
> 
> it would be helpful if  you provided more info on what u are
> trying to do.
> 
> hope this helps...
> 
> chandru
> -------------------------
> 
> Phoemphun Oothongsap wrote:
> 
> > Hi
> >
> > I am using Red Hat 6.2. I have a problem with using "sendto" command.
> > I try to send a udp packet to different three machines. The packets are
> > sent back to back. The first packet can get through but the second
> > packet gets the Connection refused, the third packet is ok. I get the
> > alternated
> > result between connection refused and successful packet.
> >
> > This is a code snippet :
> >
> > :
> > :
> > while(1)  {
> >
> >    for(i=1;i<=3;i++) {
> >        ret =  sendto(sock,(char *)&packet,
> >                       length,0,
> >                       (struct sockaddr*)&neighborAddr[i],
> >                       addrlen);
> >    }
> > :
> > :
> > }
> > :
> > :
> >
> > Do anybody have an idea how to fix this problem?
> >
> > Regards,
> >
> > Phoemphun Oothongsap
> > ____________________________________________________________________________
> > ANR Linux NetDev Exploder.
> > ____________________________________________________________________________

<Prev in Thread] Current Thread [Next in Thread>
  • Re: sendto problem, Phoemphun Oothongsap <=