Jiri Kuthan 23 роки тому
батько
коміт
76955749a9
1 змінених файлів з 9 додано та 0 видалено
  1. 9 0
      test/udp.c

+ 9 - 0
test/udp.c

@@ -61,6 +61,8 @@ bouquets and brickbats to [email protected]
 #include <arpa/inet.h>
 #include <sys/poll.h>
 
+#include <errno.h>
+
 /* this is the main function with the loops and modes */
 void shoot()
 {
@@ -76,6 +78,7 @@ void shoot()
 	fd_set	fd;
 	socklen_t slen;
 	regex_t redexp, proexp, okexp, tmhexp, errexp;
+	int bsd_compat, opt_size;
 
 	int nretries=3;
 	char *buff="MiniTest";
@@ -125,6 +128,12 @@ void shoot()
 	}
 #endif
 
+	if (getsockopt( sock, SOL_SOCKET, SO_BSDCOMPAT, &bsd_compat, &opt_size )==-1) {
+		perror("ERROR");
+		exit(1);
+	}
+	printf("BSD compat: %d\n", bsd_compat);
+
 	/* here we go for the number of nretries which healily depends on the 
 	   mode */
 	for (i = 0; i <= nretries; i++)