tvi.tv_sec = tv.tv_sec; tvi.tv_usec = tv.tv_usec;
tvi.tv_sec = htonl(tv.tv_sec); tvi.tv_usec = htonl(tv.tv_usec);
pinger(){	register struct icmp *icp;	register int cc;	int i;	char *packet = outpack;	icp = (struct icmp *)outpack;	icp->icmp_type = ICMP_ECHO;	icp->icmp_code = 0;	icp->icmp_cksum = 0;	icp->icmp_seq = htons(ntransmitted++);	icp->icmp_id = ident;			/* ID */	CLR(ntohs(icp->icmp_seq) % mx_dup_ck);	if (timing) {		struct timeval tv;		struct tvi tvi;		(void)gettimeofday(&tv, (struct timezone *)NULL);		tvi.tv_sec = tv.tv_sec;		tvi.tv_usec = tv.tv_usec;		memcpy((u_int *)&outpack[8], &tvi, sizeof tvi);	}	cc = datalen + 8;			/* skips ICMP portion */	/* compute ICMP checksum here */	icp->icmp_cksum = in_cksum((u_short *)icp, cc);	if (options & F_HDRINCL) {		struct ip *ip = (struct ip*)outpackhdr;		packet = (char*)ip;		cc += sizeof(struct ip);		ip->ip_len = htons(cc);		ip->ip_sum = in_cksum((u_short *)outpackhdr, cc);	}	i = sendto(s, (char *)packet, cc, 0, &whereto,		   sizeof(struct sockaddr));	if (i < 0 || i != cc)  {		if (i < 0)			perror("ping: sendto");		(void)printf("ping: wrote %s %d chars, ret=%d\n",		    hostname, cc, i);	}	if (!(options & F_QUIET) && options & F_FLOOD)		(void)write(STDOUT_FILENO, &DOT, 1);}