~ubuntu-branches/ubuntu/trusty/iproute/trusty-proposed

« back to all changes in this revision

Viewing changes to tc/tc_filter.c

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Wirt, Andreas Henriksson, Justin B Rye, Alexander Wirt
  • Date: 2008-05-11 11:18:29 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080511111829-rfewew7s6kiev0bh
Tags: 20080417-1
[ Andreas Henriksson ]
* New upstream release, v2.6.25 a.k.a. snapshot 20080417.
  - Initial documentation for xfrm (Partially fixes #451337)
  - Fixes manpage error caught by lintian!
* Fix typos (syntax error) in ip(8) manpage.
  - Introduced by upstream, caught by lintian yet again!
* Don't ship useless headers in iproute-dev (Closes: #467557)
* Cherry-pick "Fix bad hash calculation because of signed address" from
  upstream. (Closes: #480173)

[ Justin B Rye ]
* Update package description (Closes: #464521)

[ Alexander Wirt ]
* Fix typo in short package description.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
static void usage(void)
32
32
{
33
33
        fprintf(stderr, "Usage: tc filter [ add | del | change | replace | show ] dev STRING\n");
34
 
        fprintf(stderr, "       [ pref PRIO ] [ protocol PROTO ]\n");
 
34
        fprintf(stderr, "       [ pref PRIO ] protocol PROTO\n");
35
35
        fprintf(stderr, "       [ estimator INTERVAL TIME_CONSTANT ]\n");
36
36
        fprintf(stderr, "       [ root | classid CLASSID ] [ handle FILTERID ]\n");
37
37
        fprintf(stderr, "       [ [ FILTER_TYPE ] [ help | OPTIONS ] ]\n");
54
54
        } req;
55
55
        struct filter_util *q = NULL;
56
56
        __u32 prio = 0;
57
 
        __u32 protocol = 0;
 
57
        __u32 protocol = ETH_P_ALL;
 
58
        int protocol_set = 0;
58
59
        char *fhandle = NULL;
59
60
        char  d[16];
60
61
        char  k[16];
102
103
                        if (prio)
103
104
                                duparg("priority", *argv);
104
105
                        if (get_u32(&prio, *argv, 0))
105
 
                                invarg(*argv, "invalid prpriority value");
 
106
                                invarg(*argv, "invalid priority value");
106
107
                } else if (matches(*argv, "protocol") == 0) {
107
108
                        __u16 id;
108
109
                        NEXT_ARG();
109
 
                        if (protocol)
 
110
                        if (protocol_set)
110
111
                                duparg("protocol", *argv);
111
112
                        if (ll_proto_a2n(&id, *argv))
112
113
                                invarg(*argv, "invalid protocol");
113
114
                        protocol = id;
 
115
                        protocol_set = 1;
114
116
                } else if (matches(*argv, "estimator") == 0) {
115
117
                        if (parse_estimator(&argc, &argv, &est) < 0)
116
118
                                return -1;