\fB/proc/net/xt_DNETMAP/\fR\fIsubnet\fR\fB_\fR\fImask\fR\fB_stat\fR
Contains statistics for given subnet/mask. Line contains contains four
numerical values separated by spaces. First one is number of currently used
-dynamic addresses (bindings with negative ttl excluded), second one is number
-static assignments, third one is number of all usable addresses in subnet and
+dynamic addresses (bindings with negative ttl excluded), second one is number
+static assignments, third one is number of all usable addresses in subnet and
the fourth one is mean \fBttl\fR value for all active entries. If prefix has
persistent flag set it'll be noted as fifth entry.
.PP
Flushes all bindings for specific prefix. All static entries are also flushed
and are available for dynamic bindings.
.PP
-Note! Entries are removed if the last iptables rule for a specific prefix is
+Note! Entries are removed if the last iptables rule for a specific prefix is
deleted unless there's persistent flag set.
.PP
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j DNETMAP --prefix 20.0.0.0/26
--persistent
-.br
+.br
\fBor\fR
.br
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j DNETMAP --prefix 20.0.0.0/26
printf(" --upper-limit %u ", info->maximum_rate);
}
-static struct xtables_match fuzzy_mt_reg = {
+static struct xtables_match fuzzy_mt_reg = {
.name = "fuzzy",
.revision = 1,
.version = XTABLES_VERSION,
close(fd);
return subnets;
}
-
+
static struct geoip_country_user *geoip_load_cc(const char *code,
unsigned short cc, uint8_t nfproto)
{
printf(" --enabled ");
}
-static struct xtables_match gradm_mt_reg = {
+static struct xtables_match gradm_mt_reg = {
.family = NFPROTO_UNSPEC,
.name = "gradm",
.version = XTABLES_VERSION,
Matches Ares and AresLite packets. Use together with \-j DROP only.
.TP
\fB\-\-debug\fP
-Prints some information about each hit into kernel logfile. May
+Prints some information about each hit into kernel logfile. May
produce huge logfiles so beware!
.PP
Note that ipp2p may not (and often, does not) identify all packets that are
__be32 addr1,addr2;
bool add;
char str[25];
-
+
if (size == 0)
return 0;
if (size > sizeof(buf))
return -EFAULT;
if(strcspn(c,"\n") < size)
buf[strcspn(c,"\n")]='\0';
-
+
/* Strict protocol! */
if (*loff != 0)
return -ESPIPE;
c2 = strchr(c,':');
if(c2 == NULL)
goto invalid_arg_unlock;
-
+
c++;
c2++;
-
+
if( ! (in4_pton(c2,strlen(c2),(void *)&addr2, '\0', NULL) &&
in4_pton(c,strlen(c),(void *)&addr1, ':', NULL)))
goto invalid_arg_unlock;
break;
}
}
-
+
e->prenat_addr=addr1;
e->flags |= XT_DNETMAP_STATIC;
list_add_tail(&e->glist,
dnetmap_entry_hash
(e->postnat_addr)]);
list_del(&e->lru_list);
-
+
sprintf(str, NIPQUAD_FMT ":" NIPQUAD_FMT, NIPQUAD(addr1),NIPQUAD(addr2));
printk(KERN_INFO KBUILD_MODNAME ": adding static binding %s\n", str);
e = dnetmap_entry_rlookup(p->dnetmap,addr1);
if(e == NULL) e = dnetmap_entry_lookup(p->dnetmap,addr1);
-
+
if(e != NULL){
if (!disable_log)
printk(KERN_INFO KBUILD_MODNAME
goto invalid_arg_unlock;
}
}
-
+
spin_unlock_bh(&dnetmap_lock);
/* Note we removed one above */
invalid_arg_unlock:
spin_unlock_bh(&dnetmap_lock);
-
+
invalid_arg:
//printk(KERN_INFO KBUILD_MODNAME ": Need \"+prenat_ip:postnat_ip\", \"-ip\" or \"/\"\n");
printk(KERN_INFO KBUILD_MODNAME ": Error! Invalid option passed via procfs.\n");
long int ttl, sum_ttl;
used=used_static=all=sum_ttl=0;
-
+
spin_lock_bh(&dnetmap_lock);
list_for_each_entry(e, &p->elist, list) {
.family = NFPROTO_IPV4,
.checkentry = quota_mt2_check,
.match = quota_mt2,
- .destroy = quota_mt2_destroy,
+ .destroy = quota_mt2_destroy,
.matchsize = sizeof(struct xt_quota_mtinfo2),
.me = THIS_MODULE,
},
.family = NFPROTO_IPV6,
.checkentry = quota_mt2_check,
.match = quota_mt2,
- .destroy = quota_mt2_destroy,
+ .destroy = quota_mt2_destroy,
.matchsize = sizeof(struct xt_quota_mtinfo2),
.me = THIS_MODULE,
},