diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2010-11-19 13:07:48 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2010-11-19 13:07:48 +0100 |
commit | fe73d7d8854efda86d4d09757874c48352e6b247 (patch) | |
tree | 64104b409f7a50ae3c434034bf3c956f8b5d88a7 /src/socket.c | |
parent | 68dd5828052a965a7c8e84d0b8c9d4996ff3f410 (diff) |
build: tag function headers rather than decls as exported
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/socket.c')
-rw-r--r-- | src/socket.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/socket.c b/src/socket.c index 521e860..58f635e 100644 --- a/src/socket.c +++ b/src/socket.c @@ -14,6 +14,7 @@ #include <unistd.h> #include <time.h> #include <errno.h> +#include "internal.h" /** * \mainpage @@ -81,7 +82,7 @@ struct mnl_socket { * * This function returns the file descriptor of a given netlink socket. */ -int mnl_socket_get_fd(const struct mnl_socket *nl) +EXPORT_SYMBOL int mnl_socket_get_fd(const struct mnl_socket *nl) { return nl->fd; } @@ -95,7 +96,7 @@ int mnl_socket_get_fd(const struct mnl_socket *nl) * which is not always true. This is the case if you open more than one * socket that is binded to the same Netlink subsystem from the same process. */ -unsigned int mnl_socket_get_portid(const struct mnl_socket *nl) +EXPORT_SYMBOL unsigned int mnl_socket_get_portid(const struct mnl_socket *nl) { return nl->addr.nl_pid; } @@ -107,7 +108,7 @@ unsigned int mnl_socket_get_portid(const struct mnl_socket *nl) * On error, it returns -1 and errno is appropriately set. Otherwise, it * returns a valid pointer to the mnl_socket structure. */ -struct mnl_socket *mnl_socket_open(int bus) +EXPORT_SYMBOL struct mnl_socket *mnl_socket_open(int bus) { struct mnl_socket *nl; @@ -134,7 +135,8 @@ 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, unsigned int groups, pid_t pid) +EXPORT_SYMBOL int +mnl_socket_bind(struct mnl_socket *nl, unsigned int groups, pid_t pid) { int ret; socklen_t addr_len; @@ -172,8 +174,8 @@ int mnl_socket_bind(struct mnl_socket *nl, unsigned int groups, pid_t pid) * On error, it returns -1 and errno is appropriately set. Otherwise, it * returns the number of bytes sent. */ -ssize_t mnl_socket_sendto(const struct mnl_socket *nl, const void *buf, - size_t len) +EXPORT_SYMBOL ssize_t +mnl_socket_sendto(const struct mnl_socket *nl, const void *buf, size_t len) { static const struct sockaddr_nl snl = { .nl_family = AF_NETLINK @@ -196,8 +198,8 @@ ssize_t mnl_socket_sendto(const struct mnl_socket *nl, const void *buf, * buffer size ensures that your buffer is big enough to store the netlink * message without truncating it. */ -ssize_t mnl_socket_recvfrom(const struct mnl_socket *nl, void *buf, - size_t bufsiz) +EXPORT_SYMBOL ssize_t +mnl_socket_recvfrom(const struct mnl_socket *nl, void *buf, size_t bufsiz) { ssize_t ret; struct sockaddr_nl addr; @@ -236,7 +238,7 @@ ssize_t mnl_socket_recvfrom(const struct mnl_socket *nl, void *buf, * On error, this function returns -1 and errno is appropriately set. * On success, it returns 0. */ -int mnl_socket_close(struct mnl_socket *nl) +EXPORT_SYMBOL int mnl_socket_close(struct mnl_socket *nl) { int ret = close(nl->fd); free(nl); @@ -268,8 +270,8 @@ int mnl_socket_close(struct mnl_socket *nl) * * On error, this function returns -1 and errno is appropriately set. */ -int mnl_socket_setsockopt(const struct mnl_socket *nl, int type, - void *buf, socklen_t len) +EXPORT_SYMBOL int mnl_socket_setsockopt(const struct mnl_socket *nl, int type, + void *buf, socklen_t len) { return setsockopt(nl->fd, SOL_NETLINK, type, buf, len); } @@ -283,8 +285,8 @@ int mnl_socket_setsockopt(const struct mnl_socket *nl, int type, * * On error, this function returns -1 and errno is appropriately set. */ -int mnl_socket_getsockopt(const struct mnl_socket *nl, int type, - void *buf, socklen_t *len) +EXPORT_SYMBOL int mnl_socket_getsockopt(const struct mnl_socket *nl, int type, + void *buf, socklen_t *len) { return getsockopt(nl->fd, SOL_NETLINK, type, buf, len); } |