1*e2be04c7SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 217c07592SDavid Howells /* Header file for iptables ipt_ECN target 317c07592SDavid Howells * 417c07592SDavid Howells * (C) 2002 by Harald Welte <laforge@gnumonks.org> 517c07592SDavid Howells * 617c07592SDavid Howells * This software is distributed under GNU GPL v2, 1991 717c07592SDavid Howells * 817c07592SDavid Howells * ipt_ECN.h,v 1.3 2002/05/29 12:17:40 laforge Exp 917c07592SDavid Howells */ 1017c07592SDavid Howells #ifndef _IPT_ECN_TARGET_H 1117c07592SDavid Howells #define _IPT_ECN_TARGET_H 1217c07592SDavid Howells 1317c07592SDavid Howells #include <linux/types.h> 1417c07592SDavid Howells #include <linux/netfilter/xt_DSCP.h> 1517c07592SDavid Howells 1617c07592SDavid Howells #define IPT_ECN_IP_MASK (~XT_DSCP_MASK) 1717c07592SDavid Howells 1817c07592SDavid Howells #define IPT_ECN_OP_SET_IP 0x01 /* set ECN bits of IPv4 header */ 1917c07592SDavid Howells #define IPT_ECN_OP_SET_ECE 0x10 /* set ECE bit of TCP header */ 2017c07592SDavid Howells #define IPT_ECN_OP_SET_CWR 0x20 /* set CWR bit of TCP header */ 2117c07592SDavid Howells 2217c07592SDavid Howells #define IPT_ECN_OP_MASK 0xce 2317c07592SDavid Howells 2417c07592SDavid Howells struct ipt_ECN_info { 2517c07592SDavid Howells __u8 operation; /* bitset of operations */ 2617c07592SDavid Howells __u8 ip_ect; /* ECT codepoint of IPv4 header, pre-shifted */ 2717c07592SDavid Howells union { 2817c07592SDavid Howells struct { 2917c07592SDavid Howells __u8 ece:1, cwr:1; /* TCP ECT bits */ 3017c07592SDavid Howells } tcp; 3117c07592SDavid Howells } proto; 3217c07592SDavid Howells }; 3317c07592SDavid Howells 3417c07592SDavid Howells #endif /* _IPT_ECN_TARGET_H */ 35