summaryrefslogtreecommitdiffstats
path: root/networking/networking.rst
diff options
context:
space:
mode:
authorAmar Takhar <verm@darkbeer.org>2016-01-16 18:24:08 -0500
committerAmar Takhar <verm@darkbeer.org>2016-05-02 20:51:23 -0400
commitd01deadf095d1c6acbd00674f742f6dbfc7bdd53 (patch)
tree49fe3662b633d5b9b2872903bc502cd74cab66e5 /networking/networking.rst
parent75a59fd66385b82b6fd38e85e5e28828e2cff30c (diff)
downloadrtems-docs-d01deadf095d1c6acbd00674f742f6dbfc7bdd53.tar.bz2
Fix markup
Diffstat (limited to '')
-rw-r--r--networking/networking.rst53
1 files changed, 47 insertions, 6 deletions
diff --git a/networking/networking.rst b/networking/networking.rst
index 44ca0a1..604f9a7 100644
--- a/networking/networking.rst
+++ b/networking/networking.rst
@@ -285,6 +285,7 @@ this:
This is equivalent to the following list of definitions. Early versions
of the RTEMS BSD network stack required that all of these be defined.
+
.. code:: c
-D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS \\
@@ -459,19 +460,29 @@ commands which must be handled are:
``SIOCGIFADDR``
``SIOCSIFADDR``
+
If the device is an Ethernet interface these
commands should be passed on to ``ether_ioctl``.
``SIOCSIFFLAGS``
+
This command should be used to start or stop the device,
depending on the state of the interface ``IFF_UP`` and``IFF_RUNNING`` bits in ``if_flags``:
+
``IFF_RUNNING``
+
Stop the device.
+
``IFF_UP``
+
Start the device.
+
``IFF_UP|IFF_RUNNING``
+
Stop then start the device.
+
``0``
+
Do nothing.
Write the Driver Statistic-Printing Function
@@ -603,11 +614,13 @@ information and if you are happy with the default values described
below, you need to provide only the first two entries in this structure.
``struct rtems_bsdnet_ifconfig \*ifconfig``
+
A pointer to the first configuration structure of the first network
device. This structure is described in the following section.
You must provide a value for this entry since there is no default value for it.
``void (\*bootp)(void)``
+
This entry should be set to ``rtems_bsdnet_do_bootp`` if your
application by default uses the BOOTP/DHCP client protocol to obtain
network configuration information. It should be set to ``NULL`` if
@@ -686,34 +699,42 @@ below, you need to provide only the first two entries in this structure.
socket, this number is multiplied by the buffer sizes for that socket.
``unsigned long udp_tx_buf_size``
+
This configuration parameter specifies the maximum amount of
buffer memory which may be used for UDP sockets to transmit
with. The default size is 9216 bytes which corresponds to
the maximum datagram size.
``unsigned long udp_rx_buf_size``
+
This configuration parameter specifies the maximum amount of
buffer memory which may be used for UDP sockets to receive
into. The default size is the following length in bytes:
+
.. code:: c
+
40 * (1024 + sizeof(struct sockaddr_in)
``unsigned long tcp_tx_buf_size``
+
This configuration parameter specifies the maximum amount of
buffer memory which may be used for TCP sockets to transmit
with. The default size is sixteen kilobytes.
``unsigned long tcp_rx_buf_size``
+
This configuration parameter specifies the maximum amount of
buffer memory which may be used for TCP sockets to receive
into. The default size is sixteen kilobytes.
``const cpu_set_t \*network_task_cpuset``
+
This configuration parameter specifies the CPU affinity of the
network task. If set to ``0`` the network task can be scheduled on
any CPU. Only available in SMP configurations.
``size_t network_task_cpuset_size``
+
This configuration parameter specifies the size of the``network_task_cpuset`` used. Only available in SMP configurations.
In addition, the following fields in the ``rtems_bsdnet_ifconfig``
@@ -846,9 +867,13 @@ with the following exceptions:
- *Some of the network functions are not thread-safe.*
For example the following functions return a pointer to a static
buffer which remains valid only until the next call:
+
``gethostbyaddr``
+
``gethostbyname``
+
``inet_ntoa``
+
(``inet_ntop`` is thread-safe, though).
- The RTEMS network package gathers statistics.
@@ -1408,10 +1433,13 @@ is a list of them:
- ``inet``
This command shows the current routing information for the TCP/IP stack. Following is an
example showing the output of this command.
+
.. code:: c
+
Destination Gateway/Mask/Hw Flags Refs Use Expire Interface
10.0.0.0 255.0.0.0 U 0 0 17 smc1
127.0.0.1 127.0.0.1 UH 0 0 0 lo0
+
In this example, there is only one network interface with an IP address of 10.8.1.1. This
link is currently not up.
Two routes that are shown are the default routes for the Ethernet interface (10.0.0.0) and the
@@ -1420,28 +1448,38 @@ is a list of them:
details on the network routing please look the following
URL: (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-routing.html)
For a quick reference to the flags, see the table below:
+
‘``U``’
Up: The route is active.
+
‘``H``’
Host: The route destination is a single host.
+
‘``G``’
Gateway: Send anything for this destination on to this remote system, which
will figure out from there where to send it.
+
‘``S``’
Static: This route was configured manually, not automatically generated by the
system.
+
‘``C``’
Clone: Generates a new route based upon this route for machines we connect
to. This type of route is normally used for local networks.
+
‘``W``’
WasCloned: Indicated a route that was auto-configured based upon a local area
network (Clone) route.
+
‘``L``’
Link: Route involves references to Ethernet hardware.
- ``mbuf``
+
This command shows the current MBUF statistics. An example of the command is shown below:
+
.. code:: c
+
************ MBUF STATISTICS \************
mbufs:4096 clusters: 256 free: 241
drops: 0 waits: 0 drains: 0
@@ -1451,8 +1489,11 @@ is a list of them:
ifaddr:0 control:0 oobdata:0
- ``if``
+
This command shows the current statistics for your Ethernet driver as long as the ioctl hook``SIO_RTEMS_SHOW_STATS`` has been implemented. Below is an example:
+
.. code:: c
+
************ INTERFACE STATISTICS \************
\***** smc1 \*****
Ethernet Address: 00:12:76:43:34:25
@@ -1567,8 +1608,10 @@ Resource Exhaustion
- Display the driver statistics (Console ‘``s``’ command or telnet
‘control-G’ character) and verify that:
+
# The number of transmit interrupts is non-zero.
This indicates that all transmit descriptors have been in use at some time.
+
# The number of missed packets is non-zero.
This indicates that all receive descriptors have been in use at some time.
@@ -1604,8 +1647,7 @@ is as follows:
meaning of these flags is described in the ``ttcp.1`` manual page
found in the ``ttcp_orig`` subdirectory.
-# On the host run ``ttcp -s -t <<insert the hostname or IP address of
- the Target here>>``
+# On the host run ``ttcp -s -t <<insert the hostname or IP address of the Target here>>``
The procedure for testing throughput from an RTEMS target
to a Host is as follows:
@@ -1614,8 +1656,7 @@ to a Host is as follows:
# Download and start the ttcp program on the Target.
-# In response to the ``ttcp`` prompt, enter ``-s -t <<insert
- the hostname or IP address of the Target here>>``. You need to type the
+# In response to the ``ttcp`` prompt, enter ``-s -t <<insert the hostname or IP address of the Target here>>``. You need to type the
IP address of the host unless your Target is talking to your Domain Name
Server.
@@ -1980,11 +2021,11 @@ of adapters which support this driver :
Our DEC driver has not been tested with all these cards, only with the D-Link
DFE500-TX.
-- ```` *[DEC21140 Hardware Manual] DIGITAL, *DIGITAL
+- *[DEC21140 Hardware Manual] DIGITAL, *DIGITAL
Semiconductor 21140A PCI Fast Ethernet LAN Controller - Hardware
Reference Manual**.
-- ```` *[99.TA.0021.M.ER]Emmanuel Raguet,*RTEMS Cache Management For Intel**.
+- *[99.TA.0021.M.ER]Emmanuel Raguet,*RTEMS Cache Management For Intel**.
Command and Variable Index
##########################