~ubuntu-branches/ubuntu/precise/iproute/precise

« back to all changes in this revision

Viewing changes to tc/m_police.c

  • Committer: Bazaar Package Importer
  • Author(s): Fabio M. Di Nitto
  • Date: 2006-11-14 15:18:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20061114151853-nd3k7f6d10e18r7m
Tags: 20061002-2ubuntu1
Merge from debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
        .print_aopt = print_police,
33
33
};
34
34
 
35
 
static void explain(void)
 
35
static void usage(void)
36
36
{
37
37
        fprintf(stderr, "Usage: ... police rate BPS burst BYTES[/BYTES] [ mtu BYTES[/BYTES] ]\n");
38
38
        fprintf(stderr, "                [ peakrate BPS ] [ avrate BPS ]\n");
41
41
        fprintf(stderr, "New Syntax ACTIONTERM := conform-exceed <EXCEEDACT>[/NOTEXCEEDACT] \n"); 
42
42
        fprintf(stderr, "Where: *EXCEEDACT := pipe | ok | reclassify | drop | continue \n");
43
43
        fprintf(stderr, "Where:  pipe is only valid for new syntax \n");
 
44
        exit(-1);
44
45
}
45
46
 
46
47
static void explain1(char *arg)
48
49
        fprintf(stderr, "Illegal \"%s\"\n", arg);
49
50
}
50
51
 
51
 
#define usage() return(-1)
52
 
 
53
 
 
54
52
char *police_action_n2a(int action, char *buf, int len)
55
53
{
56
54
        switch (action) {
236
234
                                return -1;
237
235
                        }
238
236
                } else if (strcmp(*argv, "help") == 0) {
239
 
                        explain();
240
 
                        return -1;
 
237
                        usage();
241
238
                } else {
242
239
                        break;
243
240
                }