summaryrefslogtreecommitdiffstats
path: root/src/nlmsg.c
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-04-10 12:58:04 -0700
committerPablo Neira Ayuso <pablo@netfilter.org>2017-04-14 01:38:48 +0200
commit58cb0668dc15c78cd3af9eeaedf29386e86ecac1 (patch)
tree46d7352ebbbdf7c41a019248bfc94c788849fc95 /src/nlmsg.c
parentb39cac7afe54e08bb5d8af6e082de9b4f3a273ec (diff)
src: Declare the define visibility attribute together
clang ignores the visibility attribute if its not defined before the definition. As a result these symbols become hidden and consumers of this library fail to link due to these missing symbols. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/nlmsg.c')
-rw-r--r--src/nlmsg.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/nlmsg.c b/src/nlmsg.c
index ba28c77..5582407 100644
--- a/src/nlmsg.c
+++ b/src/nlmsg.c
@@ -30,7 +30,7 @@
* @{
*/
-void nfq_nlmsg_verdict_put(struct nlmsghdr *nlh, int id, int verdict)
+void __EXPORTED nfq_nlmsg_verdict_put(struct nlmsghdr *nlh, int id, int verdict)
{
struct nfqnl_msg_verdict_hdr vh = {
.verdict = htonl(verdict),
@@ -38,20 +38,17 @@ void nfq_nlmsg_verdict_put(struct nlmsghdr *nlh, int id, int verdict)
};
mnl_attr_put(nlh, NFQA_VERDICT_HDR, sizeof(vh), &vh);
}
-EXPORT_SYMBOL(nfq_nlmsg_verdict_put);
-void nfq_nlmsg_verdict_put_mark(struct nlmsghdr *nlh, uint32_t mark)
+void __EXPORTED nfq_nlmsg_verdict_put_mark(struct nlmsghdr *nlh, uint32_t mark)
{
mnl_attr_put_u32(nlh, NFQA_MARK, htonl(mark));
}
-EXPORT_SYMBOL(nfq_nlmsg_verdict_put_mark);
-void
+void __EXPORTED
nfq_nlmsg_verdict_put_pkt(struct nlmsghdr *nlh, const void *pkt, uint32_t plen)
{
mnl_attr_put(nlh, NFQA_PAYLOAD, plen, pkt);
}
-EXPORT_SYMBOL(nfq_nlmsg_verdict_put_pkt);
/**
* @}
@@ -85,7 +82,7 @@ EXPORT_SYMBOL(nfq_nlmsg_verdict_put_pkt);
* given protocol family. Both commands are ignored by Linux kernel 3.8 and
* later versions.
*/
-void nfq_nlmsg_cfg_put_cmd(struct nlmsghdr *nlh, uint16_t pf, uint8_t cmd)
+void __EXPORTED nfq_nlmsg_cfg_put_cmd(struct nlmsghdr *nlh, uint16_t pf, uint8_t cmd)
{
struct nfqnl_msg_config_cmd command = {
.command = cmd,
@@ -93,9 +90,8 @@ void nfq_nlmsg_cfg_put_cmd(struct nlmsghdr *nlh, uint16_t pf, uint8_t cmd)
};
mnl_attr_put(nlh, NFQA_CFG_CMD, sizeof(command), &command);
}
-EXPORT_SYMBOL(nfq_nlmsg_cfg_put_cmd);
-void nfq_nlmsg_cfg_put_params(struct nlmsghdr *nlh, uint8_t mode, int range)
+void __EXPORTED nfq_nlmsg_cfg_put_params(struct nlmsghdr *nlh, uint8_t mode, int range)
{
struct nfqnl_msg_config_params params = {
.copy_range = htonl(range),
@@ -103,13 +99,11 @@ void nfq_nlmsg_cfg_put_params(struct nlmsghdr *nlh, uint8_t mode, int range)
};
mnl_attr_put(nlh, NFQA_CFG_PARAMS, sizeof(params), &params);
}
-EXPORT_SYMBOL(nfq_nlmsg_cfg_put_params);
-void nfq_nlmsg_cfg_put_qmaxlen(struct nlmsghdr *nlh, uint32_t queue_maxlen)
+void __EXPORTED nfq_nlmsg_cfg_put_qmaxlen(struct nlmsghdr *nlh, uint32_t queue_maxlen)
{
mnl_attr_put_u32(nlh, NFQA_CFG_QUEUE_MAXLEN, htonl(queue_maxlen));
}
-EXPORT_SYMBOL(nfq_nlmsg_cfg_put_qmaxlen);
/**
* @}
@@ -179,12 +173,11 @@ static int nfq_pkt_parse_attr_cb(const struct nlattr *attr, void *data)
* This function returns MNL_CB_ERROR if any error occurs, or MNL_CB_OK on
* success.
*/
-int nfq_nlmsg_parse(const struct nlmsghdr *nlh, struct nlattr **attr)
+int __EXPORTED nfq_nlmsg_parse(const struct nlmsghdr *nlh, struct nlattr **attr)
{
return mnl_attr_parse(nlh, sizeof(struct nfgenmsg),
nfq_pkt_parse_attr_cb, attr);
}
-EXPORT_SYMBOL(nfq_nlmsg_parse);
/**
* @}