* libmnl: misc code updates
@ 2010-10-23 5:44 Jan Engelhardt
2010-10-23 5:44 ` [PATCH 01/13] build: fix disable_static functionality Jan Engelhardt
` (13 more replies)
0 siblings, 14 replies; 18+ messages in thread
From: Jan Engelhardt @ 2010-10-23 5:44 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
The following changes since commit a8956ff09c06869b6c5bc5f525944d8c228e64e9:
doc: git tree update (now at netfilter.org) and fix listing in doxygen (2010-10-21 13:32:42 +0200)
are available in the git repository at:
git://dev.medozas.de/libmnl master
Jan Engelhardt (13):
build: fix disable_static functionality
src: avoid using deprecated unspecified argument lists
src: add const qualifiers
src: remove redundant casts
socket: remove statement with no effect
doc: documentation updates
include: consistent usage of "extern"
attr: string functions should take char *
callback: mnl_cb_run should use a void *
socket: use more appropriate types for mnl_socket_bind
include: add cplusplus guards for extern
nlmsg: use bool return type for yes-no functions
attr: rename str_null from NULL away
README | 10 +++++-----
configure.ac | 2 +-
examples/genl/genl-family-get.c | 2 +-
examples/netfilter/nfct-event.c | 2 +-
examples/rtnl/rtnl-link-dump.c | 2 +-
examples/rtnl/rtnl-link-dump2.c | 2 +-
examples/rtnl/rtnl-link-dump3.c | 2 +-
examples/rtnl/rtnl-link-event.c | 2 +-
examples/rtnl/rtnl-route-dump.c | 2 +-
include/libmnl/libmnl.h | 25 ++++++++++++++++++-------
src/attr.c | 35 ++++++++++++++++++-----------------
src/callback.c | 8 ++++----
src/nlmsg.c | 24 ++++++++++++------------
src/socket.c | 23 +++++++++++------------
14 files changed, 76 insertions(+), 65 deletions(-)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 01/13] build: fix disable_static functionality
2010-10-23 5:44 libmnl: misc code updates Jan Engelhardt
@ 2010-10-23 5:44 ` Jan Engelhardt
2010-10-23 5:44 ` [PATCH 02/13] src: avoid using deprecated unspecified argument lists Jan Engelhardt
` (12 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Jan Engelhardt @ 2010-10-23 5:44 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
Small slip on my part. AC_DISABLE_STATIC must actually come before
LT_INIT to have any effect. (This is even documented.)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
configure.ac | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index dbb6ae3..ea1aa4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,8 +8,8 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2 1.6 subdir-objects])
AC_PROG_CC
AM_PROG_CC_C_O
AC_EXEEXT
-LT_INIT
AC_DISABLE_STATIC
+LT_INIT
AC_SUBST(LIBTOOL_DEPS)
case $target in
--
1.7.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 02/13] src: avoid using deprecated unspecified argument lists
2010-10-23 5:44 libmnl: misc code updates Jan Engelhardt
2010-10-23 5:44 ` [PATCH 01/13] build: fix disable_static functionality Jan Engelhardt
@ 2010-10-23 5:44 ` Jan Engelhardt
2010-10-23 5:44 ` [PATCH 03/13] src: add const qualifiers Jan Engelhardt
` (11 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Jan Engelhardt @ 2010-10-23 5:44 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
examples/netfilter/nfct-event.c | 2 +-
examples/rtnl/rtnl-link-dump.c | 2 +-
examples/rtnl/rtnl-link-dump2.c | 2 +-
examples/rtnl/rtnl-link-dump3.c | 2 +-
examples/rtnl/rtnl-link-event.c | 2 +-
examples/rtnl/rtnl-route-dump.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/examples/netfilter/nfct-event.c b/examples/netfilter/nfct-event.c
index c713946..3a87071 100644
--- a/examples/netfilter/nfct-event.c
+++ b/examples/netfilter/nfct-event.c
@@ -205,7 +205,7 @@ static int data_cb(const struct nlmsghdr *nlh, void *data)
return MNL_CB_OK;
}
-int main()
+int main(void)
{
struct mnl_socket *nl;
char buf[MNL_SOCKET_BUFFER_SIZE];
diff --git a/examples/rtnl/rtnl-link-dump.c b/examples/rtnl/rtnl-link-dump.c
index d47d32e..76e6c2c 100644
--- a/examples/rtnl/rtnl-link-dump.c
+++ b/examples/rtnl/rtnl-link-dump.c
@@ -66,7 +66,7 @@ static int data_cb(const struct nlmsghdr *nlh, void *data)
return MNL_CB_OK;
}
-int main()
+int main(void)
{
struct mnl_socket *nl;
char buf[MNL_SOCKET_BUFFER_SIZE];
diff --git a/examples/rtnl/rtnl-link-dump2.c b/examples/rtnl/rtnl-link-dump2.c
index 8189e7c..d8da121 100644
--- a/examples/rtnl/rtnl-link-dump2.c
+++ b/examples/rtnl/rtnl-link-dump2.c
@@ -57,7 +57,7 @@ static int data_cb(const struct nlmsghdr *nlh, void *data)
return MNL_CB_OK;
}
-int main()
+int main(void)
{
struct mnl_socket *nl;
char buf[MNL_SOCKET_BUFFER_SIZE];
diff --git a/examples/rtnl/rtnl-link-dump3.c b/examples/rtnl/rtnl-link-dump3.c
index d8cacb4..ccfc8a1 100644
--- a/examples/rtnl/rtnl-link-dump3.c
+++ b/examples/rtnl/rtnl-link-dump3.c
@@ -57,7 +57,7 @@ static int data_cb(const struct nlmsghdr *nlh, void *data)
return MNL_CB_OK;
}
-int main()
+int main(void)
{
struct mnl_socket *nl;
char buf[MNL_SOCKET_BUFFER_SIZE];
diff --git a/examples/rtnl/rtnl-link-event.c b/examples/rtnl/rtnl-link-event.c
index 4aa11ef..83c516c 100644
--- a/examples/rtnl/rtnl-link-event.c
+++ b/examples/rtnl/rtnl-link-event.c
@@ -65,7 +65,7 @@ static int data_cb(const struct nlmsghdr *nlh, void *data)
return MNL_CB_OK;
}
-int main()
+int main(void)
{
struct mnl_socket *nl;
char buf[MNL_SOCKET_BUFFER_SIZE];
diff --git a/examples/rtnl/rtnl-route-dump.c b/examples/rtnl/rtnl-route-dump.c
index 22395c4..7e86017 100644
--- a/examples/rtnl/rtnl-route-dump.c
+++ b/examples/rtnl/rtnl-route-dump.c
@@ -196,7 +196,7 @@ static int data_cb(const struct nlmsghdr *nlh, void *data)
return MNL_CB_OK;
}
-int main()
+int main(void)
{
struct mnl_socket *nl;
char buf[MNL_SOCKET_BUFFER_SIZE];
--
1.7.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 03/13] src: add const qualifiers
2010-10-23 5:44 libmnl: misc code updates Jan Engelhardt
2010-10-23 5:44 ` [PATCH 01/13] build: fix disable_static functionality Jan Engelhardt
2010-10-23 5:44 ` [PATCH 02/13] src: avoid using deprecated unspecified argument lists Jan Engelhardt
@ 2010-10-23 5:44 ` Jan Engelhardt
2010-10-23 5:44 ` [PATCH 04/13] src: remove redundant casts Jan Engelhardt
` (10 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Jan Engelhardt @ 2010-10-23 5:44 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
src/attr.c | 8 ++++----
src/callback.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/attr.c b/src/attr.c
index 9c17f4d..cafd2c7 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -138,7 +138,7 @@ static int __mnl_attr_validate(const struct nlattr *attr,
enum mnl_attr_data_type type, size_t exp_len)
{
uint16_t attr_len = mnl_attr_get_payload_len(attr);
- char *attr_data = mnl_attr_get_payload(attr);
+ const char *attr_data = mnl_attr_get_payload(attr);
if (attr_len < exp_len) {
errno = ERANGE;
@@ -188,7 +188,7 @@ static int __mnl_attr_validate(const struct nlattr *attr,
return 0;
}
-static size_t mnl_attr_data_type_len[MNL_TYPE_MAX] = {
+static const size_t mnl_attr_data_type_len[MNL_TYPE_MAX] = {
[MNL_TYPE_U8] = sizeof(uint8_t),
[MNL_TYPE_U16] = sizeof(uint16_t),
[MNL_TYPE_U32] = sizeof(uint32_t),
@@ -255,7 +255,7 @@ int mnl_attr_parse(const struct nlmsghdr *nlh, unsigned int offset,
mnl_attr_cb_t cb, void *data)
{
int ret = MNL_CB_OK;
- struct nlattr *attr = mnl_nlmsg_get_payload_offset(nlh, offset);
+ const struct nlattr *attr = mnl_nlmsg_get_payload_offset(nlh, offset);
int len = nlh->nlmsg_len - MNL_NLMSG_HDRLEN - MNL_ALIGN(offset);
while (mnl_attr_ok(attr, len)) {
@@ -284,7 +284,7 @@ int mnl_attr_parse_nested(const struct nlattr *nested,
mnl_attr_cb_t cb, void *data)
{
int ret = MNL_CB_OK;
- struct nlattr *attr = mnl_attr_get_payload(nested);
+ const struct nlattr *attr = mnl_attr_get_payload(nested);
int len = mnl_attr_get_payload_len(nested);
while (mnl_attr_ok(attr, len)) {
diff --git a/src/callback.c b/src/callback.c
index e1599ff..f5a6112 100644
--- a/src/callback.c
+++ b/src/callback.c
@@ -37,7 +37,7 @@ static int mnl_cb_stop(const struct nlmsghdr *nlh, void *data)
return MNL_CB_STOP;
}
-static mnl_cb_t default_cb_array[NLMSG_MIN_TYPE] = {
+static const mnl_cb_t default_cb_array[NLMSG_MIN_TYPE] = {
[NLMSG_NOOP] = mnl_cb_noop,
[NLMSG_ERROR] = mnl_cb_error,
[NLMSG_DONE] = mnl_cb_stop,
--
1.7.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 04/13] src: remove redundant casts
2010-10-23 5:44 libmnl: misc code updates Jan Engelhardt
` (2 preceding siblings ...)
2010-10-23 5:44 ` [PATCH 03/13] src: add const qualifiers Jan Engelhardt
@ 2010-10-23 5:44 ` Jan Engelhardt
2010-10-23 5:44 ` [PATCH 05/13] socket: remove statement with no effect Jan Engelhardt
` (9 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Jan Engelhardt @ 2010-10-23 5:44 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
src/attr.c | 2 +-
src/socket.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/attr.c b/src/attr.c
index cafd2c7..fcb5e4a 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -351,7 +351,7 @@ uint64_t mnl_attr_get_u64(const struct nlattr *attr)
*/
const char *mnl_attr_get_str(const struct nlattr *attr)
{
- return (const char *)mnl_attr_get_payload(attr);
+ return mnl_attr_get_payload(attr);
}
/**
diff --git a/src/socket.c b/src/socket.c
index a9ff053..3322ad1 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -201,7 +201,7 @@ int mnl_socket_recvfrom(const struct mnl_socket *nl, void *buf, size_t bufsiz)
.iov_len = bufsiz,
};
struct msghdr msg = {
- .msg_name = (void *)&addr,
+ .msg_name = &addr,
.msg_namelen = sizeof(struct sockaddr_nl),
.msg_iov = &iov,
.msg_iovlen = 1,
--
1.7.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 05/13] socket: remove statement with no effect
2010-10-23 5:44 libmnl: misc code updates Jan Engelhardt
` (3 preceding siblings ...)
2010-10-23 5:44 ` [PATCH 04/13] src: remove redundant casts Jan Engelhardt
@ 2010-10-23 5:44 ` Jan Engelhardt
2010-10-23 5:44 ` [PATCH 06/13] doc: documentation updates Jan Engelhardt
` (8 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Jan Engelhardt @ 2010-10-23 5:44 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
src/socket.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/socket.c b/src/socket.c
index 3322ad1..9250c27 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -235,7 +235,6 @@ int mnl_socket_close(struct mnl_socket *nl)
{
int ret = close(nl->fd);
free(nl);
- nl = NULL;
return ret;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 06/13] doc: documentation updates
2010-10-23 5:44 libmnl: misc code updates Jan Engelhardt
` (4 preceding siblings ...)
2010-10-23 5:44 ` [PATCH 05/13] socket: remove statement with no effect Jan Engelhardt
@ 2010-10-23 5:44 ` Jan Engelhardt
2010-10-23 5:44 ` [PATCH 07/13] include: consistent usage of "extern" Jan Engelhardt
` (7 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Jan Engelhardt @ 2010-10-23 5:44 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
Spelling, grammer, and synchronization of the readme.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
README | 10 +++++-----
src/attr.c | 17 +++++++++--------
src/nlmsg.c | 8 ++++----
src/socket.c | 18 +++++++++---------
4 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/README b/README
index ca7a820..fbac9d2 100644
--- a/README
+++ b/README
@@ -6,21 +6,21 @@ both the Netlink header and TLVs that are repetitive and easy to get wrong.
This library aims to provide simple helpers that allows you to re-use code
and to avoid re-inventing the wheel. The main features of this library are:
-* Small: the shared library requires around 30KB in a x86-based computer.
+* Small: the shared library requires around 30KB for an x86-based computer.
* Simple: this library avoids complexity and elaborated abstractions that
tend to hide Netlink details.
* Easy to use: the library simplifies the work for Netlink-wise developers.
It provides functions to make socket handling, message building, validating,
-parsing, and sequence tracking, easier.
+parsing and sequence tracking, easier.
* Easy to re-use: you can use the library to build your own abstraction layer
on top of this library.
* Decoupling: the interdependency of the main bricks that compose the library
-is reduced, eg. the library provides many helpers but the programmer is not
+is reduced, i.e. the library provides many helpers, but the programmer is not
forced to use them.
-= Examples files =
+= Example files =
-You can find several examples files under examples/ that you can compile by
+You can find several example files under examples/ that you can compile by
invoking `make check'.
--
diff --git a/src/attr.c b/src/attr.c
index fcb5e4a..f77f239 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -65,8 +65,9 @@ uint16_t mnl_attr_get_payload_len(const struct nlattr *attr)
/**
* mnl_attr_get_payload - get pointer to the attribute payload
+ * \param attr pointer to netlink attribute
*
- * This function return a pointer to the attribute payload
+ * This function return a pointer to the attribute payload.
*/
void *mnl_attr_get_payload(const struct nlattr *attr)
{
@@ -75,11 +76,11 @@ void *mnl_attr_get_payload(const struct nlattr *attr)
/**
* mnl_attr_ok - check if there is room for an attribute in a buffer
- * \param nattr attribute that we want to check if there is room for
+ * \param attr attribute that we want to check if there is room for
* \param len remaining bytes in a buffer that contains the attribute
*
* This function is used to check that a buffer, which is supposed to contain
- * an attribute, has enough room for the attribute that it stores, ie. this
+ * an attribute, has enough room for the attribute that it stores, i.e. this
* function can be used to verify that an attribute is neither malformed nor
* truncated.
*
@@ -202,7 +203,7 @@ static const size_t mnl_attr_data_type_len[MNL_TYPE_MAX] = {
*
* The validation is based on the data type. Specifically, it checks that
* integers (u8, u16, u32 and u64) have enough room for them. This function
- * returns -1 in case of error and errno is explicitly set.
+ * returns -1 in case of error, and errno is explicitly set.
*/
int mnl_attr_validate(const struct nlattr *attr, enum mnl_attr_data_type type)
{
@@ -248,7 +249,7 @@ int mnl_attr_validate2(const struct nlattr *attr,
* usually happens at this stage or you can use any other data structure (such
* as lists or trees).
*
- * This function propagates the return value of the callback that can be
+ * This function propagates the return value of the callback, which can be
* MNL_CB_ERROR, MNL_CB_OK or MNL_CB_STOP.
*/
int mnl_attr_parse(const struct nlmsghdr *nlh, unsigned int offset,
@@ -277,7 +278,7 @@ int mnl_attr_parse(const struct nlmsghdr *nlh, unsigned int offset,
* usually happens at this stage or you can use any other data structure (such
* as lists or trees).
*
- * This function propagates the return value of the callback that can be
+ * This function propagates the return value of the callback, which can be
* MNL_CB_ERROR, MNL_CB_OK or MNL_CB_STOP.
*/
int mnl_attr_parse_nested(const struct nlattr *nested,
@@ -333,7 +334,7 @@ uint32_t mnl_attr_get_u32(const struct nlattr *attr)
* \param attr pointer to netlink attribute
*
* This function returns the 64-bit value of the attribute payload. This
- * function is align-safe since accessing 64-bit Netlink attributes is a
+ * function is align-safe, since accessing 64-bit Netlink attributes is a
* common source of alignment issues.
*/
uint64_t mnl_attr_get_u64(const struct nlattr *attr)
@@ -453,7 +454,7 @@ void mnl_attr_put_str(struct nlmsghdr *nlh, uint16_t type, const void *data)
* \param type netlink attribute type
* \param data pointer to string data that is stored by the new attribute
*
- * This function is similar to mnl_attr_put_str but it includes the NULL
+ * This function is similar to mnl_attr_put_str, but it includes the NUL
* terminator at the end of the string.
*
* This function updates the length field of the Netlink message (nlmsg_len)
diff --git a/src/nlmsg.c b/src/nlmsg.c
index 3cec2a2..535f4b5 100644
--- a/src/nlmsg.c
+++ b/src/nlmsg.c
@@ -219,10 +219,10 @@ int mnl_nlmsg_seq_ok(const struct nlmsghdr *nlh, unsigned int seq)
* \param nlh current netlink message that we are handling
* \param seq netlink portid that we want to check
*
- * This functions return 1 if the origin is fulfilled, otherwise
+ * This functions returns 1 if the origin is fulfilled, otherwise
* 0 is returned. We skip the tracking for netlink message whose portID
* is zero since it is reserved for event-based kernel notifications. On the
- * other hand, if portid is set but the message PortID is not set (i.e. this
+ * other hand, if portid is set but the message PortID is not (i.e. this
* is an event message coming from kernel-space), then we also skip the
* tracking. This approach is good if we use the same socket to send commands
* to kernel-space (that we want to track) and to listen to events (that we
@@ -237,8 +237,8 @@ int mnl_nlmsg_portid_ok(const struct nlmsghdr *nlh, unsigned int portid)
* mnl_nlmsg_fprintf - print netlink message to file
* \param nlh pointer to netlink message that we want to print
*
- * This function prints the netlink header to a file. This function may be
- * useful for debugging purposes.
+ * This function prints the netlink header to a file handle.
+ * It may be useful for debugging purposes.
*/
void mnl_nlmsg_fprintf(FILE *fd, const struct nlmsghdr *nlh)
{
diff --git a/src/socket.c b/src/socket.c
index 9250c27..6ca3d3e 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -28,24 +28,24 @@
"Simplify, simplify" -- Henry David Thoureau. Walden (1854)
\endverbatim
*
- * The acronim libmnl stands for LIBrary Minimalistic NetLink.
+ * The acronym libmnl stands for LIBrary Minimalistic NetLink.
*
* (temporary) libmnl homepage is:
* http://1984.lsi.us.es/projects/libmnl/
*
* \section features Main Features
- * - Small: the shared library requires around 30KB in a x86-based computer.
+ * - Small: the shared library requires around 30KB for an x86-based computer.
* - Simple: this library avoids complex abstractions that tend to hide Netlink
* details. It avoids elaborated object-oriented infrastructure and complex
* callback-based workflow.
* - Easy to use: the library simplifies the work for Netlink-wise developers.
* It provides functions to make socket handling, message building,
- * validating, parsing, and sequence tracking, easier.
+ * validating, parsing and sequence tracking, easier.
* - Easy to re-use: you can use this library to build your own abstraction
* layer upon this library, if you want to provide another library that
* hides Netlink details to your users.
* - Decoupling: the interdependency of the main bricks that compose this
- * library is reduced, ie. the library provides many helpers but the
+ * library is reduced, i.e. the library provides many helpers, but the
* programmer is not forced to use them.
*
* \section Dependencies
@@ -58,7 +58,7 @@
* http://git.netfilter.org/cgi-bin/gitweb.cgi?p=libmnl.git;a=summary
*
* \section using Using libmnl
- * You can access several examples files under examples/ in the libmnl source
+ * You can access several example files under examples/ in the libmnl source
* code tree.
*/
@@ -99,7 +99,7 @@ unsigned int mnl_socket_get_portid(const struct mnl_socket *nl)
/**
* mnl_socket_open - open a netlink socket
- * \param unit the netlink socket bus ID (see NETLINK_* constants)
+ * \param bus the netlink socket bus ID (see NETLINK_* constants)
*
* On error, it returns -1 and errno is appropriately set. Otherwise, it
* returns a valid pointer to the mnl_socket structure.
@@ -164,7 +164,7 @@ int mnl_socket_bind(struct mnl_socket *nl, int groups, int pid)
* mnl_socket_sendto - send a netlink message of a certain size
* \param nl netlink socket obtained via mnl_socket_open()
* \param buf buffer containing the netlink message to be sent
- * \param bufsiz number of bytes in the buffer that you want to send
+ * \param len number of bytes in the buffer that you want to send
*
* On error, it returns -1 and errno is appropriately set. Otherwise, it
* returns the number of bytes sent.
@@ -186,8 +186,8 @@ int mnl_socket_sendto(const struct mnl_socket *nl, const void *buf, size_t len)
*
* On error, it returns -1 and errno is appropriately set. If errno is set
* to ENOSPC, it means that the buffer that you have passed to store the
- * netlink message is too small so you have received a truncated message.
- * To avoid this you have to allocate a buffer of MNL_SOCKET_BUFFER_SIZE
+ * netlink message is too small, so you have received a truncated message.
+ * To avoid this, you have to allocate a buffer of MNL_SOCKET_BUFFER_SIZE
* (which is 8KB, see linux/netlink.h for more information). Using this
* buffer size ensures that your buffer is big enough to store the netlink
* message without truncating it.
--
1.7.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 07/13] include: consistent usage of "extern"
2010-10-23 5:44 libmnl: misc code updates Jan Engelhardt
` (5 preceding siblings ...)
2010-10-23 5:44 ` [PATCH 06/13] doc: documentation updates Jan Engelhardt
@ 2010-10-23 5:44 ` Jan Engelhardt
2010-10-23 5:44 ` [PATCH 08/13] attr: string functions should take char * Jan Engelhardt
` (6 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Jan Engelhardt @ 2010-10-23 5:44 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
include/libmnl/libmnl.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
index f658428..0442d05 100644
--- a/include/libmnl/libmnl.h
+++ b/include/libmnl/libmnl.h
@@ -49,7 +49,7 @@ extern struct nlmsghdr *mnl_nlmsg_next(const struct nlmsghdr *nlh, int *len);
extern int mnl_nlmsg_seq_ok(const struct nlmsghdr *nlh, unsigned int seq);
/* Netlink portID checking */
-int mnl_nlmsg_portid_ok(const struct nlmsghdr *nlh, unsigned int portid);
+extern int mnl_nlmsg_portid_ok(const struct nlmsghdr *nlh, unsigned int portid);
/* Netlink message getters */
extern void *mnl_nlmsg_get_payload(const struct nlmsghdr *nlh);
--
1.7.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 08/13] attr: string functions should take char *
2010-10-23 5:44 libmnl: misc code updates Jan Engelhardt
` (6 preceding siblings ...)
2010-10-23 5:44 ` [PATCH 07/13] include: consistent usage of "extern" Jan Engelhardt
@ 2010-10-23 5:44 ` Jan Engelhardt
2010-10-23 5:44 ` [PATCH 09/13] callback: mnl_cb_run should use a void * Jan Engelhardt
` (5 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Jan Engelhardt @ 2010-10-23 5:44 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
I do not quite see the point of using strlen in conjunction with
non-string data; so let's use char * as argument types to catch
misuses.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
include/libmnl/libmnl.h | 4 ++--
src/attr.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
index 0442d05..a61a0b1 100644
--- a/include/libmnl/libmnl.h
+++ b/include/libmnl/libmnl.h
@@ -81,8 +81,8 @@ extern void mnl_attr_put_u8(struct nlmsghdr *nlh, uint16_t type, uint8_t data);
extern void mnl_attr_put_u16(struct nlmsghdr *nlh, uint16_t type, uint16_t data);
extern void mnl_attr_put_u32(struct nlmsghdr *nlh, uint16_t type, uint32_t data);
extern void mnl_attr_put_u64(struct nlmsghdr *nlh, uint16_t type, uint64_t data);
-extern void mnl_attr_put_str(struct nlmsghdr *nlh, uint16_t type, const void *data);
-extern void mnl_attr_put_str_null(struct nlmsghdr *nlh, uint16_t type, const void *data);
+extern void mnl_attr_put_str(struct nlmsghdr *nlh, uint16_t type, const char *data);
+extern void mnl_attr_put_str_null(struct nlmsghdr *nlh, uint16_t type, const char *data);
/* TLV attribute nesting */
extern struct nlattr *mnl_attr_nest_start(struct nlmsghdr *nlh, uint16_t type);
diff --git a/src/attr.c b/src/attr.c
index f77f239..06d6367 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -443,7 +443,7 @@ void mnl_attr_put_u64(struct nlmsghdr *nlh, uint16_t type, uint64_t data)
* This function updates the length field of the Netlink message (nlmsg_len)
* by adding the size (header + payload) of the new attribute.
*/
-void mnl_attr_put_str(struct nlmsghdr *nlh, uint16_t type, const void *data)
+void mnl_attr_put_str(struct nlmsghdr *nlh, uint16_t type, const char *data)
{
mnl_attr_put(nlh, type, strlen(data), data);
}
@@ -460,7 +460,7 @@ void mnl_attr_put_str(struct nlmsghdr *nlh, uint16_t type, const void *data)
* This function updates the length field of the Netlink message (nlmsg_len)
* by adding the size (header + payload) of the new attribute.
*/
-void mnl_attr_put_str_null(struct nlmsghdr *nlh, uint16_t type, const void *data)
+void mnl_attr_put_str_null(struct nlmsghdr *nlh, uint16_t type, const char *data)
{
mnl_attr_put(nlh, type, strlen(data)+1, data);
}
--
1.7.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 09/13] callback: mnl_cb_run should use a void *
2010-10-23 5:44 libmnl: misc code updates Jan Engelhardt
` (7 preceding siblings ...)
2010-10-23 5:44 ` [PATCH 08/13] attr: string functions should take char * Jan Engelhardt
@ 2010-10-23 5:44 ` Jan Engelhardt
2010-10-23 5:44 ` [PATCH 10/13] socket: use more appropriate types for mnl_socket_bind Jan Engelhardt
` (4 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Jan Engelhardt @ 2010-10-23 5:44 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
Because in most cases, it won't be a nul-terminated string :)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
include/libmnl/libmnl.h | 4 ++--
src/callback.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
index a61a0b1..d35e1c1 100644
--- a/include/libmnl/libmnl.h
+++ b/include/libmnl/libmnl.h
@@ -141,10 +141,10 @@ extern int mnl_attr_parse_nested(const struct nlattr *attr, mnl_attr_cb_t cb, vo
typedef int (*mnl_cb_t)(const struct nlmsghdr *nlh, void *data);
-extern int mnl_cb_run(const char *buf, size_t numbytes, unsigned int seq,
+extern int mnl_cb_run(const void *buf, size_t numbytes, unsigned int seq,
unsigned int portid, mnl_cb_t cb_data, void *data);
-extern int mnl_cb_run2(const char *buf, size_t numbytes, unsigned int seq,
+extern int mnl_cb_run2(const void *buf, size_t numbytes, unsigned int seq,
unsigned int portid, mnl_cb_t cb_data, void *data,
mnl_cb_t *cb_ctl_array, unsigned int cb_ctl_array_len);
diff --git a/src/callback.c b/src/callback.c
index f5a6112..4a8fa2d 100644
--- a/src/callback.c
+++ b/src/callback.c
@@ -74,12 +74,12 @@ static const mnl_cb_t default_cb_array[NLMSG_MIN_TYPE] = {
* is set to ESRCH. If the sequence number is not the expected, errno is set
* to EPROTO.
*/
-int mnl_cb_run2(const char *buf, size_t numbytes, unsigned int seq,
+int mnl_cb_run2(const void *buf, size_t numbytes, unsigned int seq,
unsigned int portid, mnl_cb_t cb_data, void *data,
mnl_cb_t *cb_ctl_array, unsigned int cb_ctl_array_len)
{
int ret = MNL_CB_OK, len = numbytes;
- struct nlmsghdr *nlh = (struct nlmsghdr *)buf;
+ const struct nlmsghdr *nlh = buf;
while (mnl_nlmsg_ok(nlh, len)) {
/* check message source */
@@ -136,7 +136,7 @@ out:
*
* This function propagates the callback return value.
*/
-int mnl_cb_run(const char *buf, size_t numbytes, unsigned int seq,
+int mnl_cb_run(const void *buf, size_t numbytes, unsigned int seq,
unsigned int portid, mnl_cb_t cb_data, void *data)
{
return mnl_cb_run2(buf, numbytes, seq, portid, cb_data, data, NULL, 0);
--
1.7.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 10/13] socket: use more appropriate types for mnl_socket_bind
2010-10-23 5:44 libmnl: misc code updates Jan Engelhardt
` (8 preceding siblings ...)
2010-10-23 5:44 ` [PATCH 09/13] callback: mnl_cb_run should use a void * Jan Engelhardt
@ 2010-10-23 5:44 ` Jan Engelhardt
2010-10-23 5:44 ` [PATCH 11/13] include: add cplusplus guards for extern Jan Engelhardt
` (3 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Jan Engelhardt @ 2010-10-23 5:44 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
groups, being a bitmask, should be unsigned; and let's also use pid_t
for pid.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
include/libmnl/libmnl.h | 2 +-
src/socket.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
index d35e1c1..d766183 100644
--- a/include/libmnl/libmnl.h
+++ b/include/libmnl/libmnl.h
@@ -16,7 +16,7 @@
struct mnl_socket;
extern struct mnl_socket *mnl_socket_open(int type);
-extern int mnl_socket_bind(struct mnl_socket *nl, int groups, int pid);
+extern int mnl_socket_bind(struct mnl_socket *nl, unsigned int groups, pid_t pid);
extern int mnl_socket_close(struct mnl_socket *nl);
extern int mnl_socket_get_fd(const struct mnl_socket *nl);
extern unsigned int mnl_socket_get_portid(const struct mnl_socket *nl);
diff --git a/src/socket.c b/src/socket.c
index 6ca3d3e..c9afd34 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -131,7 +131,7 @@ struct mnl_socket *mnl_socket_open(int bus)
* success, 0 is returned. You can use MNL_SOCKET_AUTOPID which is 0 for
* automatic port ID selection.
*/
-int mnl_socket_bind(struct mnl_socket *nl, int groups, int pid)
+int mnl_socket_bind(struct mnl_socket *nl, unsigned int groups, pid_t pid)
{
int ret;
socklen_t addr_len;
--
1.7.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 11/13] include: add cplusplus guards for extern
2010-10-23 5:44 libmnl: misc code updates Jan Engelhardt
` (9 preceding siblings ...)
2010-10-23 5:44 ` [PATCH 10/13] socket: use more appropriate types for mnl_socket_bind Jan Engelhardt
@ 2010-10-23 5:44 ` Jan Engelhardt
2010-10-23 5:44 ` [PATCH 12/13] nlmsg: use bool return type for yes-no functions Jan Engelhardt
` (2 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Jan Engelhardt @ 2010-10-23 5:44 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
include/libmnl/libmnl.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
index d766183..b64306a 100644
--- a/include/libmnl/libmnl.h
+++ b/include/libmnl/libmnl.h
@@ -6,6 +6,10 @@
#include <sys/socket.h> /* for sa_family_t */
#include <linux/netlink.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Netlink socket API
*/
@@ -156,4 +160,8 @@ extern int mnl_cb_run2(const void *buf, size_t numbytes, unsigned int seq,
#define SOL_NETLINK 270
#endif
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif
--
1.7.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 12/13] nlmsg: use bool return type for yes-no functions
2010-10-23 5:44 libmnl: misc code updates Jan Engelhardt
` (10 preceding siblings ...)
2010-10-23 5:44 ` [PATCH 11/13] include: add cplusplus guards for extern Jan Engelhardt
@ 2010-10-23 5:44 ` Jan Engelhardt
2010-10-23 5:44 ` [PATCH 13/13] attr: rename str_null from NULL away Jan Engelhardt
2010-10-23 14:52 ` libmnl: misc code updates Pablo Neira Ayuso
13 siblings, 0 replies; 18+ messages in thread
From: Jan Engelhardt @ 2010-10-23 5:44 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
include/libmnl/libmnl.h | 7 +++++--
src/nlmsg.c | 18 +++++++++---------
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
index b64306a..a32fb1d 100644
--- a/include/libmnl/libmnl.h
+++ b/include/libmnl/libmnl.h
@@ -5,6 +5,9 @@
#include <stdint.h>
#include <sys/socket.h> /* for sa_family_t */
#include <linux/netlink.h>
+#ifndef __cplusplus
+# include <stdbool.h>
+#endif
#ifdef __cplusplus
extern "C" {
@@ -50,10 +53,10 @@ extern int mnl_nlmsg_ok(const struct nlmsghdr *nlh, int len);
extern struct nlmsghdr *mnl_nlmsg_next(const struct nlmsghdr *nlh, int *len);
/* Netlink sequence tracking */
-extern int mnl_nlmsg_seq_ok(const struct nlmsghdr *nlh, unsigned int seq);
+extern bool mnl_nlmsg_seq_ok(const struct nlmsghdr *nlh, unsigned int seq);
/* Netlink portID checking */
-extern int mnl_nlmsg_portid_ok(const struct nlmsghdr *nlh, unsigned int portid);
+extern bool mnl_nlmsg_portid_ok(const struct nlmsghdr *nlh, unsigned int portid);
/* Netlink message getters */
extern void *mnl_nlmsg_get_payload(const struct nlmsghdr *nlh);
diff --git a/src/nlmsg.c b/src/nlmsg.c
index 535f4b5..f89a9ec 100644
--- a/src/nlmsg.c
+++ b/src/nlmsg.c
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
-
+#include <stdbool.h>
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
@@ -200,8 +200,8 @@ void *mnl_nlmsg_get_payload_tail(const struct nlmsghdr *nlh)
* \param nlh current netlink message that we are handling
* \param seq last sequence number used to send a message
*
- * This functions returns 1 if the sequence tracking is fulfilled, otherwise
- * 0 is returned. We skip the tracking for netlink messages whose sequence
+ * This functions returns true if the sequence tracking is fulfilled, otherwise
+ * false is returned. We skip the tracking for netlink messages whose sequence
* number is zero since it is usually reserved for event-based kernel
* notifications. On the other hand, if seq is set but the message sequence
* number is not set (i.e. this is an event message coming from kernel-space),
@@ -209,9 +209,9 @@ void *mnl_nlmsg_get_payload_tail(const struct nlmsghdr *nlh)
* socket to send commands to kernel-space (that we want to track) and to
* listen to events (that we do not track).
*/
-int mnl_nlmsg_seq_ok(const struct nlmsghdr *nlh, unsigned int seq)
+bool mnl_nlmsg_seq_ok(const struct nlmsghdr *nlh, unsigned int seq)
{
- return nlh->nlmsg_seq && seq ? nlh->nlmsg_seq == seq : 1;
+ return nlh->nlmsg_seq && seq ? nlh->nlmsg_seq == seq : true;
}
/**
@@ -219,8 +219,8 @@ int mnl_nlmsg_seq_ok(const struct nlmsghdr *nlh, unsigned int seq)
* \param nlh current netlink message that we are handling
* \param seq netlink portid that we want to check
*
- * This functions returns 1 if the origin is fulfilled, otherwise
- * 0 is returned. We skip the tracking for netlink message whose portID
+ * This functions returns true if the origin is fulfilled, otherwise
+ * false is returned. We skip the tracking for netlink message whose portID
* is zero since it is reserved for event-based kernel notifications. On the
* other hand, if portid is set but the message PortID is not (i.e. this
* is an event message coming from kernel-space), then we also skip the
@@ -228,9 +228,9 @@ int mnl_nlmsg_seq_ok(const struct nlmsghdr *nlh, unsigned int seq)
* to kernel-space (that we want to track) and to listen to events (that we
* do not track).
*/
-int mnl_nlmsg_portid_ok(const struct nlmsghdr *nlh, unsigned int portid)
+bool mnl_nlmsg_portid_ok(const struct nlmsghdr *nlh, unsigned int portid)
{
- return nlh->nlmsg_pid && portid ? nlh->nlmsg_pid == portid : 1;
+ return nlh->nlmsg_pid && portid ? nlh->nlmsg_pid == portid : true;
}
/**
--
1.7.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 13/13] attr: rename str_null from NULL away
2010-10-23 5:44 libmnl: misc code updates Jan Engelhardt
` (11 preceding siblings ...)
2010-10-23 5:44 ` [PATCH 12/13] nlmsg: use bool return type for yes-no functions Jan Engelhardt
@ 2010-10-23 5:44 ` Jan Engelhardt
2010-10-23 14:52 ` libmnl: misc code updates Pablo Neira Ayuso
13 siblings, 0 replies; 18+ messages in thread
From: Jan Engelhardt @ 2010-10-23 5:44 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
A small little pedantism: NULL (as in, the pointer) isn't NUL (as in,
the character with value zero, '\0'). I propose to rename it to strz,
for the zero-terminated string (sometimes referred to as ASCIZ string,
but of course C isn't tied to ASCII).
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
examples/genl/genl-family-get.c | 2 +-
include/libmnl/libmnl.h | 2 +-
src/attr.c | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/examples/genl/genl-family-get.c b/examples/genl/genl-family-get.c
index b015466..be8da3c 100644
--- a/examples/genl/genl-family-get.c
+++ b/examples/genl/genl-family-get.c
@@ -204,7 +204,7 @@ int main(int argc, char *argv[])
genl->version = 1;
mnl_attr_put_u32(nlh, CTRL_ATTR_FAMILY_ID, GENL_ID_CTRL);
- mnl_attr_put_str_null(nlh, CTRL_ATTR_FAMILY_NAME, argv[1]);
+ mnl_attr_put_strz(nlh, CTRL_ATTR_FAMILY_NAME, argv[1]);
nl = mnl_socket_open(NETLINK_GENERIC);
if (nl == NULL) {
diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
index a32fb1d..7094af2 100644
--- a/include/libmnl/libmnl.h
+++ b/include/libmnl/libmnl.h
@@ -89,7 +89,7 @@ extern void mnl_attr_put_u16(struct nlmsghdr *nlh, uint16_t type, uint16_t data)
extern void mnl_attr_put_u32(struct nlmsghdr *nlh, uint16_t type, uint32_t data);
extern void mnl_attr_put_u64(struct nlmsghdr *nlh, uint16_t type, uint64_t data);
extern void mnl_attr_put_str(struct nlmsghdr *nlh, uint16_t type, const char *data);
-extern void mnl_attr_put_str_null(struct nlmsghdr *nlh, uint16_t type, const char *data);
+extern void mnl_attr_put_strz(struct nlmsghdr *nlh, uint16_t type, const char *data);
/* TLV attribute nesting */
extern struct nlattr *mnl_attr_nest_start(struct nlmsghdr *nlh, uint16_t type);
diff --git a/src/attr.c b/src/attr.c
index 06d6367..c60e1f4 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -449,18 +449,18 @@ void mnl_attr_put_str(struct nlmsghdr *nlh, uint16_t type, const char *data)
}
/**
- * mnl_attr_put_str_null - add string attribute to netlink message
+ * mnl_attr_put_strz - add string attribute to netlink message
* \param nlh pointer to the netlink message
* \param type netlink attribute type
* \param data pointer to string data that is stored by the new attribute
*
- * This function is similar to mnl_attr_put_str, but it includes the NUL
- * terminator at the end of the string.
+ * This function is similar to mnl_attr_put_str, but it includes the
+ * NUL/zero ('\0') terminator at the end of the string.
*
* This function updates the length field of the Netlink message (nlmsg_len)
* by adding the size (header + payload) of the new attribute.
*/
-void mnl_attr_put_str_null(struct nlmsghdr *nlh, uint16_t type, const char *data)
+void mnl_attr_put_strz(struct nlmsghdr *nlh, uint16_t type, const char *data)
{
mnl_attr_put(nlh, type, strlen(data)+1, data);
}
--
1.7.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: libmnl: misc code updates
2010-10-23 5:44 libmnl: misc code updates Jan Engelhardt
` (12 preceding siblings ...)
2010-10-23 5:44 ` [PATCH 13/13] attr: rename str_null from NULL away Jan Engelhardt
@ 2010-10-23 14:52 ` Pablo Neira Ayuso
2010-10-23 18:53 ` Jan Engelhardt
13 siblings, 1 reply; 18+ messages in thread
From: Pablo Neira Ayuso @ 2010-10-23 14:52 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter-devel, Jozsef Kadlecsik
On 23/10/10 07:44, Jan Engelhardt wrote:
> The following changes since commit a8956ff09c06869b6c5bc5f525944d8c228e64e9:
>
> doc: git tree update (now at netfilter.org) and fix listing in doxygen (2010-10-21 13:32:42 +0200)
>
> are available in the git repository at:
> git://dev.medozas.de/libmnl master
Thanks Jan, I have pulled patches from 1 to 11. Patches 12 and 13 change
the API/ABI and I'd like to hear from Jozsef first.
@Jozsef, since I haven't released first version libmnl yet, we're still
in time to make those change, or would they be annoying for ipset5? If
so, I won't apply them.
P.S: Jan, I'll send your postcards by this monday.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: libmnl: misc code updates
2010-10-23 14:52 ` libmnl: misc code updates Pablo Neira Ayuso
@ 2010-10-23 18:53 ` Jan Engelhardt
2010-10-24 20:33 ` Jozsef Kadlecsik
0 siblings, 1 reply; 18+ messages in thread
From: Jan Engelhardt @ 2010-10-23 18:53 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel, Jozsef Kadlecsik
On Saturday 2010-10-23 16:52, Pablo Neira Ayuso wrote:
>On 23/10/10 07:44, Jan Engelhardt wrote:
>> The following changes since commit a8956ff09c06869b6c5bc5f525944d8c228e64e9:
>>
>> doc: git tree update (now at netfilter.org) and fix listing in doxygen (2010-10-21 13:32:42 +0200)
>>
>> are available in the git repository at:
>> git://dev.medozas.de/libmnl master
>
>Thanks Jan, I have pulled patches from 1 to 11. Patches 12 and 13 change
>the API/ABI and I'd like to hear from Jozsef first.
>
>@Jozsef, since I haven't released first version libmnl yet, we're still
>in time to make those change, or would they be annoying for ipset5? If
>so, I won't apply them.
I compile-tested it with ipset5, and there are no new errors or warnings
popping up.
>P.S: Jan, I'll send your postcards by this monday.
Thanks ;-)
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: libmnl: misc code updates
2010-10-23 18:53 ` Jan Engelhardt
@ 2010-10-24 20:33 ` Jozsef Kadlecsik
2010-10-24 22:45 ` Pablo Neira Ayuso
0 siblings, 1 reply; 18+ messages in thread
From: Jozsef Kadlecsik @ 2010-10-24 20:33 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Pablo Neira Ayuso, netfilter-devel
Hi Pablo,
On Sat, 23 Oct 2010, Jan Engelhardt wrote:
> On Saturday 2010-10-23 16:52, Pablo Neira Ayuso wrote:
>
> >On 23/10/10 07:44, Jan Engelhardt wrote:
> >> The following changes since commit a8956ff09c06869b6c5bc5f525944d8c228e64e9:
> >>
> >> doc: git tree update (now at netfilter.org) and fix listing in doxygen (2010-10-21 13:32:42 +0200)
> >>
> >> are available in the git repository at:
> >> git://dev.medozas.de/libmnl master
> >
> >Thanks Jan, I have pulled patches from 1 to 11. Patches 12 and 13 change
> >the API/ABI and I'd like to hear from Jozsef first.
> >
> >@Jozsef, since I haven't released first version libmnl yet, we're still
> >in time to make those change, or would they be annoying for ipset5? If
> >so, I won't apply them.
>
> I compile-tested it with ipset5, and there are no new errors or warnings
> popping up.
Yes, the changes are OK for ipset5, no problem for me.
Best regards,
Jozsef
-
E-mail : kadlec@blackhole.kfki.hu, kadlec@mail.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
H-1525 Budapest 114, POB. 49, Hungary
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: libmnl: misc code updates
2010-10-24 20:33 ` Jozsef Kadlecsik
@ 2010-10-24 22:45 ` Pablo Neira Ayuso
0 siblings, 0 replies; 18+ messages in thread
From: Pablo Neira Ayuso @ 2010-10-24 22:45 UTC (permalink / raw)
To: Jozsef Kadlecsik; +Cc: Jan Engelhardt, netfilter-devel
On 24/10/10 22:33, Jozsef Kadlecsik wrote:
> Hi Pablo,
>
> On Sat, 23 Oct 2010, Jan Engelhardt wrote:
>
>> On Saturday 2010-10-23 16:52, Pablo Neira Ayuso wrote:
>>
>>> On 23/10/10 07:44, Jan Engelhardt wrote:
>>>> The following changes since commit a8956ff09c06869b6c5bc5f525944d8c228e64e9:
>>>>
>>>> doc: git tree update (now at netfilter.org) and fix listing in doxygen (2010-10-21 13:32:42 +0200)
>>>>
>>>> are available in the git repository at:
>>>> git://dev.medozas.de/libmnl master
>>>
>>> Thanks Jan, I have pulled patches from 1 to 11. Patches 12 and 13 change
>>> the API/ABI and I'd like to hear from Jozsef first.
>>>
>>> @Jozsef, since I haven't released first version libmnl yet, we're still
>>> in time to make those change, or would they be annoying for ipset5? If
>>> so, I won't apply them.
>>
>> I compile-tested it with ipset5, and there are no new errors or warnings
>> popping up.
>
> Yes, the changes are OK for ipset5, no problem for me.
OK, I have applied patches 12 and 13. Thanks!
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2010-10-24 22:45 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-23 5:44 libmnl: misc code updates Jan Engelhardt
2010-10-23 5:44 ` [PATCH 01/13] build: fix disable_static functionality Jan Engelhardt
2010-10-23 5:44 ` [PATCH 02/13] src: avoid using deprecated unspecified argument lists Jan Engelhardt
2010-10-23 5:44 ` [PATCH 03/13] src: add const qualifiers Jan Engelhardt
2010-10-23 5:44 ` [PATCH 04/13] src: remove redundant casts Jan Engelhardt
2010-10-23 5:44 ` [PATCH 05/13] socket: remove statement with no effect Jan Engelhardt
2010-10-23 5:44 ` [PATCH 06/13] doc: documentation updates Jan Engelhardt
2010-10-23 5:44 ` [PATCH 07/13] include: consistent usage of "extern" Jan Engelhardt
2010-10-23 5:44 ` [PATCH 08/13] attr: string functions should take char * Jan Engelhardt
2010-10-23 5:44 ` [PATCH 09/13] callback: mnl_cb_run should use a void * Jan Engelhardt
2010-10-23 5:44 ` [PATCH 10/13] socket: use more appropriate types for mnl_socket_bind Jan Engelhardt
2010-10-23 5:44 ` [PATCH 11/13] include: add cplusplus guards for extern Jan Engelhardt
2010-10-23 5:44 ` [PATCH 12/13] nlmsg: use bool return type for yes-no functions Jan Engelhardt
2010-10-23 5:44 ` [PATCH 13/13] attr: rename str_null from NULL away Jan Engelhardt
2010-10-23 14:52 ` libmnl: misc code updates Pablo Neira Ayuso
2010-10-23 18:53 ` Jan Engelhardt
2010-10-24 20:33 ` Jozsef Kadlecsik
2010-10-24 22:45 ` Pablo Neira Ayuso
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.