//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
// Description date : 20080829
//////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
// usage
//////////////////////////////////////////////////////////////////////////////////
   ntpclient [-c count] [-d] [-f frequency] [-g goodness] -h hostname [-i interval] [-l] [-p port] [-q min_delay] [-6] [-r] [-s] [-t]

parameters description :
   -c probe_count 
   -d (debug)     
   -g goodness    
   -h hostname    
   -i interval    
   -l live        
   -p local_port  
   -q min_delay   
   -s set_clock   
   -t cross_check 
   -6 ipv6support
   -r enable replay

usage example:
   ntpclient -s -i 30 -d -6 -h ntp6.space.net
   
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
// server
//////////////////////////////////////////////////////////////////////////////////
IPv4 ntp server:
   time.stdtime.gov.tw
   tock.stdtime.gov.tw 
   clock.stdtime.gov.tw 
   freq_f.stdtime.gov.tw 
   tick.stdtime.gov.tw 
   
IPv6 ntp server:
   time6.ipv6.uni-muenster.de    (ipv6 only)
   time.join.uni-muenster.de
   ntp6.space.net
   ntp.ipv6.uni-leipzig.de
   ntp.hexago.com
   ntp.rhrk.uni-kl.de  
   ntp.ipv6.linux.ee  
   noc.sixxs.net  
   nlams01.sixxs.net  
   nlams02.sixxs.net  
   ntp1.bit.nl  
   ntp2.bit.nl  
   chime3.ipv6.surfnet.nl 
   
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
// Note
//////////////////////////////////////////////////////////////////////////////////
   1. The parameter -h only accept hostname, does't use ip address currently.
   2. In the programe IPv4/IPv6 determined by "gethostbyname" and "gethostbyname2" API.
      If use -6 parameter, program will use gethostbyname2 first, once fail, use gethostbyname to test again.
      If not use -6 parameter, program will use gethostbyname first, once fail, use gethostbyname2 to test again.
      And bellow command result "aborted", due to gethostbyname2 API call. But work well on x86.
         ntpclient -s -i 30 -d -h time6.ipv6.uni-muenster.de

   // 20100527 added
   3. Use following script to avoid error
#!/bin/sh
ntpserver=time6.ipv6.uni-muenster.de
echo "ntpclient connect to server: " $ntpserver
./ntpclient -s -i 3 -h $ntpserver
if [ $? != 0 ]; then
   echo "ntpclient retry..."
   ./ntpclient -s -i 3 -6 -h $ntpserver
fi
   
//////////////////////////////////////////////////////////////////////////////////
