-.\" $OpenBSD: ifconfig.8,v 1.313 2018/08/03 11:21:27 halex Exp $
+.\" $OpenBSD: ifconfig.8,v 1.314 2018/08/11 09:18:49 benno Exp $
.\" $NetBSD: ifconfig.8,v 1.11 1996/01/04 21:27:29 pk Exp $
.\" $FreeBSD: ifconfig.8,v 1.16 1998/02/01 07:03:29 steve Exp $
.\"
.\"
.\" @(#)ifconfig.8 8.4 (Berkeley) 6/1/94
.\"
-.Dd $Mdocdate: August 3 2018 $
+.Dd $Mdocdate: August 11 2018 $
.Dt IFCONFIG 8
.Os
.Sh NAME
.Ar wireless-interface
.Op Oo Fl Oc Ns Cm bssid Ar bssid
.Op Oo Fl Oc Ns Cm chan Op Ar n
-.Op Oo Fl Oc Ns Cm join Op Ar id
+.Op Oo Fl Oc Ns Cm join Ar id
+.Op Oo Fl Oc Ns Cm joinlist
.Op Oo Fl Oc Ns Cm nwflag Ar flag
.Op Oo Fl Oc Ns Cm nwid Ar id
.Op Oo Fl Oc Ns Cm nwkey Ar key
.It Cm -chan
Unset the desired channel.
It doesn't affect the channel to be created for IBSS or Host AP mode.
-.It Cm join Op Ar id
+.It Cm join Ar id
Add the network with NWID/ESSID
.Ar id
to the list of auto-join networks.
Information about such networks is retained,
such that configured interfaces can automatically switch to such networks
as necessary.
-If no
-.Ar id
-is specified, show the list of currently configured auto-join networks.
.Pp
The
.Ar id
or
.Cm nwkey
arguments should be specified on the same line.
-.It Cm -join Op Ar id
-Remove all networks,
-or the network with NWID
+.It Cm -join Ar id
+Remove the network with NWID
.Ar id ,
from the list of auto-join networks.
+.It joinlist
+Show the list of currently configured auto-join networks.
+.It -joinlist
+Remove all networks in the list of auto-join networks.
.It Cm nwflag Ar flag
Set specified flag.
The flag name can be either
-/* $OpenBSD: ifconfig.c,v 1.372 2018/08/08 17:26:52 florian Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.373 2018/08/11 09:18:49 benno Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
void setifnwid(const char *, int);
void setifjoin(const char *, int);
void delifjoin(const char *, int);
+void showjoin(const char *, int);
void setifbssid(const char *, int);
void setifnwkey(const char *, int);
void setifwpa(const char *, int);
{ "mtu", NEXTARG, 0, setifmtu },
{ "nwid", NEXTARG, 0, setifnwid },
{ "-nwid", -1, 0, setifnwid },
- { "join", NEXTARG0, 0, setifjoin },
- { "-join", NEXTARG0, 0, delifjoin },
+ { "join", NEXTARG, 0, setifjoin },
+ { "-join", NEXTARG, 0, delifjoin },
+ { "joinlist", NEXTARG0, 0, showjoin },
+ { "-joinlist", -1, 0, delifjoin },
{ "bssid", NEXTARG, 0, setifbssid },
{ "-bssid", -1, 0, setifbssid },
{ "nwkey", NEXTARG, 0, setifnwkey },
struct ieee80211_join join;
int len;
- if (val == NULL) {
- show_join = 1;
- return;
- }
-
if (d != 0) {
/* no network id is especially desired */
memset(&join, 0, sizeof(join));
ieee80211_listnodes();
}
+void
+showjoin(const char *cmd, int val)
+{
+ show_join = 1;
+ return;
+}
+
void
join_status(void)
{