linux/include/uapi/linux/netfilter/nfnetlink_compat.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _NFNETLINK_COMPAT_H
#define _NFNETLINK_COMPAT_H

#include <linux/types.h>

#ifndef __KERNEL__
/* Old nfnetlink macros for userspace */

/* nfnetlink groups: Up to 32 maximum */
#define NF_NETLINK_CONNTRACK_NEW
#define NF_NETLINK_CONNTRACK_UPDATE
#define NF_NETLINK_CONNTRACK_DESTROY
#define NF_NETLINK_CONNTRACK_EXP_NEW
#define NF_NETLINK_CONNTRACK_EXP_UPDATE
#define NF_NETLINK_CONNTRACK_EXP_DESTROY

/* Generic structure for encapsulation optional netfilter information.
 * It is reminiscent of sockaddr, but with sa_family replaced
 * with attribute type.
 * ! This should someday be put somewhere generic as now rtnetlink and
 * ! nfnetlink use the same attributes methods. - J. Schulist.
 */

struct nfattr {
	__u16 nfa_len;
	__u16 nfa_type;	/* we use 15 bits for the type, and the highest
				 * bit to indicate whether the payload is nested */
};

/* FIXME: Apart from NFNL_NFA_NESTED shamelessly copy and pasted from
 * rtnetlink.h, it's time to put this in a generic file */

#define NFNL_NFA_NEST
#define NFA_TYPE

#define NFA_ALIGNTO
#define NFA_ALIGN
#define NFA_OK
#define NFA_NEXT
#define NFA_LENGTH
#define NFA_SPACE
#define NFA_DATA
#define NFA_PAYLOAD
#define NFA_NEST
#define NFA_NEST_END
#define NFA_NEST_CANCEL

#define NFM_NFA
#define NFM_PAYLOAD

#endif /* ! __KERNEL__ */
#endif /* _NFNETLINK_COMPAT_H */