/usr/include/linux/netfilter
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _XT_SCTP_H_ #define _XT_SCTP_H_ #include <linux/types.h> #define XT_SCTP_SRC_PORTS 0x01 #define XT_SCTP_DEST_PORTS 0x02 #define XT_SCTP_CHUNK_TYPES 0x04 #define XT_SCTP_VALID_FLAGS 0x07 struct xt_sctp_flag_info { __u8 chunktype; __u8 flag; __u8 flag_mask; }; #define XT_NUM_SCTP_FLAGS 4 struct xt_sctp_info { __u16 dpts[2]; /* Min, Max */ __u16 spts[2]; /* Min, Max */ __u32 chunkmap[256 / sizeof (__u32)]; /* Bit mask of chunks to be matched according to RFC 2960 */ #define SCTP_CHUNK_MATCH_ANY 0x01 /* Match if any of the chunk types are present */ #define SCTP_CHUNK_MATCH_ALL 0x02 /* Match if all of the chunk types are present */ #define SCTP_CHUNK_MATCH_ONLY 0x04 /* Match if these are the only chunk types present */ __u32 chunk_match_type; struct xt_sctp_flag_info flag_info[XT_NUM_SCTP_FLAGS]; int flag_count; __u32 flags; __u32 invflags; }; #define bytes(type) (sizeof(type) * 8) #define SCTP_CHUNKMAP_SET(chunkmap, type) \ do { \ (chunkmap)[type / bytes(__u32)] |= \ 1u << (type % bytes(__u32)); \ } while (0) #define SCTP_CHUNKMAP_CLEAR(chunkmap, type) \ do { \ (chunkmap)[type / bytes(__u32)] &= \ ~(1u << (type % bytes(__u32))); \ } while (0) #define SCTP_CHUNKMAP_IS_SET(chunkmap, type) \ ({ \ ((chunkmap)[type / bytes (__u32)] & \ (1u << (type % bytes (__u32)))) ? 1: 0; \ }) #define SCTP_CHUNKMAP_RESET(chunkmap) \ memset((chunkmap), 0, sizeof(chunkmap)) #define SCTP_CHUNKMAP_SET_ALL(chunkmap) \ memset((chunkmap), ~0U, sizeof(chunkmap)) #define SCTP_CHUNKMAP_COPY(destmap, srcmap) \ memcpy((destmap), (srcmap), sizeof(srcmap)) #define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) \ __sctp_chunkmap_is_clear((chunkmap), ARRAY_SIZE(chunkmap)) static __inline__ _Bool __sctp_chunkmap_is_clear(const __u32 *chunkmap, unsigned int n) { unsigned int i; for (i = 0; i < n; ++i) if (chunkmap[i]) return 0; return 1; } #define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) \ __sctp_chunkmap_is_all_set((chunkmap), ARRAY_SIZE(chunkmap)) static __inline__ _Bool __sctp_chunkmap_is_all_set(const __u32 *chunkmap, unsigned int n) { unsigned int i; for (i = 0; i < n; ++i) if (chunkmap[i] != ~0U) return 0; return 1; } #endif /* _XT_SCTP_H_ */
.
Edit
..
Edit
ipset
Edit
nf_conntrack_common.h
Edit
nf_conntrack_ftp.h
Edit
nf_conntrack_sctp.h
Edit
nf_conntrack_tcp.h
Edit
nf_conntrack_tuple_common.h
Edit
nf_log.h
Edit
nf_nat.h
Edit
nf_synproxy.h
Edit
nf_tables.h
Edit
nf_tables_compat.h
Edit
nfnetlink.h
Edit
nfnetlink_acct.h
Edit
nfnetlink_compat.h
Edit
nfnetlink_conntrack.h
Edit
nfnetlink_cthelper.h
Edit
nfnetlink_cttimeout.h
Edit
nfnetlink_hook.h
Edit
nfnetlink_log.h
Edit
nfnetlink_osf.h
Edit
nfnetlink_queue.h
Edit
x_tables.h
Edit
xt_AUDIT.h
Edit
xt_CHECKSUM.h
Edit
xt_CLASSIFY.h
Edit
xt_CONNMARK.h
Edit
xt_CONNSECMARK.h
Edit
xt_CT.h
Edit
xt_DSCP.h
Edit
xt_HMARK.h
Edit
xt_IDLETIMER.h
Edit
xt_LED.h
Edit
xt_LOG.h
Edit
xt_MARK.h
Edit
xt_NFLOG.h
Edit
xt_NFQUEUE.h
Edit
xt_RATEEST.h
Edit
xt_SECMARK.h
Edit
xt_SYNPROXY.h
Edit
xt_TCPMSS.h
Edit
xt_TCPOPTSTRIP.h
Edit
xt_TEE.h
Edit
xt_TPROXY.h
Edit
xt_addrtype.h
Edit
xt_bpf.h
Edit
xt_cgroup.h
Edit
xt_cluster.h
Edit
xt_comment.h
Edit
xt_connbytes.h
Edit
xt_connlabel.h
Edit
xt_connlimit.h
Edit
xt_connmark.h
Edit
xt_conntrack.h
Edit
xt_cpu.h
Edit
xt_dccp.h
Edit
xt_devgroup.h
Edit
xt_dscp.h
Edit
xt_ecn.h
Edit
xt_esp.h
Edit
xt_hashlimit.h
Edit
xt_helper.h
Edit
xt_ipcomp.h
Edit
xt_iprange.h
Edit
xt_ipvs.h
Edit
xt_l2tp.h
Edit
xt_length.h
Edit
xt_limit.h
Edit
xt_mac.h
Edit
xt_mark.h
Edit
xt_multiport.h
Edit
xt_nfacct.h
Edit
xt_osf.h
Edit
xt_owner.h
Edit
xt_physdev.h
Edit
xt_pkttype.h
Edit
xt_policy.h
Edit
xt_quota.h
Edit
xt_rateest.h
Edit
xt_realm.h
Edit
xt_recent.h
Edit
xt_rpfilter.h
Edit
xt_sctp.h
Edit
xt_set.h
Edit
xt_socket.h
Edit
xt_state.h
Edit
xt_statistic.h
Edit
xt_string.h
Edit
xt_tcpmss.h
Edit
xt_tcpudp.h
Edit
xt_time.h
Edit
xt_u32.h
Edit