#include #include #include #include #include #include #define NO -1 #define YES 0 int local_bind (short port) { int sd; if ((sd = socket(AF_INET, SOCK_STREAM, 0)) == -1) { fprintf(stderr,"System call 'socket()' failed\n"); exit(1); } else return bind_address(sd,port); } int main (void) { int port=6710, tries=15; int i, s; #if defined(__linux) || defined(__NetBSD__) struct sockaddr addr; #else struct sockaddr_in addr; #endif struct hostent *host; i=0; while (i