Howto port autoconf based application to RTEMS.
    Joel Sherrill <joel@OARcorp.com> 
    joel.sherrill at OARcorp.com
       
    Thu Jan 13 14:07:10 UTC 2005
    
    
  
>>>Please file a PR on "rtems_bsdnet" to RTEMS GNATS.
>>
>>filed as: `networking/741' -- I have not been able to find rtems_bsdnet in
>>GNATS web form...
> 
> Sorry, a confusing typo.  I meant you to file a PR on
> "rtems_bsdnet_config".
When you configure an autoconf package and it probes the installed
RTEMS, there are two files used which should never be used in a
"real application" -- the default crt0.o and the dummy configuration.
The file cpukit/libmisc/dummy.c is where this should go.  I think
cutting and pasting the network configuration from samples/loopback
should be WAY more than it takes.
I think adding something like this will work if
RTEMS_HAS_NETWORKING is the right constant:
#if defined(RTEMS_HAS_NETWORKING)
#include <rtems/rtems_bsdnet.h>
extern void rtems_bsdnet_loopattach();
static struct rtems_bsdnet_ifconfig loopback_config = {
     "lo0",                          /* name */
     (int (*)(struct rtems_bsdnet_ifconfig *, 
int))rtems_bsdnet_loopattach, /* attach function */
     NULL,                           /* link to next interface */
     "127.0.0.1",                    /* IP address */
     "255.0.0.0",                    /* IP net mask */
};
struct rtems_bsdnet_config rtems_bsdnet_config = {
     &loopback_config,       /* Network interface */
     NULL,                   /* Use fixed network configuration */
     0,                      /* Default network task priority */
     0,                      /* Default mbuf capacity */
     0,                      /* Default mbuf cluster capacity */
     "testSystem",           /* Host name */
     "nowhere.com",          /* Domain name */
     "127.0.0.1",            /* Gateway */
     "127.0.0.1",            /* Log host */
     {"127.0.0.1" },         /* Name server(s) */
     {"127.0.0.1" },         /* NTP server(s) */
};
#endif
> Ralf
> 
> 
-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985
    
    
More information about the users
mailing list