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

« back to all changes in this revision

Viewing changes to extensions/libxt_CLASSIFY.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:
15
15
CLASSIFY_help(void)
16
16
{
17
17
        printf(
18
 
"CLASSIFY target v%s options:\n"
19
 
"  --set-class [MAJOR:MINOR]    Set skb->priority value\n"
20
 
"\n",
21
 
IPTABLES_VERSION);
 
18
"CLASSIFY target options:\n"
 
19
"  --set-class [MAJOR:MINOR]    Set skb->priority value\n");
22
20
}
23
21
 
24
22
static const struct option CLASSIFY_opts[] = {
25
23
        { "set-class", 1, NULL, '1' },
26
 
        { }
 
24
        { .name = NULL }
27
25
};
28
26
 
29
27
static int CLASSIFY_string_to_priority(const char *s, unsigned int *p)
103
101
}
104
102
 
105
103
static struct xtables_target classify_target = { 
106
 
        .family         = AF_INET,
107
 
        .name           = "CLASSIFY",
108
 
        .version        = IPTABLES_VERSION,
109
 
        .size           = XT_ALIGN(sizeof(struct xt_classify_target_info)),
110
 
        .userspacesize  = XT_ALIGN(sizeof(struct xt_classify_target_info)),
111
 
        .help           = CLASSIFY_help,
112
 
        .parse          = CLASSIFY_parse,
113
 
        .final_check    = CLASSIFY_final_check,
114
 
        .print          = CLASSIFY_print,
115
 
        .save           = CLASSIFY_save,
116
 
        .extra_opts     = CLASSIFY_opts,
117
 
};
118
 
 
119
 
static struct xtables_target classify_target6 = { 
120
 
        .family         = AF_INET6,
121
 
        .name           = "CLASSIFY",
122
 
        .version        = IPTABLES_VERSION,
 
104
        .family         = AF_UNSPEC,
 
105
        .name           = "CLASSIFY",
 
106
        .version        = XTABLES_VERSION,
123
107
        .size           = XT_ALIGN(sizeof(struct xt_classify_target_info)),
124
108
        .userspacesize  = XT_ALIGN(sizeof(struct xt_classify_target_info)),
125
109
        .help           = CLASSIFY_help,
133
117
void _init(void)
134
118
{
135
119
        xtables_register_target(&classify_target);
136
 
        xtables_register_target(&classify_target6);
137
120
}