RE: Re: Port Unreachable

<bill-N8kN8kpsG2dWk0Htik3J/[email protected]>
Newsgroups gmane.comp.hardware.rabbit-semiconductor
Message-ID <[email protected]>
There is a connection in the notion of the binding of the UDP socket to the netif and to an IP address and/or port.
 

 Also, there is no restriction on using the same port for UDP and TCP.  I've used TCP for a reliable control connection and UDP for the unreliable data connection both on the same port.  The IP header distinguishes the two types as it also does with ARP, ICMP and other packets.  The stack knows what socket to deliver the UDP or TCP data to, .

 

---In [email protected], <[email protected]> wrote:

 I'm confused. There is no "connection" with UDP. Are you sure you're using UDP?
 I use the following to open a UDP socket:
  
  
 
     udp_extopen( &udpcon[i].socket,
                  IF_DEFAULT,
                  UDP_BROADCAST_PORT,
                  -1, -1, NULL, 0, 0 );

 
  
  
 Also, make sure you are not using the same port number for both TCP and UDP.
  
 Steve
  
  
 
 
 On Wednesday, October 16, 2013 7:55 AM, ct3lions2000 <terencenixon@...> wrote:
 
   Hi Guys
 
 I have a simple UDP communications set up where I open up a UDP Port on the RCM6710 using:
 
 udp_open(&sock, LOCAL_PORT, REMOTE_IP,0, NULL)
 
 I specify an IP Address and port to listen too. I then call TCP_TICK regularly and it works great communicating with a Visual Basic programming running on my PC. The problem comes when I halt the VB program and restart it. When I restart the VB program and try to send data to the Rabbit I get no reply from the rabbit (rabbit never receives the packet) and using a packet sniffer I see that I get an error packet saying the "Port is unreachable". The only way to correct this is to close the and reopen the socket on the rabbit. 
 
 I have checked the return values on TCP_TICK and ifstatus and they are both nonzero indicating that as far as the rabbit is concerned the connection is still good.
 
 Is there a way I can check on the rabbit that everything is OK and reset it if it is not?
 
 Thanks
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.