void print_global_stats( void );
void main_loop();
void finish();
-int handle_random_icmp( FPING_ICMPHDR *p, int psize, struct sockaddr *addr, socklen_t addr_len);
+int handle_random_icmp( FPING_ICMPHDR *p, struct sockaddr *addr, socklen_t addr_len);
char *sprint_tm( int t );
void ev_enqueue(HOST_ENTRY *h);
HOST_ENTRY *ev_dequeue();
#endif
{
/* handle some problem */
- if( handle_random_icmp( icp, result, (struct sockaddr *)&response_addr, response_addr_len ) )
+ if( handle_random_icmp( icp, (struct sockaddr *)&response_addr, response_addr_len ) )
num_othericmprcvd++;
return 1;
}/* IF */
************************************************************/
-int handle_random_icmp(FPING_ICMPHDR *p, int psize, struct sockaddr *addr, socklen_t addr_len)
+int handle_random_icmp(FPING_ICMPHDR *p, struct sockaddr *addr, socklen_t addr_len)
{
FPING_ICMPHDR *sent_icmp;
unsigned char *c;
print_warning("%s from %s for ICMP Echo sent to %s", icmp_code, addr_ascii, h->host);
}
- if( inet_addr( h->host ) == -1 )
+ if( inet_addr( h->host ) == INADDR_NONE )
print_warning(" (%s)", addr_ascii);
print_warning("\n" );
icmp_type, addr_ascii, h->host );
}
- if( inet_addr( h->host ) == -1 )
+ if( inet_addr( h->host ) == INADDR_NONE )
fprintf( stderr, " (%s)", addr_ascii );
fprintf( stderr, "\n" );
static SEQMAP_VALUE *seqmap_map = NULL;
static unsigned int seqmap_next_id = 0;
-static SEQMAP_VALUE *seqmap_free_list;
#define SEQMAP_TIMEOUT_IN_S 10
#define SEQMAP_UNASSIGNED_HOST_NR UINT_MAX
void seqmap_init()
{
- unsigned int i;
-
seqmap_map = calloc(SEQMAP_MAXSEQ, sizeof(SEQMAP_VALUE));
if(seqmap_map == NULL) {
perror("malloc error (can't allocate seqmap_map)");