|
|
@ -38,7 +38,7 @@ int main(int argc,char* argv[]) {
|
|
|
|
|
|
|
|
|
|
|
|
if (argc != 5) {
|
|
|
|
if (argc != 5) {
|
|
|
|
print_prog_info();
|
|
|
|
print_prog_info();
|
|
|
|
exit(-30);
|
|
|
|
exit(30);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -52,7 +52,7 @@ int main(int argc,char* argv[]) {
|
|
|
|
printf("Using %d for local\nUsing %d for remote\n",preferred_local_network,preferred_remote_network);
|
|
|
|
printf("Using %d for local\nUsing %d for remote\n",preferred_local_network,preferred_remote_network);
|
|
|
|
|
|
|
|
|
|
|
|
if ((preferred_local_network == -1) || (preferred_remote_network == -1)) {
|
|
|
|
if ((preferred_local_network == -1) || (preferred_remote_network == -1)) {
|
|
|
|
exit(-7);
|
|
|
|
exit(7);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
char preferred_transport = 'T';
|
|
|
|
char preferred_transport = 'T';
|
|
|
@ -64,7 +64,7 @@ int main(int argc,char* argv[]) {
|
|
|
|
} else if (check_ip_ver(local_addr) == 6) {
|
|
|
|
} else if (check_ip_ver(local_addr) == 6) {
|
|
|
|
addrlen = sizeof(struct sockaddr_in6);
|
|
|
|
addrlen = sizeof(struct sockaddr_in6);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
exit(-7);
|
|
|
|
exit(7);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
listen(server_sock,50); /* Arbitrary number, change later */
|
|
|
|
listen(server_sock,50); /* Arbitrary number, change later */
|
|
|
|