Deleted Added
full compact
ip_fw_table.h (269988) ip_fw_table.h (270001)
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.

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

100typedef void ta_foreach(void *ta_state, struct table_info *ti, ta_foreach_f *f,
101 void *arg);
102typedef int ta_dump_tentry(void *ta_state, struct table_info *ti, void *e,
103 ipfw_obj_tentry *tent);
104typedef int ta_find_tentry(void *ta_state, struct table_info *ti,
105 ipfw_obj_tentry *tent);
106typedef void ta_dump_tinfo(void *ta_state, struct table_info *ti,
107 ipfw_ta_tinfo *tinfo);
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.

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

100typedef void ta_foreach(void *ta_state, struct table_info *ti, ta_foreach_f *f,
101 void *arg);
102typedef int ta_dump_tentry(void *ta_state, struct table_info *ti, void *e,
103 ipfw_obj_tentry *tent);
104typedef int ta_find_tentry(void *ta_state, struct table_info *ti,
105 ipfw_obj_tentry *tent);
106typedef void ta_dump_tinfo(void *ta_state, struct table_info *ti,
107 ipfw_ta_tinfo *tinfo);
108typedef uint32_t ta_get_count(void *ta_state, struct table_info *ti);
108
109struct table_algo {
110 char name[16];
111 uint32_t idx;
112 uint32_t type;
113 uint32_t refcnt;
114 uint32_t flags;
115 size_t ta_buf_size;

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

126 ta_fill_mod *fill_mod;
127 ta_modify *modify;
128 ta_flush_mod *flush_mod;
129 ta_change_ti *change_ti;
130 ta_foreach *foreach;
131 ta_dump_tentry *dump_tentry;
132 ta_print_config *print_config;
133 ta_dump_tinfo *dump_tinfo;
109
110struct table_algo {
111 char name[16];
112 uint32_t idx;
113 uint32_t type;
114 uint32_t refcnt;
115 uint32_t flags;
116 size_t ta_buf_size;

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

127 ta_fill_mod *fill_mod;
128 ta_modify *modify;
129 ta_flush_mod *flush_mod;
130 ta_change_ti *change_ti;
131 ta_foreach *foreach;
132 ta_dump_tentry *dump_tentry;
133 ta_print_config *print_config;
134 ta_dump_tinfo *dump_tinfo;
135 ta_get_count *get_count;
134};
135#define TA_FLAG_DEFAULT 0x01 /* Algo is default for given type */
136#define TA_FLAG_READONLY 0x02 /* Algo does not support modifications*/
136};
137#define TA_FLAG_DEFAULT 0x01 /* Algo is default for given type */
138#define TA_FLAG_READONLY 0x02 /* Algo does not support modifications*/
139#define TA_FLAG_EXTCOUNTER 0x04 /* Algo has external counter available*/
137
138int ipfw_add_table_algo(struct ip_fw_chain *ch, struct table_algo *ta,
139 size_t size, int *idx);
140void ipfw_del_table_algo(struct ip_fw_chain *ch, int idx);
141
142void ipfw_table_algo_init(struct ip_fw_chain *chain);
143void ipfw_table_algo_destroy(struct ip_fw_chain *chain);
144

--- 55 unchanged lines hidden ---
140
141int ipfw_add_table_algo(struct ip_fw_chain *ch, struct table_algo *ta,
142 size_t size, int *idx);
143void ipfw_del_table_algo(struct ip_fw_chain *ch, int idx);
144
145void ipfw_table_algo_init(struct ip_fw_chain *chain);
146void ipfw_table_algo_destroy(struct ip_fw_chain *chain);
147

--- 55 unchanged lines hidden ---