• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/iptables-1.4.12.1/libiptc/

Lines Matching defs:chains

5  * Chains go INPUT, FORWARD, OUTPUT then user chains.
7 * Every chain ends with an unconditional jump: a RETURN for user chains,
138 struct list_head chains;
143 unsigned int num_chains; /* number of user defined chains */
148 int sorted_offsets; /* if chains are received sorted from kernel,
311 * chains in chain list don't change the correctness of the chain
316 * CHAIN_INDEX_INSERT_MAX chains has been added.
344 list_pos=&handle->chains;
346 /* Check for empty array, e.g. no user defined chains */
363 return &handle->chains; /* Be safe, return orig start pos */
451 /* If chains were not received sorted from kernel, then the
455 pos = handle->chains.next;
473 list_pos = &handle->chains;
546 unsigned int chains = 0;
553 debug("Number of user defined chains:%d bucket_sz:%d array_sz:%d\n",
559 list_for_each_entry(c, &h->chains, list) {
562 * builtin chains, as they are not sorted */
564 cindex=chains / list_length;
567 * is useful if chains are added and array is
572 if ((chains % list_length)== 0) {
576 chains++;
603 * the simple approach behaves badly when all chains are deleted
693 if (list_empty(&handle->chains))
700 * chains, but this function is only used for finding jump
704 // list_for_each(pos, &handle->chains) {
726 if (list_empty(&handle->chains))
729 /* First look at builtin chains */
730 list_for_each(pos, &handle->chains) {
743 if (list_start_pos == &handle->chains) {
765 /* Initial/special case, no user defined chains */
784 if (pos == &handle->chains) {
862 list_start_pos = h->chains.next;
867 if (list_start_pos == &h->chains) {
868 list_start_pos = h->chains.next;
871 /* sort only user defined chains */
880 if (&tmp->list == &h->chains) {
888 list_add_tail(&c->list, &h->chains);
896 struct list_head *tail = h->chains.prev;
909 if (iptcc_is_builtin(c)) /* Only user defined chains are sorted*/
910 list_add_tail(&c->list, &h->chains);
916 list_add_tail(&c->list, &h->chains);/* Already sorted*/
920 /* Notice, if chains were not received sorted
1052 /* Assume that chains offsets are sorted, this verified during
1066 list_for_each_entry(c, &h->chains, list) {
1126 /* Jumps can only happen to builtin chains, so we
1149 /* only user-defined chains have heaer */
1232 list_for_each_entry(c, &h->chains, list) {
1254 list_for_each_entry(c, &h->chains, list) {
1288 INIT_LIST_HEAD(&h->chains);
1389 list_for_each_entry_safe(c, tmp, &h->chains, list) {
1451 if (c->list.next == &handle->chains)
1458 /* Iterator functions to run through the chains. */
1462 struct chain_head *c = list_entry(handle->chains.next,
1468 if (list_empty(&handle->chains)) {
1469 DEBUGP(": no chains\n");
1480 /* Iterator functions to run through the chains. Returns NULL at end. */
1489 DEBUGP(": no more chains\n");
2267 /* Inserting chains don't change the correctness of the chain
2271 * capacity is exceed with CHAIN_INDEX_INSERT_MAX chains.
2276 debug("Capacity(%d) exceeded(%d) rebuild (chains:%d)\n",
2606 list_for_each_entry(c, &handle->chains, list) {
2609 /* Builtin chains have their own counters */