summaryrefslogtreecommitdiffstats
path: root/doc/networking
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-11 02:51:31 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-11 02:51:31 +0000
commit33bbd74680349ea3ad8a91374fa1f72245862b50 (patch)
treed9d745426cda37b859ab66953080ffd04be95937 /doc/networking
parentd102810ea0d31333e5b4f023858aaccb04097c45 (diff)
downloadrtems-33bbd74680349ea3ad8a91374fa1f72245862b50.tar.bz2
Added information about the NTP servier field and included a copy
of the C definition of the configuration structure.
Diffstat (limited to 'doc/networking')
-rw-r--r--doc/networking/Makefile2
-rw-r--r--doc/networking/networkapp.t70
2 files changed, 69 insertions, 3 deletions
diff --git a/doc/networking/Makefile b/doc/networking/Makefile
index 9cfe311601..124f3d5837 100644
--- a/doc/networking/Makefile
+++ b/doc/networking/Makefile
@@ -68,7 +68,7 @@ networkapp.texi: networkapp.t Makefile
-n "Testing the Driver" ${*}.t
testing.texi: testing.t Makefile
- $(BMENU) -p "Socket Options" \
+ $(BMENU) -p "Time Synchronization Using NTP" \
-u "Top" \
-n "Network Servers" ${*}.t
diff --git a/doc/networking/networkapp.t b/doc/networking/networkapp.t
index add488481c..d54fe7da11 100644
--- a/doc/networking/networkapp.t
+++ b/doc/networking/networkapp.t
@@ -62,11 +62,43 @@ structures and calls the network initialization function must include
#include <rtems/rtems_bsdnet.h>
@end example
-@subsection Network configuration
+@subsection Network Configuration
The network configuration is specified by declaring
-and initializing the @code{rtems_bsdnet_configuration}
+and initializing the @code{rtems_bsdnet_config}
structure.
+@example
+@group
+struct rtems_bsdnet_config @{
+ /*
+ * This entry points to the head of the ifconfig chain.
+ */
+ struct rtems_bsdnet_ifconfig *ifconfig;
+
+ /*
+ * This entry should be rtems_bsdnet_do_bootp if BOOTP
+ * is being used to configure the network, and NULL
+ * if BOOTP is not being used.
+ */
+ void (*bootp)(void);
+
+ /*
+ * The remaining items can be initialized to 0, in
+ * which case the default value will be used.
+ */
+ rtems_task_priority network_task_priority; /* 100 */
+ unsigned long mbuf_bytecount; /* 64 kbytes */
+ unsigned long mbuf_cluster_bytecount; /* 128 kbytes */
+ char *hostname; /* BOOTP */
+ char *domainname; /* BOOTP */
+ char *gateway; /* BOOTP */
+ char *log_host; /* BOOTP */
+ char *name_server[3]; /* BOOTP */
+ char *ntp_server[3]; /* BOOTP */
+@};
+@end group
+@end example
+
The structure entries are described in the following table.
If your application uses BOOTP/DHCP to obtain network configuration
information and if you are happy with the default values described
@@ -121,6 +153,17 @@ will be sent.
The Internet host numbers of up to three machines to be used as
Internet Domain Name Servers.
+@item char *name_server[3]
+The Internet host numbers of up to three machines to be used as
+Network Time Protocol (NTP) Servers.
+
+@end table
+
+In addition, the following fields in the @code{rtems_bsdnet_ifconfig}
+are of interest.
+
+@table @b
+
@item int port
The I/O port number (ex: 0x240) on which the external Ethernet
can be accessed.
@@ -369,4 +412,27 @@ The purpose of these functions is to permit a more efficient
alternative to the select call when dealing with a large number of
sockets.
+@subsection Time Synchronization Using NTP
+
+@example
+int rtems_bsdnet_synchronize_ntp (int interval, rtems_task_priority priority);
+@end example
+
+If the interval argument is 0 the routine synchronizes the RTEMS time-of-day
+clock with the first NTP server in the rtems_bsdnet_ntpserve array and
+returns. The priority argument is ignored.
+
+If the interval argument is greater than 0, the routine also starts an
+RTEMS task at the specified priority and polls the NTP server every
+`interval' seconds. NOTE: This mode of operation has not yet been
+implemented.
+
+On successful synchronization of the RTEMS time-of-day clock the routine
+returns 0. If an error occurs a message is printed and the routine returns -1
+with an error code in errno.
+There is no timeout -- if there is no response from an NTP server the
+routine will wait forever.
+
+
+