whitespace cleanup
Remove all trailing whitespace and space before tabs.
This commit is contained in:
parent
b9ea445d52
commit
3d0b7439df
|
|
@ -20,7 +20,7 @@
|
||||||
#define MAX_FIELDS 128
|
#define MAX_FIELDS 128
|
||||||
|
|
||||||
/* Maximum number of header lines */
|
/* Maximum number of header lines */
|
||||||
#define HDR_LINES 10
|
#define HDR_LINES 10
|
||||||
|
|
||||||
/* default field width if none specified */
|
/* default field width if none specified */
|
||||||
#define FIELD_WIDTH_DEFAULT 8
|
#define FIELD_WIDTH_DEFAULT 8
|
||||||
|
|
|
||||||
|
|
@ -1726,7 +1726,7 @@ static int inet_show_sock(struct nlmsghdr *nlh, struct filter *f, int protocol)
|
||||||
printf(" sk:");
|
printf(" sk:");
|
||||||
if (r->id.idiag_cookie[1] != 0)
|
if (r->id.idiag_cookie[1] != 0)
|
||||||
printf("%08x", r->id.idiag_cookie[1]);
|
printf("%08x", r->id.idiag_cookie[1]);
|
||||||
printf("%08x", r->id.idiag_cookie[0]);
|
printf("%08x", r->id.idiag_cookie[0]);
|
||||||
if (tb[INET_DIAG_SHUTDOWN]) {
|
if (tb[INET_DIAG_SHUTDOWN]) {
|
||||||
unsigned char mask;
|
unsigned char mask;
|
||||||
mask = *(__u8 *)RTA_DATA(tb[INET_DIAG_SHUTDOWN]);
|
mask = *(__u8 *)RTA_DATA(tb[INET_DIAG_SHUTDOWN]);
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
/*
|
/*
|
||||||
* f_flow.c Flow filter
|
* f_flow.c Flow filter
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation; either version
|
* as published by the Free Software Foundation; either version
|
||||||
* 2 of the License, or (at your option) any later version.
|
* 2 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Authors: Patrick McHardy <kaber@trash.net>
|
* Authors: Patrick McHardy <kaber@trash.net>
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* m_ipt.c iptables based targets
|
* m_ipt.c iptables based targets
|
||||||
* utilities mostly ripped from iptables <duh, its the linux way>
|
* utilities mostly ripped from iptables <duh, its the linux way>
|
||||||
*
|
*
|
||||||
* This program is free software; you can distribute it and/or
|
* This program is free software; you can distribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@
|
||||||
* Authors: J Hadi Salim (hadi@cyberus.ca)
|
* Authors: J Hadi Salim (hadi@cyberus.ca)
|
||||||
*
|
*
|
||||||
* TODO:
|
* TODO:
|
||||||
* 1) Big endian broken in some spots
|
* 1) Big endian broken in some spots
|
||||||
* 2) A lot of this stuff was added on the fly; get a big double-double
|
* 2) A lot of this stuff was added on the fly; get a big double-double
|
||||||
* and clean it up at some point.
|
* and clean it up at some point.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,18 +26,18 @@
|
||||||
*
|
*
|
||||||
hadi@noma1:$ tc qdisc add dev eth0 ingress
|
hadi@noma1:$ tc qdisc add dev eth0 ingress
|
||||||
hadi@noma1:$tc filter add dev eth0 parent ffff: protocol ip prio 5 \
|
hadi@noma1:$tc filter add dev eth0 parent ffff: protocol ip prio 5 \
|
||||||
u32 match ip protocol 1 0xff flowid 1:1 action simple "Incoming ICMP"
|
u32 match ip protocol 1 0xff flowid 1:1 action simple "Incoming ICMP"
|
||||||
|
|
||||||
hadi@noma1:$ sudo tc -s filter ls dev eth0 parent ffff:
|
hadi@noma1:$ sudo tc -s filter ls dev eth0 parent ffff:
|
||||||
filter protocol ip pref 5 u32
|
filter protocol ip pref 5 u32
|
||||||
filter protocol ip pref 5 u32 fh 800: ht divisor 1
|
filter protocol ip pref 5 u32 fh 800: ht divisor 1
|
||||||
filter protocol ip pref 5 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1
|
filter protocol ip pref 5 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1
|
||||||
match 00010000/00ff0000 at 8
|
match 00010000/00ff0000 at 8
|
||||||
action order 1: Simple <Incoming ICMP>
|
action order 1: Simple <Incoming ICMP>
|
||||||
index 4 ref 1 bind 1 installed 29 sec used 29 sec
|
index 4 ref 1 bind 1 installed 29 sec used 29 sec
|
||||||
Action statistics:
|
Action statistics:
|
||||||
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
|
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
|
||||||
backlog 0b 0p requeues 0
|
backlog 0b 0p requeues 0
|
||||||
|
|
||||||
|
|
||||||
hadi@noma1$ ping -c 1 www.google.ca
|
hadi@noma1$ ping -c 1 www.google.ca
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
static void
|
static void
|
||||||
explain(void)
|
explain(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Usage: ... skbedit <[QM] [PM] [MM]>\n"
|
fprintf(stderr, "Usage: ... skbedit <[QM] [PM] [MM]>\n"
|
||||||
"QM = queue_mapping QUEUE_MAPPING\n"
|
"QM = queue_mapping QUEUE_MAPPING\n"
|
||||||
"PM = priority PRIORITY \n"
|
"PM = priority PRIORITY \n"
|
||||||
"MM = mark MARK \n"
|
"MM = mark MARK \n"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* m_xt.c xtables based targets
|
* m_xt.c xtables based targets
|
||||||
* utilities mostly ripped from iptables <duh, its the linux way>
|
* utilities mostly ripped from iptables <duh, its the linux way>
|
||||||
*
|
*
|
||||||
* This program is free software; you can distribute it and/or
|
* This program is free software; you can distribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* m_xt.c xtables based targets
|
* m_xt.c xtables based targets
|
||||||
* utilities mostly ripped from iptables <duh, its the linux way>
|
* utilities mostly ripped from iptables <duh, its the linux way>
|
||||||
*
|
*
|
||||||
* This program is free software; you can distribute it and/or
|
* This program is free software; you can distribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
* Author: Alexander Duyck <alexander.h.duyck@intel.com>
|
* Author: Alexander Duyck <alexander.h.duyck@intel.com>
|
||||||
*
|
*
|
||||||
* Original Authors: PJ Waskiewicz, <peter.p.waskiewicz.jr@intel.com> (RR)
|
* Original Authors: PJ Waskiewicz, <peter.p.waskiewicz.jr@intel.com> (RR)
|
||||||
* Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> (from PRIO)
|
* Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> (from PRIO)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ static int tc_class_modify(int cmd, unsigned flags, int argc, char **argv)
|
||||||
} else if (strcmp(*argv, "handle") == 0) {
|
} else if (strcmp(*argv, "handle") == 0) {
|
||||||
fprintf(stderr, "Error: try \"classid\" instead of \"handle\"\n");
|
fprintf(stderr, "Error: try \"classid\" instead of \"handle\"\n");
|
||||||
return -1;
|
return -1;
|
||||||
} else if (strcmp(*argv, "root") == 0) {
|
} else if (strcmp(*argv, "root") == 0) {
|
||||||
if (req.t.tcm_parent) {
|
if (req.t.tcm_parent) {
|
||||||
fprintf(stderr, "Error: \"root\" is duplicate parent ID.\n");
|
fprintf(stderr, "Error: \"root\" is duplicate parent ID.\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -286,7 +286,7 @@ static int tc_class_list(int argc, char **argv)
|
||||||
argc--; argv++;
|
argc--; argv++;
|
||||||
}
|
}
|
||||||
|
|
||||||
ll_init_map(&rth);
|
ll_init_map(&rth);
|
||||||
|
|
||||||
if (d[0]) {
|
if (d[0]) {
|
||||||
if ((t.tcm_ifindex = ll_name_to_index(d)) == 0) {
|
if ((t.tcm_ifindex = ll_name_to_index(d)) == 0) {
|
||||||
|
|
@ -296,12 +296,12 @@ static int tc_class_list(int argc, char **argv)
|
||||||
filter_ifindex = t.tcm_ifindex;
|
filter_ifindex = t.tcm_ifindex;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtnl_dump_request(&rth, RTM_GETTCLASS, &t, sizeof(t)) < 0) {
|
if (rtnl_dump_request(&rth, RTM_GETTCLASS, &t, sizeof(t)) < 0) {
|
||||||
perror("Cannot send dump request");
|
perror("Cannot send dump request");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtnl_dump_filter(&rth, print_class, stdout) < 0) {
|
if (rtnl_dump_filter(&rth, print_class, stdout) < 0) {
|
||||||
fprintf(stderr, "Dump terminated\n");
|
fprintf(stderr, "Dump terminated\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ static int tc_filter_modify(int cmd, unsigned flags, int argc, char **argv)
|
||||||
|
|
||||||
|
|
||||||
if (d[0]) {
|
if (d[0]) {
|
||||||
ll_init_map(&rth);
|
ll_init_map(&rth);
|
||||||
|
|
||||||
if ((req.t.tcm_ifindex = ll_name_to_index(d)) == 0) {
|
if ((req.t.tcm_ifindex = ll_name_to_index(d)) == 0) {
|
||||||
fprintf(stderr, "Cannot find device \"%s\"\n", d);
|
fprintf(stderr, "Cannot find device \"%s\"\n", d);
|
||||||
|
|
@ -326,7 +326,7 @@ static int tc_filter_list(int argc, char **argv)
|
||||||
|
|
||||||
t.tcm_info = TC_H_MAKE(prio<<16, protocol);
|
t.tcm_info = TC_H_MAKE(prio<<16, protocol);
|
||||||
|
|
||||||
ll_init_map(&rth);
|
ll_init_map(&rth);
|
||||||
|
|
||||||
if (d[0]) {
|
if (d[0]) {
|
||||||
if ((t.tcm_ifindex = ll_name_to_index(d)) == 0) {
|
if ((t.tcm_ifindex = ll_name_to_index(d)) == 0) {
|
||||||
|
|
@ -336,12 +336,12 @@ static int tc_filter_list(int argc, char **argv)
|
||||||
filter_ifindex = t.tcm_ifindex;
|
filter_ifindex = t.tcm_ifindex;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtnl_dump_request(&rth, RTM_GETTFILTER, &t, sizeof(t)) < 0) {
|
if (rtnl_dump_request(&rth, RTM_GETTFILTER, &t, sizeof(t)) < 0) {
|
||||||
perror("Cannot send dump request");
|
perror("Cannot send dump request");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtnl_dump_filter(&rth, print_filter, stdout) < 0) {
|
if (rtnl_dump_filter(&rth, print_filter, stdout) < 0) {
|
||||||
fprintf(stderr, "Dump terminated\n");
|
fprintf(stderr, "Dump terminated\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ static int tc_qdisc_modify(int cmd, unsigned flags, int argc, char **argv)
|
||||||
if (d[0]) {
|
if (d[0]) {
|
||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
ll_init_map(&rth);
|
ll_init_map(&rth);
|
||||||
|
|
||||||
if ((idx = ll_name_to_index(d)) == 0) {
|
if ((idx = ll_name_to_index(d)) == 0) {
|
||||||
fprintf(stderr, "Cannot find device \"%s\"\n", d);
|
fprintf(stderr, "Cannot find device \"%s\"\n", d);
|
||||||
|
|
@ -309,7 +309,7 @@ static int tc_qdisc_list(int argc, char **argv)
|
||||||
argc--; argv++;
|
argc--; argv++;
|
||||||
}
|
}
|
||||||
|
|
||||||
ll_init_map(&rth);
|
ll_init_map(&rth);
|
||||||
|
|
||||||
if (d[0]) {
|
if (d[0]) {
|
||||||
if ((t.tcm_ifindex = ll_name_to_index(d)) == 0) {
|
if ((t.tcm_ifindex = ll_name_to_index(d)) == 0) {
|
||||||
|
|
@ -319,12 +319,12 @@ static int tc_qdisc_list(int argc, char **argv)
|
||||||
filter_ifindex = t.tcm_ifindex;
|
filter_ifindex = t.tcm_ifindex;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtnl_dump_request(&rth, RTM_GETQDISC, &t, sizeof(t)) < 0) {
|
if (rtnl_dump_request(&rth, RTM_GETQDISC, &t, sizeof(t)) < 0) {
|
||||||
perror("Cannot send dump request");
|
perror("Cannot send dump request");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtnl_dump_filter(&rth, print_qdisc, stdout) < 0) {
|
if (rtnl_dump_filter(&rth, print_qdisc, stdout) < 0) {
|
||||||
fprintf(stderr, "Dump terminated\n");
|
fprintf(stderr, "Dump terminated\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue