Use of static keyword, that ensures persistent variables within function
during different invocations, is the reason why these values can be moved
from global scope to a function scope.
};
-/* BSD-derived kernels use host byte order for the IP length and
- offset fields when using raw sockets. We detect this automatically at
- run-time and do the right thing. */
-static int BSDfix = 0;
-
static struct nethost host[MaxHost];
static struct sequence sequence[MaxSequence];
/* offset for ipv6 checksum calculation */
int offset = 6;
#endif
+ /* BSD-derived kernels use host byte order for the IP length and offset
+ fields when using raw sockets. We detect this automatically at
+ run-time and do the right thing. */
+ static int BSDfix = 0;
if (ctl->mtrtype == IPPROTO_TCP) {
net_send_tcp(ctl, index);
#include "display.h"
#include "select.h"
-static double dnsinterval;
-static struct timeval intervaltime;
-
extern void select_loop(struct mtr_ctl *ctl){
fd_set readfd;
fd_set writefd;
int dt;
int rv;
int graceperiod = 0;
+ struct timeval intervaltime;
+ static double dnsinterval = 0;
memset(&startgrace, 0, sizeof(startgrace));