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 <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to