[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I don't know why we use unsigned int/long for all sockopt parameters. But how
about use the default type for setsockopt. Then we can set optval for some
special options such as SO_LIGNER, SO_SNDTIMEO...


diff --git a/include/net.h b/include/net.h
index 78665d2..6306551 100644
--- a/include/net.h
+++ b/include/net.h
@@ -29,10 +29,10 @@ struct socket_triplet {
 };

 struct sockopt {
-       unsigned int level;
-       unsigned long optname;
-       unsigned long optval;
-       unsigned long optlen;
+       int level;
+       int optname;
+       const void *optval;
+       socklen_t optlen;
 };


-- 

Thanks & Best Regards
Hangbin Liu <liuhangbin@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux