summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ppp/command.c')
-rw-r--r--usr.sbin/ppp/command.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index cc23518..0468b32 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -184,6 +184,7 @@ static int DeleteCommand(struct cmdargs const *);
static int NegotiateCommand(struct cmdargs const *);
static int ClearCommand(struct cmdargs const *);
static int RunListCommand(struct cmdargs const *);
+static int IfaceNameCommand(struct cmdargs const *arg);
static int IfaceAddCommand(struct cmdargs const *);
static int IfaceDeleteCommand(struct cmdargs const *);
static int IfaceClearCommand(struct cmdargs const *);
@@ -823,6 +824,10 @@ static struct cmdtab const IfaceCommands[] =
"Delete iface address", "iface delete addr", (void *)1},
{NULL, "delete!", IfaceDeleteCommand, LOCAL_AUTH,
"Delete iface address", "iface delete addr", (void *)1},
+ {"name", NULL, IfaceNameCommand, LOCAL_AUTH,
+ "Set iface name", "iface name name", NULL},
+ {"description", NULL, iface_Descr, LOCAL_AUTH,
+ "Set iface description", "iface description text", NULL},
{"show", NULL, iface_Show, LOCAL_AUTH,
"Show iface address(es)", "iface show", NULL},
{"help", "?", HelpCommand, LOCAL_AUTH | LOCAL_NO_AUTH,
@@ -3176,6 +3181,21 @@ RunListCommand(struct cmdargs const *arg)
}
static int
+IfaceNameCommand(struct cmdargs const *arg)
+{
+ int n = arg->argn;
+
+ if (arg->argc != n + 1)
+ return -1;
+
+ if (!iface_Name(arg->bundle->iface, arg->argv[n]))
+ return 1;
+
+ log_SetTun(arg->bundle->unit, arg->bundle->iface->name);
+ return 0;
+}
+
+static int
IfaceAddCommand(struct cmdargs const *arg)
{
struct ncpaddr peer, addr;
OpenPOWER on IntegriCloud