]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
cleanup
authorHarlan Stenn <stenn@ntp.org>
Tue, 11 Jan 2011 08:38:31 +0000 (08:38 +0000)
committerHarlan Stenn <stenn@ntp.org>
Tue, 11 Jan 2011 08:38:31 +0000 (08:38 +0000)
bk: 4d2c1707v_bMs7VDywAlnmSiYs262A

sntp/networking.c
sntp/sntp-opts.c
sntp/sntp-opts.def
sntp/sntp-opts.h
sntp/sntp-opts.texi
sntp/sntp.1
sntp/sntp.html

index a48405c9ea3456a94412f020e83a73b50877cbdf..3cb9f1c6d0542ef1617013004a393b5593897ce8 100644 (file)
@@ -2,87 +2,6 @@
 #include "networking.h"
 #include "ntp_debug.h"
 
-char adr_buf[INET6_ADDRSTRLEN];
-
-
-/*
-** resolve_hosts consumes an array of hostnames/addresses and its length,
-** stores a pointer to the array with the resolved hosts in res and returns
-** the size of the array res.
-**
-** pref_family enforces IPv4 or IPv6 depending on commandline options and
-** system capability.
-**
-** If pref_family is NULL or PF_UNSPEC any compatible family will be
-** accepted.
-**
-** Check here: Probably getaddrinfo() can do without ISC's IPv6 availability
-** check?
-*/
-int 
-resolve_hosts (
-              const char * const *     hosts,
-              int                      hostc, 
-              struct addrinfo ***      res,
-              int                      pref_family
-              )
-{
-       register unsigned int a;
-       unsigned int resc;
-       struct addrinfo **tres;
-
-       if (hostc < 1 || NULL == res)
-               return 0;
-       
-       tres = emalloc(sizeof(struct addrinfo *) * hostc);
-       for (a = 0, resc = 0; a < hostc; a++) {
-               struct addrinfo hints;
-               int error;
-
-               tres[resc] = NULL;
-#ifdef DEBUG
-               DPRINTF(2, ("sntp resolve_hosts: Starting host resolution for %s...\n", hosts[a])); 
-#endif
-               memset(&hints, 0, sizeof(hints));
-               if (AF_UNSPEC == pref_family)
-                       hints.ai_family = PF_UNSPEC;
-               else 
-                       hints.ai_family = pref_family;
-               hints.ai_socktype = SOCK_DGRAM;
-               error = getaddrinfo(hosts[a], "123", &hints, &tres[resc]);
-               if (error) {
-                       msyslog(LOG_DEBUG, "Error looking up %s%s: %s",
-                               (AF_UNSPEC == hints.ai_family)
-                                   ? ""
-                                   : (AF_INET == hints.ai_family)
-                                         ? "(A) "
-                                         : "(AAAA) ",
-                               hosts[a], gai_strerror(error));
-               } else {
-#if 0
-                       for (dres = tres[resc]; dres; dres = dres->ai_next) {
-                               getnameinfo(dres->ai_addr, dres->ai_addrlen, adr_buf, sizeof(adr_buf), NULL, 0, NI_NUMERICHOST);
-                               STDLINE
-                               printf("Resolv No.: %i Result of getaddrinfo for %s:\n", resc, hosts[a]);
-                               printf("socktype: %i ", dres->ai_socktype); 
-                               printf("protocol: %i ", dres->ai_protocol);
-                               printf("Prefered socktype: %i IP: %s\n", dres->ai_socktype, adr_buf);
-                               STDLINE
-                       }
-#endif
-                       resc++;
-               }
-       }
-
-       if (resc)
-               *res = realloc(tres, sizeof(struct addrinfo *) * resc);
-       else {
-               free(tres);
-               *res = NULL;
-       }
-       return resc;
-}
-
 
 /* Send a packet */
 void
@@ -120,6 +39,31 @@ sendpkt (
 }
 
 
+/*
+** Fetch data, check if it's data for us and whether it's useable or not.
+**
+** If not, return a failure code so we can delete this server from our list
+** and continue with another one.
+*/
+int
+recvpkt (
+       SOCKET rsock,
+       struct pkt *rpkt,    /* received packet (response) */
+       unsigned int rsize,  /* size of rpkt buffer */
+       struct pkt *spkt     /* sent     packet (request) */
+       )
+{
+       int pkt_len;
+       sockaddr_u sender;
+
+       pkt_len = recvdata(rsock, &sender, (char *)rpkt, rsize);
+       if (pkt_len > 0)
+               pkt_len = process_pkt(rpkt, &sender, pkt_len, MODE_SERVER, spkt, "recvpkt");
+
+       return pkt_len;
+}
+
+
 /* Receive raw data */
 int
 recvdata(
@@ -149,146 +93,6 @@ recvdata(
 }
 
 
-/*
-** Receive data from broadcast.
-**
-** Couldn't finish that.
-**
-** Need to do some digging here, especially for protocol independence and
-** IPv6 multicast.
-*/
-int 
-recv_bcst_data (
-       SOCKET rsock,
-       char *rdata,
-       int rdata_len,
-       sockaddr_u *sas,
-       sockaddr_u *ras
-       )
-{
-       char *buf;
-       int btrue = 1;
-       int recv_bytes = 0;
-       int rdy_socks;
-       GETSOCKNAME_SOCKLEN_TYPE ss_len;
-       long l;
-       struct timeval timeout_tv;
-       fd_set bcst_fd;
-#ifdef MCAST
-       struct ip_mreq mdevadr;
-       TYPEOF_IP_MULTICAST_LOOP mtrue = 1;
-#endif
-#ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
-       struct ipv6_mreq mdevadr6;
-#endif
-
-       setsockopt(rsock, SOL_SOCKET, SO_REUSEADDR, &btrue, sizeof(btrue));
-       if (IS_IPV4(sas)) {
-               if (bind(rsock, &sas->sa, SOCKLEN(sas)) < 0) {
-                       if (debug)
-                               printf("sntp recv_bcst_data: Couldn't bind() address %s.\n",
-                                      sptoa(sas));
-               }
-
-#ifdef MCAST
-               if (setsockopt(rsock, IPPROTO_IP, IP_MULTICAST_LOOP, &mtrue, sizeof(mtrue)) < 0) {
-                       /* some error message regarding setting up multicast loop */
-                       return BROADCAST_FAILED;
-               }
-               mdevadr.imr_multiaddr.s_addr = NSRCADR(sas); 
-               mdevadr.imr_interface.s_addr = htonl(INADDR_ANY);
-               if (mdevadr.imr_multiaddr.s_addr == -1) {
-                       if (debug) {
-                               printf("sntp recv_bcst_data: %s is not a broad-/multicast address, aborting...\n",
-                                      sptoa(sas));
-                       }
-                       return BROADCAST_FAILED;
-               }
-               if (setsockopt(rsock, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mdevadr, sizeof(mdevadr)) < 0) {
-                       if (debug) {
-                               buf = ss_to_str(sas);
-                               printf("sntp recv_bcst_data: Couldn't add IP membership for %s\n", buf);
-                               free(buf);
-                       }
-               }
-#endif /* MCAST */
-       }
-#ifdef ISC_PLATFORM_HAVEIPV6
-       else if (IS_IPV6(sas)) {
-               if (bind(rsock, &sas->sa, SOCKLEN(sas)) < 0) {
-                       if (debug)
-                               printf("sntp recv_bcst_data: Couldn't bind() address.\n");
-               }
-#ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
-               if (setsockopt(rsock, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, &btrue, sizeof (btrue)) < 0) {
-                       /* some error message regarding setting up multicast loop */
-                       return BROADCAST_FAILED;
-               }
-               memset(&mdevadr6, 0, sizeof(mdevadr6));
-               mdevadr6.ipv6mr_multiaddr = SOCK_ADDR6(sas);
-               if (!IN6_IS_ADDR_MULTICAST(&mdevadr6.ipv6mr_multiaddr)) {
-                       if (debug) {
-                               buf = ss_to_str(sas); 
-                               printf("sntp recv_bcst_data: %s is not a broad-/multicast address, aborting...\n", buf);
-                               free(buf);
-                       }
-                       return BROADCAST_FAILED;
-               }
-               if (setsockopt(rsock, IPPROTO_IPV6, IPV6_JOIN_GROUP,
-                              &mdevadr6, sizeof(mdevadr6)) < 0) {
-                       if (debug) {
-                               buf = ss_to_str(sas); 
-                               printf("sntp recv_bcst_data: Couldn't join group for %s\n", buf);
-                               free(buf);
-                       }
-               }
-#endif /* INCLUDE_IPV6_MULTICAST_SUPPORT */
-       }
-#endif /* ISC_PLATFORM_HAVEIPV6 */
-       FD_ZERO(&bcst_fd);
-       FD_SET(rsock, &bcst_fd);
-       if (ENABLED_OPT(TIMEOUT) && atoint(OPT_ARG(TIMEOUT), &l))
-               timeout_tv.tv_sec = l;
-       else 
-               timeout_tv.tv_sec = 68; /* ntpd broadcasts every 64s */
-       timeout_tv.tv_usec = 0;
-       rdy_socks = select(rsock + 1, &bcst_fd, 0, 0, &timeout_tv);
-       switch (rdy_socks) {
-           case -1: 
-               if (debug) 
-                       perror("sntp recv_bcst_data: select()");
-               return BROADCAST_FAILED;
-               break;
-           case 0:
-               if (debug)
-                       printf("sntp recv_bcst_data: select() reached timeout (%u sec), aborting.\n", 
-                              (unsigned)timeout_tv.tv_sec);
-               return BROADCAST_FAILED;
-               break;
-           default:
-               ss_len = sizeof(*ras);
-               recv_bytes = recvfrom(rsock, rdata, rdata_len, 0, &ras->sa, &ss_len);
-               break;
-       }
-       if (recv_bytes == -1) {
-               if (debug)
-                       perror("sntp recv_bcst_data: recvfrom:");
-               recv_bytes = BROADCAST_FAILED;
-       }
-#ifdef MCAST
-       if (IS_IPV4(sas)) 
-               setsockopt(rsock, IPPROTO_IP, IP_DROP_MEMBERSHIP, &btrue,
-                          sizeof(btrue));
-#endif
-#ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
-       if (IS_IPV6(sas))
-               setsockopt(rsock, IPPROTO_IPV6, IPV6_LEAVE_GROUP, &btrue,
-                          sizeof(btrue));
-#endif
-       return recv_bytes;
-}
-
-
 int
 process_pkt (
        struct pkt *rpkt,
@@ -461,99 +265,3 @@ unusable:
 
        return pkt_len;
 }
-
-
-int 
-recv_bcst_pkt (
-       SOCKET rsock,
-       struct pkt *rpkt,
-       unsigned int rsize,
-       sockaddr_u *sas
-       )
-{
-       sockaddr_u sender;
-       int pkt_len = recv_bcst_data(rsock, (char *)rpkt, rsize, sas, &sender);
-
-       if (pkt_len < 0) {
-               return BROADCAST_FAILED;
-       }
-       pkt_len = process_pkt(rpkt, sas, pkt_len, MODE_BROADCAST, NULL, "recv_bcst_pkt");
-       return pkt_len;
-}
-
-
-/*
-** Fetch data, check if it's data for us and whether it's useable or not.
-**
-** If not, return a failure code so we can delete this server from our list
-** and continue with another one.
-*/
-int
-recvpkt (
-       SOCKET rsock,
-       struct pkt *rpkt,    /* received packet (response) */
-       unsigned int rsize,  /* size of rpkt buffer */
-       struct pkt *spkt     /* sent     packet (request) */
-       )
-{
-       int rdy_socks;
-       int pkt_len;
-       sockaddr_u sender;
-       long l;
-       struct timeval timeout_tv;
-       fd_set recv_fd;
-
-       FD_ZERO(&recv_fd);
-       FD_SET(rsock, &recv_fd);
-       if (ENABLED_OPT(TIMEOUT) && atoint(OPT_ARG(TIMEOUT), &l))
-               timeout_tv.tv_sec = l;
-       else 
-               timeout_tv.tv_sec = 68; /* ntpd broadcasts every 64s */
-       timeout_tv.tv_usec = 0;
-       rdy_socks = select(rsock + 1, &recv_fd, 0, 0, &timeout_tv);
-       switch (rdy_socks) {
-           case -1: 
-               if (debug) 
-                       perror("sntp recvpkt: select()");
-               return PACKET_UNUSEABLE;
-               break;
-           case 0:
-               if (debug)
-                       printf("sntp recvpkt: select() reached timeout (%u sec), aborting.\n", 
-                              (unsigned)timeout_tv.tv_sec);
-               return PACKET_UNUSEABLE;
-               break;
-           default:
-               break;
-       }
-       pkt_len = recvdata(rsock, &sender, (char *)rpkt, rsize);
-       if (pkt_len > 0)
-               pkt_len = process_pkt(rpkt, &sender, pkt_len, MODE_SERVER, spkt, "recvpkt");
-
-       return pkt_len;
-}
-
-
-/*
- * is_reachable - check to see if we have a route to given destination
- */
-int
-is_reachable (
-       struct addrinfo *dst
-       )
-{
-       SOCKET sockfd = socket(dst->ai_family, SOCK_DGRAM, 0);
-
-       if (-1 == sockfd) {
-#ifdef DEBUG
-               printf("is_reachable: Couldn't create socket\n");
-#endif
-               return 0;
-       }
-       if (connect(sockfd, dst->ai_addr, SOCKLEN((sockaddr_u *)dst->ai_addr))) {
-               closesocket(sockfd);
-               return 0;
-       }
-       closesocket(sockfd);
-       return 1;
-}
index aa455ec3909661adc3e0bdc1129291c0a58dabd9..8254ddc180c04aa010be740a1212639830ab45e9 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.c)
  *  
- *  It has been AutoGen-ed  January 11, 2011 at 01:30:03 AM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  January 11, 2011 at 08:16:38 AM by AutoGen 5.11.6pre7
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
@@ -241,6 +241,15 @@ static char const zKeyfile_Name[]            = "keyfile";
 #define KEYFILE_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
+/*
+ *  Unpriv_Port option description:
+ */
+static char const zUnpriv_PortText[] =
+        "Use an unprivileged port for communicating";
+static char const zUnpriv_Port_NAME[]        = "UNPRIV_PORT";
+static char const zUnpriv_Port_Name[]        = "unpriv-port";
+#define UNPRIV_PORT_FLAGS       (OPTST_DISABLED)
+
 /*
  *  Help/More_Help/Version option descriptions:
  */
@@ -498,6 +507,18 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* desc, NAME, name */ zKeyfileText, zKeyfile_NAME, zKeyfile_Name,
      /* disablement strs */ NULL, NULL },
 
+  {  /* entry idx, value */ 15, VALUE_OPT_UNPRIV_PORT,
+     /* equiv idx, value */ 15, VALUE_OPT_UNPRIV_PORT,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ UNPRIV_PORT_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ zUnpriv_PortText, zUnpriv_Port_NAME, zUnpriv_Port_Name,
+     /* disablement strs */ NULL, NULL },
+
   {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
      /* equiv idx value  */ NO_EQUIVALENT, 0,
      /* equivalenced to  */ NO_EQUIVALENT,
@@ -632,7 +653,7 @@ tOptions sntpOptions = {
       NO_EQUIVALENT, /* '-#' option index */
       NO_EQUIVALENT /* index of default opt */
     },
-    20 /* full option count */, 15 /* user option count */,
+    21 /* full option count */, 16 /* user option count */,
     sntp_full_usage, sntp_short_usage,
     NULL, NULL,
     PKGDATADIR
index c58792234854b21f4ae91d09ff878d062e1c9811..ea7bd5de49152d4a10c6ea672488b01ab2fc3cca 100644 (file)
@@ -202,6 +202,14 @@ flag = {
        _EndOfDoc_;
 };
 
+flag = {
+    name      = unpriv-port;
+    value     = u;
+    descrip   = "Use an unprivileged port for communicating";
+    doc = <<-  _EndOfDoc_
+       _EndOfDoc_;
+};
+
 
 /* explain: Additional information whenever the usage routine is invoked */
 explain = <<- _END_EXPLAIN
index 06f9a04a0181883be1c5133e2c2af7b1335cd76d..d9a6aa4e0cdad32f46959ace64743c71707e75d2 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.h)
  *  
- *  It has been AutoGen-ed  January 11, 2011 at 01:30:02 AM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  January 11, 2011 at 08:16:38 AM by AutoGen 5.11.6pre7
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
@@ -65,14 +65,15 @@ typedef enum {
     INDEX_OPT_TIMEOUT          = 12,
     INDEX_OPT_AUTHENTICATION   = 13,
     INDEX_OPT_KEYFILE          = 14,
-    INDEX_OPT_VERSION          = 15,
-    INDEX_OPT_HELP             = 16,
-    INDEX_OPT_MORE_HELP        = 17,
-    INDEX_OPT_SAVE_OPTS        = 18,
-    INDEX_OPT_LOAD_OPTS        = 19
+    INDEX_OPT_UNPRIV_PORT      = 15,
+    INDEX_OPT_VERSION          = 16,
+    INDEX_OPT_HELP             = 17,
+    INDEX_OPT_MORE_HELP        = 18,
+    INDEX_OPT_SAVE_OPTS        = 19,
+    INDEX_OPT_LOAD_OPTS        = 20
 } teOptIndex;
 
-#define OPTION_CT    20
+#define OPTION_CT    21
 #define SNTP_VERSION       "4.2.7p114"
 #define SNTP_FULL_VERSION  "sntp - standard SNTP program - Ver. 4.2.7p114"
 
@@ -170,6 +171,10 @@ typedef enum {
 #  warning undefining KEYFILE due to option name conflict
 #  undef   KEYFILE
 # endif
+# ifdef    UNPRIV_PORT
+#  warning undefining UNPRIV_PORT due to option name conflict
+#  undef   UNPRIV_PORT
+# endif
 #else  /* NO_OPTION_NAME_WARNINGS */
 # undef DEBUG_LEVEL
 # undef SET_DEBUG_LEVEL
@@ -186,6 +191,7 @@ typedef enum {
 # undef TIMEOUT
 # undef AUTHENTICATION
 # undef KEYFILE
+# undef UNPRIV_PORT
 #endif  /*  NO_OPTION_NAME_WARNINGS */
 
 /* * * * * *
@@ -213,6 +219,7 @@ typedef enum {
 
 #define OPT_VALUE_AUTHENTICATION (DESC(AUTHENTICATION).optArg.argInt)
 #define VALUE_OPT_KEYFILE        'k'
+#define VALUE_OPT_UNPRIV_PORT    'u'
 #define VALUE_OPT_HELP          '?'
 #define VALUE_OPT_MORE_HELP     '!'
 #define VALUE_OPT_VERSION       INDEX_OPT_VERSION
index 2a4946cd479960abe0f42ad848f4855e2ae12ce4..c88c8ddd67d11f6ec4f038742fd5b66f7be171e5 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (sntp-opts.texi)
 # 
-# It has been AutoGen-ed  January 11, 2011 at 01:30:08 AM by AutoGen 5.11.6pre7
+# It has been AutoGen-ed  January 11, 2011 at 08:16:46 AM by AutoGen 5.11.6pre7
 # From the definitions    sntp-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -62,6 +62,7 @@ This software is released under a specialized copyright license.
 * sntp steplimit::             steplimit option (-S)
 * sntp syslog::                syslog option (-p)
 * sntp timeout::               timeout option (-t)
+* sntp unpriv-port::           unpriv-port option (-u)
 @end menu
 
 @node sntp usage
@@ -112,6 +113,7 @@ USAGE:  sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
    -t Num timeout        Specify the number of seconds to wait for broadcasts
    -a Num authentication Enable authentication with the key auth-keynumber
    -k Fil keyfile        Specify a keyfile. SNTP will look in this file for the key specified with -a
+   -u no  unpriv-port    Use an unprivileged port for communicating
       opt version        Output version information and exit
    -? no  help           Display extended usage information and exit
    -! no  more-help      Extended usage information passed thru pager
@@ -362,3 +364,9 @@ When this option is set all logging will be done using syslog.
 This is the ``specify the number of seconds to wait for broadcasts'' option.
 When waiting for a broadcast packet SNTP will wait the number
 of seconds specified before giving up.  Default 68 seconds.
+
+@node sntp unpriv-port
+@subsection unpriv-port option (-u)
+@cindex sntp-unpriv-port
+
+This is the ``use an unprivileged port for communicating'' option.
index 82858a3f36a7f2f8ed327ac1722806ca79124956..50bd74db79ed28e5bc6cfe6cbb88cb0fcf3abcb3 100644 (file)
@@ -1,7 +1,7 @@
 .TH SNTP 1 2011-01-11 "( 4.2.7p114)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (sntp.1)
 .\"  
-.\"  It has been AutoGen-ed  January 11, 2011 at 01:30:07 AM by AutoGen 5.11.6pre7
+.\"  It has been AutoGen-ed  January 11, 2011 at 08:16:45 AM by AutoGen 5.11.6pre7
 .\"  From the definitions    sntp-opts.def
 .\"  and the template file   agman1.tpl
 .\"
@@ -179,6 +179,11 @@ A  Key in a 1-to-8 character ASCII string.
 M  Key in a 1-to-8 character ASCII string using the MD5 authentication scheme.
 
 For more information see ntp.keys(5).
+.TP
+.BR \-u ", " \--unpriv-port
+Use an unprivileged port for communicating.
+.sp
+
 .TP
 .BR \-? , " \--help"
 Display extended usage information and exit.
index b7435aca34ec5b14f159859a3449c7631b74b7bf..3ad3663e38254d6d942956a43993cd4b29ad9d9a 100644 (file)
@@ -132,6 +132,7 @@ the aginfo template and the option descriptions for the <samp><span class="comma
 <li><a href="#sntp-steplimit">sntp steplimit</a>:              steplimit option (-S)
 <li><a href="#sntp-syslog">sntp syslog</a>:                 syslog option (-p)
 <li><a href="#sntp-timeout">sntp timeout</a>:                timeout option (-t)
+<li><a href="#sntp-unpriv_002dport">sntp unpriv-port</a>:            unpriv-port option (-u)
 </ul>
 
 <div class="node">
@@ -187,6 +188,7 @@ USAGE:  sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ].
    -t Num timeout        Specify the number of seconds to wait for broadcasts
    -a Num authentication Enable authentication with the key auth-keynumber
    -k Fil keyfile        Specify a keyfile. SNTP will look in this file for the key specified with -a
+   -u no  unpriv-port    Use an unprivileged port for communicating
       opt version        Output version information and exit
    -? no  help           Display extended usage information and exit
    -! no  more-help      Extended usage information passed thru pager
@@ -530,6 +532,7 @@ filelog.
 <div class="node">
 <p><hr>
 <a name="sntp-timeout"></a>
+Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-unpriv_002dport">sntp unpriv-port</a>,
 Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-syslog">sntp syslog</a>,
 Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 
@@ -542,6 +545,20 @@ This is the &ldquo;specify the number of seconds to wait for broadcasts&rdquo; o
 When waiting for a broadcast packet SNTP will wait the number
 of seconds specified before giving up.  Default 68 seconds.
 
+<div class="node">
+<p><hr>
+<a name="sntp-unpriv-port"></a>
+<a name="sntp-unpriv_002dport"></a>
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-timeout">sntp timeout</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+
+</div>
+
+<h4 class="subsection">unpriv-port option (-u)</h4>
+
+<p><a name="index-sntp_002dunpriv_002dport-19"></a>
+This is the &ldquo;use an unprivileged port for communicating&rdquo; option.
+
 <div class="node">
 <p><hr>
 <a name="Usage"></a>