~ubuntu-branches/ubuntu/lucid/iptables/lucid

« back to all changes in this revision

Viewing changes to extensions/libxt_length.c

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen, Iain Lane, Soren Hansen
  • Date: 2008-11-15 01:27:37 UTC
  • mfrom: (5.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20081115012737-o3kdn2z1o9ercq10
Tags: 1.4.1.1-4ubuntu1
[ Iain Lane ]
* Merge from debian unstable (LP: #294220), remaining changes:
  - debian/patches/0901-build-libipq_pic.a.patch - Build libipq_pic.a with
    -fPIC. Upstream changed build system and patch modified accordingly.

[ Soren Hansen ]
* Revert changes between 1.4.1.1-3 and 1.4.1.1-4, thus bringing back
  the howtos.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
static void length_help(void)
13
13
{
14
14
        printf(
15
 
"length v%s options:\n"
 
15
"length match options:\n"
16
16
"[!] --length length[:length]    Match packet length against value or range\n"
17
 
"                                of values (inclusive)\n",
18
 
IPTABLES_VERSION);
19
 
 
 
17
"                                of values (inclusive)\n");
20
18
}
21
19
  
22
20
static const struct option length_opts[] = {
23
21
        { "length", 1, NULL, '1' },
24
 
        { }
 
22
        { .name = NULL }
25
23
};
26
24
 
27
25
static u_int16_t
125
123
}
126
124
 
127
125
static struct xtables_match length_match = {
128
 
        .family         = AF_INET,
129
 
        .name           = "length",
130
 
        .version        = IPTABLES_VERSION,
131
 
        .size           = XT_ALIGN(sizeof(struct xt_length_info)),
132
 
        .userspacesize  = XT_ALIGN(sizeof(struct xt_length_info)),
133
 
        .help           = length_help,
134
 
        .parse          = length_parse,
135
 
        .final_check    = length_check,
136
 
        .print          = length_print,
137
 
        .save           = length_save,
138
 
        .extra_opts     = length_opts,
139
 
};
140
 
 
141
 
static struct xtables_match length_match6 = {
142
 
        .family         = AF_INET6,
143
 
        .name           = "length",
144
 
        .version        = IPTABLES_VERSION,
 
126
        .family         = AF_UNSPEC,
 
127
        .name           = "length",
 
128
        .version        = XTABLES_VERSION,
145
129
        .size           = XT_ALIGN(sizeof(struct xt_length_info)),
146
130
        .userspacesize  = XT_ALIGN(sizeof(struct xt_length_info)),
147
131
        .help           = length_help,
155
139
void _init(void)
156
140
{
157
141
        xtables_register_match(&length_match);
158
 
        xtables_register_match(&length_match6);
159
142
}