ip: link: Add missing link type help texts

These are basically stubs: The types which lacked their own help text
simply don't accept any options (yet). Still it might be a bit confusing
to users if they are presented with the generic 'ip link' help text
instead of something saying there are no type specific options.

Signed-off-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
Phil Sutter 2017-03-28 23:19:39 +02:00 committed by Stephen Hemminger
parent 8b47135474
commit 9fd7b86c2d
6 changed files with 91 additions and 1 deletions

View File

@ -1,7 +1,8 @@
IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o \
rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o iptuntap.o iptoken.o \
ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o \
ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o iplink_dummy.o \
iplink_ifb.o iplink_nlmon.o iplink_team.o iplink_vcan.o \
iplink_vlan.o link_veth.o link_gre.o iplink_can.o iplink_xdp.o \
iplink_macvlan.o ipl2tp.o link_vti.o link_vti6.o \
iplink_vxlan.o tcp_metrics.o iplink_ipoib.o ipnetconf.o link_ip6tnl.o \

16
ip/iplink_dummy.c Normal file
View File

@ -0,0 +1,16 @@
#include <stdio.h>
#include <stdlib.h>
#include "utils.h"
#include "ip_common.h"
static void dummy_print_help(struct link_util *lu,
int argc, char **argv, FILE *f)
{
fprintf(f, "Usage: ... dummy\n");
}
struct link_util dummy_link_util = {
.id = "dummy",
.print_help = dummy_print_help,
};

16
ip/iplink_ifb.c Normal file
View File

@ -0,0 +1,16 @@
#include <stdio.h>
#include <stdlib.h>
#include "utils.h"
#include "ip_common.h"
static void ifb_print_help(struct link_util *lu,
int argc, char **argv, FILE *f)
{
fprintf(f, "Usage: ... ifb\n");
}
struct link_util ifb_link_util = {
.id = "ifb",
.print_help = ifb_print_help,
};

16
ip/iplink_nlmon.c Normal file
View File

@ -0,0 +1,16 @@
#include <stdio.h>
#include <stdlib.h>
#include "utils.h"
#include "ip_common.h"
static void nlmon_print_help(struct link_util *lu,
int argc, char **argv, FILE *f)
{
fprintf(f, "Usage: ... nlmon\n");
}
struct link_util nlmon_link_util = {
.id = "nlmon",
.print_help = nlmon_print_help,
};

25
ip/iplink_team.c Normal file
View File

@ -0,0 +1,25 @@
#include <stdio.h>
#include <stdlib.h>
#include "utils.h"
#include "ip_common.h"
static void team_print_help(struct link_util *lu,
int argc, char **argv, FILE *f)
{
fprintf(f, "Usage: ... team\n");
}
static void team_slave_print_help(struct link_util *lu,
int argc, char **argv, FILE *f)
{
fprintf(f, "Usage: ... team_slave\n");
}
struct link_util team_link_util = {
.id = "team",
.print_help = team_print_help,
}, team_slave_link_util = {
.id = "team_slave",
.print_help = team_slave_print_help,
};

16
ip/iplink_vcan.c Normal file
View File

@ -0,0 +1,16 @@
#include <stdio.h>
#include <stdlib.h>
#include "utils.h"
#include "ip_common.h"
static void vcan_print_help(struct link_util *lu,
int argc, char **argv, FILE *f)
{
fprintf(f, "Usage: ... vcan\n");
}
struct link_util vcan_link_util = {
.id = "vcan",
.print_help = vcan_print_help,
};