]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
treewide: refactor help messages
authorMatteo Croce <mcroce@redhat.com>
Fri, 17 May 2019 13:38:28 +0000 (15:38 +0200)
committerDavid Ahern <dsahern@gmail.com>
Mon, 20 May 2019 21:35:07 +0000 (14:35 -0700)
Every tool in the iproute2 package have one or more function to show
an help message to the user. Some of these functions print the help
line by line with a series of printf call, e.g. ip/xfrm_state.c does
60 fprintf calls.
If we group all the calls to a single one and just concatenate strings,
we save a lot of libc calls and thus object size. The size difference
of the compiled binaries calculated with bloat-o-meter is:

        ip/ip:
        add/remove: 0/0 grow/shrink: 5/15 up/down: 103/-4796 (-4693)
        Total: Before=672591, After=667898, chg -0.70%
        ip/rtmon:
        add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-54 (-54)
        Total: Before=48879, After=48825, chg -0.11%
        tc/tc:
        add/remove: 0/2 grow/shrink: 31/10 up/down: 882/-6133 (-5251)
        Total: Before=351912, After=346661, chg -1.49%
        bridge/bridge:
        add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-459 (-459)
        Total: Before=70502, After=70043, chg -0.65%
        misc/lnstat:
        add/remove: 0/1 grow/shrink: 1/0 up/down: 48/-486 (-438)
        Total: Before=9960, After=9522, chg -4.40%
        tipc/tipc:
        add/remove: 0/0 grow/shrink: 1/1 up/down: 18/-62 (-44)
        Total: Before=79182, After=79138, chg -0.06%

While at it, indent some strings which were starting at column 0,
and use tabs where possible, to have a consistent style across helps.

Signed-off-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
83 files changed:
bridge/link.c
bridge/mdb.c
ip/ip.c
ip/ip6tunnel.c
ip/ipaddress.c
ip/ipaddrlabel.c
ip/ipila.c
ip/iplink.c
ip/iplink_bridge.c
ip/iplink_bridge_slave.c
ip/iplink_geneve.c
ip/iplink_hsr.c
ip/iplink_ipoib.c
ip/iplink_vlan.c
ip/iplink_vxlan.c
ip/ipmaddr.c
ip/ipmonitor.c
ip/ipmroute.c
ip/ipneigh.c
ip/ipnetns.c
ip/ipntable.c
ip/ipseg6.c
ip/iptunnel.c
ip/iptuntap.c
ip/ipvrf.c
ip/link_gre.c
ip/link_gre6.c
ip/link_ip6tnl.c
ip/link_iptnl.c
ip/link_vti.c
ip/link_vti6.c
ip/link_xfrm.c
ip/rtmon.c
ip/tcp_metrics.c
ip/xfrm_monitor.c
ip/xfrm_policy.c
ip/xfrm_state.c
misc/lnstat.c
misc/nstat.c
tc/e_bpf.c
tc/f_basic.c
tc/f_bpf.c
tc/f_flow.c
tc/f_flower.c
tc/f_fw.c
tc/f_matchall.c
tc/f_route.c
tc/f_rsvp.c
tc/f_tcindex.c
tc/m_action.c
tc/m_bpf.c
tc/m_connmark.c
tc/m_estimator.c
tc/m_gact.c
tc/m_ife.c
tc/m_pedit.c
tc/m_police.c
tc/m_sample.c
tc/m_simple.c
tc/m_tunnel_key.c
tc/q_atm.c
tc/q_cake.c
tc/q_cbq.c
tc/q_cbs.c
tc/q_choke.c
tc/q_codel.c
tc/q_etf.c
tc/q_fq.c
tc/q_fq_codel.c
tc/q_gred.c
tc/q_hhf.c
tc/q_mqprio.c
tc/q_netem.c
tc/q_pie.c
tc/q_red.c
tc/q_sfq.c
tc/q_taprio.c
tc/q_tbf.c
tc/tc.c
tc/tc_class.c
tc/tc_exec.c
tc/tc_qdisc.c
tipc/bearer.c

index 04cfc1445833ee882c4338b2755465d34321af15..074edf000e047340e8372dcf219f0303c681042d 100644 (file)
@@ -254,23 +254,24 @@ int print_linkinfo(struct nlmsghdr *n, void *arg)
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: bridge link set dev DEV [ cost COST ] [ priority PRIO ] [ state STATE ]\n");
-       fprintf(stderr, "                               [ guard {on | off} ]\n");
-       fprintf(stderr, "                               [ hairpin {on | off} ]\n");
-       fprintf(stderr, "                               [ fastleave {on | off} ]\n");
-       fprintf(stderr, "                               [ root_block {on | off} ]\n");
-       fprintf(stderr, "                               [ learning {on | off} ]\n");
-       fprintf(stderr, "                               [ learning_sync {on | off} ]\n");
-       fprintf(stderr, "                               [ flood {on | off} ]\n");
-       fprintf(stderr, "                               [ mcast_flood {on | off} ]\n");
-       fprintf(stderr, "                               [ mcast_to_unicast {on | off} ]\n");
-       fprintf(stderr, "                               [ neigh_suppress {on | off} ]\n");
-       fprintf(stderr, "                               [ vlan_tunnel {on | off} ]\n");
-       fprintf(stderr, "                               [ isolated {on | off} ]\n");
-       fprintf(stderr, "                               [ hwmode {vepa | veb} ]\n");
-       fprintf(stderr, "                               [ backup_port DEVICE ] [ nobackup_port ]\n");
-       fprintf(stderr, "                               [ self ] [ master ]\n");
-       fprintf(stderr, "       bridge link show [dev DEV]\n");
+       fprintf(stderr,
+               "Usage: bridge link set dev DEV [ cost COST ] [ priority PRIO ] [ state STATE ]\n"
+               "                               [ guard {on | off} ]\n"
+               "                               [ hairpin {on | off} ]\n"
+               "                               [ fastleave {on | off} ]\n"
+               "                               [ root_block {on | off} ]\n"
+               "                               [ learning {on | off} ]\n"
+               "                               [ learning_sync {on | off} ]\n"
+               "                               [ flood {on | off} ]\n"
+               "                               [ mcast_flood {on | off} ]\n"
+               "                               [ mcast_to_unicast {on | off} ]\n"
+               "                               [ neigh_suppress {on | off} ]\n"
+               "                               [ vlan_tunnel {on | off} ]\n"
+               "                               [ isolated {on | off} ]\n"
+               "                               [ hwmode {vepa | veb} ]\n"
+               "                               [ backup_port DEVICE ] [ nobackup_port ]\n"
+               "                               [ self ] [ master ]\n"
+               "       bridge link show [dev DEV]\n");
        exit(-1);
 }
 
index 59aa176435170f7768298ac3dbe56862b839aaa7..ede3542b92aa716e0d24ac1b9987f555b79076ce 100644 (file)
@@ -30,8 +30,9 @@ static unsigned int filter_index, filter_vlan;
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: bridge mdb { add | del } dev DEV port PORT grp GROUP [permanent | temp] [vid VID]\n");
-       fprintf(stderr, "       bridge mdb {show} [ dev DEV ] [ vid VID ]\n");
+       fprintf(stderr,
+               "Usage: bridge mdb { add | del } dev DEV port PORT grp GROUP [permanent | temp] [vid VID]\n"
+               "       bridge mdb {show} [ dev DEV ] [ vid VID ]\n");
        exit(-1);
 }
 
diff --git a/ip/ip.c b/ip/ip.c
index e4131714018f9a843a02cbff2fa9054eae75e75d..b71ae816e24d16710998acb7e9fe57288286b08b 100644 (file)
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -45,19 +45,19 @@ static void usage(void) __attribute__((noreturn));
 static void usage(void)
 {
        fprintf(stderr,
-"Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n"
-"       ip [ -force ] -batch filename\n"
-"where  OBJECT := { link | address | addrlabel | route | rule | neigh | ntable |\n"
-"                   tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm |\n"
-"                   netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila |\n"
-"                   vrf | sr }\n"
-"       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
-"                    -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
-"                    -f[amily] { inet | inet6 | mpls | bridge | link } |\n"
-"                    -4 | -6 | -I | -D | -M | -B | -0 |\n"
-"                    -l[oops] { maximum-addr-flush-attempts } | -br[ief] |\n"
-"                    -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |\n"
-"                    -rc[vbuf] [size] | -n[etns] name | -a[ll] | -c[olor]}\n");
+               "Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n"
+               "       ip [ -force ] -batch filename\n"
+               "where  OBJECT := { link | address | addrlabel | route | rule | neigh | ntable |\n"
+               "                   tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm |\n"
+               "                   netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila |\n"
+               "                   vrf | sr }\n"
+               "       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
+               "                    -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
+               "                    -f[amily] { inet | inet6 | mpls | bridge | link } |\n"
+               "                    -4 | -6 | -I | -D | -M | -B | -0 |\n"
+               "                    -l[oops] { maximum-addr-flush-attempts } | -br[ief] |\n"
+               "                    -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |\n"
+               "                    -rc[vbuf] [size] | -n[etns] name | -a[ll] | -c[olor]}\n");
        exit(-1);
 }
 
index 999408ed801b189619df2161b27af8686b5275e9..a1bf366b411b916e86274e016fcc2dcb2a4dd215 100644 (file)
@@ -46,24 +46,25 @@ static void usage(void) __attribute__((noreturn));
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: ip -f inet6 tunnel { add | change | del | show } [ NAME ]\n");
-       fprintf(stderr, "          [ mode { ip6ip6 | ipip6 | ip6gre | vti6 | any } ]\n");
-       fprintf(stderr, "          [ remote ADDR local ADDR ] [ dev PHYS_DEV ]\n");
-       fprintf(stderr, "          [ encaplimit ELIM ]\n");
-       fprintf(stderr, "          [ hoplimit TTL ] [ tclass TCLASS ] [ flowlabel FLOWLABEL ]\n");
-       fprintf(stderr, "          [ dscp inherit ]\n");
-       fprintf(stderr, "          [ [no]allow-localremote ]\n");
-       fprintf(stderr, "          [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where: NAME      := STRING\n");
-       fprintf(stderr, "       ADDR      := IPV6_ADDRESS\n");
-       fprintf(stderr, "       ELIM      := { none | 0..255 }(default=%d)\n",
-               IPV6_DEFAULT_TNL_ENCAP_LIMIT);
-       fprintf(stderr, "       TTL       := 0..255 (default=%d)\n",
+       fprintf(stderr,
+               "Usage: ip -f inet6 tunnel { add | change | del | show } [ NAME ]\n"
+               "          [ mode { ip6ip6 | ipip6 | ip6gre | vti6 | any } ]\n"
+               "          [ remote ADDR local ADDR ] [ dev PHYS_DEV ]\n"
+               "          [ encaplimit ELIM ]\n"
+               "          [ hoplimit TTL ] [ tclass TCLASS ] [ flowlabel FLOWLABEL ]\n"
+               "          [ dscp inherit ]\n"
+               "          [ [no]allow-localremote ]\n"
+               "          [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n"
+               "\n"
+               "Where: NAME      := STRING\n"
+               "       ADDR      := IPV6_ADDRESS\n"
+               "       ELIM      := { none | 0..255 }(default=%d)\n"
+               "       TTL       := 0..255 (default=%d)\n"
+               "       TCLASS    := { 0x0..0xff | inherit }\n"
+               "       FLOWLABEL := { 0x0..0xfffff | inherit }\n"
+               "       KEY       := { DOTTED_QUAD | NUMBER }\n",
+               IPV6_DEFAULT_TNL_ENCAP_LIMIT,
                DEFAULT_TNL_HOP_LIMIT);
-       fprintf(stderr, "       TCLASS    := { 0x0..0xff | inherit }\n");
-       fprintf(stderr, "       FLOWLABEL := { 0x0..0xfffff | inherit }\n");
-       fprintf(stderr, "       KEY       := { DOTTED_QUAD | NUMBER }\n");
        exit(-1);
 }
 
index b504200bb3776a09d90a6ff697da4846bcb890d4..1309ac7ca58851f999b15e7b746971fc1450c6f4 100644 (file)
@@ -52,32 +52,33 @@ static void usage(void)
        if (do_link)
                iplink_usage();
 
-       fprintf(stderr, "Usage: ip address {add|change|replace} IFADDR dev IFNAME [ LIFETIME ]\n");
-       fprintf(stderr, "                                                      [ CONFFLAG-LIST ]\n");
-       fprintf(stderr, "       ip address del IFADDR dev IFNAME [mngtmpaddr]\n");
-       fprintf(stderr, "       ip address {save|flush} [ dev IFNAME ] [ scope SCOPE-ID ]\n");
-       fprintf(stderr, "                            [ to PREFIX ] [ FLAG-LIST ] [ label LABEL ] [up]\n");
-       fprintf(stderr, "       ip address [ show [ dev IFNAME ] [ scope SCOPE-ID ] [ master DEVICE ]\n");
-       fprintf(stderr, "                         [ type TYPE ] [ to PREFIX ] [ FLAG-LIST ]\n");
-       fprintf(stderr, "                         [ label LABEL ] [up] [ vrf NAME ] ]\n");
-       fprintf(stderr, "       ip address {showdump|restore}\n");
-       fprintf(stderr, "IFADDR := PREFIX | ADDR peer PREFIX\n");
-       fprintf(stderr, "          [ broadcast ADDR ] [ anycast ADDR ]\n");
-       fprintf(stderr, "          [ label IFNAME ] [ scope SCOPE-ID ] [ metric METRIC ]\n");
-       fprintf(stderr, "SCOPE-ID := [ host | link | global | NUMBER ]\n");
-       fprintf(stderr, "FLAG-LIST := [ FLAG-LIST ] FLAG\n");
-       fprintf(stderr, "FLAG  := [ permanent | dynamic | secondary | primary |\n");
-       fprintf(stderr, "           [-]tentative | [-]deprecated | [-]dadfailed | temporary |\n");
-       fprintf(stderr, "           CONFFLAG-LIST ]\n");
-       fprintf(stderr, "CONFFLAG-LIST := [ CONFFLAG-LIST ] CONFFLAG\n");
-       fprintf(stderr, "CONFFLAG  := [ home | nodad | mngtmpaddr | noprefixroute | autojoin ]\n");
-       fprintf(stderr, "LIFETIME := [ valid_lft LFT ] [ preferred_lft LFT ]\n");
-       fprintf(stderr, "LFT := forever | SECONDS\n");
-       fprintf(stderr, "TYPE := { vlan | veth | vcan | vxcan | dummy | ifb | macvlan | macvtap |\n");
-       fprintf(stderr, "          bridge | bond | ipoib | ip6tnl | ipip | sit | vxlan | lowpan |\n");
-       fprintf(stderr, "          gre | gretap | erspan | ip6gre | ip6gretap | ip6erspan | vti |\n");
-       fprintf(stderr, "          nlmon | can | bond_slave | ipvlan | geneve | bridge_slave |\n");
-       fprintf(stderr, "          hsr | macsec | netdevsim }\n");
+       fprintf(stderr,
+               "Usage: ip address {add|change|replace} IFADDR dev IFNAME [ LIFETIME ]\n"
+               "                                                      [ CONFFLAG-LIST ]\n"
+               "       ip address del IFADDR dev IFNAME [mngtmpaddr]\n"
+               "       ip address {save|flush} [ dev IFNAME ] [ scope SCOPE-ID ]\n"
+               "                            [ to PREFIX ] [ FLAG-LIST ] [ label LABEL ] [up]\n"
+               "       ip address [ show [ dev IFNAME ] [ scope SCOPE-ID ] [ master DEVICE ]\n"
+               "                         [ type TYPE ] [ to PREFIX ] [ FLAG-LIST ]\n"
+               "                         [ label LABEL ] [up] [ vrf NAME ] ]\n"
+               "       ip address {showdump|restore}\n"
+               "IFADDR := PREFIX | ADDR peer PREFIX\n"
+               "          [ broadcast ADDR ] [ anycast ADDR ]\n"
+               "          [ label IFNAME ] [ scope SCOPE-ID ] [ metric METRIC ]\n"
+               "SCOPE-ID := [ host | link | global | NUMBER ]\n"
+               "FLAG-LIST := [ FLAG-LIST ] FLAG\n"
+               "FLAG  := [ permanent | dynamic | secondary | primary |\n"
+               "           [-]tentative | [-]deprecated | [-]dadfailed | temporary |\n"
+               "           CONFFLAG-LIST ]\n"
+               "CONFFLAG-LIST := [ CONFFLAG-LIST ] CONFFLAG\n"
+               "CONFFLAG  := [ home | nodad | mngtmpaddr | noprefixroute | autojoin ]\n"
+               "LIFETIME := [ valid_lft LFT ] [ preferred_lft LFT ]\n"
+               "LFT := forever | SECONDS\n"
+               "TYPE := { vlan | veth | vcan | vxcan | dummy | ifb | macvlan | macvtap |\n"
+               "          bridge | bond | ipoib | ip6tnl | ipip | sit | vxlan | lowpan |\n"
+               "          gre | gretap | erspan | ip6gre | ip6gretap | ip6erspan | vti |\n"
+               "          nlmon | can | bond_slave | ipvlan | geneve | bridge_slave |\n"
+               "          hsr | macsec | netdevsim }\n");
 
        exit(-1);
 }
index f06ed1e77f41ed8e79c101688ab457251bbb50aa..beb08da3bfc2d86d5ae60daa687cbb6fcea9241d 100644 (file)
@@ -49,8 +49,9 @@ static void usage(void) __attribute__((noreturn));
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: ip addrlabel { add | del } prefix PREFIX [ dev DEV ] [ label LABEL ]\n");
-       fprintf(stderr, "       ip addrlabel [ list | flush | help ]\n");
+       fprintf(stderr,
+               "Usage: ip addrlabel { add | del } prefix PREFIX [ dev DEV ] [ label LABEL ]\n"
+               "       ip addrlabel [ list | flush | help ]\n");
        exit(-1);
 }
 
index 11fbb5fae805e44c4a640512143dc809557c05b2..739ee4e1aaed07b97c356d592cc33a25d73e3761 100644 (file)
 static void usage(void)
 {
        fprintf(stderr,
-"Usage: ip ila add loc_match LOCATOR_MATCH loc LOCATOR [ dev DEV ] OPTIONS\n"
-"       ip ila del loc_match LOCATOR_MATCH [ loc LOCATOR ] [ dev DEV ]\n"
-"       ip ila list\n"
-"OPTIONS := [ csum-mode { adj-transport | neutral-map | neutral-map-auto | no-action } ]\n"
-"           [ ident-type { luid | use-format } ]\n");
+               "Usage: ip ila add loc_match LOCATOR_MATCH loc LOCATOR [ dev DEV ] OPTIONS\n"
+               "       ip ila del loc_match LOCATOR_MATCH [ loc LOCATOR ] [ dev DEV ]\n"
+               "       ip ila list\n"
+               "OPTIONS := [ csum-mode { adj-transport | neutral-map | neutral-map-auto | no-action } ]\n"
+               "           [ ident-type { luid | use-format } ]\n");
 
        exit(-1);
 }
index 7952cb2be3644735d6490a8e0c2575aa6cfc0852..baea89673a069866d1115fa3bf85d3ec00474de7 100644 (file)
@@ -54,75 +54,76 @@ void iplink_usage(void)
        if (iplink_have_newlink()) {
                fprintf(stderr,
                        "Usage: ip link add [link DEV] [ name ] NAME\n"
-                       "                   [ txqueuelen PACKETS ]\n"
-                       "                   [ address LLADDR ]\n"
-                       "                   [ broadcast LLADDR ]\n"
-                       "                   [ mtu MTU ] [index IDX ]\n"
-                       "                   [ numtxqueues QUEUE_COUNT ]\n"
-                       "                   [ numrxqueues QUEUE_COUNT ]\n"
-                       "                   type TYPE [ ARGS ]\n"
+                       "                   [ txqueuelen PACKETS ]\n"
+                       "                   [ address LLADDR ]\n"
+                       "                   [ broadcast LLADDR ]\n"
+                       "                   [ mtu MTU ] [index IDX ]\n"
+                       "                   [ numtxqueues QUEUE_COUNT ]\n"
+                       "                   [ numrxqueues QUEUE_COUNT ]\n"
+                       "                   type TYPE [ ARGS ]\n"
                        "\n"
-                       "       ip link delete { DEVICE | dev DEVICE | group DEVGROUP } type TYPE [ ARGS ]\n"
+                       "       ip link delete { DEVICE | dev DEVICE | group DEVGROUP } type TYPE [ ARGS ]\n"
                        "\n"
-                       "       ip link set { DEVICE | dev DEVICE | group DEVGROUP }\n"
-                       "                         [ { up | down } ]\n"
-                       "                         [ type TYPE ARGS ]\n");
+                       "       ip link set { DEVICE | dev DEVICE | group DEVGROUP }\n"
+                       "                       [ { up | down } ]\n"
+                       "                       [ type TYPE ARGS ]\n");
        } else
                fprintf(stderr,
                        "Usage: ip link set DEVICE [ { up | down } ]\n");
 
        fprintf(stderr,
-               "                         [ arp { on | off } ]\n"
-               "                         [ dynamic { on | off } ]\n"
-               "                         [ multicast { on | off } ]\n"
-               "                         [ allmulticast { on | off } ]\n"
-               "                         [ promisc { on | off } ]\n"
-               "                         [ trailers { on | off } ]\n"
-               "                         [ carrier { on | off } ]\n"
-               "                         [ txqueuelen PACKETS ]\n"
-               "                         [ name NEWNAME ]\n"
-               "                         [ address LLADDR ]\n"
-               "                         [ broadcast LLADDR ]\n"
-               "                         [ mtu MTU ]\n"
-               "                         [ netns { PID | NAME } ]\n"
-               "                         [ link-netns NAME | link-netnsid ID ]\n"
-               "                         [ alias NAME ]\n"
-               "                         [ vf NUM [ mac LLADDR ]\n"
-               "                                  [ vlan VLANID [ qos VLAN-QOS ] [ proto VLAN-PROTO ] ]\n"
-               "                                  [ rate TXRATE ]\n"
-               "                                  [ max_tx_rate TXRATE ]\n"
-               "                                  [ min_tx_rate TXRATE ]\n"
-               "                                  [ spoofchk { on | off} ]\n"
-               "                                  [ query_rss { on | off} ]\n"
-               "                                  [ state { auto | enable | disable} ] ]\n"
-               "                                  [ trust { on | off} ] ]\n"
-               "                                  [ node_guid { eui64 } ]\n"
-               "                                  [ port_guid { eui64 } ]\n"
-               "                         [ { xdp | xdpgeneric | xdpdrv | xdpoffload } { off |\n"
+               "               [ arp { on | off } ]\n"
+               "               [ dynamic { on | off } ]\n"
+               "               [ multicast { on | off } ]\n"
+               "               [ allmulticast { on | off } ]\n"
+               "               [ promisc { on | off } ]\n"
+               "               [ trailers { on | off } ]\n"
+               "               [ carrier { on | off } ]\n"
+               "               [ txqueuelen PACKETS ]\n"
+               "               [ name NEWNAME ]\n"
+               "               [ address LLADDR ]\n"
+               "               [ broadcast LLADDR ]\n"
+               "               [ mtu MTU ]\n"
+               "               [ netns { PID | NAME } ]\n"
+               "               [ link-netns NAME | link-netnsid ID ]\n"
+               "                       [ alias NAME ]\n"
+               "                       [ vf NUM [ mac LLADDR ]\n"
+               "                                [ vlan VLANID [ qos VLAN-QOS ] [ proto VLAN-PROTO ] ]\n"
+               "                                [ rate TXRATE ]\n"
+               "                                [ max_tx_rate TXRATE ]\n"
+               "                                [ min_tx_rate TXRATE ]\n"
+               "                                [ spoofchk { on | off} ]\n"
+               "                                [ query_rss { on | off} ]\n"
+               "                                [ state { auto | enable | disable} ] ]\n"
+               "                                [ trust { on | off} ] ]\n"
+               "                                [ node_guid { eui64 } ]\n"
+               "                                [ port_guid { eui64 } ]\n"
+               "                       [ { xdp | xdpgeneric | xdpdrv | xdpoffload } { off |\n"
                "                                 object FILE [ section NAME ] [ verbose ] |\n"
                "                                 pinned FILE } ]\n"
-               "                         [ master DEVICE ][ vrf NAME ]\n"
-               "                         [ nomaster ]\n"
-               "                         [ addrgenmode { eui64 | none | stable_secret | random } ]\n"
-               "                         [ protodown { on | off } ]\n"
-               "                         [ gso_max_size BYTES ] | [ gso_max_segs PACKETS ]\n"
+               "                       [ master DEVICE ][ vrf NAME ]\n"
+               "                       [ nomaster ]\n"
+               "                       [ addrgenmode { eui64 | none | stable_secret | random } ]\n"
+               "                       [ protodown { on | off } ]\n"
+               "                       [ gso_max_size BYTES ] | [ gso_max_segs PACKETS ]\n"
                "\n"
-               "       ip link show [ DEVICE | group GROUP ] [up] [master DEV] [vrf NAME] [type TYPE]\n");
-
-       fprintf(stderr, "\n       ip link xstats type TYPE [ ARGS ]\n");
-       fprintf(stderr, "\n       ip link afstats [ dev DEVICE ]\n");
+               "       ip link show [ DEVICE | group GROUP ] [up] [master DEV] [vrf NAME] [type TYPE]\n"
+               "\n"
+               "       ip link xstats type TYPE [ ARGS ]\n"
+               "\n"
+               "       ip link afstats [ dev DEVICE ]\n");
 
        if (iplink_have_newlink()) {
                fprintf(stderr,
                        "\n"
-                       "       ip link help [ TYPE ]\n"
+                       "       ip link help [ TYPE ]\n"
                        "\n"
                        "TYPE := { vlan | veth | vcan | vxcan | dummy | ifb | macvlan | macvtap |\n"
-                       "          bridge | bond | team | ipoib | ip6tnl | ipip | sit | vxlan |\n"
-                       "          gre | gretap | erspan | ip6gre | ip6gretap | ip6erspan |\n"
-                       "          vti | nlmon | team_slave | bond_slave | bridge_slave |\n"
-                       "          ipvlan | ipvtap | geneve | vrf | macsec | netdevsim | rmnet |\n"
-                       "          xfrm }\n");
+                       "          bridge | bond | team | ipoib | ip6tnl | ipip | sit | vxlan |\n"
+                       "          gre | gretap | erspan | ip6gre | ip6gretap | ip6erspan |\n"
+                       "          vti | nlmon | team_slave | bond_slave | bridge_slave |\n"
+                       "          ipvlan | ipvtap | geneve | vrf | macsec | netdevsim | rmnet |\n"
+                       "          xfrm }\n");
        }
        exit(-1);
 }
index 10ba85f6f1fee896dab27347bcb1d8e93f5f3f1d..06f736d4dc710568d3ac2fdd92df730b28fadf0c 100644 (file)
@@ -29,39 +29,39 @@ static void print_explain(FILE *f)
 {
        fprintf(f,
                "Usage: ... bridge [ fdb_flush ]\n"
-               "                  [ forward_delay FORWARD_DELAY ]\n"
-               "                  [ hello_time HELLO_TIME ]\n"
-               "                  [ max_age MAX_AGE ]\n"
-               "                  [ ageing_time AGEING_TIME ]\n"
-               "                  [ stp_state STP_STATE ]\n"
-               "                  [ priority PRIORITY ]\n"
-               "                  [ group_fwd_mask MASK ]\n"
-               "                  [ group_address ADDRESS ]\n"
-               "                  [ vlan_filtering VLAN_FILTERING ]\n"
-               "                  [ vlan_protocol VLAN_PROTOCOL ]\n"
-               "                  [ vlan_default_pvid VLAN_DEFAULT_PVID ]\n"
-               "                  [ vlan_stats_enabled VLAN_STATS_ENABLED ]\n"
-               "                  [ vlan_stats_per_port VLAN_STATS_PER_PORT ]\n"
-               "                  [ mcast_snooping MULTICAST_SNOOPING ]\n"
-               "                  [ mcast_router MULTICAST_ROUTER ]\n"
-               "                  [ mcast_query_use_ifaddr MCAST_QUERY_USE_IFADDR ]\n"
-               "                  [ mcast_querier MULTICAST_QUERIER ]\n"
-               "                  [ mcast_hash_elasticity HASH_ELASTICITY ]\n"
-               "                  [ mcast_hash_max HASH_MAX ]\n"
-               "                  [ mcast_last_member_count LAST_MEMBER_COUNT ]\n"
-               "                  [ mcast_startup_query_count STARTUP_QUERY_COUNT ]\n"
-               "                  [ mcast_last_member_interval LAST_MEMBER_INTERVAL ]\n"
-               "                  [ mcast_membership_interval MEMBERSHIP_INTERVAL ]\n"
-               "                  [ mcast_querier_interval QUERIER_INTERVAL ]\n"
-               "                  [ mcast_query_interval QUERY_INTERVAL ]\n"
-               "                  [ mcast_query_response_interval QUERY_RESPONSE_INTERVAL ]\n"
-               "                  [ mcast_startup_query_interval STARTUP_QUERY_INTERVAL ]\n"
-               "                  [ mcast_stats_enabled MCAST_STATS_ENABLED ]\n"
-               "                  [ mcast_igmp_version IGMP_VERSION ]\n"
-               "                  [ mcast_mld_version MLD_VERSION ]\n"
-               "                  [ nf_call_iptables NF_CALL_IPTABLES ]\n"
-               "                  [ nf_call_ip6tables NF_CALL_IP6TABLES ]\n"
-               "                  [ nf_call_arptables NF_CALL_ARPTABLES ]\n"
+               "                 [ forward_delay FORWARD_DELAY ]\n"
+               "                 [ hello_time HELLO_TIME ]\n"
+               "                 [ max_age MAX_AGE ]\n"
+               "                 [ ageing_time AGEING_TIME ]\n"
+               "                 [ stp_state STP_STATE ]\n"
+               "                 [ priority PRIORITY ]\n"
+               "                 [ group_fwd_mask MASK ]\n"
+               "                 [ group_address ADDRESS ]\n"
+               "                 [ vlan_filtering VLAN_FILTERING ]\n"
+               "                 [ vlan_protocol VLAN_PROTOCOL ]\n"
+               "                 [ vlan_default_pvid VLAN_DEFAULT_PVID ]\n"
+               "                 [ vlan_stats_enabled VLAN_STATS_ENABLED ]\n"
+               "                 [ vlan_stats_per_port VLAN_STATS_PER_PORT ]\n"
+               "                 [ mcast_snooping MULTICAST_SNOOPING ]\n"
+               "                 [ mcast_router MULTICAST_ROUTER ]\n"
+               "                 [ mcast_query_use_ifaddr MCAST_QUERY_USE_IFADDR ]\n"
+               "                 [ mcast_querier MULTICAST_QUERIER ]\n"
+               "                 [ mcast_hash_elasticity HASH_ELASTICITY ]\n"
+               "                 [ mcast_hash_max HASH_MAX ]\n"
+               "                 [ mcast_last_member_count LAST_MEMBER_COUNT ]\n"
+               "                 [ mcast_startup_query_count STARTUP_QUERY_COUNT ]\n"
+               "                 [ mcast_last_member_interval LAST_MEMBER_INTERVAL ]\n"
+               "                 [ mcast_membership_interval MEMBERSHIP_INTERVAL ]\n"
+               "                 [ mcast_querier_interval QUERIER_INTERVAL ]\n"
+               "                 [ mcast_query_interval QUERY_INTERVAL ]\n"
+               "                 [ mcast_query_response_interval QUERY_RESPONSE_INTERVAL ]\n"
+               "                 [ mcast_startup_query_interval STARTUP_QUERY_INTERVAL ]\n"
+               "                 [ mcast_stats_enabled MCAST_STATS_ENABLED ]\n"
+               "                 [ mcast_igmp_version IGMP_VERSION ]\n"
+               "                 [ mcast_mld_version MLD_VERSION ]\n"
+               "                 [ nf_call_iptables NF_CALL_IPTABLES ]\n"
+               "                 [ nf_call_ip6tables NF_CALL_IP6TABLES ]\n"
+               "                 [ nf_call_arptables NF_CALL_ARPTABLES ]\n"
                "\n"
                "Where: VLAN_PROTOCOL := { 802.1Q | 802.1ad }\n"
        );
index ae9d15fcf5065ddb97e15bd7f516081ff1f2c37a..79a1d2f5f5b8fdf1f1498d0400603ef5dcb14b94 100644 (file)
@@ -23,26 +23,26 @@ static void print_explain(FILE *f)
 {
        fprintf(f,
                "Usage: ... bridge_slave [ fdb_flush ]\n"
-               "                        [ state STATE ]\n"
-               "                        [ priority PRIO ]\n"
-               "                        [ cost COST ]\n"
-               "                        [ guard {on | off} ]\n"
-               "                        [ hairpin {on | off} ]\n"
-               "                        [ fastleave {on | off} ]\n"
-               "                        [ root_block {on | off} ]\n"
-               "                        [ learning {on | off} ]\n"
-               "                        [ flood {on | off} ]\n"
-               "                        [ proxy_arp {on | off} ]\n"
-               "                        [ proxy_arp_wifi {on | off} ]\n"
-               "                        [ mcast_router MULTICAST_ROUTER ]\n"
-               "                        [ mcast_fast_leave {on | off} ]\n"
-               "                        [ mcast_flood {on | off} ]\n"
-               "                        [ mcast_to_unicast {on | off} ]\n"
-               "                        [ group_fwd_mask MASK ]\n"
-               "                        [ neigh_suppress {on | off} ]\n"
-               "                        [ vlan_tunnel {on | off} ]\n"
-               "                        [ isolated {on | off} ]\n"
-               "                        [ backup_port DEVICE ] [ nobackup_port ]\n"
+               "                       [ state STATE ]\n"
+               "                       [ priority PRIO ]\n"
+               "                       [ cost COST ]\n"
+               "                       [ guard {on | off} ]\n"
+               "                       [ hairpin {on | off} ]\n"
+               "                       [ fastleave {on | off} ]\n"
+               "                       [ root_block {on | off} ]\n"
+               "                       [ learning {on | off} ]\n"
+               "                       [ flood {on | off} ]\n"
+               "                       [ proxy_arp {on | off} ]\n"
+               "                       [ proxy_arp_wifi {on | off} ]\n"
+               "                       [ mcast_router MULTICAST_ROUTER ]\n"
+               "                       [ mcast_fast_leave {on | off} ]\n"
+               "                       [ mcast_flood {on | off} ]\n"
+               "                       [ mcast_to_unicast {on | off} ]\n"
+               "                       [ group_fwd_mask MASK ]\n"
+               "                       [ neigh_suppress {on | off} ]\n"
+               "                       [ vlan_tunnel {on | off} ]\n"
+               "                       [ isolated {on | off} ]\n"
+               "                       [ backup_port DEVICE ] [ nobackup_port ]\n"
        );
 }
 
index d70b1941a885e991b76ba3eeea39ca34561d0944..9299236cbd33a2fb92ae319dd09ed16932f41624 100644 (file)
@@ -21,23 +21,23 @@ static void print_explain(FILE *f)
 {
        fprintf(f,
                "Usage: ... geneve id VNI\n"
-               "                  remote ADDR\n"
-               "                  [ ttl TTL ]\n"
-               "                  [ tos TOS ]\n"
-               "                  [ df DF ]\n"
-               "                  [ flowlabel LABEL ]\n"
-               "                  [ dstport PORT ]\n"
-               "                  [ [no]external ]\n"
-               "                  [ [no]udpcsum ]\n"
-               "                  [ [no]udp6zerocsumtx ]\n"
-               "                  [ [no]udp6zerocsumrx ]\n"
+               "               remote ADDR\n"
+               "               [ ttl TTL ]\n"
+               "               [ tos TOS ]\n"
+               "               [ df DF ]\n"
+               "               [ flowlabel LABEL ]\n"
+               "               [ dstport PORT ]\n"
+               "               [ [no]external ]\n"
+               "               [ [no]udpcsum ]\n"
+               "               [ [no]udp6zerocsumtx ]\n"
+               "               [ [no]udp6zerocsumrx ]\n"
                "\n"
-               "Where: VNI   := 0-16777215\n"
-               "       ADDR  := IP_ADDRESS\n"
-               "       TOS   := { NUMBER | inherit }\n"
-               "       TTL   := { 1..255 | auto | inherit }\n"
-               "       DF    := { unset | set | inherit }\n"
-               "       LABEL := 0-1048575\n"
+               "Where: VNI   := 0-16777215\n"
+               "       ADDR  := IP_ADDRESS\n"
+               "       TOS   := { NUMBER | inherit }\n"
+               "       TTL   := { 1..255 | auto | inherit }\n"
+               "       DF    := { unset | set | inherit }\n"
+               "       LABEL := 0-1048575\n"
        );
 }
 
index c673ccf7727197a8d97ba2a90427f7a7ee774c04..7d9167d4e6a34f9064e5508890d31e7b36c79534 100644 (file)
 static void print_usage(FILE *f)
 {
        fprintf(f,
-"Usage:\tip link add name NAME type hsr slave1 SLAVE1-IF slave2 SLAVE2-IF\n"
-"\t[ supervision ADDR-BYTE ] [version VERSION]\n"
-"\n"
-"NAME\n"
-"      name of new hsr device (e.g. hsr0)\n"
-"SLAVE1-IF, SLAVE2-IF\n"
-"      the two slave devices bound to the HSR device\n"
-"ADDR-BYTE\n"
-"      0-255; the last byte of the multicast address used for HSR supervision\n"
-"      frames (default = 0)\n"
-"VERSION\n"
-"      0,1; the protocol version to be used. (default = 0)\n");
+               "Usage:\tip link add name NAME type hsr slave1 SLAVE1-IF slave2 SLAVE2-IF\n"
+               "\t[ supervision ADDR-BYTE ] [version VERSION]\n"
+               "\n"
+               "NAME\n"
+               "       name of new hsr device (e.g. hsr0)\n"
+               "SLAVE1-IF, SLAVE2-IF\n"
+               "       the two slave devices bound to the HSR device\n"
+               "ADDR-BYTE\n"
+               "       0-255; the last byte of the multicast address used for HSR supervision\n"
+               "       frames (default = 0)\n"
+               "VERSION\n"
+               "       0,1; the protocol version to be used. (default = 0)\n");
 }
 
 static void usage(void)
index e69bda0e8628b65e6498f65336ce8915f7a0f21b..05dba3503373a4b3dec3971f6c6f4542d2dff911 100644 (file)
@@ -23,8 +23,8 @@ static void print_explain(FILE *f)
 {
        fprintf(f,
                "Usage: ... ipoib [ pkey PKEY ]\n"
-               "                 [ mode {datagram | connected} ]\n"
-               "                 [ umcast {0|1} ]\n"
+               "                [ mode {datagram | connected} ]\n"
+               "                [ umcast {0|1} ]\n"
                "\n"
                "PKEY  := 0x8001-0xffff\n"
        );
index 26f6ee8358d27e6a613853a82751e9c11653bec7..0dfb4a8d536caaf677fd77959bb969ed94797673 100644 (file)
@@ -22,14 +22,14 @@ static void print_explain(FILE *f)
 {
        fprintf(f,
                "Usage: ... vlan id VLANID\n"
-               "                [ protocol VLANPROTO ]\n"
-               "                [ reorder_hdr { on | off } ]\n"
-               "                [ gvrp { on | off } ]\n"
-               "                [ mvrp { on | off } ]\n"
-               "                [ loose_binding { on | off } ]\n"
-               "                [ bridge_binding { on | off } ]\n"
-               "                [ ingress-qos-map QOS-MAP ]\n"
-               "                [ egress-qos-map QOS-MAP ]\n"
+               "               [ protocol VLANPROTO ]\n"
+               "               [ reorder_hdr { on | off } ]\n"
+               "               [ gvrp { on | off } ]\n"
+               "               [ mvrp { on | off } ]\n"
+               "               [ loose_binding { on | off } ]\n"
+               "               [ bridge_binding { on | off } ]\n"
+               "               [ ingress-qos-map QOS-MAP ]\n"
+               "               [ egress-qos-map QOS-MAP ]\n"
                "\n"
                "VLANID := 0-4095\n"
                "VLANPROTO: [ 802.1Q | 802.1ad ]\n"
index 1489c00925fbecf59982197cd781c5375d7fda22..bae9d99436e5a59ec73e66027bd7bc7ece488eb5 100644 (file)
@@ -27,34 +27,34 @@ static void print_explain(FILE *f)
 {
        fprintf(f,
                "Usage: ... vxlan id VNI\n"
-               "                 [ { group | remote } IP_ADDRESS ]\n"
-               "                 [ local ADDR ]\n"
-               "                 [ ttl TTL ]\n"
-               "                 [ tos TOS ]\n"
-               "                 [ df DF ]\n"
-               "                 [ flowlabel LABEL ]\n"
-               "                 [ dev PHYS_DEV ]\n"
-               "                 [ dstport PORT ]\n"
-               "                 [ srcport MIN MAX ]\n"
-               "                 [ [no]learning ]\n"
-               "                 [ [no]proxy ]\n"
-               "                 [ [no]rsc ]\n"
-               "                 [ [no]l2miss ]\n"
-               "                 [ [no]l3miss ]\n"
-               "                 [ ageing SECONDS ]\n"
-               "                 [ maxaddress NUMBER ]\n"
-               "                 [ [no]udpcsum ]\n"
-               "                 [ [no]udp6zerocsumtx ]\n"
-               "                 [ [no]udp6zerocsumrx ]\n"
-               "                 [ [no]remcsumtx ] [ [no]remcsumrx ]\n"
-               "                 [ [no]external ] [ gbp ] [ gpe ]\n"
+               "               [ { group | remote } IP_ADDRESS ]\n"
+               "               [ local ADDR ]\n"
+               "               [ ttl TTL ]\n"
+               "               [ tos TOS ]\n"
+               "               [ df DF ]\n"
+               "               [ flowlabel LABEL ]\n"
+               "               [ dev PHYS_DEV ]\n"
+               "               [ dstport PORT ]\n"
+               "               [ srcport MIN MAX ]\n"
+               "               [ [no]learning ]\n"
+               "               [ [no]proxy ]\n"
+               "               [ [no]rsc ]\n"
+               "               [ [no]l2miss ]\n"
+               "               [ [no]l3miss ]\n"
+               "               [ ageing SECONDS ]\n"
+               "               [ maxaddress NUMBER ]\n"
+               "               [ [no]udpcsum ]\n"
+               "               [ [no]udp6zerocsumtx ]\n"
+               "               [ [no]udp6zerocsumrx ]\n"
+               "               [ [no]remcsumtx ] [ [no]remcsumrx ]\n"
+               "               [ [no]external ] [ gbp ] [ gpe ]\n"
                "\n"
-               "Where: VNI   := 0-16777215\n"
-               "       ADDR  := { IP_ADDRESS | any }\n"
-               "       TOS   := { NUMBER | inherit }\n"
-               "       TTL   := { 1..255 | auto | inherit }\n"
-               "       DF    := { unset | set | inherit }\n"
-               "       LABEL := 0-1048575\n"
+               "Where: VNI     := 0-16777215\n"
+               "       ADDR    := { IP_ADDRESS | any }\n"
+               "       TOS     := { NUMBER | inherit }\n"
+               "       TTL     := { 1..255 | auto | inherit }\n"
+               "       DF      := { unset | set | inherit }\n"
+               "       LABEL := 0-1048575\n"
        );
 }
 
index 105b23a8f075a871c31a129a0e44046bd921893a..3400e055ad8c186a0bd85074638cbe841db8545f 100644 (file)
@@ -39,8 +39,9 @@ static void usage(void) __attribute__((noreturn));
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: ip maddr [ add | del ] MULTIADDR dev STRING\n");
-       fprintf(stderr, "       ip maddr show [ dev STRING ]\n");
+       fprintf(stderr,
+               "Usage: ip maddr [ add | del ] MULTIADDR dev STRING\n"
+               "       ip maddr show [ dev STRING ]\n");
        exit(-1);
 }
 
index 743632cc5569309483a28db09f8bf0a056c30758..9ecc7fd2011ac9a86634ac09126474ef2d844aac 100644 (file)
@@ -29,10 +29,11 @@ int listen_all_nsid;
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: ip monitor [ all | LISTofOBJECTS ] [ FILE ] [ label ] [all-nsid] [dev DEVICE]\n");
-       fprintf(stderr, "LISTofOBJECTS := link | address | route | mroute | prefix |\n");
-       fprintf(stderr, "                 neigh | netconf | rule | nsid\n");
-       fprintf(stderr, "FILE := file FILENAME\n");
+       fprintf(stderr,
+               "Usage: ip monitor [ all | LISTofOBJECTS ] [ FILE ] [ label ] [all-nsid] [dev DEVICE]\n"
+               "LISTofOBJECTS := link | address | route | mroute | prefix |\n"
+               "                neigh | netconf | rule | nsid\n"
+               "FILE := file FILENAME\n");
        exit(-1);
 }
 
index 6cf91fe934a76c9e3aad72d7dbebf66a0730ade1..8b3c4c25d2e29cf724079c3b3e3e0640ff6233af 100644 (file)
@@ -35,12 +35,14 @@ static void usage(void) __attribute__((noreturn));
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: ip mroute show [ [ to ] PREFIX ] [ from PREFIX ] [ iif DEVICE ]\n");
-       fprintf(stderr, "                      [ table TABLE_ID ]\n");
-       fprintf(stderr, "TABLE_ID := [ local | main | default | all | NUMBER ]\n");
+       fprintf(stderr,
+               "Usage: ip mroute show [ [ to ] PREFIX ] [ from PREFIX ] [ iif DEVICE ]\n"
+       "                       [ table TABLE_ID ]\n"
+       "TABLE_ID := [ local | main | default | all | NUMBER ]\n"
 #if 0
-       fprintf(stderr, "Usage: ip mroute [ add | del ] DESTINATION from SOURCE [ iif DEVICE ] [ oif DEVICE ]\n");
+       "Usage: ip mroute [ add | del ] DESTINATION from SOURCE [ iif DEVICE ] [ oif DEVICE ]\n"
 #endif
+       );
        exit(-1);
 }
 
index 27986ff7a6c9ba6355446032388303c7ca83fdfa..a3869c841f97cdbf370961e82da7b088093dda93 100644 (file)
@@ -48,13 +48,16 @@ static void usage(void) __attribute__((noreturn));
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: ip neigh { add | del | change | replace }\n"
-                       "                { ADDR [ lladdr LLADDR ] [ nud STATE ] | proxy ADDR } [ dev DEV ]\n");
-       fprintf(stderr, "                [ router ] [ extern_learn ] [ protocol PROTO ]\n\n");
-       fprintf(stderr, "       ip neigh { show | flush } [ proxy ] [ to PREFIX ] [ dev DEV ] [ nud STATE ]\n");
-       fprintf(stderr, "                                 [ vrf NAME ]\n\n");
-       fprintf(stderr, "STATE := { permanent | noarp | stale | reachable | none |\n"
-                       "           incomplete | delay | probe | failed }\n");
+       fprintf(stderr,
+               "Usage: ip neigh { add | del | change | replace }\n"
+               "               { ADDR [ lladdr LLADDR ] [ nud STATE ] | proxy ADDR } [ dev DEV ]\n"
+               "               [ router ] [ extern_learn ] [ protocol PROTO ]\n"
+               "\n"
+               "       ip neigh { show | flush } [ proxy ] [ to PREFIX ] [ dev DEV ] [ nud STATE ]\n"
+               "                                 [ vrf NAME ]\n"
+               "\n"
+               "STATE := { permanent | noarp | stale | reachable | none |\n"
+               "           incomplete | delay | probe | failed }\n");
        exit(-1);
 }
 
index 52aefacf4dc2e35be14f2560a649d777f9b17a59..db11fdb2c4fe2b5767bb2f944108620576061015 100644 (file)
 
 static int usage(void)
 {
-       fprintf(stderr, "Usage: ip netns list\n");
-       fprintf(stderr, "       ip netns add NAME\n");
-       fprintf(stderr, "       ip netns attach NAME PID\n");
-       fprintf(stderr, "       ip netns set NAME NETNSID\n");
-       fprintf(stderr, "       ip [-all] netns delete [NAME]\n");
-       fprintf(stderr, "       ip netns identify [PID]\n");
-       fprintf(stderr, "       ip netns pids NAME\n");
-       fprintf(stderr, "       ip [-all] netns exec [NAME] cmd ...\n");
-       fprintf(stderr, "       ip netns monitor\n");
-       fprintf(stderr, "       ip netns list-id\n");
-       fprintf(stderr, "NETNSID := auto | POSITIVE-INT\n");
+       fprintf(stderr,
+               "Usage: ip netns list\n"
+               "       ip netns add NAME\n"
+               "       ip netns attach NAME PID\n"
+               "       ip netns set NAME NETNSID\n"
+               "       ip [-all] netns delete [NAME]\n"
+               "       ip netns identify [PID]\n"
+               "       ip netns pids NAME\n"
+               "       ip [-all] netns exec [NAME] cmd ...\n"
+               "       ip netns monitor\n"
+               "       ip netns list-id\n"
+               "NETNSID := auto | POSITIVE-INT\n");
        exit(-1);
 }
 
index 50fc949f1fcc43fa63df03094b604fbbf0f47bfd..ddee4905df088e306296ce77e0410672bea37423 100644 (file)
@@ -47,15 +47,15 @@ static void usage(void)
 {
        fprintf(stderr,
                "Usage: ip ntable change name NAME [ dev DEV ]\n"
-               "          [ thresh1 VAL ] [ thresh2 VAL ] [ thresh3 VAL ] [ gc_int MSEC ]\n"
-               "          [ PARMS ]\n"
+               "        [ thresh1 VAL ] [ thresh2 VAL ] [ thresh3 VAL ] [ gc_int MSEC ]\n"
+               "        [ PARMS ]\n"
                "Usage: ip ntable show [ dev DEV ] [ name NAME ]\n"
 
                "PARMS := [ base_reachable MSEC ] [ retrans MSEC ] [ gc_stale MSEC ]\n"
-               "         [ delay_probe MSEC ] [ queue LEN ]\n"
-               "         [ app_probes VAL ] [ ucast_probes VAL ] [ mcast_probes VAL ]\n"
-               "         [ anycast_delay MSEC ] [ proxy_delay MSEC ] [ proxy_queue LEN ]\n"
-               "         [ locktime MSEC ]\n"
+               "        [ delay_probe MSEC ] [ queue LEN ]\n"
+               "        [ app_probes VAL ] [ ucast_probes VAL ] [ mcast_probes VAL ]\n"
+               "        [ anycast_delay MSEC ] [ proxy_delay MSEC ] [ proxy_queue LEN ]\n"
+               "        [ locktime MSEC ]\n"
                );
 
        exit(-1);
index 33076e726de64d6d547b82334cfb76e2ed8b9bf5..56a76996a6cab8b1fef6d94b7b6945e29a363f90 100644 (file)
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: ip sr { COMMAND | help }\n");
-       fprintf(stderr, "          ip sr hmac show\n");
-       fprintf(stderr, "          ip sr hmac set KEYID ALGO\n");
-       fprintf(stderr, "          ip sr tunsrc show\n");
-       fprintf(stderr, "          ip sr tunsrc set ADDRESS\n");
-       fprintf(stderr, "where  ALGO := { sha1 | sha256 }\n");
+       fprintf(stderr,
+               "Usage: ip sr { COMMAND | help }\n"
+               "          ip sr hmac show\n"
+               "          ip sr hmac set KEYID ALGO\n"
+               "          ip sr tunsrc show\n"
+               "          ip sr tunsrc set ADDRESS\n"
+               "where  ALGO := { sha1 | sha256 }\n");
        exit(-1);
 }
 
index d597908fa209e63bb7928ab87fac2640fdd6e199..92a5cb923b6b02a47766f22af5cfbdbf3401c569 100644 (file)
@@ -32,18 +32,19 @@ static void usage(void) __attribute__((noreturn));
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: ip tunnel { add | change | del | show | prl | 6rd } [ NAME ]\n");
-       fprintf(stderr, "          [ mode { ipip | gre | sit | isatap | vti } ] [ remote ADDR ] [ local ADDR ]\n");
-       fprintf(stderr, "          [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n");
-       fprintf(stderr, "          [ prl-default ADDR ] [ prl-nodefault ADDR ] [ prl-delete ADDR ]\n");
-       fprintf(stderr, "          [ 6rd-prefix ADDR ] [ 6rd-relay_prefix ADDR ] [ 6rd-reset ]\n");
-       fprintf(stderr, "          [ ttl TTL ] [ tos TOS ] [ [no]pmtudisc ] [ dev PHYS_DEV ]\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where: NAME := STRING\n");
-       fprintf(stderr, "       ADDR := { IP_ADDRESS | any }\n");
-       fprintf(stderr, "       TOS  := { STRING | 00..ff | inherit | inherit/STRING | inherit/00..ff }\n");
-       fprintf(stderr, "       TTL  := { 1..255 | inherit }\n");
-       fprintf(stderr, "       KEY  := { DOTTED_QUAD | NUMBER }\n");
+       fprintf(stderr,
+               "Usage: ip tunnel { add | change | del | show | prl | 6rd } [ NAME ]\n"
+               "        [ mode { ipip | gre | sit | isatap | vti } ] [ remote ADDR ] [ local ADDR ]\n"
+               "        [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n"
+               "        [ prl-default ADDR ] [ prl-nodefault ADDR ] [ prl-delete ADDR ]\n"
+               "        [ 6rd-prefix ADDR ] [ 6rd-relay_prefix ADDR ] [ 6rd-reset ]\n"
+               "        [ ttl TTL ] [ tos TOS ] [ [no]pmtudisc ] [ dev PHYS_DEV ]\n"
+               "\n"
+               "Where: NAME := STRING\n"
+               "       ADDR := { IP_ADDRESS | any }\n"
+               "       TOS  := { STRING | 00..ff | inherit | inherit/STRING | inherit/00..ff }\n"
+               "       TTL  := { 1..255 | inherit }\n"
+               "       KEY  := { DOTTED_QUAD | NUMBER }\n");
        exit(-1);
 }
 
index 03238c3f6518bb6133c7824deb012db2960d503a..82e384998b1c9926c1505416b1f3b5b0f62cf467 100644 (file)
@@ -40,12 +40,13 @@ static void usage(void) __attribute__((noreturn));
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: ip tuntap { add | del | show | list | lst | help } [ dev PHYS_DEV ]\n");
-       fprintf(stderr, "          [ mode { tun | tap } ] [ user USER ] [ group GROUP ]\n");
-       fprintf(stderr, "          [ one_queue ] [ pi ] [ vnet_hdr ] [ multi_queue ] [ name NAME ]\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where: USER  := { STRING | NUMBER }\n");
-       fprintf(stderr, "       GROUP := { STRING | NUMBER }\n");
+       fprintf(stderr,
+               "Usage: ip tuntap { add | del | show | list | lst | help } [ dev PHYS_DEV ]\n"
+               "       [ mode { tun | tap } ] [ user USER ] [ group GROUP ]\n"
+               "       [ one_queue ] [ pi ] [ vnet_hdr ] [ multi_queue ] [ name NAME ]\n"
+               "\n"
+               "Where: USER  := { STRING | NUMBER }\n"
+               "       GROUP := { STRING | NUMBER }\n");
        exit(-1);
 }
 
index 08a0d45b2570f47167b0e55bae55f1776334996a..a13cf653131b0cf9300b36fac88fb0a1bd904749 100644 (file)
@@ -36,10 +36,11 @@ static struct link_filter vrf_filter;
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: ip vrf show [NAME] ...\n");
-       fprintf(stderr, "       ip vrf exec [NAME] cmd ...\n");
-       fprintf(stderr, "       ip vrf identify [PID]\n");
-       fprintf(stderr, "       ip vrf pids [NAME]\n");
+       fprintf(stderr,
+               "Usage: ip vrf show [NAME] ...\n"
+               "       ip vrf exec [NAME] cmd ...\n"
+               "       ip vrf identify [PID]\n"
+               "       ip vrf pids [NAME]\n");
 
        exit(-1);
 }
index 842fab5cdb0fb768244eb0a9820d1567cee39e53..15beb737217e878b6d34550311e73c66a9008287 100644 (file)
 static void gre_print_help(struct link_util *lu, int argc, char **argv, FILE *f)
 {
        fprintf(f,
-               "Usage: ... %-9s [ remote ADDR ]\n",
-               lu->id
-       );
-       fprintf(f,
-               "                     [ local ADDR ]\n"
-               "                     [ [no][i|o]seq ]\n"
-               "                     [ [i|o]key KEY | no[i|o]key ]\n"
-               "                     [ [no][i|o]csum ]\n"
-               "                     [ ttl TTL ]\n"
-               "                     [ tos TOS ]\n"
-               "                     [ [no]pmtudisc ]\n"
-               "                     [ [no]ignore-df ]\n"
-               "                     [ dev PHYS_DEV ]\n"
-               "                     [ fwmark MARK ]\n"
-               "                     [ external ]\n"
-               "                     [ noencap ]\n"
-               "                     [ encap { fou | gue | none } ]\n"
-               "                     [ encap-sport PORT ]\n"
-               "                     [ encap-dport PORT ]\n"
-               "                     [ [no]encap-csum ]\n"
-               "                     [ [no]encap-csum6 ]\n"
-               "                     [ [no]encap-remcsum ]\n"
-               "                     [ erspan_ver version ]\n"
-               "                     [ erspan IDX ]\n"
-               "                     [ erspan_dir { ingress | egress } ]\n"
-               "                     [ erspan_hwid hwid ]\n"
+               "Usage: ... %-9s        [ remote ADDR ]\n"
+               "                       [ local ADDR ]\n"
+               "                       [ [no][i|o]seq ]\n"
+               "                       [ [i|o]key KEY | no[i|o]key ]\n"
+               "                       [ [no][i|o]csum ]\n"
+               "                       [ ttl TTL ]\n"
+               "                       [ tos TOS ]\n"
+               "                       [ [no]pmtudisc ]\n"
+               "                       [ [no]ignore-df ]\n"
+               "                       [ dev PHYS_DEV ]\n"
+               "                       [ fwmark MARK ]\n"
+               "                       [ external ]\n"
+               "                       [ noencap ]\n"
+               "                       [ encap { fou | gue | none } ]\n"
+               "                       [ encap-sport PORT ]\n"
+               "                       [ encap-dport PORT ]\n"
+               "                       [ [no]encap-csum ]\n"
+               "                       [ [no]encap-csum6 ]\n"
+               "                       [ [no]encap-remcsum ]\n"
+               "                       [ erspan_ver version ]\n"
+               "                       [ erspan IDX ]\n"
+               "                       [ erspan_dir { ingress | egress } ]\n"
+               "                       [ erspan_hwid hwid ]\n"
                "\n"
-       );
-       fprintf(f,
-               "Where: ADDR := { IP_ADDRESS | any }\n"
-               "       TOS  := { NUMBER | inherit }\n"
-               "       TTL  := { 1..255 | inherit }\n"
-               "       KEY  := { DOTTED_QUAD | NUMBER }\n"
-               "       MARK := { 0x0..0xffffffff }\n"
-       );
+               "Where: ADDR := { IP_ADDRESS | any }\n"
+               "       TOS  := { NUMBER | inherit }\n"
+               "       TTL  := { 1..255 | inherit }\n"
+               "       KEY  := { DOTTED_QUAD | NUMBER }\n"
+               "       MARK := { 0x0..0xffffffff }\n",
+               lu->id);
 }
 
 static int gre_parse_opt(struct link_util *lu, int argc, char **argv,
index 4710b4048c0fede57147958e47069b9e575a86d5..9d1741bff8a161dc930b9737d30eac4d03038608 100644 (file)
 static void gre_print_help(struct link_util *lu, int argc, char **argv, FILE *f)
 {
        fprintf(f,
-               "Usage: ... %-9s [ remote ADDR ]\n",
-               lu->id
-       );
-       fprintf(f,
-               "                     [ local ADDR ]\n"
-               "                     [ [no][i|o]seq ]\n"
-               "                     [ [i|o]key KEY | no[i|o]key ]\n"
-               "                     [ [no][i|o]csum ]\n"
-               "                     [ hoplimit TTL ]\n"
-               "                     [ encaplimit ELIM ]\n"
-               "                     [ tclass TCLASS ]\n"
-               "                     [ flowlabel FLOWLABEL ]\n"
-               "                     [ dscp inherit ]\n"
-               "                     [ dev PHYS_DEV ]\n"
-               "                     [ fwmark MARK ]\n"
-               "                     [ [no]allow-localremote ]\n"
-               "                     [ external ]\n"
-               "                     [ noencap ]\n"
-               "                     [ encap { fou | gue | none } ]\n"
-               "                     [ encap-sport PORT ]\n"
-               "                     [ encap-dport PORT ]\n"
-               "                     [ [no]encap-csum ]\n"
-               "                     [ [no]encap-csum6 ]\n"
-               "                     [ [no]encap-remcsum ]\n"
-               "                     [ erspan_ver version ]\n"
-               "                     [ erspan IDX ]\n"
-               "                     [ erspan_dir { ingress | egress } ]\n"
-               "                     [ erspan_hwid hwid ]\n"
+               "Usage: ... %-9s        [ remote ADDR ]\n"
+               "                       [ local ADDR ]\n"
+               "                       [ [no][i|o]seq ]\n"
+               "                       [ [i|o]key KEY | no[i|o]key ]\n"
+               "                       [ [no][i|o]csum ]\n"
+               "                       [ hoplimit TTL ]\n"
+               "                       [ encaplimit ELIM ]\n"
+               "                       [ tclass TCLASS ]\n"
+               "                       [ flowlabel FLOWLABEL ]\n"
+               "                       [ dscp inherit ]\n"
+               "                       [ dev PHYS_DEV ]\n"
+               "                       [ fwmark MARK ]\n"
+               "                       [ [no]allow-localremote ]\n"
+               "                       [ external ]\n"
+               "                       [ noencap ]\n"
+               "                       [ encap { fou | gue | none } ]\n"
+               "                       [ encap-sport PORT ]\n"
+               "                       [ encap-dport PORT ]\n"
+               "                       [ [no]encap-csum ]\n"
+               "                       [ [no]encap-csum6 ]\n"
+               "                       [ [no]encap-remcsum ]\n"
+               "                       [ erspan_ver version ]\n"
+               "                       [ erspan IDX ]\n"
+               "                       [ erspan_dir { ingress | egress } ]\n"
+               "                       [ erspan_hwid hwid ]\n"
                "\n"
-       );
-       fprintf(f,
-               "Where: ADDR      := IPV6_ADDRESS\n"
-               "       TTL       := { 0..255 } (default=%d)\n"
-               "       KEY       := { DOTTED_QUAD | NUMBER }\n"
-               "       ELIM      := { none | 0..255 }(default=%d)\n"
-               "       TCLASS    := { 0x0..0xff | inherit }\n"
-               "       FLOWLABEL := { 0x0..0xfffff | inherit }\n"
-               "       MARK      := { 0x0..0xffffffff | inherit }\n",
-               DEFAULT_TNL_HOP_LIMIT, IPV6_DEFAULT_TNL_ENCAP_LIMIT
-       );
+               "Where: ADDR      := IPV6_ADDRESS\n"
+               "       TTL       := { 0..255 } (default=%d)\n"
+               "       KEY       := { DOTTED_QUAD | NUMBER }\n"
+               "       ELIM      := { none | 0..255 }(default=%d)\n"
+               "       TCLASS    := { 0x0..0xff | inherit }\n"
+               "       FLOWLABEL := { 0x0..0xfffff | inherit }\n"
+               "       MARK      := { 0x0..0xffffffff | inherit }\n",
+               lu->id,
+               DEFAULT_TNL_HOP_LIMIT, IPV6_DEFAULT_TNL_ENCAP_LIMIT);
 }
 
 static int gre_parse_opt(struct link_util *lu, int argc, char **argv,
index 8d9feab17e6a885f4b3c3e6b95613e433ecceda4..c7b49b02aa099642b660a0377da87df978b899fd 100644 (file)
 static void ip6tunnel_print_help(struct link_util *lu, int argc, char **argv,
                                 FILE *f)
 {
-       const char *mode;
-
-       fprintf(f,
-               "Usage: ... %-6s [ remote ADDR ]\n",
-               lu->id
-       );
-       fprintf(f,
-               "                  [ local ADDR ]\n"
-               "                  [ encaplimit ELIM ]\n"
-               "                  [ hoplimit HLIM ]\n"
-               "                  [ tclass TCLASS ]\n"
-               "                  [ flowlabel FLOWLABEL ]\n"
-               "                  [ dscp inherit ]\n"
-               "                  [ [no]allow-localremote ]\n"
-               "                  [ dev PHYS_DEV ]\n"
-               "                  [ fwmark MARK ]\n"
-               "                  [ external ]\n"
-               "                  [ noencap ]\n"
-               "                  [ encap { fou | gue | none } ]\n"
-               "                  [ encap-sport PORT ]\n"
-               "                  [ encap-dport PORT ]\n"
-               "                  [ [no]encap-csum ]\n"
-               "                  [ [no]encap-csum6 ]\n"
-               "                  [ [no]encap-remcsum ]\n"
-       );
-       mode = "{ ip6ip6 | ipip6 | any }";
-       fprintf(f,
-               "                  [ mode %s ]\n"
-               "\n",
-               mode
-       );
        fprintf(f,
-               "Where: ADDR      := IPV6_ADDRESS\n"
-               "       ELIM      := { none | 0..255 }(default=%d)\n"
-               "       HLIM      := 0..255 (default=%d)\n"
-               "       TCLASS    := { 0x0..0xff | inherit }\n"
-               "       FLOWLABEL := { 0x0..0xfffff | inherit }\n"
-               "       MARK      := { 0x0..0xffffffff | inherit }\n",
-               IPV6_DEFAULT_TNL_ENCAP_LIMIT, DEFAULT_TNL_HOP_LIMIT
-       );
+               "Usage: ... %-6s        [ remote ADDR ]\n"
+               "                       [ local ADDR ]\n"
+               "                       [ encaplimit ELIM ]\n"
+               "                       [ hoplimit HLIM ]\n"
+               "                       [ tclass TCLASS ]\n"
+               "                       [ flowlabel FLOWLABEL ]\n"
+               "                       [ dscp inherit ]\n"
+               "                       [ [no]allow-localremote ]\n"
+               "                       [ dev PHYS_DEV ]\n"
+               "                       [ fwmark MARK ]\n"
+               "                       [ external ]\n"
+               "                       [ noencap ]\n"
+               "                       [ encap { fou | gue | none } ]\n"
+               "                       [ encap-sport PORT ]\n"
+               "                       [ encap-dport PORT ]\n"
+               "                       [ [no]encap-csum ]\n"
+               "                       [ [no]encap-csum6 ]\n"
+               "                       [ [no]encap-remcsum ]\n"
+               "                       [ mode { ip6ip6 | ipip6 | any } ]\n"
+               "\n"
+               "Where: ADDR      := IPV6_ADDRESS\n"
+               "       ELIM      := { none | 0..255 }(default=%d)\n"
+               "       HLIM      := 0..255 (default=%d)\n"
+               "       TCLASS    := { 0x0..0xff | inherit }\n"
+               "       FLOWLABEL := { 0x0..0xfffff | inherit }\n"
+               "       MARK      := { 0x0..0xffffffff | inherit }\n",
+               lu->id,
+               IPV6_DEFAULT_TNL_ENCAP_LIMIT, DEFAULT_TNL_HOP_LIMIT);
 }
 
 static int ip6tunnel_parse_opt(struct link_util *lu, int argc, char **argv,
index 2736ef8996b6ae6701a922f2fc57727130991c66..636cdb2cf5bb7135ff4854047ea384b6b8d354f4 100644 (file)
@@ -29,46 +29,39 @@ static void iptunnel_print_help(struct link_util *lu, int argc, char **argv,
 {
        const char *mode;
 
-       fprintf(f,
-               "Usage: ... %-6s [ remote ADDR ]\n",
-               lu->id
-       );
-       fprintf(f,
-               "                  [ local ADDR ]\n"
-               "                  [ ttl TTL ]\n"
-               "                  [ tos TOS ]\n"
-               "                  [ [no]pmtudisc ]\n"
-               "                  [ 6rd-prefix ADDR ]\n"
-               "                  [ 6rd-relay_prefix ADDR ]\n"
-               "                  [ 6rd-reset ]\n"
-               "                  [ dev PHYS_DEV ]\n"
-               "                  [ fwmark MARK ]\n"
-               "                  [ external ]\n"
-               "                  [ noencap ]\n"
-               "                  [ encap { fou | gue | none } ]\n"
-               "                  [ encap-sport PORT ]\n"
-               "                  [ encap-dport PORT ]\n"
-               "                  [ [no]encap-csum ]\n"
-               "                  [ [no]encap-csum6 ]\n"
-               "                  [ [no]encap-remcsum ]\n"
-       );
        if (strcmp(lu->id, "sit") == 0) {
-               mode = "{ ip6ip | ipip | mplsip | any } ]\n"
-               "                  [ isatap";
+               mode =  "{ ip6ip | ipip | mplsip | any } ]\n"
+                       "                       [ isatap";
        } else {
                mode = "{ ipip | mplsip | any }";
        }
+
        fprintf(f,
-               "                  [ mode %s ]\n"
-               "\n",
-               mode
-       );
-       fprintf(f,
-               "Where: ADDR := { IP_ADDRESS | any }\n"
-               "       TOS  := { NUMBER | inherit }\n"
-               "       TTL  := { 1..255 | inherit }\n"
-               "       MARK := { 0x0..0xffffffff }\n"
-       );
+               "Usage: ... %-6s        [ remote ADDR ]\n"
+               "                       [ local ADDR ]\n"
+               "                       [ ttl TTL ]\n"
+               "                       [ tos TOS ]\n"
+               "                       [ [no]pmtudisc ]\n"
+               "                       [ 6rd-prefix ADDR ]\n"
+               "                       [ 6rd-relay_prefix ADDR ]\n"
+               "                       [ 6rd-reset ]\n"
+               "                       [ dev PHYS_DEV ]\n"
+               "                       [ fwmark MARK ]\n"
+               "                       [ external ]\n"
+               "                       [ noencap ]\n"
+               "                       [ encap { fou | gue | none } ]\n"
+               "                       [ encap-sport PORT ]\n"
+               "                       [ encap-dport PORT ]\n"
+               "                       [ [no]encap-csum ]\n"
+               "                       [ [no]encap-csum6 ]\n"
+               "                       [ [no]encap-remcsum ]\n"
+               "                       [ mode %s ]\n"
+               "\n"
+               "Where: ADDR := { IP_ADDRESS | any }\n"
+               "       TOS  := { NUMBER | inherit }\n"
+               "       TTL  := { 1..255 | inherit }\n"
+               "       MARK := { 0x0..0xffffffff }\n",
+               lu->id, mode);
 }
 
 static int iptunnel_parse_opt(struct link_util *lu, int argc, char **argv,
index b974c62b27545b51b1e7f38eb3fd0ce642af2f0a..3a52ea870b56b6e3df15c7c882420262bfa0503e 100644 (file)
 static void vti_print_help(struct link_util *lu, int argc, char **argv, FILE *f)
 {
        fprintf(f,
-               "Usage: ... %-4s [ remote ADDR ]\n",
-               lu->id
-       );
-       fprintf(f,
-               "                [ local ADDR ]\n"
-               "                [ [i|o]key KEY ]\n"
-               "                [ dev PHYS_DEV ]\n"
-               "                [ fwmark MARK ]\n"
+               "Usage: ... %-4s        [ remote ADDR ]\n"
+               "               [ local ADDR ]\n"
+               "               [ [i|o]key KEY ]\n"
+               "               [ dev PHYS_DEV ]\n"
+               "               [ fwmark MARK ]\n"
                "\n"
-       );
-       fprintf(f,
-               "Where: ADDR := { IP%s_ADDRESS }\n"
-               "       KEY  := { DOTTED_QUAD | NUMBER }\n"
-               "       MARK := { 0x0..0xffffffff }\n",
-               ""
-       );
+               "Where: ADDR := { IP_ADDRESS }\n"
+               "       KEY  := { DOTTED_QUAD | NUMBER }\n"
+               "       MARK := { 0x0..0xffffffff }\n",
+               lu->id);
 }
 
 static int vti_parse_opt(struct link_util *lu, int argc, char **argv,
index f13c08583103a5f0a67e0fec5c31a600ac13dfd8..0b080fa9f4ddad30d787855198ea57e3f543b33d 100644 (file)
@@ -28,22 +28,16 @@ static void vti6_print_help(struct link_util *lu, int argc, char **argv,
                            FILE *f)
 {
        fprintf(f,
-               "Usage: ... %-4s [ remote ADDR ]\n",
-               lu->id
-       );
-       fprintf(f,
-               "                [ local ADDR ]\n"
-               "                [ [i|o]key KEY ]\n"
-               "                [ dev PHYS_DEV ]\n"
-               "                [ fwmark MARK ]\n"
+               "Usage: ... %-4s        [ remote ADDR ]\n"
+               "               [ local ADDR ]\n"
+               "               [ [i|o]key KEY ]\n"
+               "               [ dev PHYS_DEV ]\n"
+               "               [ fwmark MARK ]\n"
                "\n"
-       );
-       fprintf(f,
-               "Where: ADDR := { IP%s_ADDRESS }\n"
-               "       KEY  := { DOTTED_QUAD | NUMBER }\n"
-               "       MARK := { 0x0..0xffffffff }\n",
-               "V6"
-       );
+               "Where: ADDR := { IPV6_ADDRESS }\n"
+               "       KEY  := { DOTTED_QUAD | NUMBER }\n"
+               "       MARK := { 0x0..0xffffffff }\n",
+               lu->id);
 }
 
 static int vti6_parse_opt(struct link_util *lu, int argc, char **argv,
index 79a902fd6b6917f5589f69491980668574a1b238..7a3285b420456130e14d4705bab1a05e29281211 100644 (file)
 static void xfrm_print_help(struct link_util *lu, int argc, char **argv,
                            FILE *f)
 {
-       fprintf(f, "Usage: ... %-4s dev PHYS_DEV [ if_id IF-ID ]\n", lu->id);
-       fprintf(f, "\nWhere: IF-ID := { 0x0..0xffffffff }\n");
+       fprintf(f,
+               "Usage: ... %-4s dev PHYS_DEV [ if_id IF-ID ]\n"
+               "\n"
+               "Where: IF-ID := { 0x0..0xffffffff }\n",
+               lu->id);
 }
 
 static int xfrm_parse_opt(struct link_util *lu, int argc, char **argv,
index 7373443f2f8ab18380ac21534d41ba492c217f9c..bccddedddd17dd68932a42d011ba2d28895432f3 100644 (file)
@@ -62,10 +62,11 @@ static int dump_msg2(struct nlmsghdr *n, void *arg)
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: rtmon [ OPTIONS ] file FILE [ all | LISTofOBJECTS ]\n");
-       fprintf(stderr, "OPTIONS := { -f[amily] { inet | inet6 | link | help } |\n"
-                       "             -4 | -6 | -0 | -V[ersion] }\n");
-       fprintf(stderr, "LISTofOBJECTS := [ link ] [ address ] [ route ]\n");
+       fprintf(stderr,
+               "Usage: rtmon [ OPTIONS ] file FILE [ all | LISTofOBJECTS ]\n"
+               "OPTIONS := { -f[amily] { inet | inet6 | link | help } |\n"
+               "            -4 | -6 | -0 | -V[ersion] }\n"
+               "LISTofOBJECTS := [ link ] [ address ] [ route ]\n");
        exit(-1);
 }
 
index 72ef3ab5cfda4a01ae3a0328125068ae5b0e6d4f..acbd745ab09ed596f01c0a9f6a11b3e00342b05a 100644 (file)
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: ip tcp_metrics/tcpmetrics { COMMAND | help }\n");
-       fprintf(stderr, "       ip tcp_metrics { show | flush } SELECTOR\n");
-       fprintf(stderr, "       ip tcp_metrics delete [ address ] ADDRESS\n");
-       fprintf(stderr, "SELECTOR := [ [ address ] PREFIX ]\n");
+       fprintf(stderr,
+               "Usage: ip tcp_metrics/tcpmetrics { COMMAND | help }\n"
+               "       ip tcp_metrics { show | flush } SELECTOR\n"
+               "       ip tcp_metrics delete [ address ] ADDRESS\n"
+               "SELECTOR := [ [ address ] PREFIX ]\n");
        exit(-1);
 }
 
index 17117f417dc8333238559024dc59827dc273a47d..e34b5fbda1305a538729d996bdb7d0b3029d5fda 100644 (file)
@@ -39,8 +39,9 @@ static bool nokeys;
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: ip xfrm monitor [ nokeys ] [ all-nsid ] [ all | OBJECTS | help ]\n");
-       fprintf(stderr, "OBJECTS := { acquire | expire | SA | aevent | policy | report }\n");
+       fprintf(stderr,
+               "Usage: ip xfrm monitor [ nokeys ] [ all-nsid ] [ all | OBJECTS | help ]\n"
+               "OBJECTS := { acquire | expire | SA | aevent | policy | report }\n");
        exit(-1);
 }
 
index 9898435055d6f95a1f0ed55fb03290b70dd581d0..7c0233c182902cb710e44df7bfbfa649b9b6e4c0 100644 (file)
@@ -52,51 +52,60 @@ static void usage(void) __attribute__((noreturn));
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: ip xfrm policy { add | update } SELECTOR dir DIR [ ctx CTX ]\n");
-       fprintf(stderr, "        [ mark MARK [ mask MASK ] ] [ index INDEX ] [ ptype PTYPE ]\n");
-       fprintf(stderr, "        [ action ACTION ] [ priority PRIORITY ] [ flag FLAG-LIST ]\n");
-       fprintf(stderr, "        [ if_id IF_ID ] [ LIMIT-LIST ] [ TMPL-LIST ]\n");
-       fprintf(stderr, "Usage: ip xfrm policy { delete | get } { SELECTOR | index INDEX } dir DIR\n");
-       fprintf(stderr, "        [ ctx CTX ] [ mark MARK [ mask MASK ] ] [ ptype PTYPE ]\n");
-       fprintf(stderr, "Usage: ip xfrm policy { deleteall | list } [ nosock ] [ SELECTOR ] [ dir DIR ]\n");
-       fprintf(stderr, "        [ index INDEX ] [ ptype PTYPE ] [ action ACTION ] [ priority PRIORITY ]\n");
-       fprintf(stderr, "        [ flag FLAG-LIST ]\n");
-       fprintf(stderr, "Usage: ip xfrm policy flush [ ptype PTYPE ]\n");
-       fprintf(stderr, "Usage: ip xfrm policy count\n");
-       fprintf(stderr, "Usage: ip xfrm policy set [ hthresh4 LBITS RBITS ] [ hthresh6 LBITS RBITS ]\n");
-       fprintf(stderr, "SELECTOR := [ src ADDR[/PLEN] ] [ dst ADDR[/PLEN] ] [ dev DEV ] [ UPSPEC ]\n");
-       fprintf(stderr, "UPSPEC := proto { { ");
-       fprintf(stderr, "%s | ", strxf_proto(IPPROTO_TCP));
-       fprintf(stderr, "%s | ", strxf_proto(IPPROTO_UDP));
-       fprintf(stderr, "%s | ", strxf_proto(IPPROTO_SCTP));
-       fprintf(stderr, "%s", strxf_proto(IPPROTO_DCCP));
-       fprintf(stderr, " } [ sport PORT ] [ dport PORT ] |\n");
-       fprintf(stderr, "                  { ");
-       fprintf(stderr, "%s | ", strxf_proto(IPPROTO_ICMP));
-       fprintf(stderr, "%s | ", strxf_proto(IPPROTO_ICMPV6));
-       fprintf(stderr, "%s", strxf_proto(IPPROTO_MH));
-       fprintf(stderr, " } [ type NUMBER ] [ code NUMBER ] |\n");
-       fprintf(stderr, "                  %s", strxf_proto(IPPROTO_GRE));
-       fprintf(stderr, " [ key { DOTTED-QUAD | NUMBER } ] | PROTO }\n");
-       fprintf(stderr, "DIR := in | out | fwd\n");
-       fprintf(stderr, "PTYPE := main | sub\n");
-       fprintf(stderr, "ACTION := allow | block\n");
-       fprintf(stderr, "FLAG-LIST := [ FLAG-LIST ] FLAG\n");
-       fprintf(stderr, "FLAG := localok | icmp\n");
-       fprintf(stderr, "LIMIT-LIST := [ LIMIT-LIST ] limit LIMIT\n");
-       fprintf(stderr, "LIMIT := { time-soft | time-hard | time-use-soft | time-use-hard } SECONDS |\n");
-       fprintf(stderr, "         { byte-soft | byte-hard } SIZE | { packet-soft | packet-hard } COUNT\n");
-       fprintf(stderr, "TMPL-LIST := [ TMPL-LIST ] tmpl TMPL\n");
-       fprintf(stderr, "TMPL := ID [ mode MODE ] [ reqid REQID ] [ level LEVEL ]\n");
-       fprintf(stderr, "ID := [ src ADDR ] [ dst ADDR ] [ proto XFRM-PROTO ] [ spi SPI ]\n");
-       fprintf(stderr, "XFRM-PROTO := ");
-       fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_ESP));
-       fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_AH));
-       fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_COMP));
-       fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_ROUTING));
-       fprintf(stderr, "%s\n", strxf_xfrmproto(IPPROTO_DSTOPTS));
-       fprintf(stderr, "MODE := transport | tunnel | beet | ro | in_trigger\n");
-       fprintf(stderr, "LEVEL := required | use\n");
+       fprintf(stderr,
+               "Usage: ip xfrm policy { add | update } SELECTOR dir DIR [ ctx CTX ]\n"
+               "       [ mark MARK [ mask MASK ] ] [ index INDEX ] [ ptype PTYPE ]\n"
+               "       [ action ACTION ] [ priority PRIORITY ] [ flag FLAG-LIST ]\n"
+               "       [ if_id IF_ID ] [ LIMIT-LIST ] [ TMPL-LIST ]\n"
+               "Usage: ip xfrm policy { delete | get } { SELECTOR | index INDEX } dir DIR\n"
+               "       [ ctx CTX ] [ mark MARK [ mask MASK ] ] [ ptype PTYPE ]\n"
+               "Usage: ip xfrm policy { deleteall | list } [ nosock ] [ SELECTOR ] [ dir DIR ]\n"
+               "       [ index INDEX ] [ ptype PTYPE ] [ action ACTION ] [ priority PRIORITY ]\n"
+               "       [ flag FLAG-LIST ]\n"
+               "Usage: ip xfrm policy flush [ ptype PTYPE ]\n"
+               "Usage: ip xfrm policy count\n"
+               "Usage: ip xfrm policy set [ hthresh4 LBITS RBITS ] [ hthresh6 LBITS RBITS ]\n"
+               "SELECTOR := [ src ADDR[/PLEN] ] [ dst ADDR[/PLEN] ] [ dev DEV ] [ UPSPEC ]\n"
+               "UPSPEC := proto { { ");
+       fprintf(stderr, "%s | %s | %s | %s } ",
+               strxf_proto(IPPROTO_TCP),
+               strxf_proto(IPPROTO_UDP),
+               strxf_proto(IPPROTO_SCTP),
+               strxf_proto(IPPROTO_DCCP));
+       fprintf(stderr,
+               "[ sport PORT ] [ dport PORT ] |\n"
+               "                  { %s | %s | %s } ",
+               strxf_proto(IPPROTO_ICMP),
+               strxf_proto(IPPROTO_ICMPV6),
+               strxf_proto(IPPROTO_MH));
+       fprintf(stderr,
+               "[ type NUMBER ] [ code NUMBER ] |\n"
+               "                  %s",
+               strxf_proto(IPPROTO_GRE));
+       fprintf(stderr,
+               " [ key { DOTTED-QUAD | NUMBER } ] | PROTO }\n"
+               "DIR := in | out | fwd\n"
+               "PTYPE := main | sub\n"
+               "ACTION := allow | block\n"
+               "FLAG-LIST := [ FLAG-LIST ] FLAG\n"
+               "FLAG := localok | icmp\n"
+               "LIMIT-LIST := [ LIMIT-LIST ] limit LIMIT\n"
+               "LIMIT := { time-soft | time-hard | time-use-soft | time-use-hard } SECONDS |\n"
+               "         { byte-soft | byte-hard } SIZE | { packet-soft | packet-hard } COUNT\n"
+               "TMPL-LIST := [ TMPL-LIST ] tmpl TMPL\n"
+               "TMPL := ID [ mode MODE ] [ reqid REQID ] [ level LEVEL ]\n"
+               "ID := [ src ADDR ] [ dst ADDR ] [ proto XFRM-PROTO ] [ spi SPI ]\n"
+               "XFRM-PROTO := ");
+       fprintf(stderr,
+               "%s | %s | %s | %s | %s\n",
+               strxf_xfrmproto(IPPROTO_ESP),
+               strxf_xfrmproto(IPPROTO_AH),
+               strxf_xfrmproto(IPPROTO_COMP),
+               strxf_xfrmproto(IPPROTO_ROUTING),
+               strxf_xfrmproto(IPPROTO_DSTOPTS));
+       fprintf(stderr,
+               "MODE := transport | tunnel | beet | ro | in_trigger\n"
+               "LEVEL := required | use\n");
 
        exit(-1);
 }
index f27270709d2fb166222fc66c53339a467693e500..b03ccc5807e900d82ced4d92d00661e845fc6cf9 100644 (file)
@@ -54,66 +54,84 @@ static void usage(void) __attribute__((noreturn));
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: ip xfrm state { add | update } ID [ ALGO-LIST ] [ mode MODE ]\n");
-       fprintf(stderr, "        [ mark MARK [ mask MASK ] ] [ reqid REQID ] [ seq SEQ ]\n");
-       fprintf(stderr, "        [ replay-window SIZE ] [ replay-seq SEQ ] [ replay-oseq SEQ ]\n");
-       fprintf(stderr, "        [ replay-seq-hi SEQ ] [ replay-oseq-hi SEQ ]\n");
-       fprintf(stderr, "        [ flag FLAG-LIST ] [ sel SELECTOR ] [ LIMIT-LIST ] [ encap ENCAP ]\n");
-       fprintf(stderr, "        [ coa ADDR[/PLEN] ] [ ctx CTX ] [ extra-flag EXTRA-FLAG-LIST ]\n");
-       fprintf(stderr, "        [ offload [dev DEV] dir DIR ]\n");
-       fprintf(stderr, "        [ output-mark OUTPUT-MARK ]\n");
-+      fprintf(stderr, "        [ if_id IF_ID ]\n");
-       fprintf(stderr, "Usage: ip xfrm state allocspi ID [ mode MODE ] [ mark MARK [ mask MASK ] ]\n");
-       fprintf(stderr, "        [ reqid REQID ] [ seq SEQ ] [ min SPI max SPI ]\n");
-       fprintf(stderr, "Usage: ip xfrm state { delete | get } ID [ mark MARK [ mask MASK ] ]\n");
-       fprintf(stderr, "Usage: ip xfrm state deleteall [ ID ] [ mode MODE ] [ reqid REQID ]\n");
-       fprintf(stderr, "        [ flag FLAG-LIST ]\n");
-       fprintf(stderr, "Usage: ip xfrm state list [ nokeys ] [ ID ] [ mode MODE ] [ reqid REQID ]\n");
-       fprintf(stderr, "        [ flag FLAG-LIST ]\n");
-       fprintf(stderr, "Usage: ip xfrm state flush [ proto XFRM-PROTO ]\n");
-       fprintf(stderr, "Usage: ip xfrm state count\n");
-       fprintf(stderr, "ID := [ src ADDR ] [ dst ADDR ] [ proto XFRM-PROTO ] [ spi SPI ]\n");
-       fprintf(stderr, "XFRM-PROTO := ");
-       fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_ESP));
-       fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_AH));
-       fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_COMP));
-       fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_ROUTING));
-       fprintf(stderr, "%s\n", strxf_xfrmproto(IPPROTO_DSTOPTS));
-       fprintf(stderr, "ALGO-LIST := [ ALGO-LIST ] ALGO\n");
-       fprintf(stderr, "ALGO := { ");
-       fprintf(stderr, "%s | ", strxf_algotype(XFRMA_ALG_CRYPT));
-       fprintf(stderr, "%s", strxf_algotype(XFRMA_ALG_AUTH));
-       fprintf(stderr, " } ALGO-NAME ALGO-KEYMAT |\n");
-       fprintf(stderr, "        %s", strxf_algotype(XFRMA_ALG_AUTH_TRUNC));
-       fprintf(stderr, " ALGO-NAME ALGO-KEYMAT ALGO-TRUNC-LEN |\n");
-       fprintf(stderr, "        %s", strxf_algotype(XFRMA_ALG_AEAD));
-       fprintf(stderr, " ALGO-NAME ALGO-KEYMAT ALGO-ICV-LEN |\n");
-       fprintf(stderr, "        %s", strxf_algotype(XFRMA_ALG_COMP));
-       fprintf(stderr, " ALGO-NAME\n");
-       fprintf(stderr, "MODE := transport | tunnel | beet | ro | in_trigger\n");
-       fprintf(stderr, "FLAG-LIST := [ FLAG-LIST ] FLAG\n");
-       fprintf(stderr, "FLAG := noecn | decap-dscp | nopmtudisc | wildrecv | icmp | af-unspec | align4 | esn\n");
-       fprintf(stderr, "EXTRA-FLAG-LIST := [ EXTRA-FLAG-LIST ] EXTRA-FLAG\n");
-       fprintf(stderr, "EXTRA-FLAG := dont-encap-dscp\n");
-       fprintf(stderr, "SELECTOR := [ src ADDR[/PLEN] ] [ dst ADDR[/PLEN] ] [ dev DEV ] [ UPSPEC ]\n");
-       fprintf(stderr, "UPSPEC := proto { { ");
-       fprintf(stderr, "%s | ", strxf_proto(IPPROTO_TCP));
-       fprintf(stderr, "%s | ", strxf_proto(IPPROTO_UDP));
-       fprintf(stderr, "%s | ", strxf_proto(IPPROTO_SCTP));
-       fprintf(stderr, "%s", strxf_proto(IPPROTO_DCCP));
-       fprintf(stderr, " } [ sport PORT ] [ dport PORT ] |\n");
-       fprintf(stderr, "                  { ");
-       fprintf(stderr, "%s | ", strxf_proto(IPPROTO_ICMP));
-       fprintf(stderr, "%s | ", strxf_proto(IPPROTO_ICMPV6));
-       fprintf(stderr, "%s", strxf_proto(IPPROTO_MH));
-       fprintf(stderr, " } [ type NUMBER ] [ code NUMBER ] |\n");
-       fprintf(stderr, "                  %s", strxf_proto(IPPROTO_GRE));
-       fprintf(stderr, " [ key { DOTTED-QUAD | NUMBER } ] | PROTO }\n");
-       fprintf(stderr, "LIMIT-LIST := [ LIMIT-LIST ] limit LIMIT\n");
-       fprintf(stderr, "LIMIT := { time-soft | time-hard | time-use-soft | time-use-hard } SECONDS |\n");
-       fprintf(stderr, "         { byte-soft | byte-hard } SIZE | { packet-soft | packet-hard } COUNT\n");
-       fprintf(stderr, "ENCAP := { espinudp | espinudp-nonike } SPORT DPORT OADDR\n");
-       fprintf(stderr, "DIR := in | out\n");
+       fprintf(stderr,
+               "Usage: ip xfrm state { add | update } ID [ ALGO-LIST ] [ mode MODE ]\n"
+               "        [ mark MARK [ mask MASK ] ] [ reqid REQID ] [ seq SEQ ]\n"
+               "        [ replay-window SIZE ] [ replay-seq SEQ ] [ replay-oseq SEQ ]\n"
+               "        [ replay-seq-hi SEQ ] [ replay-oseq-hi SEQ ]\n"
+               "        [ flag FLAG-LIST ] [ sel SELECTOR ] [ LIMIT-LIST ] [ encap ENCAP ]\n"
+               "        [ coa ADDR[/PLEN] ] [ ctx CTX ] [ extra-flag EXTRA-FLAG-LIST ]\n"
+               "        [ offload [dev DEV] dir DIR ]\n"
+               "        [ output-mark OUTPUT-MARK ]\n"
+               "        [ if_id IF_ID ]\n"
+               "Usage: ip xfrm state allocspi ID [ mode MODE ] [ mark MARK [ mask MASK ] ]\n"
+               "        [ reqid REQID ] [ seq SEQ ] [ min SPI max SPI ]\n"
+               "Usage: ip xfrm state { delete | get } ID [ mark MARK [ mask MASK ] ]\n"
+               "Usage: ip xfrm state deleteall [ ID ] [ mode MODE ] [ reqid REQID ]\n"
+               "        [ flag FLAG-LIST ]\n"
+               "Usage: ip xfrm state list [ nokeys ] [ ID ] [ mode MODE ] [ reqid REQID ]\n"
+               "        [ flag FLAG-LIST ]\n"
+               "Usage: ip xfrm state flush [ proto XFRM-PROTO ]\n"
+               "Usage: ip xfrm state count\n"
+               "ID := [ src ADDR ] [ dst ADDR ] [ proto XFRM-PROTO ] [ spi SPI ]\n"
+               "XFRM-PROTO := ");
+       fprintf(stderr,
+               "%s | %s | %s | %s | %s\n",
+               strxf_xfrmproto(IPPROTO_ESP),
+               strxf_xfrmproto(IPPROTO_AH),
+               strxf_xfrmproto(IPPROTO_COMP),
+               strxf_xfrmproto(IPPROTO_ROUTING),
+               strxf_xfrmproto(IPPROTO_DSTOPTS));
+       fprintf(stderr,
+               "ALGO-LIST := [ ALGO-LIST ] ALGO\n"
+               "ALGO := { ");
+       fprintf(stderr,
+               "%s | %s",
+               strxf_algotype(XFRMA_ALG_CRYPT),
+               strxf_algotype(XFRMA_ALG_AUTH));
+       fprintf(stderr,
+               " } ALGO-NAME ALGO-KEYMAT |\n"
+               "        %s", strxf_algotype(XFRMA_ALG_AUTH_TRUNC));
+       fprintf(stderr,
+               " ALGO-NAME ALGO-KEYMAT ALGO-TRUNC-LEN |\n"
+               "        %s", strxf_algotype(XFRMA_ALG_AEAD));
+       fprintf(stderr,
+               " ALGO-NAME ALGO-KEYMAT ALGO-ICV-LEN |\n"
+               "        %s", strxf_algotype(XFRMA_ALG_COMP));
+       fprintf(stderr,
+               " ALGO-NAME\n"
+               "MODE := transport | tunnel | beet | ro | in_trigger\n"
+               "FLAG-LIST := [ FLAG-LIST ] FLAG\n"
+               "FLAG := noecn | decap-dscp | nopmtudisc | wildrecv | icmp | af-unspec | align4 | esn\n"
+               "EXTRA-FLAG-LIST := [ EXTRA-FLAG-LIST ] EXTRA-FLAG\n"
+               "EXTRA-FLAG := dont-encap-dscp\n"
+               "SELECTOR := [ src ADDR[/PLEN] ] [ dst ADDR[/PLEN] ] [ dev DEV ] [ UPSPEC ]\n"
+               "UPSPEC := proto { { ");
+       fprintf(stderr,
+               "%s | %s | %s | %s",
+               strxf_proto(IPPROTO_TCP),
+               strxf_proto(IPPROTO_UDP),
+               strxf_proto(IPPROTO_SCTP),
+               strxf_proto(IPPROTO_DCCP));
+       fprintf(stderr,
+               " } [ sport PORT ] [ dport PORT ] |\n"
+               "                  { ");
+       fprintf(stderr,
+               "%s | %s | %s",
+               strxf_proto(IPPROTO_ICMP),
+               strxf_proto(IPPROTO_ICMPV6),
+               strxf_proto(IPPROTO_MH));
+       fprintf(stderr,
+               " } [ type NUMBER ] [ code NUMBER ] |\n");
+       fprintf(stderr,
+               "                  %s", strxf_proto(IPPROTO_GRE));
+       fprintf(stderr,
+               " [ key { DOTTED-QUAD | NUMBER } ] | PROTO }\n"
+               "LIMIT-LIST := [ LIMIT-LIST ] limit LIMIT\n"
+               "LIMIT := { time-soft | time-hard | time-use-soft | time-use-hard } SECONDS |\n"
+               "         { byte-soft | byte-hard } SIZE | { packet-soft | packet-hard } COUNT\n"
+               "ENCAP := { espinudp | espinudp-nonike } SPORT DPORT OADDR\n"
+               "DIR := in | out\n");
 
        exit(-1);
 }
index 863fd4d9f03f293230fee7d0618947c2ef2478dc..e3c8421194e9f5c91758a73c7eaae55b262b153d 100644 (file)
@@ -55,28 +55,31 @@ static struct option opts[] = {
 
 static int usage(char *name, int exit_code)
 {
-       fprintf(stderr, "%s Version %s\n", name, LNSTAT_VERSION);
-       fprintf(stderr, "Copyright (C) 2004 by Harald Welte <laforge@gnumonks.org>\n");
-       fprintf(stderr, "This program is free software licensed under GNU GPLv2\nwith ABSOLUTELY NO WARRANTY.\n\n");
-       fprintf(stderr, "Parameters:\n");
-       fprintf(stderr, "\t-V --version\t\tPrint Version of Program\n");
-       fprintf(stderr, "\t-c --count <count>\t"
-                       "Print <count> number of intervals\n");
-       fprintf(stderr, "\t-d --dump\t\t"
-                       "Dump list of available files/keys\n");
-       fprintf(stderr, "\t-j --json\t\t"
-                       "Display in JSON format\n");
-       fprintf(stderr, "\t-f --file <file>\tStatistics file to use\n");
-       fprintf(stderr, "\t-h --help\t\tThis help message\n");
-       fprintf(stderr, "\t-i --interval <intv>\t"
-                       "Set interval to 'intv' seconds\n");
-       fprintf(stderr, "\t-k --keys k,k,k,...\tDisplay only keys specified\n");
-       fprintf(stderr, "\t-s --subject [0-2]\tControl header printing:\n");
-       fprintf(stderr, "\t\t\t\t0 = never\n");
-       fprintf(stderr, "\t\t\t\t1 = once\n");
-       fprintf(stderr, "\t\t\t\t2 = every 20 lines (default))\n");
-       fprintf(stderr, "\t-w --width n,n,n,...\tWidth for each field\n");
-       fprintf(stderr, "\n");
+       fprintf(stderr,
+               "%s Version %s\n"
+               "Copyright (C) 2004 by Harald Welte <laforge@gnumonks.org>\n"
+               "This program is free software licensed under GNU GPLv2\nwith ABSOLUTELY NO WARRANTY.\n"
+               "\n"
+               "Parameters:\n"
+               "       -V --version            Print Version of Program\n"
+               "       -c --count <count>      "
+               "Print <count> number of intervals\n"
+               "       -d --dump               "
+               "Dump list of available files/keys\n"
+               "       -j --json               "
+               "Display in JSON format\n"
+               "       -f --file <file>        Statistics file to use\n"
+               "       -h --help               This help message\n"
+               "       -i --interval <intv>    "
+               "Set interval to 'intv' seconds\n"
+               "       -k --keys k,k,k,...     Display only keys specified\n"
+               "       -s --subject [0-2]      Control header printing:\n"
+               "                               0 = never\n"
+               "                               1 = once\n"
+               "                               2 = every 20 lines (default))\n"
+               "       -w --width n,n,n,...    Width for each field\n"
+               "\n",
+               name, LNSTAT_VERSION);
 
        exit(exit_code);
 }
index 653580eae0603327ea654510ae1f23a79578c1fe..23113b223b22d5db1c82bf28c26105936ee6776b 100644 (file)
@@ -528,18 +528,18 @@ static void usage(void) __attribute__((noreturn));
 static void usage(void)
 {
        fprintf(stderr,
-"Usage: nstat [OPTION] [ PATTERN [ PATTERN ] ]\n"
-"   -h, --help           this message\n"
-"   -a, --ignore         ignore history\n"
-"   -d, --scan=SECS      sample every statistics every SECS\n"
-"   -j, --json           format output in JSON\n"
-"   -n, --nooutput       do history only\n"
-"   -p, --pretty         pretty print\n"
-"   -r, --reset          reset history\n"
-"   -s, --noupdate       don't update history\n"
-"   -t, --interval=SECS  report average over the last SECS\n"
-"   -V, --version        output version information\n"
-"   -z, --zeros          show entries with zero activity\n");
+               "Usage: nstat [OPTION] [ PATTERN [ PATTERN ] ]\n"
+               "   -h, --help          this message\n"
+               "   -a, --ignore        ignore history\n"
+               "   -d, --scan=SECS     sample every statistics every SECS\n"
+               "   -j, --json          format output in JSON\n"
+               "   -n, --nooutput      do history only\n"
+               "   -p, --pretty        pretty print\n"
+               "   -r, --reset         reset history\n"
+               "   -s, --noupdate      don't update history\n"
+               "   -t, --interval=SECS report average over the last SECS\n"
+               "   -V, --version       output version information\n"
+               "   -z, --zeros         show entries with zero activity\n");
        exit(-1);
 }
 
index 84f43e6c60104f9f107dafbc35aad3b75b4da4d0..a48393b74df64fb5614f78f5bd851c5c12f4c779 100644 (file)
@@ -26,19 +26,21 @@ static char *argv_default[] = { BPF_DEFAULT_CMD, NULL };
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... bpf [ import UDS_FILE ] [ run CMD ]\n");
-       fprintf(stderr, "       ... bpf [ debug ]\n");
-       fprintf(stderr, "       ... bpf [ graft MAP_FILE ] [ key KEY ]\n");
-       fprintf(stderr, "          `... [ object-file OBJ_FILE ] [ type TYPE ] [ section NAME ] [ verbose ]\n");
-       fprintf(stderr, "          `... [ object-pinned PROG_FILE ]\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where UDS_FILE provides the name of a unix domain socket file\n");
-       fprintf(stderr, "to import eBPF maps and the optional CMD denotes the command\n");
-       fprintf(stderr, "to be executed (default: \'%s\').\n", BPF_DEFAULT_CMD);
-       fprintf(stderr, "Where MAP_FILE points to a pinned map, OBJ_FILE to an object file\n");
-       fprintf(stderr, "and PROG_FILE to a pinned program. TYPE can be {cls, act}, where\n");
-       fprintf(stderr, "\'cls\' is default. KEY is optional and can be inferred from the\n");
-       fprintf(stderr, "section name, otherwise it needs to be provided.\n");
+       fprintf(stderr,
+               "Usage: ... bpf [ import UDS_FILE ] [ run CMD ]\n"
+               "       ... bpf [ debug ]\n"
+               "       ... bpf [ graft MAP_FILE ] [ key KEY ]\n"
+               "          `... [ object-file OBJ_FILE ] [ type TYPE ] [ section NAME ] [ verbose ]\n"
+               "          `... [ object-pinned PROG_FILE ]\n"
+               "\n"
+               "Where UDS_FILE provides the name of a unix domain socket file\n"
+               "to import eBPF maps and the optional CMD denotes the command\n"
+               "to be executed (default: \'%s\').\n"
+               "Where MAP_FILE points to a pinned map, OBJ_FILE to an object file\n"
+               "and PROG_FILE to a pinned program. TYPE can be {cls, act}, where\n"
+               "\'cls\' is default. KEY is optional and can be inferred from the\n"
+               "section name, otherwise it needs to be provided.\n",
+               BPF_DEFAULT_CMD);
 }
 
 static int bpf_num_env_entries(void)
index af98c0885cb6030ecc558e75fcd1683fd8450113..7b19cea6e87e75c060ab822d5463ee73370a1405 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... basic [ match EMATCH_TREE ]\n");
-       fprintf(stderr, "                 [ action ACTION_SPEC ] [ classid CLASSID ]\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where: SELECTOR := SAMPLE SAMPLE ...\n");
-       fprintf(stderr, "       FILTERID := X:Y:Z\n");
-       fprintf(stderr, "       ACTION_SPEC := ... look at individual actions\n");
-       fprintf(stderr, "\nNOTE: CLASSID is parsed as hexadecimal input.\n");
+       fprintf(stderr,
+               "Usage: ... basic [ match EMATCH_TREE ]\n"
+               "                 [ action ACTION_SPEC ] [ classid CLASSID ]\n"
+               "\n"
+               "Where: SELECTOR := SAMPLE SAMPLE ...\n"
+               "       FILTERID := X:Y:Z\n"
+               "       ACTION_SPEC := ... look at individual actions\n"
+               "\n"
+               "NOTE: CLASSID is parsed as hexadecimal input.\n");
 }
 
 static int basic_parse_opt(struct filter_util *qu, char *handle,
index 948d9051b9a5862e97693059527610981bd8d77f..135271aa16978c34d41e19b6e8ea3b261f9b07d2 100644 (file)
@@ -23,36 +23,38 @@ static const enum bpf_prog_type bpf_type = BPF_PROG_TYPE_SCHED_CLS;
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... bpf ...\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "BPF use case:\n");
-       fprintf(stderr, " bytecode BPF_BYTECODE\n");
-       fprintf(stderr, " bytecode-file FILE\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "eBPF use case:\n");
-       fprintf(stderr, " object-file FILE [ section CLS_NAME ] [ export UDS_FILE ]");
-       fprintf(stderr, " [ verbose ] [ direct-action ] [ skip_hw | skip_sw ]\n");
-       fprintf(stderr, " object-pinned FILE [ direct-action ] [ skip_hw | skip_sw ]\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Common remaining options:\n");
-       fprintf(stderr, " [ action ACTION_SPEC ]\n");
-       fprintf(stderr, " [ classid CLASSID ]\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where BPF_BYTECODE := \'s,c t f k,c t f k,c t f k,...\'\n");
-       fprintf(stderr, "c,t,f,k and s are decimals; s denotes number of 4-tuples\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where FILE points to a file containing the BPF_BYTECODE string,\n");
-       fprintf(stderr, "an ELF file containing eBPF map definitions and bytecode, or a\n");
-       fprintf(stderr, "pinned eBPF program.\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where CLS_NAME refers to the section name containing the\n");
-       fprintf(stderr, "classifier (default \'%s\').\n", bpf_prog_to_default_section(bpf_type));
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where UDS_FILE points to a unix domain socket file in order\n");
-       fprintf(stderr, "to hand off control of all created eBPF maps to an agent.\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "ACTION_SPEC := ... look at individual actions\n");
-       fprintf(stderr, "NOTE: CLASSID is parsed as hexadecimal input.\n");
+       fprintf(stderr,
+               "Usage: ... bpf ...\n"
+               "\n"
+               "BPF use case:\n"
+               " bytecode BPF_BYTECODE\n"
+               " bytecode-file FILE\n"
+               "\n"
+               "eBPF use case:\n"
+               " object-file FILE [ section CLS_NAME ] [ export UDS_FILE ]"
+               " [ verbose ] [ direct-action ] [ skip_hw | skip_sw ]\n"
+               " object-pinned FILE [ direct-action ] [ skip_hw | skip_sw ]\n"
+               "\n"
+               "Common remaining options:\n"
+               " [ action ACTION_SPEC ]\n"
+               " [ classid CLASSID ]\n"
+               "\n"
+               "Where BPF_BYTECODE := \'s,c t f k,c t f k,c t f k,...\'\n"
+               "c,t,f,k and s are decimals; s denotes number of 4-tuples\n"
+               "\n"
+               "Where FILE points to a file containing the BPF_BYTECODE string,\n"
+               "an ELF file containing eBPF map definitions and bytecode, or a\n"
+               "pinned eBPF program.\n"
+               "\n"
+               "Where CLS_NAME refers to the section name containing the\n"
+               "classifier (default \'%s\').\n"
+               "\n"
+               "Where UDS_FILE points to a unix domain socket file in order\n"
+               "to hand off control of all created eBPF maps to an agent.\n"
+               "\n"
+               "ACTION_SPEC := ... look at individual actions\n"
+               "NOTE: CLASSID is parsed as hexadecimal input.\n",
+               bpf_prog_to_default_section(bpf_type));
 }
 
 static void bpf_cbpf_cb(void *nl, const struct sock_filter *ops, int ops_len)
index badeaa2907285db2ad55c7e8639ec06b304cc124..9dd50df2e49212277a8f5fc9bc3609dc17d83b63 100644 (file)
 static void explain(void)
 {
        fprintf(stderr,
-"Usage: ... flow ...\n"
-"\n"
-" [mapping mode]: map key KEY [ OPS ] ...\n"
-" [hashing mode]: hash keys KEY-LIST ... [ perturb SECS ]\n"
-"\n"
-"                 [ divisor NUM ] [ baseclass ID ] [ match EMATCH_TREE ]\n"
-"                 [ action ACTION_SPEC ]\n"
-"\n"
-"KEY-LIST := [ KEY-LIST , ] KEY\n"
-"KEY      := [ src | dst | proto | proto-src | proto-dst | iif | priority |\n"
-"              mark | nfct | nfct-src | nfct-dst | nfct-proto-src |\n"
-"              nfct-proto-dst | rt-classid | sk-uid | sk-gid |\n"
-"              vlan-tag | rxhash ]\n"
-"OPS      := [ or NUM | and NUM | xor NUM | rshift NUM | addend NUM ]\n"
-"ID       := X:Y\n"
+               "Usage: ... flow ...\n"
+               "\n"
+               " [mapping mode]: map key KEY [ OPS ] ...\n"
+               " [hashing mode]: hash keys KEY-LIST ... [ perturb SECS ]\n"
+               "\n"
+               "                 [ divisor NUM ] [ baseclass ID ] [ match EMATCH_TREE ]\n"
+               "                 [ action ACTION_SPEC ]\n"
+               "\n"
+               "KEY-LIST := [ KEY-LIST , ] KEY\n"
+               "KEY      := [ src | dst | proto | proto-src | proto-dst | iif | priority |\n"
+               "              mark | nfct | nfct-src | nfct-dst | nfct-proto-src |\n"
+               "              nfct-proto-dst | rt-classid | sk-uid | sk-gid |\n"
+               "              vlan-tag | rxhash ]\n"
+               "OPS      := [ or NUM | and NUM | xor NUM | rshift NUM | addend NUM ]\n"
+               "ID       := X:Y\n"
        );
 }
 
index 9659e894dd1f93b4f773525f38270ecadf174b67..98345c5d109ad7e446f737dd6c210a86799c5db7 100644 (file)
@@ -42,54 +42,54 @@ enum flower_icmp_field {
 static void explain(void)
 {
        fprintf(stderr,
-               "Usage: ... flower [ MATCH-LIST ] [ verbose ]\n"
-               "                  [ skip_sw | skip_hw ]\n"
-               "                  [ action ACTION-SPEC ] [ classid CLASSID ]\n"
+               "Usage: ... flower      [ MATCH-LIST ] [ verbose ]\n"
+               "                       [ skip_sw | skip_hw ]\n"
+               "                       [ action ACTION-SPEC ] [ classid CLASSID ]\n"
                "\n"
                "Where: MATCH-LIST := [ MATCH-LIST ] MATCH\n"
-               "       MATCH      := { indev DEV-NAME |\n"
-               "                       vlan_id VID |\n"
-               "                       vlan_prio PRIORITY |\n"
-               "                       vlan_ethtype [ ipv4 | ipv6 | ETH-TYPE ] |\n"
-               "                       cvlan_id VID |\n"
-               "                       cvlan_prio PRIORITY |\n"
-               "                       cvlan_ethtype [ ipv4 | ipv6 | ETH-TYPE ] |\n"
-               "                       dst_mac MASKED-LLADDR |\n"
-               "                       src_mac MASKED-LLADDR |\n"
-               "                       ip_proto [tcp | udp | sctp | icmp | icmpv6 | IP-PROTO ] |\n"
-               "                       ip_tos MASKED-IP_TOS |\n"
-               "                       ip_ttl MASKED-IP_TTL |\n"
-               "                       mpls_label LABEL |\n"
-               "                       mpls_tc TC |\n"
-               "                       mpls_bos BOS |\n"
-               "                       mpls_ttl TTL |\n"
-               "                       dst_ip PREFIX |\n"
-               "                       src_ip PREFIX |\n"
-               "                       dst_port PORT-NUMBER |\n"
-               "                       src_port PORT-NUMBER |\n"
-               "                       tcp_flags MASKED-TCP_FLAGS |\n"
-               "                       type MASKED-ICMP-TYPE |\n"
-               "                       code MASKED-ICMP-CODE |\n"
-               "                       arp_tip IPV4-PREFIX |\n"
-               "                       arp_sip IPV4-PREFIX |\n"
-               "                       arp_op [ request | reply | OP ] |\n"
-               "                       arp_tha MASKED-LLADDR |\n"
-               "                       arp_sha MASKED-LLADDR |\n"
-               "                       enc_dst_ip [ IPV4-ADDR | IPV6-ADDR ] |\n"
-               "                       enc_src_ip [ IPV4-ADDR | IPV6-ADDR ] |\n"
-               "                       enc_key_id [ KEY-ID ] |\n"
-               "                       enc_tos MASKED-IP_TOS |\n"
-               "                       enc_ttl MASKED-IP_TTL |\n"
-               "                       geneve_opts MASKED-OPTIONS |\n"
-               "                       ip_flags IP-FLAGS | \n"
-               "                       enc_dst_port [ port_number ] }\n"
-               "       FILTERID := X:Y:Z\n"
-               "       MASKED_LLADDR := { LLADDR | LLADDR/MASK | LLADDR/BITS }\n"
-               "       ACTION-SPEC := ... look at individual actions\n"
+               "       MATCH      := { indev DEV-NAME |\n"
+               "                       vlan_id VID |\n"
+               "                       vlan_prio PRIORITY |\n"
+               "                       vlan_ethtype [ ipv4 | ipv6 | ETH-TYPE ] |\n"
+               "                       cvlan_id VID |\n"
+               "                       cvlan_prio PRIORITY |\n"
+               "                       cvlan_ethtype [ ipv4 | ipv6 | ETH-TYPE ] |\n"
+               "                       dst_mac MASKED-LLADDR |\n"
+               "                       src_mac MASKED-LLADDR |\n"
+               "                       ip_proto [tcp | udp | sctp | icmp | icmpv6 | IP-PROTO ] |\n"
+               "                       ip_tos MASKED-IP_TOS |\n"
+               "                       ip_ttl MASKED-IP_TTL |\n"
+               "                       mpls_label LABEL |\n"
+               "                       mpls_tc TC |\n"
+               "                       mpls_bos BOS |\n"
+               "                       mpls_ttl TTL |\n"
+               "                       dst_ip PREFIX |\n"
+               "                       src_ip PREFIX |\n"
+               "                       dst_port PORT-NUMBER |\n"
+               "                       src_port PORT-NUMBER |\n"
+               "                       tcp_flags MASKED-TCP_FLAGS |\n"
+               "                       type MASKED-ICMP-TYPE |\n"
+               "                       code MASKED-ICMP-CODE |\n"
+               "                       arp_tip IPV4-PREFIX |\n"
+               "                       arp_sip IPV4-PREFIX |\n"
+               "                       arp_op [ request | reply | OP ] |\n"
+               "                       arp_tha MASKED-LLADDR |\n"
+               "                       arp_sha MASKED-LLADDR |\n"
+               "                       enc_dst_ip [ IPV4-ADDR | IPV6-ADDR ] |\n"
+               "                       enc_src_ip [ IPV4-ADDR | IPV6-ADDR ] |\n"
+               "                       enc_key_id [ KEY-ID ] |\n"
+               "                       enc_tos MASKED-IP_TOS |\n"
+               "                       enc_ttl MASKED-IP_TTL |\n"
+               "                       geneve_opts MASKED-OPTIONS |\n"
+               "                       ip_flags IP-FLAGS | \n"
+               "                       enc_dst_port [ port_number ] }\n"
+               "       FILTERID := X:Y:Z\n"
+               "       MASKED_LLADDR := { LLADDR | LLADDR/MASK | LLADDR/BITS }\n"
+               "       ACTION-SPEC := ... look at individual actions\n"
                "\n"
-               "NOTE: CLASSID, IP-PROTO are parsed as hexadecimal input.\n"
-               "NOTE: There can be only used one mask per one prio. If user needs\n"
-               "      to specify different mask, he has to use different prio.\n");
+               "NOTE:  CLASSID, IP-PROTO are parsed as hexadecimal input.\n"
+               "NOTE:  There can be only used one mask per one prio. If user needs\n"
+               "       to specify different mask, he has to use different prio.\n");
 }
 
 static int flower_parse_eth_addr(char *str, int addr_type, int mask_type,
index adce2bdb7d8af353133af9a852b0494e2dd36e15..688364f55d1d326489345942184d84b8b60fdd32 100644 (file)
--- a/tc/f_fw.c
+++ b/tc/f_fw.c
 static void explain(void)
 {
        fprintf(stderr,
-               "Usage: ... fw [ classid CLASSID ] [ indev DEV ] [ action ACTION_SPEC ]\n");
-       fprintf(stderr,
-               "       CLASSID := Push matching packets to the class identified by CLASSID with format X:Y\n");
-       fprintf(stderr,
-               "                  CLASSID is parsed as hexadecimal input.\n");
-       fprintf(stderr,
-               "       DEV := specify device for incoming device classification.\n");
-       fprintf(stderr,
-               "       ACTION_SPEC := Apply an action on matching packets.\n");
-       fprintf(stderr,
-               "       NOTE: handle is represented as HANDLE[/FWMASK].\n");
-       fprintf(stderr, "             FWMASK is 0xffffffff by default.\n");
+               "Usage: ... fw [ classid CLASSID ] [ indev DEV ] [ action ACTION_SPEC ]\n"
+               "       CLASSID := Push matching packets to the class identified by CLASSID with format X:Y\n"
+               "               CLASSID is parsed as hexadecimal input.\n"
+               "       DEV := specify device for incoming device classification.\n"
+               "       ACTION_SPEC := Apply an action on matching packets.\n"
+               "       NOTE: handle is represented as HANDLE[/FWMASK].\n"
+               "               FWMASK is 0xffffffff by default.\n");
 }
 
 static int fw_parse_opt(struct filter_util *qu, char *handle, int argc, char **argv, struct nlmsghdr *n)
index 03dd51de1aced9ffb7d43ed6f69c1ddf30dfe1c3..253ed5ce42e0aa3e249a826724510289fc9921a5 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... matchall [skip_sw | skip_hw]\n");
-       fprintf(stderr, "                 [ action ACTION_SPEC ] [ classid CLASSID ]\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where: SELECTOR := SAMPLE SAMPLE ...\n");
-       fprintf(stderr, "       FILTERID := X:Y:Z\n");
-       fprintf(stderr, "       ACTION_SPEC := ... look at individual actions\n");
-       fprintf(stderr, "\nNOTE: CLASSID is parsed as hexadecimal input.\n");
+       fprintf(stderr,
+               "Usage: ... matchall [skip_sw | skip_hw]\n"
+               "                 [ action ACTION_SPEC ] [ classid CLASSID ]\n"
+               "\n"
+               "Where: SELECTOR := SAMPLE SAMPLE ...\n"
+               "       FILTERID := X:Y:Z\n"
+               "       ACTION_SPEC := ... look at individual actions\n"
+               "\n"
+               "NOTE: CLASSID is parsed as hexadecimal input.\n");
 }
 
 static int matchall_parse_opt(struct filter_util *qu, char *handle,
index e52da6441fb0897cc09448280fb028e8f8629616..31fa96a0565e35a6d45c2b700bf0234e13ba55a5 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... route [ from REALM | fromif TAG ] [ to REALM ]\n");
-       fprintf(stderr, "                [ classid CLASSID ] [ action ACTION_SPEC ]\n");
-       fprintf(stderr, "       ACTION_SPEC := ... look at individual actions\n");
-       fprintf(stderr, "       CLASSID := X:Y\n");
-       fprintf(stderr, "\nNOTE: CLASSID is parsed as hexadecimal input.\n");
+       fprintf(stderr,
+               "Usage: ... route [ from REALM | fromif TAG ] [ to REALM ]\n"
+               "                [ classid CLASSID ] [ action ACTION_SPEC ]\n"
+               "       ACTION_SPEC := ... look at individual actions\n"
+               "       CLASSID := X:Y\n"
+               "\n"
+               "NOTE: CLASSID is parsed as hexadecimal input.\n");
 }
 
 static int route_parse_opt(struct filter_util *qu, char *handle, int argc, char **argv, struct nlmsghdr *n)
index bddd4740501a07bd77ab6fa6ffd96d60de03ec67..388e9ee59ad39e266e3f02375a658453b4082306 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... rsvp ipproto PROTOCOL session DST[/PORT | GPI ]\n");
-       fprintf(stderr, "                [ sender SRC[/PORT | GPI ] ]\n");
-       fprintf(stderr, "                [ classid CLASSID ] [ action ACTION_SPEC ]\n");
-       fprintf(stderr, "                [ tunnelid ID ] [ tunnel ID skip NUMBER ]\n");
-       fprintf(stderr, "Where: GPI := { flowlabel NUMBER | spi/ah SPI | spi/esp SPI |\n");
-       fprintf(stderr, "                u{8|16|32} NUMBER mask MASK at OFFSET}\n");
-       fprintf(stderr, "       ACTION_SPEC := ... look at individual actions\n");
-       fprintf(stderr, "       FILTERID := X:Y\n");
-       fprintf(stderr, "\nNOTE: CLASSID is parsed as hexadecimal input.\n");
+       fprintf(stderr,
+               "Usage: ... rsvp ipproto PROTOCOL session DST[/PORT | GPI ]\n"
+               "               [ sender SRC[/PORT | GPI ] ]\n"
+               "               [ classid CLASSID ] [ action ACTION_SPEC ]\n"
+               "               [ tunnelid ID ] [ tunnel ID skip NUMBER ]\n"
+               "Where: GPI := { flowlabel NUMBER | spi/ah SPI | spi/esp SPI |\n"
+               "               u{8|16|32} NUMBER mask MASK at OFFSET}\n"
+               "       ACTION_SPEC := ... look at individual actions\n"
+               "       FILTERID := X:Y\n"
+               "\nNOTE: CLASSID is parsed as hexadecimal input.\n");
 }
 
 static int get_addr_and_pi(int *argc_p, char ***argv_p, inet_prefix *addr,
index 159cf41461b5b35c02a415a384668dafc78f7a47..ae4cbf1186ade53892080d055ecaaa5c672245da 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr," Usage: ... tcindex [ hash SIZE ] [ mask MASK ] [ shift SHIFT ]\n");
-       fprintf(stderr, "                    [ pass_on | fall_through ]\n");
-       fprintf(stderr,"                    [ classid CLASSID ] [ action ACTION_SPEC ]\n");
+       fprintf(stderr,
+               " Usage: ... tcindex    [ hash SIZE ] [ mask MASK ] [ shift SHIFT ]\n"
+               "                       [ pass_on | fall_through ]\n"
+               "                       [ classid CLASSID ] [ action ACTION_SPEC ]\n");
 }
 
 static int tcindex_parse_opt(struct filter_util *qu, char *handle, int argc,
index b5aff3ab4896d4055f7683434cc9f6140ec7cbcb..ab6bc0ad28ffdb4288f07e71b4ffafd2b8b6154c 100644 (file)
@@ -43,20 +43,20 @@ static void act_usage(void)
         * does that, they would know how to fix this ..
         *
         */
-       fprintf(stderr, "usage: tc actions <ACTSPECOP>*\n");
        fprintf(stderr,
-               "Where: \tACTSPECOP := ACR | GD | FL\n"
-                       "\tACR := add | change | replace <ACTSPEC>*\n"
-                       "\tGD := get | delete | <ACTISPEC>*\n"
-                       "\tFL := ls | list | flush | <ACTNAMESPEC>\n"
-                       "\tACTNAMESPEC :=  action <ACTNAME>\n"
-                       "\tACTISPEC := <ACTNAMESPEC> <INDEXSPEC>\n"
-                       "\tACTSPEC := action <ACTDETAIL> [INDEXSPEC]\n"
-                       "\tINDEXSPEC := index <32 bit indexvalue>\n"
-                       "\tACTDETAIL := <ACTNAME> <ACTPARAMS>\n"
-                       "\t\tExample ACTNAME is gact, mirred, bpf, etc\n"
-                       "\t\tEach action has its own parameters (ACTPARAMS)\n"
-                       "\n");
+               "usage: tc actions <ACTSPECOP>*\n"
+               "Where:         ACTSPECOP := ACR | GD | FL\n"
+               "       ACR := add | change | replace <ACTSPEC>*\n"
+               "       GD := get | delete | <ACTISPEC>*\n"
+               "       FL := ls | list | flush | <ACTNAMESPEC>\n"
+               "       ACTNAMESPEC :=  action <ACTNAME>\n"
+               "       ACTISPEC := <ACTNAMESPEC> <INDEXSPEC>\n"
+               "       ACTSPEC := action <ACTDETAIL> [INDEXSPEC]\n"
+               "       INDEXSPEC := index <32 bit indexvalue>\n"
+               "       ACTDETAIL := <ACTNAME> <ACTPARAMS>\n"
+               "               Example ACTNAME is gact, mirred, bpf, etc\n"
+               "               Each action has its own parameters (ACTPARAMS)\n"
+               "\n");
 
        exit(-1);
 }
index 3e8468c683246955145269b650de73791e132d8b..e247da8da579f42a42dc2d8d385524f8e12c4582 100644 (file)
@@ -25,32 +25,34 @@ static const enum bpf_prog_type bpf_type = BPF_PROG_TYPE_SCHED_ACT;
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... bpf ... [ index INDEX ]\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "BPF use case:\n");
-       fprintf(stderr, " bytecode BPF_BYTECODE\n");
-       fprintf(stderr, " bytecode-file FILE\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "eBPF use case:\n");
-       fprintf(stderr, " object-file FILE [ section ACT_NAME ] [ export UDS_FILE ]");
-       fprintf(stderr, " [ verbose ]\n");
-       fprintf(stderr, " object-pinned FILE\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where BPF_BYTECODE := \'s,c t f k,c t f k,c t f k,...\'\n");
-       fprintf(stderr, "c,t,f,k and s are decimals; s denotes number of 4-tuples\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where FILE points to a file containing the BPF_BYTECODE string,\n");
-       fprintf(stderr, "an ELF file containing eBPF map definitions and bytecode, or a\n");
-       fprintf(stderr, "pinned eBPF program.\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where ACT_NAME refers to the section name containing the\n");
-       fprintf(stderr, "action (default \'%s\').\n", bpf_prog_to_default_section(bpf_type));
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where UDS_FILE points to a unix domain socket file in order\n");
-       fprintf(stderr, "to hand off control of all created eBPF maps to an agent.\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where optionally INDEX points to an existing action, or\n");
-       fprintf(stderr, "explicitly specifies an action index upon creation.\n");
+       fprintf(stderr,
+               "Usage: ... bpf ... [ index INDEX ]\n"
+               "\n"
+               "BPF use case:\n"
+               " bytecode BPF_BYTECODE\n"
+               " bytecode-file FILE\n"
+               "\n"
+               "eBPF use case:\n"
+               " object-file FILE [ section ACT_NAME ] [ export UDS_FILE ]"
+               " [ verbose ]\n"
+               " object-pinned FILE\n"
+               "\n"
+               "Where BPF_BYTECODE := \'s,c t f k,c t f k,c t f k,...\'\n"
+               "c,t,f,k and s are decimals; s denotes number of 4-tuples\n"
+               "\n"
+               "Where FILE points to a file containing the BPF_BYTECODE string,\n"
+               "an ELF file containing eBPF map definitions and bytecode, or a\n"
+               "pinned eBPF program.\n"
+               "\n"
+               "Where ACT_NAME refers to the section name containing the\n"
+               "action (default \'%s\').\n"
+               "\n"
+               "Where UDS_FILE points to a unix domain socket file in order\n"
+               "to hand off control of all created eBPF maps to an agent.\n"
+               "\n"
+               "Where optionally INDEX points to an existing action, or\n"
+               "explicitly specifies an action index upon creation.\n",
+               bpf_prog_to_default_section(bpf_type));
 }
 
 static void bpf_cbpf_cb(void *nl, const struct sock_filter *ops, int ops_len)
index 13543d337cc2dec9d842fecae97cdd1319174642..af5ebfc4e40bfda58572ad4a7179f63404903dd4 100644 (file)
@@ -27,8 +27,9 @@
 static void
 explain(void)
 {
-       fprintf(stderr, "Usage: ... connmark [zone ZONE] [CONTROL] [index <INDEX>]\n");
-       fprintf(stderr, "where :\n"
+       fprintf(stderr,
+               "Usage: ... connmark [zone ZONE] [CONTROL] [index <INDEX>]\n"
+               "where :\n"
                "\tZONE is the conntrack zone\n"
                "\tCONTROL := reclassify | pipe | drop | continue | ok |\n"
                "\t           goto chain <CHAIN_INDEX>\n");
index a2f747f46a3d60422f3fd7e00a2e7e6bb10b9bc0..ef62e1bbaee04279526d76b93466232e80ac35ee 100644 (file)
@@ -27,10 +27,11 @@ static void est_help(void);
 
 static void est_help(void)
 {
-       fprintf(stderr, "Usage: ... estimator INTERVAL TIME-CONST\n");
-       fprintf(stderr, "  INTERVAL is interval between measurements\n");
-       fprintf(stderr, "  TIME-CONST is averaging time constant\n");
-       fprintf(stderr, "Example: ... est 1sec 8sec\n");
+       fprintf(stderr,
+               "Usage: ... estimator INTERVAL TIME-CONST\n"
+               "  INTERVAL is interval between measurements\n"
+               "  TIME-CONST is averaging time constant\n"
+               "Example: ... est 1sec 8sec\n");
 }
 
 int parse_estimator(int *p_argc, char ***p_argv, struct tc_estimator *est)
index a0a3c33d23dac4e9149062b6956b00069e6d8d37..f48f0cbc7c77b42d6beab08c252231c213775f31 100644 (file)
@@ -53,8 +53,7 @@ explain(void)
                        "\tINDEX := index value used\n"
                        "\n");
 #else
-       fprintf(stderr, "Usage: ... gact <ACTION> [INDEX]\n");
-       fprintf(stderr,
+       fprintf(stderr, "Usage: ... gact <ACTION> [INDEX]\n"
                "Where: \tACTION := reclassify | drop | continue | pass | pipe |\n"
                "       \t          goto chain <CHAIN_INDEX> | jump <JUMP_COUNT>\n"
                "\tINDEX := index value used\n"
index 2bf9f2047b46df7e6ce15351011b488fffb384ab..67c1df75a96a2c28a79926598572d6c124ff1319 100644 (file)
@@ -28,8 +28,7 @@
 static void ife_explain(void)
 {
        fprintf(stderr,
-               "Usage:... ife {decode|encode} [{ALLOW|USE} ATTR] [dst DMAC] [src SMAC] [type TYPE] [CONTROL] [index INDEX]\n");
-       fprintf(stderr,
+               "Usage:... ife {decode|encode} [{ALLOW|USE} ATTR] [dst DMAC] [src SMAC] [type TYPE] [CONTROL] [index INDEX]\n"
                "\tALLOW := Encode direction. Allows encoding specified metadata\n"
                "\t\t e.g \"allow mark\"\n"
                "\tUSE := Encode direction. Enforce Static encoding of specified metadata\n"
@@ -39,9 +38,9 @@ static void ife_explain(void)
                "\tSMAC := optional 6 byte Source MAC address to encode\n"
                "\tTYPE := optional 16 bit ethertype to encode\n"
                "\tCONTROL := reclassify|pipe|drop|continue|ok\n"
-               "\tINDEX := optional IFE table index value used\n");
-       fprintf(stderr, "encode is used for sending IFE packets\n");
-       fprintf(stderr, "decode is used for receiving IFE packets\n");
+               "\tINDEX := optional IFE table index value used\n"
+               "encode is used for sending IFE packets\n"
+               "decode is used for receiving IFE packets\n");
 }
 
 static void ife_usage(void)
index 6f8d078b7d3c78a7ba77e0ed14a1bdbc70462068..8eb15f4b276d344aa7dd2213b75db7073badec8a 100644 (file)
@@ -34,8 +34,8 @@ static int pedit_debug;
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... pedit munge [ex] <MUNGE> [CONTROL]\n");
        fprintf(stderr,
+               "Usage: ... pedit munge [ex] <MUNGE> [CONTROL]\n"
                "Where: MUNGE := <RAW>|<LAYERED>\n"
                "\t<RAW>:= <OFFSETC>[ATC]<CMD>\n \t\tOFFSETC:= offset <offval> <u8|u16|u32>\n"
                "\t\tATC:= at <atval> offmask <maskval> shift <shiftval>\n"
index d645999ba08bf74537472ba30cab165e9bfe45a8..862a39ffef935d6fbbf492cf42816845947dfdfb 100644 (file)
@@ -37,15 +37,15 @@ struct action_util police_action_util = {
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: ... police rate BPS burst BYTES[/BYTES] [ mtu BYTES[/BYTES] ]\n");
-       fprintf(stderr, "                [ peakrate BPS ] [ avrate BPS ] [ overhead BYTES ]\n");
-       fprintf(stderr, "                [ linklayer TYPE ] [ CONTROL ]\n");
-
-       fprintf(stderr, "Where: CONTROL := conform-exceed <EXCEEDACT>[/NOTEXCEEDACT]\n");
-       fprintf(stderr, "                  Define how to handle packets which exceed (<EXCEEDACT>)\n");
-       fprintf(stderr, "                  or conform (<NOTEXCEEDACT>) the configured bandwidth limit.\n");
-       fprintf(stderr, "       EXCEEDACT/NOTEXCEEDACT := { pipe | ok | reclassify | drop | continue |\n");
-       fprintf(stderr, "                                   goto chain <CHAIN_INDEX> }\n");
+       fprintf(stderr,
+               "Usage: ... police rate BPS burst BYTES[/BYTES] [ mtu BYTES[/BYTES] ]\n"
+               "               [ peakrate BPS ] [ avrate BPS ] [ overhead BYTES ]\n"
+               "               [ linklayer TYPE ] [ CONTROL ]\n"
+               "Where: CONTROL := conform-exceed <EXCEEDACT>[/NOTEXCEEDACT]\n"
+               "                 Define how to handle packets which exceed (<EXCEEDACT>)\n"
+               "                 or conform (<NOTEXCEEDACT>) the configured bandwidth limit.\n"
+               "       EXCEEDACT/NOTEXCEEDACT := { pipe | ok | reclassify | drop | continue |\n"
+               "                                  goto chain <CHAIN_INDEX> }\n");
        exit(-1);
 }
 
index 39a99246a8eaedac9a859f42e7795bdb0a0d4103..3c840d3f62c6c43e7a08199e52f560486ecad650 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: sample SAMPLE_CONF\n");
-       fprintf(stderr, "where:\n");
-       fprintf(stderr, "\tSAMPLE_CONF := SAMPLE_PARAMS | SAMPLE_INDEX\n");
-       fprintf(stderr, "\tSAMPLE_PARAMS := rate RATE group GROUP [trunc SIZE] [SAMPLE_INDEX]\n");
-       fprintf(stderr, "\tSAMPLE_INDEX := index INDEX\n");
-       fprintf(stderr, "\tRATE := The ratio of packets observed at the data source to the samples generated.\n");
-       fprintf(stderr, "\tGROUP := the psample sampling group\n");
-       fprintf(stderr, "\tSIZE := the truncation size\n");
-       fprintf(stderr, "\tINDEX := integer index of the sample action\n");
+       fprintf(stderr,
+               "Usage: sample SAMPLE_CONF\n"
+               "where:\n"
+               "\tSAMPLE_CONF := SAMPLE_PARAMS | SAMPLE_INDEX\n"
+               "\tSAMPLE_PARAMS := rate RATE group GROUP [trunc SIZE] [SAMPLE_INDEX]\n"
+               "\tSAMPLE_INDEX := index INDEX\n"
+               "\tRATE := The ratio of packets observed at the data source to the samples generated.\n"
+               "\tGROUP := the psample sampling group\n"
+               "\tSIZE := the truncation size\n"
+               "\tINDEX := integer index of the sample action\n");
 }
 
 static void usage(void)
index 886606f9f8b4e754c035d3c74932f753126abd89..e3e1cdb1ba2108684a14d4cc49707b403717fb59 100644 (file)
@@ -80,8 +80,9 @@
 #endif
 static void explain(void)
 {
-       fprintf(stderr, "Usage:... simple [sdata STRING] [index INDEX] [CONTROL]\n");
-       fprintf(stderr, "\tSTRING being an arbitrary string\n"
+       fprintf(stderr,
+               "Usage:... simple [sdata STRING] [index INDEX] [CONTROL]\n"
+               "\tSTRING being an arbitrary string\n"
                "\tINDEX := optional index value used\n"
                "\tCONTROL := reclassify|pipe|drop|continue|ok\n");
 }
index 9449287ea0b4fd77efaad7f6b6e788204f952208..fd699017cfa780e829d6f277a50615979a8caf66 100644 (file)
@@ -21,9 +21,9 @@
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: tunnel_key unset\n");
-       fprintf(stderr, "       tunnel_key set <TUNNEL_KEY>\n");
        fprintf(stderr,
+               "Usage: tunnel_key unset\n"
+               "       tunnel_key set <TUNNEL_KEY>\n"
                "Where TUNNEL_KEY is a combination of:\n"
                "id <TUNNELID>\n"
                "src_ip <IP> (mandatory)\n"
index f8215f06507a69d4862abc69c73274c9bec49730..77b56825f777bf09cf90f4989b266420f7a5156d 100644 (file)
@@ -40,8 +40,9 @@ static int atm_parse_opt(struct qdisc_util *qu, int argc, char **argv,
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... atm ( pvc ADDR | svc ADDR [ sap SAP ] ) [ qos QOS ] [ sndbuf BYTES ]\n");
-       fprintf(stderr, "  [ hdr HEX... ] [ excess ( CLASSID | clp ) ] [ clip ]\n");
+       fprintf(stderr,
+               "Usage: ... atm ( pvc ADDR | svc ADDR [ sap SAP ] ) [ qos QOS ] [ sndbuf BYTES ]\n"
+               "  [ hdr HEX... ] [ excess ( CLASSID | clp ) ] [ clip ]\n");
 }
 
 
index 307a12c098c3ec80196ddc378ef2051fcf49c9eb..65ea07ef6cb59e7d1abf4e0194a9ea160d815a59 100644 (file)
@@ -71,21 +71,21 @@ static struct cake_preset *find_preset(char *argv)
 static void explain(void)
 {
        fprintf(stderr,
-"Usage: ... cake [ bandwidth RATE | unlimited* | autorate-ingress ]\n"
-"                [ rtt TIME | datacentre | lan | metro | regional |\n"
-"                  internet* | oceanic | satellite | interplanetary ]\n"
-"                [ besteffort | diffserv8 | diffserv4 | diffserv3* ]\n"
-"                [ flowblind | srchost | dsthost | hosts | flows |\n"
-"                  dual-srchost | dual-dsthost | triple-isolate* ]\n"
-"                [ nat | nonat* ]\n"
-"                [ wash | nowash* ]\n"
-"                [ split-gso* | no-split-gso ]\n"
-"                [ ack-filter | ack-filter-aggressive | no-ack-filter* ]\n"
-"                [ memlimit LIMIT ]\n"
-"                [ fwmark MASK ]\n"
-"                [ ptm | atm | noatm* ] [ overhead N | conservative | raw* ]\n"
-"                [ mpu N ] [ ingress | egress* ]\n"
-"                (* marks defaults)\n");
+               "Usage: ... cake [ bandwidth RATE | unlimited* | autorate-ingress ]\n"
+               "                [ rtt TIME | datacentre | lan | metro | regional |\n"
+               "                  internet* | oceanic | satellite | interplanetary ]\n"
+               "                [ besteffort | diffserv8 | diffserv4 | diffserv3* ]\n"
+               "                [ flowblind | srchost | dsthost | hosts | flows |\n"
+               "                  dual-srchost | dual-dsthost | triple-isolate* ]\n"
+               "                [ nat | nonat* ]\n"
+               "                [ wash | nowash* ]\n"
+               "                [ split-gso* | no-split-gso ]\n"
+               "                [ ack-filter | ack-filter-aggressive | no-ack-filter* ]\n"
+               "                [ memlimit LIMIT ]\n"
+               "                [ fwmark MASK ]\n"
+               "                [ ptm | atm | noatm* ] [ overhead N | conservative | raw* ]\n"
+               "                [ mpu N ] [ ingress | egress* ]\n"
+               "                (* marks defaults)\n");
 }
 
 static int cake_parse_opt(struct qdisc_util *qu, int argc, char **argv,
index e7f1a3bfaf5dbb2565d4f1bafdab9639d8a2ec06..6518ef46813ba4272185bf93902acdf7cba66146 100644 (file)
 
 static void explain_class(void)
 {
-       fprintf(stderr, "Usage: ... cbq bandwidth BPS rate BPS maxburst PKTS [ avpkt BYTES ]\n");
-       fprintf(stderr, "               [ minburst PKTS ] [ bounded ] [ isolated ]\n");
-       fprintf(stderr, "               [ allot BYTES ] [ mpu BYTES ] [ weight RATE ]\n");
-       fprintf(stderr, "               [ prio NUMBER ] [ cell BYTES ] [ ewma LOG ]\n");
-       fprintf(stderr, "               [ estimator INTERVAL TIME_CONSTANT ]\n");
-       fprintf(stderr, "               [ split CLASSID ] [ defmap MASK/CHANGE ]\n");
-       fprintf(stderr, "               [ overhead BYTES ] [ linklayer TYPE ]\n");
+       fprintf(stderr,
+               "Usage: ... cbq bandwidth BPS rate BPS maxburst PKTS [ avpkt BYTES ]\n"
+               "               [ minburst PKTS ] [ bounded ] [ isolated ]\n"
+               "               [ allot BYTES ] [ mpu BYTES ] [ weight RATE ]\n"
+               "               [ prio NUMBER ] [ cell BYTES ] [ ewma LOG ]\n"
+               "               [ estimator INTERVAL TIME_CONSTANT ]\n"
+               "               [ split CLASSID ] [ defmap MASK/CHANGE ]\n"
+               "               [ overhead BYTES ] [ linklayer TYPE ]\n");
 }
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... cbq bandwidth BPS avpkt BYTES [ mpu BYTES ]\n");
-       fprintf(stderr, "               [ cell BYTES ] [ ewma LOG ]\n");
+       fprintf(stderr,
+               "Usage: ... cbq bandwidth BPS avpkt BYTES [ mpu BYTES ]\n"
+               "               [ cell BYTES ] [ ewma LOG ]\n");
 }
 
 static void explain1(char *arg)
index a2ffb1db385247a66a96602b1840181c795bc1c9..9515a1f7feeb4168a8fee5ef207bd2b29ce2b59b 100644 (file)
@@ -24,9 +24,9 @@
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... cbs hicredit BYTES locredit BYTES sendslope BPS idleslope BPS\n");
-       fprintf(stderr, "           [offload 0|1]\n");
-
+       fprintf(stderr,
+               "Usage: ... cbs hicredit BYTES locredit BYTES sendslope BPS idleslope BPS\n"
+               "          [offload 0|1]\n");
 }
 
 static void explain1(const char *arg, const char *val)
index 1353c80c806ba1bea44ce3c066c51166cca480ec..648d9ad718669f9247f03455482faf77a503d038 100644 (file)
@@ -26,8 +26,9 @@
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... choke limit PACKETS bandwidth KBPS [ecn]\n");
-       fprintf(stderr, "                 [ min PACKETS ] [ max PACKETS ] [ burst PACKETS ]\n");
+       fprintf(stderr,
+               "Usage: ... choke limit PACKETS bandwidth KBPS [ecn]\n"
+               "                [ min PACKETS ] [ max PACKETS ] [ burst PACKETS ]\n");
 }
 
 static int choke_parse_opt(struct qdisc_util *qu, int argc, char **argv,
index 8a2a871671cbe89382db378e913947855074eef1..849cc0400131a133b466945cc82d6ab8dab30feb 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... codel [ limit PACKETS ] [ target TIME ]\n");
-       fprintf(stderr, "                 [ interval TIME ] [ ecn | noecn ]\n");
-       fprintf(stderr, "                 [ ce_threshold TIME ]\n");
+       fprintf(stderr,
+               "Usage: ... codel [ limit PACKETS ] [ target TIME ]\n"
+               "                [ interval TIME ] [ ecn | noecn ]\n"
+               "                [ ce_threshold TIME ]\n");
 }
 
 static int codel_parse_opt(struct qdisc_util *qu, int argc, char **argv,
index 79a06ba82bdfad5d81f14df80ad92c19158c960d..76aca476c61d490bb017246ba3987bd8ae7ee0e1 100644 (file)
@@ -38,8 +38,9 @@ static const struct static_clockid {
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... etf delta NANOS clockid CLOCKID [offload] [deadline_mode]\n");
-       fprintf(stderr, "CLOCKID must be a valid SYS-V id (i.e. CLOCK_TAI)\n");
+       fprintf(stderr,
+               "Usage: ... etf delta NANOS clockid CLOCKID [offload] [deadline_mode]\n"
+               "CLOCKID must be a valid SYS-V id (i.e. CLOCK_TAI)\n");
 }
 
 static void explain1(const char *arg, const char *val)
@@ -49,8 +50,10 @@ static void explain1(const char *arg, const char *val)
 
 static void explain_clockid(const char *val)
 {
-       fprintf(stderr, "etf: illegal value for \"clockid\": \"%s\".\n", val);
-       fprintf(stderr, "It must be a valid SYS-V id (i.e. CLOCK_TAI)\n");
+       fprintf(stderr,
+               "etf: illegal value for \"clockid\": \"%s\".\n"
+               "It must be a valid SYS-V id (i.e. CLOCK_TAI)\n",
+               val);
 }
 
 static int get_clockid(__s32 *val, const char *arg)
index a4174380d5d49730e1f7b2d9e83d684f852aa3cf..caf232ec4573b09446637897d7194254efd35174 100644 (file)
--- a/tc/q_fq.c
+++ b/tc/q_fq.c
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... fq [ limit PACKETS ] [ flow_limit PACKETS ]\n");
-       fprintf(stderr, "              [ quantum BYTES ] [ initial_quantum BYTES ]\n");
-       fprintf(stderr, "              [ maxrate RATE  ] [ buckets NUMBER ]\n");
-       fprintf(stderr, "              [ [no]pacing ] [ refill_delay TIME ]\n");
-       fprintf(stderr, "              [ low_rate_threshold RATE ]\n");
-       fprintf(stderr, "              [ orphan_mask MASK]\n");
-       fprintf(stderr, "              [ ce_threshold TIME ]\n");
+       fprintf(stderr,
+               "Usage: ... fq  [ limit PACKETS ] [ flow_limit PACKETS ]\n"
+               "               [ quantum BYTES ] [ initial_quantum BYTES ]\n"
+               "               [ maxrate RATE  ] [ buckets NUMBER ]\n"
+               "               [ [no]pacing ] [ refill_delay TIME ]\n"
+               "               [ low_rate_threshold RATE ]\n"
+               "               [ orphan_mask MASK]\n"
+               "               [ ce_threshold TIME ]\n");
 }
 
 static unsigned int ilog2(unsigned int val)
index 02ad2214110b460d5e3c6233525cf1de13f1a667..376ac50da1a5d6f6d3fee2655a96db5745918d81 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... fq_codel [ limit PACKETS ] [ flows NUMBER ]\n");
-       fprintf(stderr, "                    [ memory_limit BYTES ]\n");
-       fprintf(stderr, "                    [ target TIME ] [ interval TIME ]\n");
-       fprintf(stderr, "                    [ quantum BYTES ] [ [no]ecn ]\n");
-       fprintf(stderr, "                    [ ce_threshold TIME ]\n");
+       fprintf(stderr,
+               "Usage: ... fq_codel    [ limit PACKETS ] [ flows NUMBER ]\n"
+                                       "[ memory_limit BYTES ]\n"
+                                       "[ target TIME ] [ interval TIME ]\n"
+                                       "[ quantum BYTES ] [ [no]ecn ]\n"
+                                       "[ ce_threshold TIME ]\n");
 }
 
 static int fq_codel_parse_opt(struct qdisc_util *qu, int argc, char **argv,
index e297b866c76e82bcd7607b91bd27c0b1351c9f52..8a1cecffc1261789353e9f25a7bad425a446d0ec 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: tc qdisc { add | replace | change } ... gred setup vqs NUMBER\n");
-       fprintf(stderr, "           default DEFAULT_VQ [ grio ] [ limit BYTES ] [ecn] [harddrop]\n");
-       fprintf(stderr, "       tc qdisc change ... gred vq VQ [ prio VALUE ] limit BYTES\n");
-       fprintf(stderr, "           min BYTES max BYTES avpkt BYTES [ burst PACKETS ]\n");
-       fprintf(stderr, "           [ probability PROBABILITY ] [ bandwidth KBPS ] [ecn] [harddrop]\n");
+       fprintf(stderr,
+               "Usage: tc qdisc { add | replace | change } ... gred setup vqs NUMBER\n"
+               "           default DEFAULT_VQ [ grio ] [ limit BYTES ] [ecn] [harddrop]\n"
+               "       tc qdisc change ... gred vq VQ [ prio VALUE ] limit BYTES\n"
+               "           min BYTES max BYTES avpkt BYTES [ burst PACKETS ]\n"
+               "           [ probability PROBABILITY ] [ bandwidth KBPS ] [ecn] [harddrop]\n");
 }
 
 static int init_gred(struct qdisc_util *qu, int argc, char **argv,
index 21186a92c017ab6e1bd7c30b4178122c1a6a4456..5ee6642f24d2352331aa345ff70ef2228eee9ff3 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... hhf [ limit PACKETS ] [ quantum BYTES]\n");
-       fprintf(stderr, "               [ hh_limit NUMBER ]\n");
-       fprintf(stderr, "               [ reset_timeout TIME ]\n");
-       fprintf(stderr, "               [ admit_bytes BYTES ]\n");
-       fprintf(stderr, "               [ evict_timeout TIME ]\n");
-       fprintf(stderr, "               [ non_hh_weight NUMBER ]\n");
+       fprintf(stderr,
+               "Usage: ... hhf [ limit PACKETS ] [ quantum BYTES]\n"
+               "               [ hh_limit NUMBER ]\n"
+               "               [ reset_timeout TIME ]\n"
+               "               [ admit_bytes BYTES ]\n"
+               "               [ evict_timeout TIME ]\n"
+               "               [ non_hh_weight NUMBER ]\n");
 }
 
 static int hhf_parse_opt(struct qdisc_util *qu, int argc, char **argv,
index 7cd18ae152e1516f2103f2dca70d38c09560bf8b..0eb41308a3fbc7ebbbf2bcb6558723c8cd74eb64 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... mqprio [num_tc NUMBER] [map P0 P1 ...]\n");
-       fprintf(stderr, "                  [queues count1@offset1 count2@offset2 ...] ");
-       fprintf(stderr, "[hw 1|0]\n");
-       fprintf(stderr, "                  [mode dcb|channel]\n");
-       fprintf(stderr, "                  [shaper bw_rlimit SHAPER_PARAMS]\n"
+       fprintf(stderr,
+               "Usage: ... mqprio      [num_tc NUMBER] [map P0 P1 ...]\n"
+               "                       [queues count1@offset1 count2@offset2 ...] "
+               "[hw 1|0]\n"
+               "                       [mode dcb|channel]\n"
+               "                       [shaper bw_rlimit SHAPER_PARAMS]\n"
                "Where: SHAPER_PARAMS := { min_rate MIN_RATE1 MIN_RATE2 ...|\n"
-               "                          max_rate MAX_RATE1 MAX_RATE2 ... }\n");
+               "                         max_rate MAX_RATE1 MAX_RATE2 ... }\n");
 }
 
 static int mqprio_parse_opt(struct qdisc_util *qu, int argc,
index 6e0e8a8cbfde508a59318812103b991b3fd093e3..59fb8efae3996b30a612985ba004d6f5195ada82 100644 (file)
 static void explain(void)
 {
        fprintf(stderr,
-"Usage: ... netem [ limit PACKETS ]\n" \
-"                 [ delay TIME [ JITTER [CORRELATION]]]\n" \
-"                 [ distribution {uniform|normal|pareto|paretonormal} ]\n" \
-"                 [ corrupt PERCENT [CORRELATION]]\n" \
-"                 [ duplicate PERCENT [CORRELATION]]\n" \
-"                 [ loss random PERCENT [CORRELATION]]\n" \
-"                 [ loss state P13 [P31 [P32 [P23 P14]]]\n" \
-"                 [ loss gemodel PERCENT [R [1-H [1-K]]]\n" \
-"                 [ ecn ]\n" \
-"                 [ reorder PRECENT [CORRELATION] [ gap DISTANCE ]]\n" \
-"                 [ rate RATE [PACKETOVERHEAD] [CELLSIZE] [CELLOVERHEAD]]\n" \
-"                 [ slot MIN_DELAY [MAX_DELAY] [packets MAX_PACKETS]" \
-" [bytes MAX_BYTES]]\n" \
-"                 [ slot distribution" \
-" {uniform|normal|pareto|paretonormal|custom} DELAY JITTER" \
-" [packets MAX_PACKETS] [bytes MAX_BYTES]]\n");
+               "Usage: ... netem       [ limit PACKETS ]\n" \
+               "                       [ delay TIME [ JITTER [CORRELATION]]]\n" \
+               "                       [ distribution {uniform|normal|pareto|paretonormal} ]\n" \
+               "                       [ corrupt PERCENT [CORRELATION]]\n" \
+               "                       [ duplicate PERCENT [CORRELATION]]\n" \
+               "                       [ loss random PERCENT [CORRELATION]]\n" \
+               "                       [ loss state P13 [P31 [P32 [P23 P14]]]\n" \
+               "                       [ loss gemodel PERCENT [R [1-H [1-K]]]\n" \
+               "                       [ ecn ]\n" \
+               "                       [ reorder PRECENT [CORRELATION] [ gap DISTANCE ]]\n" \
+               "                       [ rate RATE [PACKETOVERHEAD] [CELLSIZE] [CELLOVERHEAD]]\n" \
+               "                       [ slot MIN_DELAY [MAX_DELAY] [packets MAX_PACKETS]" \
+               " [bytes MAX_BYTES]]\n" \
+               "               [ slot distribution" \
+               " {uniform|normal|pareto|paretonormal|custom} DELAY JITTER" \
+               " [packets MAX_PACKETS] [bytes MAX_BYTES]]\n");
 }
 
 static void explain1(const char *arg)
index 236ea31b06d6fb13f85ad1fc8cbf9bffb77a5a42..40982f9618783e77b0283765410da92f798ae651 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... pie [ limit PACKETS ][ target TIME us]\n");
-       fprintf(stderr, "              [ tupdate TIME us][ alpha ALPHA ]");
-       fprintf(stderr, "[beta BETA ][bytemode | nobytemode][ecn | noecn ]\n");
+       fprintf(stderr,
+               "Usage: ... pie [ limit PACKETS ][ target TIME us]\n"
+               "               [ tupdate TIME us][ alpha ALPHA ]"
+               "[beta BETA ][bytemode | nobytemode][ecn | noecn ]\n");
 }
 
 #define ALPHA_MAX 32
index 3b3a1204198979d2392ba344ea3c7a5584441064..6256420fb9a47d2d7f5ad9ac08c4b3a02da276be 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... red limit BYTES [min BYTES] [max BYTES] avpkt BYTES [burst PACKETS]\n");
-       fprintf(stderr, "               [adaptive] [probability PROBABILITY] [bandwidth KBPS]\n");
-       fprintf(stderr, "               [ecn] [harddrop]\n");
+       fprintf(stderr,
+               "Usage: ... red limit BYTES [min BYTES] [max BYTES] avpkt BYTES [burst PACKETS]\n"
+               "               [adaptive] [probability PROBABILITY] [bandwidth KBPS]\n"
+               "               [ecn] [harddrop]\n");
 }
 
 static int red_parse_opt(struct qdisc_util *qu, int argc, char **argv,
index eee31ec54d331976abcda8d7b2b995aa43794f73..4998921d3f8ac8dd630a91094d652f71031cbb5e 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... sfq [ limit NUMBER ] [ perturb SECS ] [ quantum BYTES ]\n");
-       fprintf(stderr, "               [ divisor NUMBER ] [ flows NUMBER] [ depth NUMBER ]\n");
-       fprintf(stderr, "               [ headdrop ]\n");
-       fprintf(stderr, "               [ redflowlimit BYTES ] [ min BYTES ] [ max BYTES ]\n");
-       fprintf(stderr, "               [ avpkt BYTES ] [ burst PACKETS ] [ probability P ]\n");
-       fprintf(stderr, "               [ ecn ] [ harddrop ]\n");
+       fprintf(stderr,
+               "Usage: ... sfq [ limit NUMBER ] [ perturb SECS ] [ quantum BYTES ]\n"
+               "               [ divisor NUMBER ] [ flows NUMBER] [ depth NUMBER ]\n"
+               "               [ headdrop ]\n"
+               "               [ redflowlimit BYTES ] [ min BYTES ] [ max BYTES ]\n"
+               "               [ avpkt BYTES ] [ burst PACKETS ] [ probability P ]\n"
+               "               [ ecn ] [ harddrop ]\n");
 }
 
 static int sfq_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n, const char *dev)
index aad055d8797d315cc44cf39709d9ab07f47b4b32..62c8c591da994167c4d1b32f90b316818d69e151 100644 (file)
@@ -47,13 +47,14 @@ static const struct static_clockid {
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... taprio clockid CLOCKID\n");
-       fprintf(stderr, "                  [num_tc NUMBER] [map P0 P1 ...] ");
-       fprintf(stderr, "                  [queues COUNT@OFFSET COUNT@OFFSET COUNT@OFFSET ...] ");
-       fprintf(stderr, "                  [ [sched-entry index cmd gate-mask interval] ... ] ");
-       fprintf(stderr, "                  [base-time time] ");
-       fprintf(stderr, "\nCLOCKID must be a valid SYS-V id (i.e. CLOCK_TAI)");
-       fprintf(stderr, "\n");
+       fprintf(stderr,
+               "Usage: ... taprio clockid CLOCKID\n"
+               "               [num_tc NUMBER] [map P0 P1 ...] "
+               "               [queues COUNT@OFFSET COUNT@OFFSET COUNT@OFFSET ...] "
+               "               [ [sched-entry index cmd gate-mask interval] ... ] "
+               "               [base-time time] "
+               "\n"
+               "CLOCKID must be a valid SYS-V id (i.e. CLOCK_TAI)\n");
 }
 
 static void explain_clockid(const char *val)
index b9465b20d2beadafef3bce9729f08cf86f158672..57a9736ca80f9bef6a8458257dc0b7228d216114 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... tbf limit BYTES burst BYTES[/BYTES] rate KBPS [ mtu BYTES[/BYTES] ]\n");
-       fprintf(stderr, "               [ peakrate KBPS ] [ latency TIME ] ");
-       fprintf(stderr, "[ overhead BYTES ] [ linklayer TYPE ]\n");
+       fprintf(stderr,
+               "Usage: ... tbf limit BYTES burst BYTES[/BYTES] rate KBPS [ mtu BYTES[/BYTES] ]\n"
+               "       [ peakrate KBPS ] [ latency TIME ] "
+               "[ overhead BYTES ] [ linklayer TYPE ]\n");
 }
 
 static void explain1(const char *arg, const char *val)
diff --git a/tc/tc.c b/tc/tc.c
index eacd5c08573d4e9f1bc8bd22a35e218033f86c06..e08f322a528a5fe6a27056804a2d71cca4ddb13f 100644 (file)
--- a/tc/tc.c
+++ b/tc/tc.c
@@ -194,14 +194,14 @@ noexist:
 static void usage(void)
 {
        fprintf(stderr,
-               "Usage: tc [ OPTIONS ] OBJECT { COMMAND | help }\n"
-               "       tc [-force] -batch filename\n"
+               "Usage: tc [ OPTIONS ] OBJECT { COMMAND | help }\n"
+               "       tc [-force] -batch filename\n"
                "where  OBJECT := { qdisc | class | filter | chain |\n"
-               "                   action | monitor | exec }\n"
+               "                   action | monitor | exec }\n"
                "       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[aw] |\n"
-               "                    -o[neline] | -j[son] | -p[retty] | -c[olor]\n"
-               "                    -b[atch] [filename] | -n[etns] name |\n"
-               "                    -nm | -nam[es] | { -cf | -conf } path }\n");
+               "                   -o[neline] | -j[son] | -p[retty] | -c[olor]\n"
+               "                   -b[atch] [filename] | -n[etns] name |\n"
+               "                    -nm | -nam[es] | { -cf | -conf } path }\n");
 }
 
 static int do_cmd(int argc, char **argv, void *buf, size_t buflen)
index 7ac700d7ab31369729dbaaad539bd894812b877b..c7e3cfdf6c87644783c184ad43cde2a9e23b7a92 100644 (file)
@@ -43,14 +43,15 @@ static void usage(void);
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: tc class [ add | del | change | replace | show ] dev STRING\n");
-       fprintf(stderr, "       [ classid CLASSID ] [ root | parent CLASSID ]\n");
-       fprintf(stderr, "       [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "       tc class show [ dev STRING ] [ root | parent CLASSID ]\n");
-       fprintf(stderr, "Where:\n");
-       fprintf(stderr, "QDISC_KIND := { prio | cbq | etc. }\n");
-       fprintf(stderr, "OPTIONS := ... try tc class add <desired QDISC_KIND> help\n");
+       fprintf(stderr,
+               "Usage: tc class [ add | del | change | replace | show ] dev STRING\n"
+               "       [ classid CLASSID ] [ root | parent CLASSID ]\n"
+               "       [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n"
+               "\n"
+               "       tc class show [ dev STRING ] [ root | parent CLASSID ]\n"
+               "Where:\n"
+               "QDISC_KIND := { prio | cbq | etc. }\n"
+               "OPTIONS := ... try tc class add <desired QDISC_KIND> help\n");
 }
 
 static int tc_class_modify(int cmd, unsigned int flags, int argc, char **argv)
index 0151af7be23b9f5382a6d8d5c9bfd5042225dfec..9b912ceb1916c04f7908ed1615967835604aa78b 100644 (file)
@@ -23,10 +23,11 @@ static void *BODY;
 
 static void usage(void)
 {
-       fprintf(stderr, "Usage: tc exec [ EXEC_TYPE ] [ help | OPTIONS ]\n");
-       fprintf(stderr, "Where:\n");
-       fprintf(stderr, "EXEC_TYPE := { bpf | etc. }\n");
-       fprintf(stderr, "OPTIONS := ... try tc exec <desired EXEC_KIND> help\n");
+       fprintf(stderr,
+               "Usage: tc exec [ EXEC_TYPE ] [ help | OPTIONS ]\n"
+               "Where:\n"
+               "EXEC_TYPE := { bpf | etc. }\n"
+               "OPTIONS := ... try tc exec <desired EXEC_KIND> help\n");
 }
 
 static int parse_noeopt(struct exec_util *eu, int argc, char **argv)
index c5da5b5c1ed5164b4a2bb7e4514242aada193749..e573a1df4e1ad557bae0f2e419061006cf7632d5 100644 (file)
 
 static int usage(void)
 {
-       fprintf(stderr, "Usage: tc qdisc [ add | del | replace | change | show ] dev STRING\n");
-       fprintf(stderr, "       [ handle QHANDLE ] [ root | ingress | clsact | parent CLASSID ]\n");
-       fprintf(stderr, "       [ estimator INTERVAL TIME_CONSTANT ]\n");
-       fprintf(stderr, "       [ stab [ help | STAB_OPTIONS] ]\n");
-       fprintf(stderr, "       [ ingress_block BLOCK_INDEX ] [ egress_block BLOCK_INDEX ]\n");
-       fprintf(stderr, "       [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "       tc qdisc show [ dev STRING ] [ ingress | clsact ] [ invisible ]\n");
-       fprintf(stderr, "Where:\n");
-       fprintf(stderr, "QDISC_KIND := { [p|b]fifo | tbf | prio | cbq | red | etc. }\n");
-       fprintf(stderr, "OPTIONS := ... try tc qdisc add <desired QDISC_KIND> help\n");
-       fprintf(stderr, "STAB_OPTIONS := ... try tc qdisc add stab help\n");
+       fprintf(stderr,
+               "Usage: tc qdisc [ add | del | replace | change | show ] dev STRING\n"
+               "       [ handle QHANDLE ] [ root | ingress | clsact | parent CLASSID ]\n"
+               "       [ estimator INTERVAL TIME_CONSTANT ]\n"
+               "       [ stab [ help | STAB_OPTIONS] ]\n"
+               "       [ ingress_block BLOCK_INDEX ] [ egress_block BLOCK_INDEX ]\n"
+               "       [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n"
+               "\n"
+               "       tc qdisc show [ dev STRING ] [ ingress | clsact ] [ invisible ]\n"
+               "Where:\n"
+               "QDISC_KIND := { [p|b]fifo | tbf | prio | cbq | red | etc. }\n"
+               "OPTIONS := ... try tc qdisc add <desired QDISC_KIND> help\n"
+               "STAB_OPTIONS := ... try tc qdisc add stab help\n");
        return -1;
 }
 
index 05dc84aa8dedebfc66ee068f3229a137543c7e57..1f3a4d44441edbc6b64bfe1247e84ec2ecf6352c 100644 (file)
@@ -40,19 +40,19 @@ static void _print_bearer_opts(void)
 {
        fprintf(stderr,
                "OPTIONS\n"
-               " priority              - Bearer link priority\n"
-               " tolerance             - Bearer link tolerance\n"
-               " window                - Bearer link window\n"
-               " mtu                   - Bearer link mtu\n");
+               " priority              - Bearer link priority\n"
+               " tolerance             - Bearer link tolerance\n"
+               " window                - Bearer link window\n"
+               " mtu                   - Bearer link mtu\n");
 }
 
 void print_bearer_media(void)
 {
        fprintf(stderr,
                "\nMEDIA\n"
-               " udp                   - User Datagram Protocol\n"
-               " ib                    - Infiniband\n"
-               " eth                   - Ethernet\n");
+               " udp                   - User Datagram Protocol\n"
+               " ib                    - Infiniband\n"
+               " eth                   - Ethernet\n");
 }
 
 static void cmd_bearer_enable_l2_help(struct cmdl *cmdl, char *media)
@@ -60,25 +60,23 @@ static void cmd_bearer_enable_l2_help(struct cmdl *cmdl, char *media)
        fprintf(stderr,
                "Usage: %s bearer enable media %s device DEVICE [OPTIONS]\n"
                "\nOPTIONS\n"
-               " domain DOMAIN         - Discovery domain\n"
-               " priority PRIORITY     - Bearer priority\n",
+               " domain DOMAIN         - Discovery domain\n"
+               " priority PRIORITY     - Bearer priority\n",
                cmdl->argv[0], media);
 }
 
 static void cmd_bearer_enable_udp_help(struct cmdl *cmdl, char *media)
 {
        fprintf(stderr,
-               "Usage: %s bearer enable [OPTIONS] media %s name NAME localip IP [UDP OPTIONS]\n\n",
-               cmdl->argv[0], media);
-       fprintf(stderr,
+               "Usage: %s bearer enable [OPTIONS] media %s name NAME localip IP [UDP OPTIONS]\n\n"
                "OPTIONS\n"
-               " domain DOMAIN         - Discovery domain\n"
-               " priority PRIORITY     - Bearer priority\n\n");
-       fprintf(stderr,
+               " domain DOMAIN         - Discovery domain\n"
+               " priority PRIORITY     - Bearer priority\n\n"
                "UDP OPTIONS\n"
-               " localport PORT        - Local UDP port (default 6118)\n"
-               " remoteip IP           - Remote IP address\n"
-               " remoteport PORT       - Remote UDP port (default 6118)\n");
+               " localport PORT        - Local UDP port (default 6118)\n"
+               " remoteip IP           - Remote IP address\n"
+               " remoteport PORT       - Remote UDP port (default 6118)\n",
+               cmdl->argv[0], media);
 }
 
 static int get_netid_cb(const struct nlmsghdr *nlh, void *data)
@@ -996,11 +994,11 @@ void cmd_bearer_help(struct cmdl *cmdl)
                "\n"
                "COMMANDS\n"
                " add                   - Add data to existing bearer\n"
-               " enable                - Enable a bearer\n"
-               " disable               - Disable a bearer\n"
-               " set                   - Set various bearer properties\n"
-               " get                   - Get various bearer properties\n"
-               " list                  - List bearers\n", cmdl->argv[0]);
+               " enable                - Enable a bearer\n"
+               " disable               - Disable a bearer\n"
+               " set                   - Set various bearer properties\n"
+               " get                   - Get various bearer properties\n"
+               " list                  - List bearers\n", cmdl->argv[0]);
 }
 
 int cmd_bearer(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,