Changeset 7bd2c06 in network-demos


Ignore:
Timestamp:
09/14/07 20:54:42 (16 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 57a009d5b89e72f488ab655184e6a33bb0fe6b7f, network-demos-4-10-branch, network-demos-4-8-branch, network-demos-4-9-branch
Children:
5538df4
Parents:
e8722e7
Message:

2007-09-14 Joel Sherrill <joel.sherrill@…>

  • networkconfig.h: Loopback only network configuration. Use one of the real ones as an example.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    re8722e7 r7bd2c06  
     12007-09-14      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * networkconfig.h: Loopback only network configuration. Use one of the
     4        real ones as an example.
     5
    162007-09-07      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • networkconfig.h

    re8722e7 r7bd2c06  
    11/*
    2  * Network configuration EXAMPLE!!!
     2 * Network configuration -- LOOPBACK ONLY!!!
     3 *
     4 * See one of the other networkconfig.h files for an
     5 * example of a system that includes a real NIC and
     6 * the loopback interface.
    37 *
    48 ************************************************************
     
    1317#define _RTEMS_NETWORKCONFIG_H_
    1418
    15 /*
    16  *  The following will normally be set by the BSP if it supports
    17  *  a single network device driver.  In the event, it supports
    18  *  multiple network device drivers, then the user's default
    19  *  network device driver will have to be selected by a BSP
    20  *  specific mechanism.
    21  */
    22 
    23 #ifndef RTEMS_BSP_NETWORK_DRIVER_NAME
    24 #warning "RTEMS_BSP_NETWORK_DRIVER_NAME is not defined"
    25 #define RTEMS_BSP_NETWORK_DRIVER_NAME "no_network1"
    26 #endif
    27 
    28 #ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH
    29 #warning "RTEMS_BSP_NETWORK_DRIVER_ATTACH is not defined"
    30 #define RTEMS_BSP_NETWORK_DRIVER_ATTACH 0
    31 #endif
    3219
    3320/* #define RTEMS_USE_BOOTP */
     
    3623
    3724/*
    38  * Define RTEMS_SET_ETHERNET_ADDRESS if you want to specify the
    39  * Ethernet address here.  If RTEMS_SET_ETHERNET_ADDRESS is not
    40  * defined the driver will choose an address.
    41  */
    42 #define RTEMS_SET_ETHERNET_ADDRESS
    43 #if (defined (RTEMS_SET_ETHERNET_ADDRESS))
    44 /* static char ethernet_address[6] = { 0x08, 0x00, 0x3e, 0x12, 0x28, 0xb1 }; */
    45 static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 };
    46 
    47 #endif
    48 
    49 #define RTEMS_USE_LOOPBACK
    50 #ifdef RTEMS_USE_LOOPBACK
    51 /*
    5225 * Loopback interface
    5326 */
    54 extern void rtems_bsdnet_loopattach();
    55 static struct rtems_bsdnet_ifconfig loopback_config = {
    56         "lo0",                          /* name */
    57         rtems_bsdnet_loopattach,        /* attach function */
    58 
    59         NULL,                           /* link to next interface */
    60 
    61         "127.0.0.1",                    /* IP address */
    62         "255.0.0.0",                    /* IP net mask */
    63 };
    64 #endif
     27extern int rtems_bsdnet_loopattach();
    6528
    6629/*
     
    6831 */
    6932static struct rtems_bsdnet_ifconfig netdriver_config = {
    70         RTEMS_BSP_NETWORK_DRIVER_NAME,          /* name */
    71         RTEMS_BSP_NETWORK_DRIVER_ATTACH,        /* attach function */
    72 
    73 #ifdef RTEMS_USE_LOOPBACK
    74         &loopback_config,               /* link to next interface */
    75 #else
    76         NULL,                           /* No more interfaces */
    77 #endif
    78 
    79 #if (defined (RTEMS_USE_BOOTP))
    80         NULL,                           /* BOOTP supplies IP address */
    81         NULL,                           /* BOOTP supplies IP net mask */
    82 #else
    83         "XXX.YYY.ZZZ.XYZ",              /* IP address */
    84         "255.255.255.0",                /* IP net mask */
    85 #endif /* !RTEMS_USE_BOOTP */
    86 
    87 #if (defined (RTEMS_SET_ETHERNET_ADDRESS))
    88         ethernet_address,               /* Ethernet hardware address */
    89 #else
    90         NULL,                           /* Driver supplies hardware address */
    91 #endif
    92         0                               /* Use default driver parameters */
     33  "lo0",                    /* name */
     34  rtems_bsdnet_loopattach,  /* attach function */
     35  NULL,                     /* No more interfaces */
     36  "127.0.0.1",              /* IP address */
     37  "255.0.0.0",              /* IP net mask */
     38  NULL,                     /* Driver supplies hardware address */
     39  0                         /* Use default driver parameters */
    9340};
    9441
     
    9744 */
    9845struct rtems_bsdnet_config rtems_bsdnet_config = {
    99 #if 0
    100         &netdriver_config,
    101 #endif
    102 
    103 #if (defined (RTEMS_USE_BOOTP))
    104         rtems_bsdnet_do_bootp,
    105 #else
    106         NULL,
    107 #endif
    108 
    109         0,                      /* Default network task priority */
    110         0,                      /* Default mbuf capacity */
    111         0,                      /* Default mbuf cluster capacity */
    112 
    113 #if (!defined (RTEMS_USE_BOOTP))
    114         "rtems_host",           /* Host name */
    115         "nodomain.com",         /* Domain name */
    116         "XXX.YYY.ZZZ.1",        /* Gateway */
    117         "XXX.YYY.ZZZ.1",        /* Log host */
    118         {"XXX.YYY.ZZZ.1" },     /* Name server(s) */
    119         {"XXX.YYY.ZZZ.1" },     /* NTP server(s) */
    120 
    121 #endif /* !RTEMS_USE_BOOTP */
    122 
     46  &netdriver_config,
     47  NULL,                   /* do not use bootp */
     48  0,                      /* Default network task priority */
     49  0,                      /* Default mbuf capacity */
     50  0,                      /* Default mbuf cluster capacity */
    12351};
    12452
Note: See TracChangeset for help on using the changeset viewer.