linux/include/net/netfilter/nf_queue.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _NF_QUEUE_H
#define _NF_QUEUE_H

#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/jhash.h>
#include <linux/netfilter.h>
#include <linux/skbuff.h>

/* Each queued (to userspace) skbuff has one of these. */
struct nf_queue_entry {};

#define nf_queue_entry_reroute(x)

/* Packet queuing */
struct nf_queue_handler {};

void nf_register_queue_handler(const struct nf_queue_handler *qh);
void nf_unregister_queue_handler(void);

bool nf_queue_entry_get_refs(struct nf_queue_entry *entry);
void nf_queue_entry_free(struct nf_queue_entry *entry);

static inline void init_hashrandom(u32 *jhash_initval)
{}

static inline u32 hash_v4(const struct iphdr *iph, u32 initval)
{}

static inline u32 hash_v6(const struct ipv6hdr *ip6h, u32 initval)
{}

static inline u32 hash_bridge(const struct sk_buff *skb, u32 initval)
{}

static inline u32
nfqueue_hash(const struct sk_buff *skb, u16 queue, u16 queues_total, u8 family,
	     u32 initval)
{}

int nf_queue(struct sk_buff *skb, struct nf_hook_state *state,
	     unsigned int index, unsigned int verdict);

#endif /* _NF_QUEUE_H */