Re: DC 9.62 Networking documentation

Jeff Powell <jrpinjapan-/[email protected]>
Newsgroups gmane.comp.hardware.rabbit-semiconductor
Message-ID <[email protected]>
Forget that question. I found the tcp/ip user's manual v1.

Now I have a UDP datahandler. It gets the first request and replies with 
valid data. Subsequent incoming connections never get to the 
datahandler. After setting a breakpoint I step through the program I am 
still running through my main loop.

This program is a re-tooling of the tcp/ip version which occasionally 
becomes overwhelmed by too many requests and won't allow connections. 
The idea was that UDP would not hang.

  ------- code --------
     while (1)
     {
         idleProcessing();
         tcp_tick(NULL);
     }

int dataHandler(int event, udp_Socket *s, ll_Gather *g, 
_udp_datagram_info *udi)
{
     int status;
    char cip[20];
    CARDMSG_S *pkt;
    if(handleUdp)             // stops recursion, does not effect 
handler death
        return 1;
    handleUdp=1;
     if(event == UDP_DH_ICMPMSG)     // from the example
    {
         return 1;
    }
     memset(&replyMsg, 0, sizeof (REPLYMSG_S));
     xmem2root(pktbuf, g->data2, g->len2);
     if(g->len3>0)
         xmem2root(pktbuf+g->len2, g->data3, g->len3);
    pkt=(CARDMSG_S*) &pktbuf;
    inet_ntoa( cip, udi->remip);
    printf("%s:%u Slot %d Type %d Device %d Offset %x Width %x Data %lx 
%lx\n", cip, udi->remport, pkt->cSlot, pkt->cOperation, pkt->cDevice, 
pkt->cOffset, pkt->cDataWidth, pkt->sData.longs[1], pkt->sData.longs[0] );
    status = process_packet(pktbuf);
     replyMsg.eStatus = status;
    printf("Status: %x\n", status);
     udp_sendto(s, (char*) &replyMsg, sizeof(REPLYMSG_S), udi->remip, 
udi->remport);     // straight from the
// even tried this but it does not help either. Returns 1 for NULL or 
bytes recv'd for the incoming socket.
    printf("Sent response %u\n", tcp_tick(NULL));
    handleUdp=0;
     return 1;
}


On 07/29/2012 08:19 AM, Jeff Powell wrote:
>
> Where can I can documentation for the tcp and udp functions that are 
> in the samples?
>
> I can't find the following in either the Function Reference or the 
> Introduction to TCP/IP manuals.
>
>  1. udp_recv
>  2. udp_sendto
>  3. udp_xsendto
>
>
> TIA.
>
>
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.