diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2010-06-25 15:05:38 +0200 |
---|---|---|
committer | pablo <pablo@dune.localdomain> | 2010-06-25 15:05:38 +0200 |
commit | 5d51315f5263f9cbda18f70e2d340a66cf1bf1f9 (patch) | |
tree | 1ef351f4055e63ec4dd2d39101ff409e252236c5 /src | |
parent | ff088fc0d88ef97fe9559880643def6fe40ae086 (diff) | |
download | libmnl-5d51315f5263f9cbda18f70e2d340a66cf1bf1f9.tar.gz libmnl-5d51315f5263f9cbda18f70e2d340a66cf1bf1f9.zip |
socket: remove mnl_socket_sendmsg() and mnl_socket_recvmsg()
These functions are too simple wrappers that bloat the library.
We can use mnl_socket_get_fd() to obtain the file descriptor
and invoke message-oriented system call instead.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/socket.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/socket.c b/src/socket.c index 7fd3a5c..cf8f251 100644 --- a/src/socket.c +++ b/src/socket.c @@ -127,21 +127,6 @@ int mnl_socket_sendto(const struct mnl_socket *nl, const void *buf, size_t len) } /** - * mnl_socket_sendmsg - send a netlink message of a certain size - * @nl: netlink socket obtained via mnl_socket_open() - * @msg: pointer to struct msghdr (must be initialized appropriately) - * @flags: flags passed to sendmsg() - * - * On error, it returns -1 and errno is appropriately set. Otherwise, it - * returns the number of bytes sent. - */ -int mnl_socket_sendmsg(const struct mnl_socket *nl, - const struct msghdr *msg, int flags) -{ - return sendmsg(nl->fd, msg, flags); -} - -/** * mnl_socket_recvfrom - receive a netlink message * @nl: netlink socket obtained via mnl_socket_open() * @buf: buffer that you want to use to store the netlink message @@ -185,21 +170,6 @@ int mnl_socket_recvfrom(const struct mnl_socket *nl, void *buf, size_t bufsiz) } /** - * mnl_socket_recvmsg- receive a netlink message - * @nl: netlink socket obtained via mnl_socket_open() - * @msg: pointer to struct msghdr (must be initialized appropriately) - * @flags: flags passed to recvmsg() - * - * On error, this function returns -1 and errno is appropriately set. - * On sucess, this function returns the number of bytes received. - */ -int mnl_socket_recvmsg(const struct mnl_socket *nl, - struct msghdr *msg, int flags) -{ - return recvmsg(nl->fd, msg, flags); -} - -/** * mnl_socket_close - close a given netlink socket * @nl: netlink socket obtained via mnl_socket_open() * |