char addr_buf[INET6_ADDRSTRLEN];
char *p_SNTP_PRETEND_TIME;
time_t pretend_time;
+ #if SIZEOF_TIME_T == 8
+ longlong ll;
+ #else
+ long l;
+ #endif
- if(rpktl > 0)
+ if (rpktl > 0)
sw_case = 1;
else
sw_case = rpktl;
struct pkt x_pkt;
int error, rpktl, handle_pkt_res;
- if (ENABLED_OPT(AUTHENTICATION)) {
- key_id = (int) OPT_ARG(AUTHENTICATION);
-
+ if (ENABLED_OPT(AUTHENTICATION) &&
+ atoint(OPT_ARG(AUTHENTICATION), &l)) {
+ key_id = l;
get_key(key_id, &pkt_key);
}
- for (try=0; try<5; try++) {
+ for (try = 0; try < 5; try++) {
memset(&r_pkt, 0, sizeof rbuf);
-
+
- error = GETTIMEOFDAY(&tv_xmt, (struct timezone *)NULL);
+ error = GETTIMEOFDAY(&tv_xmt, NULL);
tv_xmt.tv_sec += JAN_1970;
#ifdef DEBUG
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?
- */
+/*
+** 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 **hosts,
- int hostc,
- struct addrinfo ***res,
- int pref_family
- )
- const char * const * hosts,
- int hostc,
- struct addrinfo *** res,
- int pref_family
- )
++ const char * const * hosts,
++ int hostc,
++ struct addrinfo *** res,
++ int pref_family
++ )
{
register unsigned int a;
unsigned int resc;