static unsigned int ebt_ulog_tg(struct sk_buff *skb, const struct xt_action_param *par) { ebt_ulog_packet(par->hooknum, skb, par->in, par->out, par->targinfo, NULL); return EBT_CONTINUE; }
static void ebt_ulog(const struct sk_buff *skb, unsigned int hooknr, const struct net_device *in, const struct net_device *out, const void *data, unsigned int datalen) { struct ebt_ulog_info *uloginfo = (struct ebt_ulog_info *)data; ebt_ulog_packet(hooknr, skb, in, out, uloginfo, NULL); }
/* this function is registered with the netfilter core */ static void ebt_log_packet(struct net *net, u_int8_t pf, unsigned int hooknum, const struct sk_buff *skb, const struct net_device *in, const struct net_device *out, const struct nf_loginfo *li, const char *prefix) { struct ebt_ulog_info loginfo; if (!li || li->type != NF_LOG_TYPE_ULOG) { loginfo.nlgroup = EBT_ULOG_DEFAULT_NLGROUP; loginfo.cprange = 0; loginfo.qthreshold = EBT_ULOG_DEFAULT_QTHRESHOLD; loginfo.prefix[0] = '\0'; } else { loginfo.nlgroup = li->u.ulog.group; loginfo.cprange = li->u.ulog.copy_len; loginfo.qthreshold = li->u.ulog.qthreshold; strlcpy(loginfo.prefix, prefix, sizeof(loginfo.prefix)); } ebt_ulog_packet(net, hooknum, skb, in, out, &loginfo, prefix); }