- Does not appear to work on netlink sockets. libnl uses
- MSG_PEEK instead. I don't know if that is worth the
- extra roundtrip.
-
- For now we simply use the maximum message size the kernel
- may use (NLMSG_GOODSIZE), and then realloc to the actual
- size after reading the message (hence avoiding huge memory
- usage in case many small messages are kept around) */
- *need = getpagesize();
+ Does not appear to work on netlink sockets. libnl uses
+ MSG_PEEK instead. I don't know if that is worth the
+ extra roundtrip.
+
+ For now we simply use the maximum message size the kernel
+ may use (NLMSG_GOODSIZE), and then realloc to the actual
+ size after reading the message (hence avoiding huge memory
+ usage in case many small messages are kept around) */
+ *need = page_size();