Deleted Added
full compact
ip_fw_private.h (232868) ip_fw_private.h (233478)
1/*-
2 * Copyright (c) 2002-2009 Luigi Rizzo, Universita` di Pisa
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 *
1/*-
2 * Copyright (c) 2002-2009 Luigi Rizzo, Universita` di Pisa
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 *
25 * $FreeBSD: head/sys/netinet/ipfw/ip_fw_private.h 232868 2012-03-12 15:41:36Z melifaro $
25 * $FreeBSD: head/sys/netinet/ipfw/ip_fw_private.h 233478 2012-03-25 20:37:59Z melifaro $
26 */
27
28#ifndef _IPFW2_PRIVATE_H
29#define _IPFW2_PRIVATE_H
30
31/*
32 * Internal constants and data structures used by ipfw components
33 * and not meant to be exported outside the kernel.

--- 170 unchanged lines hidden (view full) ---

204#define V_layer3_chain VNET(layer3_chain)
205
206VNET_DECLARE(u_int32_t, set_disable);
207#define V_set_disable VNET(set_disable)
208
209VNET_DECLARE(int, autoinc_step);
210#define V_autoinc_step VNET(autoinc_step)
211
26 */
27
28#ifndef _IPFW2_PRIVATE_H
29#define _IPFW2_PRIVATE_H
30
31/*
32 * Internal constants and data structures used by ipfw components
33 * and not meant to be exported outside the kernel.

--- 170 unchanged lines hidden (view full) ---

204#define V_layer3_chain VNET(layer3_chain)
205
206VNET_DECLARE(u_int32_t, set_disable);
207#define V_set_disable VNET(set_disable)
208
209VNET_DECLARE(int, autoinc_step);
210#define V_autoinc_step VNET(autoinc_step)
211
212extern int fw_tables_max;
213#define V_fw_tables_max fw_tables_max
212VNET_DECLARE(unsigned int, fw_tables_max);
213#define V_fw_tables_max VNET(fw_tables_max)
214
215struct ip_fw_chain {
216 struct ip_fw *rules; /* list of rules */
217 struct ip_fw *reap; /* list of rules to reap */
218 struct ip_fw *default_rule;
219 int n_rules; /* number of static rules */
220 int static_len; /* total len of static rules */
221 struct ip_fw **map; /* array of rule ptrs to ease lookup */

--- 65 unchanged lines hidden (view full) ---

287 uint8_t plen, uint8_t mlen, uint8_t type, uint32_t value);
288int ipfw_del_table_entry(struct ip_fw_chain *ch, uint16_t tbl, void *paddr,
289 uint8_t plen, uint8_t mlen, uint8_t type);
290int ipfw_count_table(struct ip_fw_chain *ch, uint32_t tbl, uint32_t *cnt);
291int ipfw_dump_table_entry(struct radix_node *rn, void *arg);
292int ipfw_dump_table(struct ip_fw_chain *ch, ipfw_table *tbl);
293int ipfw_count_xtable(struct ip_fw_chain *ch, uint32_t tbl, uint32_t *cnt);
294int ipfw_dump_xtable(struct ip_fw_chain *ch, ipfw_xtable *tbl);
214
215struct ip_fw_chain {
216 struct ip_fw *rules; /* list of rules */
217 struct ip_fw *reap; /* list of rules to reap */
218 struct ip_fw *default_rule;
219 int n_rules; /* number of static rules */
220 int static_len; /* total len of static rules */
221 struct ip_fw **map; /* array of rule ptrs to ease lookup */

--- 65 unchanged lines hidden (view full) ---

287 uint8_t plen, uint8_t mlen, uint8_t type, uint32_t value);
288int ipfw_del_table_entry(struct ip_fw_chain *ch, uint16_t tbl, void *paddr,
289 uint8_t plen, uint8_t mlen, uint8_t type);
290int ipfw_count_table(struct ip_fw_chain *ch, uint32_t tbl, uint32_t *cnt);
291int ipfw_dump_table_entry(struct radix_node *rn, void *arg);
292int ipfw_dump_table(struct ip_fw_chain *ch, ipfw_table *tbl);
293int ipfw_count_xtable(struct ip_fw_chain *ch, uint32_t tbl, uint32_t *cnt);
294int ipfw_dump_xtable(struct ip_fw_chain *ch, ipfw_xtable *tbl);
295int ipfw_resize_tables(struct ip_fw_chain *ch, unsigned int ntables);
295
296/* In ip_fw_nat.c -- XXX to be moved to ip_var.h */
297
298extern struct cfg_nat *(*lookup_nat_ptr)(struct nat_list *, int);
299
300typedef int ipfw_nat_t(struct ip_fw_args *, struct cfg_nat *, struct mbuf *);
301typedef int ipfw_nat_cfg_t(struct sockopt *);
302
303extern ipfw_nat_t *ipfw_nat_ptr;
304#define IPFW_NAT_LOADED (ipfw_nat_ptr != NULL)
305
306extern ipfw_nat_cfg_t *ipfw_nat_cfg_ptr;
307extern ipfw_nat_cfg_t *ipfw_nat_del_ptr;
308extern ipfw_nat_cfg_t *ipfw_nat_get_cfg_ptr;
309extern ipfw_nat_cfg_t *ipfw_nat_get_log_ptr;
310
311#endif /* _KERNEL */
312#endif /* _IPFW2_PRIVATE_H */
296
297/* In ip_fw_nat.c -- XXX to be moved to ip_var.h */
298
299extern struct cfg_nat *(*lookup_nat_ptr)(struct nat_list *, int);
300
301typedef int ipfw_nat_t(struct ip_fw_args *, struct cfg_nat *, struct mbuf *);
302typedef int ipfw_nat_cfg_t(struct sockopt *);
303
304extern ipfw_nat_t *ipfw_nat_ptr;
305#define IPFW_NAT_LOADED (ipfw_nat_ptr != NULL)
306
307extern ipfw_nat_cfg_t *ipfw_nat_cfg_ptr;
308extern ipfw_nat_cfg_t *ipfw_nat_del_ptr;
309extern ipfw_nat_cfg_t *ipfw_nat_get_cfg_ptr;
310extern ipfw_nat_cfg_t *ipfw_nat_get_log_ptr;
311
312#endif /* _KERNEL */
313#endif /* _IPFW2_PRIVATE_H */