summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libipulog_compat.c3
-rw-r--r--src/libnetfilter_log.c11
2 files changed, 6 insertions, 8 deletions
diff --git a/src/libipulog_compat.c b/src/libipulog_compat.c
index a0de3cb..4efa501 100644
--- a/src/libipulog_compat.c
+++ b/src/libipulog_compat.c
@@ -133,10 +133,9 @@ ulog_packet_msg_t *ipulog_get_packet(struct ipulog_handle *h,
struct nfulnl_msg_packet_hdr *hdr;
if (!h->last_nlh) {
- printf("first\n");
nlh = nfnl_get_msg_first(nflog_nfnlh(h->nfulh), buf, len);
}else {
-next_msg: printf("next\n");
+next_msg:
nlh = nfnl_get_msg_next(nflog_nfnlh(h->nfulh), buf, len);
}
h->last_nlh = nlh;
diff --git a/src/libnetfilter_log.c b/src/libnetfilter_log.c
index 1b47242..339c961 100644
--- a/src/libnetfilter_log.c
+++ b/src/libnetfilter_log.c
@@ -161,11 +161,6 @@ static int __nflog_rcv_pkt(struct nlmsghdr *nlh, struct nfattr *nfa[],
return gh->cb(gh, nfmsg, &nfldata, gh->data);
}
-static struct nfnl_callback pkt_cb = {
- .call = &__nflog_rcv_pkt,
- .attr_count = NFULA_MAX,
-};
-
/* public interface */
struct nfnl_handle *nflog_nfnlh(struct nflog_handle *h)
@@ -255,6 +250,10 @@ struct nflog_handle *nflog_open_nfnl(struct nfnl_handle *nfnlh)
{
struct nflog_handle *h;
int err;
+ struct nfnl_callback pkt_cb = {
+ .call = &__nflog_rcv_pkt,
+ .attr_count = NFULA_MAX,
+ };
h = calloc(1, sizeof(*h));
if (!h)
@@ -557,7 +556,7 @@ int nflog_set_mode(struct nflog_g_handle *gh,
* \param gh Netfilter log group handle obtained by call to nflog_bind_group().
* \param timeout Time to wait until the log buffer is pushed to userspace
*
- * This function allows to set the maximum time that nflog waits until it
+ * This function allows one to set the maximum time that nflog waits until it
* pushes the log buffer to userspace if no new logged packets have occured.
* Basically, nflog implements a buffer to reduce the computational cost
* of delivering the log message to userspace.