xref: /dflybsd-src/sys/net/ipfw3_layer4/ip_fw3_layer4.h (revision 4408d5485757eef6e44859025e931d1c1b6746c4)
16a03354eSMatthew Dillon /*
2*4408d548SBill Yuan  * Copyright (c) 2014 - 2018 The DragonFly Project.  All rights reserved.
36a03354eSMatthew Dillon  *
46a03354eSMatthew Dillon  * This code is derived from software contributed to The DragonFly Project
59187b359SBill Yuan  * by Bill Yuan <bycn82@dragonflybsd.org>
66a03354eSMatthew Dillon  *
76a03354eSMatthew Dillon  * Redistribution and use in source and binary forms, with or without
86a03354eSMatthew Dillon  * modification, are permitted provided that the following conditions
96a03354eSMatthew Dillon  * are met:
106a03354eSMatthew Dillon  *
116a03354eSMatthew Dillon  * 1. Redistributions of source code must retain the above copyright
126a03354eSMatthew Dillon  *    notice, this list of conditions and the following disclaimer.
136a03354eSMatthew Dillon  * 2. Redistributions in binary form must reproduce the above copyright
146a03354eSMatthew Dillon  *    notice, this list of conditions and the following disclaimer in
156a03354eSMatthew Dillon  *    the documentation and/or other materials provided with the
166a03354eSMatthew Dillon  *    distribution.
176a03354eSMatthew Dillon  * 3. Neither the name of The DragonFly Project nor the names of its
186a03354eSMatthew Dillon  *    contributors may be used to endorse or promote products derived
196a03354eSMatthew Dillon  *    from this software without specific, prior written permission.
206a03354eSMatthew Dillon  *
216a03354eSMatthew Dillon  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
226a03354eSMatthew Dillon  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
236a03354eSMatthew Dillon  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
246a03354eSMatthew Dillon  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
256a03354eSMatthew Dillon  * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
266a03354eSMatthew Dillon  * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
276a03354eSMatthew Dillon  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
286a03354eSMatthew Dillon  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
296a03354eSMatthew Dillon  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
306a03354eSMatthew Dillon  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
316a03354eSMatthew Dillon  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
326a03354eSMatthew Dillon  * SUCH DAMAGE.
336a03354eSMatthew Dillon  */
346a03354eSMatthew Dillon 
35*4408d548SBill Yuan #ifndef _IP_FW3_LAYER4_H
36*4408d548SBill Yuan #define _IP_FW3_LAYER4_H
376a03354eSMatthew Dillon 
386a03354eSMatthew Dillon #define MODULE_LAYER4_ID	3
396a03354eSMatthew Dillon #define MODULE_LAYER4_NAME	"layer4"
406a03354eSMatthew Dillon 
416a03354eSMatthew Dillon #ifdef _KERNEL
426a03354eSMatthew Dillon //placeholder for kernel
436a03354eSMatthew Dillon #endif
446a03354eSMatthew Dillon 
45*4408d548SBill Yuan enum ipfw3_layer4_opcodes {
466a03354eSMatthew Dillon 	O_LAYER4_TCPFLAG,
476a03354eSMatthew Dillon 	O_LAYER4_UID,
486a03354eSMatthew Dillon 	O_LAYER4_GID,
49dee12ddaSBill Yuan 	O_LAYER4_ESTABLISHED,
50e895e94dSBill Yuan 	O_LAYER4_BPF,			/* bpf syntax filter */
516a03354eSMatthew Dillon };
526a03354eSMatthew Dillon 
536a03354eSMatthew Dillon #endif
54