Home | History | Annotate | Download | only in 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 */
453 /* If chains were not received sorted from kernel, then the
457 pos = handle->chains.next;
475 list_pos = &handle->chains;
548 unsigned int chains = 0;
555 debug("Number of user defined chains:%d bucket_sz:%d array_sz:%d\n",
561 list_for_each_entry(c, &h->chains, list) {
564 * builtin chains, as they are not sorted */
566 cindex=chains / list_length;
569 * is useful if chains are added and array is
574 if ((chains % list_length)== 0) {
575 debug("\nIndex[%d] Chains:", cindex);
578 chains++;
605 * the simple approach behaves badly when all chains are deleted
695 if (list_empty(&handle->chains))
702 * chains, but this function is only used for finding jump
706 // list_for_each(pos, &handle->chains) {
728 if (list_empty(&handle->chains))
731 /* First look at builtin chains */
732 list_for_each(pos, &handle->chains) {
745 if (list_start_pos == &handle->chains) {
767 /* Initial/special case, no user defined chains */
786 if (pos == &handle->chains) {
864 list_start_pos = h->chains.next;
869 if (list_start_pos == &h->chains) {
870 list_start_pos = h->chains.next;
873 /* sort only user defined chains */
882 if (&tmp->list == &h->chains) {
890 list_add_tail(&c->list, &h->chains);
898 struct list_head *tail = h->chains.prev;
906 /* Chains from kernel are already sorted, as they are inserted
911 if (iptcc_is_builtin(c)) /* Only user defined chains are sorted*/
912 list_add_tail(&c->list, &h->chains);
918 list_add_tail(&c->list, &h->chains);/* Already sorted*/
922 /* Notice, if chains were not received sorted
1054 /* Assume that chains offsets are sorted, this verified during
1068 list_for_each_entry(c, &h->chains, list) {
1128 /* Jumps can only happen to builtin chains, so we
1151 /* only user-defined chains have heaer */
1234 list_for_each_entry(c, &h->chains, list) {
1256 list_for_each_entry(c, &h->chains, list) {
1290 INIT_LIST_HEAD(&h->chains);
1391 list_for_each_entry_safe(c, tmp, &h->chains, list) {
1453 if (c->list.next == &handle->chains)
1460 /* Iterator functions to run through the chains. */
1464 struct chain_head *c = list_entry(handle->chains.next,
1470 if (list_empty(&handle->chains)) {
1471 DEBUGP(": no chains\n");
1482 /* Iterator functions to run through the chains. Returns NULL at end. */
1491 DEBUGP(": no more chains\n");
2269 /* Inserting chains don't change the correctness of the chain
2273 * capacity is exceed with CHAIN_INDEX_INSERT_MAX chains.
2278 debug("Capacity(%d) exceeded(%d) rebuild (chains:%d)\n",
2608 list_for_each_entry(c, &handle->chains, list) {
2611 /* Builtin chains have their own counters */