summaryrefslogtreecommitdiffstats
path: root/doc/networking
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-08-21 12:55:03 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-08-21 12:55:03 +0000
commitd9de76f6708a3f9126ad3b296b465b2126a7c438 (patch)
tree7a7031af13c0bf6edf4352599bb62da1bf9114a4 /doc/networking
parentChanged version. (diff)
downloadrtems-d9de76f6708a3f9126ad3b296b465b2126a7c438.tar.bz2
Update from Eric Norum.
Diffstat (limited to 'doc/networking')
-rw-r--r--doc/networking/networkapp.t27
1 files changed, 23 insertions, 4 deletions
diff --git a/doc/networking/networkapp.t b/doc/networking/networkapp.t
index 59a3293e10..7a7ae59066 100644
--- a/doc/networking/networkapp.t
+++ b/doc/networking/networkapp.t
@@ -65,8 +65,7 @@ structures and calls the network initialization function must include
@subsection Network configuration
The network configuration is specified by declaring
and initializing the @code{rtems_bsdnet_configuration}
-structure. This structure may be declared @code{const} since the
-network initialization functions do not write to any of the entries.
+structure.
The structure entries are described in the following table.
If your application uses BOOTP to obtain network configuration
@@ -131,8 +130,6 @@ rtems_task_set_priority (RTEMS_SELF, 30, &oldPri);
@subsection Network device configuration
Network devices are specified and configured by declaring and initializing a
@code{struct rtems_bsdnet_ifcontig} structure for each network device.
-These structures may be declared @code{const} since the
-network initialization functions do not write to any of the entries.
The structure entries are described in the following table. An application
which uses a single network interface, gets network configuration information
@@ -144,11 +141,15 @@ structure.
@item char *name
The full name of the network device. This name consists of the
driver name and the unit number (e.g. @code{"scc1"}).
+The @code{bsp.h} include file usually defines RTEMS_BSP_NETWORK_DRIVER_NAME as
+the name of the primary (or only) network driver.
@item int (*attach)(struct rtems_bsdnet_ifconfig *conf)
The address of the driver @code{attach} function. The network
initialization function calls this function to configure the driver and
attach it to the network stack.
+The @code{bsp.h} include file usually defines RTEMS_BSP_NETWORK_DRIVER_ATTACH as
+the name of the attach function of the primary (or only) network driver.
@item struct rtems_bsdnet_ifconfig *next
A pointer to the network device configuration structure for the next network
@@ -193,6 +194,24 @@ transmit descriptors for a single transmit buffer.
@end table
+A complete network configuration specification can be as simple as the one
+shown in the following example.
+This configuration uses a single network interface, gets
+network configuration information
+from a BOOTP server, and uses the default values for all driver
+parameters.
+
+@example
+static struct rtems_bsdnet_ifconfig netdriver_config = @{
+ RTEMS_BSP_NETWORK_DRIVER_NAME,
+ RTEMS_BSP_NETWORK_DRIVER_ATTACH
+@};
+struct rtems_bsdnet_config rtems_bsdnet_config = @{
+ &netdriver_config,
+ rtems_bsdnet_do_bootp,
+@};
+@end example
+
@subsection Network initialization
The networking tasks must be started before any