OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [bootloaders/] [orpmon/] [services/] [rarp.c] - Diff between revs 175 and 406

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 175 Rev 406
Line 30... Line 30...
#if (CONFIG_COMMANDS & CFG_CMD_NET)
#if (CONFIG_COMMANDS & CFG_CMD_NET)
 
 
#define TIMEOUT         5               /* Seconds before trying BOOTP again */
#define TIMEOUT         5               /* Seconds before trying BOOTP again */
#define TIMEOUT_COUNT   1               /* # of timeouts before giving up    */
#define TIMEOUT_COUNT   1               /* # of timeouts before giving up    */
 
 
 
 
int             RarpTry;
int             RarpTry;
 
 
/*
/*
 *      Handle a RARP received packet.
 *      Handle a RARP received packet.
 */
 */
Line 45... Line 44...
        printf("Got good RARP\n");
        printf("Got good RARP\n");
#endif
#endif
        TftpStart ();
        TftpStart ();
}
}
 
 
 
 
/*
/*
 *      Timeout on BOOTP request.
 *      Timeout on BOOTP request.
 */
 */
static void
static void RarpTimeout(void)
RarpTimeout(void)
 
{
{
        if (RarpTry >= TIMEOUT_COUNT) {
        if (RarpTry >= TIMEOUT_COUNT) {
                puts ("\nRetry count exceeded; starting again\n");
                puts ("\nRetry count exceeded; starting again\n");
                NetStartAgain ();
                NetStartAgain ();
        } else {
        } else {
                NetSetTimeout (TIMEOUT * CFG_HZ, RarpTimeout);
                NetSetTimeout (TIMEOUT * CFG_HZ, RarpTimeout);
                RarpRequest ();
                RarpRequest ();
        }
        }
}
}
 
 
 
void RarpRequest(void)
void
 
RarpRequest (void)
 
{
{
        int i;
        int i;
        volatile uchar *pkt;
        volatile uchar *pkt;
        ARP_t * rarp;
        ARP_t * rarp;
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.