Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

Ticket #741: pr741.diff

File pr741.diff, 1.8 KB (added by Joel Sherrill, on 08/05/08 at 15:32:04)

Add Loopback Network Configuration

  • cpukit/libmisc/dummy/dummy.c

    ? cpukit/libmisc/dummy/test.log
    RCS file: /usr1/CVS/rtems/cpukit/libmisc/dummy/dummy.c,v
    retrieving revision 1.10
    diff -u -r1.10 dummy.c
     
    1717
    1818#include <rtems.h>
    1919
    20 rtems_task Init(
    21   rtems_task_argument ignored
    22 )
    23 {
    24 }
    25 
    2620int main( int, char **, char **);
    2721
    2822/* configuration information */
     
    4236
    4337#include <rtems/confdefs.h>
    4438
    45 /* global variables */
     39/* Loopback Network Configuration */
     40#if defined(RTEMS_NETWORKING)
     41  #include <rtems/rtems_bsdnet.h>
     42  #include <sys/socket.h>
     43  #include <netinet/in.h>
     44
     45  extern int rtems_bsdnet_loopattach(struct rtems_bsdnet_ifconfig *, int);
     46
     47  static struct rtems_bsdnet_ifconfig loopback_config = {
     48      "lo0",                     /* name */
     49      rtems_bsdnet_loopattach,   /* attach function */
     50      NULL,                      /* link to next interface */
     51      "127.0.0.1",               /* IP address */
     52      "255.0.0.0",               /* IP net mask */
     53  };
     54
     55  struct rtems_bsdnet_config rtems_bsdnet_config = {
     56      &loopback_config,       /* Network interface */
     57      NULL,                   /* Use fixed network configuration */
     58      0,                      /* Default network task priority */
     59      0,                      /* Default mbuf capacity */
     60      0,                      /* Default mbuf cluster capacity */
     61      "testSystem",           /* Host name */
     62      "nowhere.com",          /* Domain name */
     63      "127.0.0.1",            /* Gateway */
     64      "127.0.0.1",            /* Log host */
     65      {"127.0.0.1" },         /* Name server(s) */
     66      {"127.0.0.1" },         /* NTP server(s) */
     67  };
     68#endif
     69