summaryrefslogtreecommitdiffstats
path: root/ip
diff options
context:
space:
mode:
authornet[shemminger]!shemminger <net[shemminger]!shemminger>2004-07-01 22:15:50 +0000
committernet[shemminger]!shemminger <net[shemminger]!shemminger>2004-07-01 22:15:50 +0000
commitd27b1b5b41659d7b62f2e9f5213ffcefcad9753c (patch)
tree4da5923a1dff7cf543ae2c15557a4fc91fb4816d /ip
parenta185b60475b373f0177e54e11de1cf2a3863dbaa (diff)
Import patch iplink.c.more_ifcfg_opts.diff
(Logical change 1.42)
Diffstat (limited to 'ip')
-rw-r--r--ip/iplink.c36
1 files changed, 34 insertions, 2 deletions
diff --git a/ip/iplink.c b/ip/iplink.c
index 1fc3dcfd..a4132fa5 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -36,9 +36,14 @@ static void usage(void) __attribute__((noreturn));
void iplink_usage(void)
{
- fprintf(stderr, "Usage: ip link set DEVICE { up | down | arp { on | off } |\n");
+ fprintf(stderr, "Usage: ip link set DEVICE { up | down |\n");
+ fprintf(stderr, " arp { on | off } |\n");
fprintf(stderr, " dynamic { on | off } |\n");
- fprintf(stderr, " multicast { on | off } | txqueuelen PACKETS |\n");
+ fprintf(stderr, " multicast { on | off } |\n");
+ fprintf(stderr, " allmulticast { on | off } |\n");
+ fprintf(stderr, " promisc { on | off } |\n");
+ fprintf(stderr, " trailers { on | off } |\n");
+ fprintf(stderr, " txqueuelen PACKETS |\n");
fprintf(stderr, " name NEWNAME |\n");
fprintf(stderr, " address LLADDR | broadcast LLADDR |\n");
fprintf(stderr, " mtu MTU }\n");
@@ -298,6 +303,33 @@ static int do_set(int argc, char **argv)
flags &= ~IFF_MULTICAST;
} else
return on_off("multicast");
+ } else if (strcmp(*argv, "allmulticast") == 0) {
+ NEXT_ARG();
+ mask |= IFF_ALLMULTI;
+ if (strcmp(*argv, "on") == 0) {
+ flags |= IFF_ALLMULTI;
+ } else if (strcmp(*argv, "off") == 0) {
+ flags &= ~IFF_ALLMULTI;
+ } else
+ return on_off("allmulticast");
+ } else if (strcmp(*argv, "promisc") == 0) {
+ NEXT_ARG();
+ mask |= IFF_PROMISC;
+ if (strcmp(*argv, "on") == 0) {
+ flags |= IFF_PROMISC;
+ } else if (strcmp(*argv, "off") == 0) {
+ flags &= ~IFF_PROMISC;
+ } else
+ return on_off("promisc");
+ } else if (strcmp(*argv, "trailers") == 0) {
+ NEXT_ARG();
+ mask |= IFF_NOTRAILERS;
+ if (strcmp(*argv, "off") == 0) {
+ flags |= IFF_NOTRAILERS;
+ } else if (strcmp(*argv, "on") == 0) {
+ flags &= ~IFF_NOTRAILERS;
+ } else
+ return on_off("trailers");
} else if (strcmp(*argv, "arp") == 0) {
NEXT_ARG();
mask |= IFF_NOARP;