[pkg-wpa-devel] r1361 - in /iw/trunk: .gitignore Makefile debian/changelog ibss.c info.c interface.c iw.c iw.h nl80211.h util.c version.sh
kelmo-guest at users.alioth.debian.org
kelmo-guest at users.alioth.debian.org
Sat Apr 25 16:26:41 UTC 2009
Author: kelmo-guest
Date: Sat Apr 25 16:26:41 2009
New Revision: 1361
URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=1361
Log:
New upstream release.
Added:
iw/trunk/ibss.c
- copied unchanged from r1360, iw/branches/upstream/current/ibss.c
Modified:
iw/trunk/.gitignore
iw/trunk/Makefile
iw/trunk/debian/changelog
iw/trunk/info.c
iw/trunk/interface.c
iw/trunk/iw.c
iw/trunk/iw.h
iw/trunk/nl80211.h
iw/trunk/util.c
iw/trunk/version.sh
Modified: iw/trunk/.gitignore
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/.gitignore?rev=1361&op=diff
==============================================================================
--- iw/trunk/.gitignore (original)
+++ iw/trunk/.gitignore Sat Apr 25 16:26:41 2009
@@ -2,6 +2,6 @@
*~
*.o
.config
-version.h
+version.c
iw.8.gz
*-stamp
Modified: iw/trunk/Makefile
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/Makefile?rev=1361&op=diff
==============================================================================
--- iw/trunk/Makefile (original)
+++ iw/trunk/Makefile Sat Apr 25 16:26:41 2009
@@ -13,7 +13,7 @@
CFLAGS ?= -O2 -g
CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
-OBJS = iw.o genl.o info.o phy.o interface.o station.o util.o mesh.o mpath.o scan.o reg.o
+OBJS = iw.o genl.o info.o phy.o interface.o ibss.o station.o util.o mesh.o mpath.o scan.o reg.o version.o
ALL = iw
NL1FOUND := $(shell pkg-config --atleast-version=1 libnl-1 && echo Y)
@@ -55,11 +55,15 @@
endif
endif
-version.h: version.sh
- @$(NQ) ' GEN version.h'
- $(Q)./version.sh
-%.o: %.c iw.h version.h nl80211.h
+VERSION_OBJS := $(filter-out version.o, $(OBJS))
+
+version.c: version.sh $(patsubst %.o,%.c,$(VERSION_OBJS)) nl80211.h iw.h Makefile \
+ $(wildcard .git/index .git/refs/tags)
+ @$(NQ) ' GEN ' $@
+ $(Q)./version.sh $@
+
+%.o: %.c iw.h nl80211.h
@$(NQ) ' CC ' $@
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
@@ -83,4 +87,4 @@
$(Q)$(INSTALL) -m 644 -t $(DESTDIR)$(MANDIR)/man8/ iw.8.gz
clean:
- $(Q)rm -f iw *.o *~ *.gz version.h *-stamp
+ $(Q)rm -f iw *.o *~ *.gz version.c *-stamp
Modified: iw/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/debian/changelog?rev=1361&op=diff
==============================================================================
--- iw/trunk/debian/changelog (original)
+++ iw/trunk/debian/changelog Sat Apr 25 16:26:41 2009
@@ -1,8 +1,8 @@
-iw (0.9.12-1) unstable; urgency=low
+iw (0.9.13-1) unstable; urgency=low
* New upstream release.
- -- Kel Modderman <kel at otaku42.de> Sat, 18 Apr 2009 22:25:58 +1000
+ -- Kel Modderman <kel at otaku42.de> Sun, 26 Apr 2009 02:26:16 +1000
iw (0.9.11-1) unstable; urgency=low
Modified: iw/trunk/info.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/info.c?rev=1361&op=diff
==============================================================================
--- iw/trunk/info.c (original)
+++ iw/trunk/info.c Sat Apr 25 16:26:41 2009
@@ -268,3 +268,4 @@
}
TOPLEVEL(info, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_PHY, handle_info);
TOPLEVEL(list, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info);
+TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info);
Modified: iw/trunk/interface.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/interface.c?rev=1361&op=diff
==============================================================================
--- iw/trunk/interface.c (original)
+++ iw/trunk/interface.c Sat Apr 25 16:26:41 2009
@@ -1,6 +1,7 @@
#include <net/if.h>
#include <errno.h>
#include <string.h>
+#include <stdbool.h>
#include <netlink/genl/genl.h>
#include <netlink/genl/family.h>
@@ -70,28 +71,29 @@
return err;
}
-/* return 0 if not found, 1 if ok, -1 on error */
-static int get_if_type(int *argc, char ***argv, enum nl80211_iftype *type)
+/* return 0 if ok, internal error otherwise */
+static int get_if_type(int *argc, char ***argv, enum nl80211_iftype *type,
+ bool need_type)
{
char *tpstr;
- if (*argc < 2)
- return 0;
-
- if (strcmp((*argv)[0], "type"))
- return 0;
-
- tpstr = (*argv)[1];
- *argc -= 2;
- *argv += 2;
+ if (*argc < 1 + !!need_type)
+ return 1;
+
+ if (need_type && strcmp((*argv)[0], "type"))
+ return 1;
+
+ tpstr = (*argv)[!!need_type];
+ *argc -= 1 + !!need_type;
+ *argv += 1 + !!need_type;
if (strcmp(tpstr, "adhoc") == 0 ||
strcmp(tpstr, "ibss") == 0) {
*type = NL80211_IFTYPE_ADHOC;
- return 1;
+ return 0;
} else if (strcmp(tpstr, "monitor") == 0) {
*type = NL80211_IFTYPE_MONITOR;
- return 1;
+ return 0;
} else if (strcmp(tpstr, "master") == 0) {
*type = NL80211_IFTYPE_UNSPECIFIED;
fprintf(stderr, "See http://wireless.kernel.org/RTFM-AP.\n");
@@ -102,25 +104,26 @@
return 2;
} else if (strcmp(tpstr, "__ap") == 0) {
*type = NL80211_IFTYPE_AP;
- return 1;
+ return 0;
} else if (strcmp(tpstr, "__ap_vlan") == 0) {
*type = NL80211_IFTYPE_AP_VLAN;
- return 1;
+ return 0;
} else if (strcmp(tpstr, "wds") == 0) {
*type = NL80211_IFTYPE_WDS;
- return 1;
- } else if (strcmp(tpstr, "station") == 0) {
+ return 0;
+ } else if (strcmp(tpstr, "managed") == 0 ||
+ strcmp(tpstr, "mgd") == 0 ||
+ strcmp(tpstr, "station") == 0) {
*type = NL80211_IFTYPE_STATION;
- return 1;
+ return 0;
} else if (strcmp(tpstr, "mp") == 0 ||
- strcmp(tpstr, "mesh") == 0) {
+ strcmp(tpstr, "mesh") == 0) {
*type = NL80211_IFTYPE_MESH_POINT;
- return 1;
- }
-
+ return 0;
+ }
fprintf(stderr, "invalid interface type %s\n", tpstr);
- return -1;
+ return 2;
}
static int handle_interface_add(struct nl80211_state *state,
@@ -140,8 +143,8 @@
argc--;
argv++;
- tpset = get_if_type(&argc, &argv, &type);
- if (tpset != 1)
+ tpset = get_if_type(&argc, &argv, &type, true);
+ if (tpset)
return tpset;
if (argc) {
@@ -170,8 +173,7 @@
return 1;
NLA_PUT_STRING(msg, NL80211_ATTR_IFNAME, name);
- if (tpset)
- NLA_PUT_U32(msg, NL80211_ATTR_IFTYPE, type);
+ NLA_PUT_U32(msg, NL80211_ATTR_IFTYPE, type);
if (mesh_id)
NLA_PUT(msg, NL80211_ATTR_MESH_ID, strlen(mesh_id), mesh_id);
@@ -198,16 +200,26 @@
{
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
struct nlattr *tb_msg[NL80211_ATTR_MAX + 1];
+ unsigned int *wiphy = arg;
+ const char *indent = "";
nla_parse(tb_msg, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
genlmsg_attrlen(gnlh, 0), NULL);
+ if (wiphy && tb_msg[NL80211_ATTR_WIPHY]) {
+ unsigned int thiswiphy = nla_get_u32(tb_msg[NL80211_ATTR_WIPHY]);
+ indent = "\t";
+ if (*wiphy != thiswiphy)
+ printf("phy#%d\n", thiswiphy);
+ *wiphy = thiswiphy;
+ }
+
if (tb_msg[NL80211_ATTR_IFNAME])
- printf("Interface %s\n", nla_get_string(tb_msg[NL80211_ATTR_IFNAME]));
+ printf("%sInterface %s\n", indent, nla_get_string(tb_msg[NL80211_ATTR_IFNAME]));
if (tb_msg[NL80211_ATTR_IFINDEX])
- printf("\tifindex %d\n", nla_get_u32(tb_msg[NL80211_ATTR_IFINDEX]));
+ printf("%s\tifindex %d\n", indent, nla_get_u32(tb_msg[NL80211_ATTR_IFINDEX]));
if (tb_msg[NL80211_ATTR_IFTYPE])
- printf("\ttype %s\n", iftype_name(nla_get_u32(tb_msg[NL80211_ATTR_IFTYPE])));
+ printf("%s\ttype %s\n", indent, iftype_name(nla_get_u32(tb_msg[NL80211_ATTR_IFTYPE])));
return NL_SKIP;
}
@@ -270,3 +282,40 @@
}
COMMAND(set, meshid, "<meshid>",
NL80211_CMD_SET_INTERFACE, 0, CIB_NETDEV, handle_interface_meshid);
+
+static unsigned int dev_dump_wiphy;
+
+static int handle_dev_dump(struct nl80211_state *state,
+ struct nl_cb *cb,
+ struct nl_msg *msg,
+ int argc, char **argv)
+{
+ dev_dump_wiphy = -1;
+ nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_iface_handler, &dev_dump_wiphy);
+ return 0;
+}
+TOPLEVEL(dev, NULL, NL80211_CMD_GET_INTERFACE, NLM_F_DUMP, CIB_NONE, handle_dev_dump);
+
+static int handle_interface_type(struct nl80211_state *state,
+ struct nl_cb *cb,
+ struct nl_msg *msg,
+ int argc, char **argv)
+{
+ enum nl80211_iftype type;
+ int tpset;
+
+ tpset = get_if_type(&argc, &argv, &type, false);
+ if (tpset)
+ return tpset;
+
+ if (argc)
+ return 1;
+
+ NLA_PUT_U32(msg, NL80211_ATTR_IFTYPE, type);
+
+ return 0;
+ nla_put_failure:
+ return -ENOBUFS;
+}
+COMMAND(set, type, "<type>",
+ NL80211_CMD_SET_INTERFACE, 0, CIB_NETDEV, handle_interface_type);
Modified: iw/trunk/iw.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/iw.c?rev=1361&op=diff
==============================================================================
--- iw/trunk/iw.c (original)
+++ iw/trunk/iw.c Sat Apr 25 16:26:41 2009
@@ -21,7 +21,6 @@
#include "nl80211.h"
#include "iw.h"
-#include "version.h"
#ifndef CONFIG_LIBNL20
/* libnl 2.0 compatibility code */
@@ -94,8 +93,8 @@
nl_socket_free(state->nl_sock);
}
-__COMMAND(NULL, NULL, NULL, 0, 0, 0, CIB_NONE, NULL);
-__COMMAND(NULL, NULL, NULL, 1, 0, 0, CIB_NONE, NULL);
+__COMMAND(NULL, NULL, "", NULL, 0, 0, 0, CIB_NONE, NULL);
+__COMMAND(NULL, NULL, "", NULL, 1, 0, 0, CIB_NONE, NULL);
static int cmd_size;
@@ -136,7 +135,7 @@
static void version(void)
{
- printf("iw version " IW_VERSION "\n");
+ printf("iw version %s\n", iw_version);
}
static int phy_lookup(char *name)
@@ -334,6 +333,7 @@
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
struct nlattr *tb[NL80211_ATTR_MAX + 1];
char ifname[100];
+ char macbuf[6*3];
__u8 reg_type;
nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
@@ -391,6 +391,12 @@
printf("\n");
break;
+ case NL80211_CMD_JOIN_IBSS:
+ if_indextoname(nla_get_u32(tb[NL80211_ATTR_IFINDEX]), ifname);
+ mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
+ printf("IBSS %s joined on %s (phy #%d)\n",
+ macbuf, ifname, nla_get_u32(tb[NL80211_ATTR_WIPHY]));
+ break;
default:
printf("unknown event: %d\n", gnlh->cmd);
break;
@@ -457,6 +463,14 @@
return ret;
}
+ /* MLME multicast group */
+ mcid = nl_get_multicast_id(state->nl_sock, "nl80211", "mlme");
+ if (mcid >= 0) {
+ ret = nl_socket_add_membership(state->nl_sock, mcid);
+ if (ret)
+ return ret;
+ }
+
/* no sequence checking for multicast messages */
nl_cb_set(cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM, no_seq_check, NULL);
@@ -485,8 +499,8 @@
const char *argv0;
/* calculate command size including padding */
- cmd_size = abs((long)&__cmd_NULL_1_CIB_NONE_0
- - (long)&__cmd_NULL_0_CIB_NONE_0);
+ cmd_size = abs((long)&__cmd_NULL_NULL_1_CIB_NONE_0
+ - (long)&__cmd_NULL_NULL_0_CIB_NONE_0);
/* strip off self */
argc--;
argv0 = *argv++;
@@ -516,11 +530,11 @@
err = 1;
else
err = listen_events(&nlstate, 0, NULL);
- } else if (strcmp(*argv, "dev") == 0) {
+ } else if (strcmp(*argv, "dev") == 0 && argc > 1) {
argc--;
argv++;
err = handle_cmd(&nlstate, II_NETDEV, argc, argv);
- } else if (strncmp(*argv, "phy", 3) == 0) {
+ } else if (strncmp(*argv, "phy", 3) == 0 && argc > 1) {
if (strlen(*argv) == 3) {
argc--;
argv++;
Modified: iw/trunk/iw.h
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/iw.h?rev=1361&op=diff
==============================================================================
--- iw/trunk/iw.h (original)
+++ iw/trunk/iw.h Sat Apr 25 16:26:41 2009
@@ -54,20 +54,21 @@
#define ARRAY_SIZE(ar) (sizeof(ar)/sizeof(ar[0]))
-#define __COMMAND(sect, name, args, nlcmd, flags, hidden, idby, handler)\
+#define __COMMAND(sect, symname, name, args, nlcmd, flags, hidden, idby, handler)\
static const struct cmd \
- __cmd_ ## handler ## _ ## nlcmd ## _ ## idby ## _ ## hidden \
+ __cmd ## _ ## symname ## _ ## handler ## _ ## nlcmd ## _ ## idby ## _ ## hidden\
__attribute__((used)) __attribute__((section("__cmd"))) \
= { sect, name, args, nlcmd, flags, hidden, idby, handler }
#define COMMAND(section, name, args, cmd, flags, idby, handler) \
- __COMMAND(#section, #name, args, cmd, flags, 0, idby, handler)
+ __COMMAND(#section, name, #name, args, cmd, flags, 0, idby, handler)
#define HIDDEN(section, name, args, cmd, flags, idby, handler) \
- __COMMAND(#section, #name, args, cmd, flags, 1, idby, handler)
+ __COMMAND(#section, name, #name, args, cmd, flags, 1, idby, handler)
#define TOPLEVEL(name, args, cmd, flags, idby, handler) \
- __COMMAND(NULL, #name, args, cmd, flags, 0, idby, handler)
+ __COMMAND(NULL, name, #name, args, cmd, flags, 0, idby, handler)
extern struct cmd __start___cmd;
extern struct cmd __stop___cmd;
+extern const char iw_version[];
int handle_cmd(struct nl80211_state *state, enum id_input idby,
int argc, char **argv);
Modified: iw/trunk/nl80211.h
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/nl80211.h?rev=1361&op=diff
==============================================================================
--- iw/trunk/nl80211.h (original)
+++ iw/trunk/nl80211.h Sat Apr 25 16:26:41 2009
@@ -7,7 +7,7 @@
* Copyright 2008 Michael Wu <flamingice at sourmilk.net>
* Copyright 2008 Luis Carlos Cobo <luisca at cozybit.com>
* Copyright 2008 Michael Buesch <mb at bu3sch.de>
- * Copyright 2008 Luis R. Rodriguez <lrodriguez at atheros.com>
+ * Copyright 2008, 2009 Luis R. Rodriguez <lrodriguez at atheros.com>
* Copyright 2008 Jouni Malinen <jouni.malinen at atheros.com>
* Copyright 2008 Colin McCabe <colin at cozybit.com>
*
@@ -46,8 +46,10 @@
* to get a list of all present wiphys.
* @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or
* %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME,
- * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ, and/or
- * %NL80211_ATTR_WIPHY_CHANNEL_TYPE.
+ * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ,
+ * %NL80211_ATTR_WIPHY_CHANNEL_TYPE, %NL80211_ATTR_WIPHY_RETRY_SHORT,
+ * %NL80211_ATTR_WIPHY_RETRY_LONG, %NL80211_ATTR_WIPHY_FRAG_THRESHOLD,
+ * and/or %NL80211_ATTR_WIPHY_RTS_THRESHOLD.
* @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request
* or rename notification. Has attributes %NL80211_ATTR_WIPHY and
* %NL80211_ATTR_WIPHY_NAME.
@@ -142,6 +144,12 @@
* %NL80211_ATTR_IE. If the command succeeds, the requested data will be
* added to all specified management frames generated by
* kernel/firmware/driver.
+ * Note: This command has been removed and it is only reserved at this
+ * point to avoid re-using existing command number. The functionality this
+ * command was planned for has been provided with cleaner design with the
+ * option to specify additional IEs in NL80211_CMD_TRIGGER_SCAN,
+ * NL80211_CMD_AUTHENTICATE, NL80211_CMD_ASSOCIATE,
+ * NL80211_CMD_DEAUTHENTICATE, and NL80211_CMD_DISASSOCIATE.
*
* @NL80211_CMD_GET_SCAN: get scan results
* @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters
@@ -160,6 +168,71 @@
* set (%NL80211_ATTR_REG_TYPE), if the type of regulatory domain is
* %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on
* to (%NL80211_ATTR_REG_ALPHA2).
+ * @NL80211_CMD_REG_BEACON_HINT: indicates to userspace that an AP beacon
+ * has been found while world roaming thus enabling active scan or
+ * any mode of operation that initiates TX (beacons) on a channel
+ * where we would not have been able to do either before. As an example
+ * if you are world roaming (regulatory domain set to world or if your
+ * driver is using a custom world roaming regulatory domain) and while
+ * doing a passive scan on the 5 GHz band you find an AP there (if not
+ * on a DFS channel) you will now be able to actively scan for that AP
+ * or use AP mode on your card on that same channel. Note that this will
+ * never be used for channels 1-11 on the 2 GHz band as they are always
+ * enabled world wide. This beacon hint is only sent if your device had
+ * either disabled active scanning or beaconing on a channel. We send to
+ * userspace the wiphy on which we removed a restriction from
+ * (%NL80211_ATTR_WIPHY) and the channel on which this occurred
+ * before (%NL80211_ATTR_FREQ_BEFORE) and after (%NL80211_ATTR_FREQ_AFTER)
+ * the beacon hint was processed.
+ *
+ * @NL80211_CMD_AUTHENTICATE: authentication request and notification.
+ * This command is used both as a command (request to authenticate) and
+ * as an event on the "mlme" multicast group indicating completion of the
+ * authentication process.
+ * When used as a command, %NL80211_ATTR_IFINDEX is used to identify the
+ * interface. %NL80211_ATTR_MAC is used to specify PeerSTAAddress (and
+ * BSSID in case of station mode). %NL80211_ATTR_SSID is used to specify
+ * the SSID (mainly for association, but is included in authentication
+ * request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ is used
+ * to specify the frequence of the channel in MHz. %NL80211_ATTR_AUTH_TYPE
+ * is used to specify the authentication type. %NL80211_ATTR_IE is used to
+ * define IEs (VendorSpecificInfo, but also including RSN IE and FT IEs)
+ * to be added to the frame.
+ * When used as an event, this reports reception of an Authentication
+ * frame in station and IBSS modes when the local MLME processed the
+ * frame, i.e., it was for the local STA and was received in correct
+ * state. This is similar to MLME-AUTHENTICATE.confirm primitive in the
+ * MLME SAP interface (kernel providing MLME, userspace SME). The
+ * included NL80211_ATTR_FRAME attribute contains the management frame
+ * (including both the header and frame body, but not FCS).
+ * @NL80211_CMD_ASSOCIATE: association request and notification; like
+ * NL80211_CMD_AUTHENTICATE but for Association and Reassociation
+ * (similar to MLME-ASSOCIATE.request, MLME-REASSOCIATE.request,
+ * MLME-ASSOCIATE.confirm or MLME-REASSOCIATE.confirm primitives).
+ * @NL80211_CMD_DEAUTHENTICATE: deauthentication request and notification; like
+ * NL80211_CMD_AUTHENTICATE but for Deauthentication frames (similar to
+ * MLME-DEAUTHENTICATION.request and MLME-DEAUTHENTICATE.indication
+ * primitives).
+ * @NL80211_CMD_DISASSOCIATE: disassociation request and notification; like
+ * NL80211_CMD_AUTHENTICATE but for Disassociation frames (similar to
+ * MLME-DISASSOCIATE.request and MLME-DISASSOCIATE.indication primitives).
+ *
+ * @NL80211_CMD_MICHAEL_MIC_FAILURE: notification of a locally detected Michael
+ * MIC (part of TKIP) failure; sent on the "mlme" multicast group; the
+ * event includes %NL80211_ATTR_MAC to describe the source MAC address of
+ * the frame with invalid MIC, %NL80211_ATTR_KEY_TYPE to show the key
+ * type, %NL80211_ATTR_KEY_IDX to indicate the key identifier, and
+ * %NL80211_ATTR_KEY_SEQ to indicate the TSC value of the frame; this
+ * event matches with MLME-MICHAELMICFAILURE.indication() primitive
+ *
+ * @NL80211_CMD_JOIN_IBSS: Join a new IBSS -- given at least an SSID and a
+ * FREQ attribute (for the initial frequency if no peer can be found)
+ * and optionally a MAC (as BSSID) and FREQ_FIXED attribute if those
+ * should be fixed rather than automatically determined. Can only be
+ * executed on a network interface that is UP, and fixed BSSID/FREQ
+ * may be rejected.
+ * @NL80211_CMD_LEAVE_IBSS: Leave the IBSS -- no special arguments, the IBSS is
+ * determined by the network interface.
*
* @NL80211_CMD_MAX: highest used command number
* @__NL80211_CMD_AFTER_LAST: internal use
@@ -206,7 +279,7 @@
NL80211_CMD_GET_MESH_PARAMS,
NL80211_CMD_SET_MESH_PARAMS,
- NL80211_CMD_SET_MGMT_EXTRA_IE,
+ NL80211_CMD_SET_MGMT_EXTRA_IE /* reserved; not used */,
NL80211_CMD_GET_REG,
@@ -217,6 +290,18 @@
NL80211_CMD_REG_CHANGE,
+ NL80211_CMD_AUTHENTICATE,
+ NL80211_CMD_ASSOCIATE,
+ NL80211_CMD_DEAUTHENTICATE,
+ NL80211_CMD_DISASSOCIATE,
+
+ NL80211_CMD_MICHAEL_MIC_FAILURE,
+
+ NL80211_CMD_REG_BEACON_HINT,
+
+ NL80211_CMD_JOIN_IBSS,
+ NL80211_CMD_LEAVE_IBSS,
+
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@@ -230,8 +315,12 @@
*/
#define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS
#define NL80211_CMD_SET_MGMT_EXTRA_IE NL80211_CMD_SET_MGMT_EXTRA_IE
-
#define NL80211_CMD_REG_CHANGE NL80211_CMD_REG_CHANGE
+#define NL80211_CMD_AUTHENTICATE NL80211_CMD_AUTHENTICATE
+#define NL80211_CMD_ASSOCIATE NL80211_CMD_ASSOCIATE
+#define NL80211_CMD_DEAUTHENTICATE NL80211_CMD_DEAUTHENTICATE
+#define NL80211_CMD_DISASSOCIATE NL80211_CMD_DISASSOCIATE
+#define NL80211_CMD_REG_BEACON_HINT NL80211_CMD_REG_BEACON_HINT
/**
* enum nl80211_attrs - nl80211 netlink attributes
@@ -250,6 +339,18 @@
* NL80211_CHAN_HT20 = HT20 only
* NL80211_CHAN_HT40MINUS = secondary channel is below the primary channel
* NL80211_CHAN_HT40PLUS = secondary channel is above the primary channel
+ * @NL80211_ATTR_WIPHY_RETRY_SHORT: TX retry limit for frames whose length is
+ * less than or equal to the RTS threshold; allowed range: 1..255;
+ * dot11ShortRetryLimit; u8
+ * @NL80211_ATTR_WIPHY_RETRY_LONG: TX retry limit for frames whose length is
+ * greater than the RTS threshold; allowed range: 1..255;
+ * dot11ShortLongLimit; u8
+ * @NL80211_ATTR_WIPHY_FRAG_THRESHOLD: fragmentation threshold, i.e., maximum
+ * length in octets for frames; allowed range: 256..8000, disable
+ * fragmentation with (u32)-1; dot11FragmentationThreshold; u32
+ * @NL80211_ATTR_WIPHY_RTS_THRESHOLD: RTS threshold (TX frames with length
+ * larger than or equal to this use RTS/CTS handshake); allowed range:
+ * 0..65536, disable with (u32)-1; dot11RTSThreshold; u32
*
* @NL80211_ATTR_IFINDEX: network interface index of the device to operate on
* @NL80211_ATTR_IFNAME: network interface name
@@ -334,6 +435,8 @@
*
* @NL80211_ATTR_MAX_NUM_SCAN_SSIDS: number of SSIDs you can scan with
* a single scan request, a wiphy attribute.
+ * @NL80211_ATTR_MAX_SCAN_IE_LEN: maximum length of information elements
+ * that can be added to a scan request
*
* @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz)
* @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive
@@ -349,6 +452,39 @@
* @NL80211_ATTR_REG_TYPE: indicates the type of the regulatory domain currently
* set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*)
*
+ * @NL80211_ATTR_SUPPORTED_COMMANDS: wiphy attribute that specifies
+ * an array of command numbers (i.e. a mapping index to command number)
+ * that the driver for the given wiphy supports.
+ *
+ * @NL80211_ATTR_FRAME: frame data (binary attribute), including frame header
+ * and body, but not FCS; used, e.g., with NL80211_CMD_AUTHENTICATE and
+ * NL80211_CMD_ASSOCIATE events
+ * @NL80211_ATTR_SSID: SSID (binary attribute, 0..32 octets)
+ * @NL80211_ATTR_AUTH_TYPE: AuthenticationType, see &enum nl80211_auth_type,
+ * represented as a u32
+ * @NL80211_ATTR_REASON_CODE: ReasonCode for %NL80211_CMD_DEAUTHENTICATE and
+ * %NL80211_CMD_DISASSOCIATE, u16
+ *
+ * @NL80211_ATTR_KEY_TYPE: Key Type, see &enum nl80211_key_type, represented as
+ * a u32
+ *
+ * @NL80211_ATTR_FREQ_BEFORE: A channel which has suffered a regulatory change
+ * due to considerations from a beacon hint. This attribute reflects
+ * the state of the channel _before_ the beacon hint processing. This
+ * attributes consists of a nested attribute containing
+ * NL80211_FREQUENCY_ATTR_*
+ * @NL80211_ATTR_FREQ_AFTER: A channel which has suffered a regulatory change
+ * due to considerations from a beacon hint. This attribute reflects
+ * the state of the channel _after_ the beacon hint processing. This
+ * attributes consists of a nested attribute containing
+ * NL80211_FREQUENCY_ATTR_*
+ *
+ * @NL80211_ATTR_CIPHER_SUITES: a set of u32 values indicating the supported
+ * cipher suites
+ *
+ * @NL80211_ATTR_FREQ_FIXED: a flag indicating the IBSS should not try to look
+ * for other networks on different channels
+ *
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -425,6 +561,29 @@
NL80211_ATTR_REG_INITIATOR,
NL80211_ATTR_REG_TYPE,
+
+ NL80211_ATTR_SUPPORTED_COMMANDS,
+
+ NL80211_ATTR_FRAME,
+ NL80211_ATTR_SSID,
+ NL80211_ATTR_AUTH_TYPE,
+ NL80211_ATTR_REASON_CODE,
+
+ NL80211_ATTR_KEY_TYPE,
+
+ NL80211_ATTR_MAX_SCAN_IE_LEN,
+ NL80211_ATTR_CIPHER_SUITES,
+
+ NL80211_ATTR_FREQ_BEFORE,
+ NL80211_ATTR_FREQ_AFTER,
+
+ NL80211_ATTR_FREQ_FIXED,
+
+
+ NL80211_ATTR_WIPHY_RETRY_SHORT,
+ NL80211_ATTR_WIPHY_RETRY_LONG,
+ NL80211_ATTR_WIPHY_FRAG_THRESHOLD,
+ NL80211_ATTR_WIPHY_RTS_THRESHOLD,
/* add attributes here, update the policy in nl80211.c */
@@ -445,6 +604,10 @@
#define NL80211_ATTR_IE NL80211_ATTR_IE
#define NL80211_ATTR_REG_INITIATOR NL80211_ATTR_REG_INITIATOR
#define NL80211_ATTR_REG_TYPE NL80211_ATTR_REG_TYPE
+#define NL80211_ATTR_FRAME NL80211_ATTR_FRAME
+#define NL80211_ATTR_SSID NL80211_ATTR_SSID
+#define NL80211_ATTR_AUTH_TYPE NL80211_ATTR_AUTH_TYPE
+#define NL80211_ATTR_REASON_CODE NL80211_ATTR_REASON_CODE
#define NL80211_MAX_SUPP_RATES 32
#define NL80211_MAX_SUPP_REG_RULES 32
@@ -978,4 +1141,31 @@
NL80211_BSS_MAX = __NL80211_BSS_AFTER_LAST - 1
};
+/**
+ * enum nl80211_auth_type - AuthenticationType
+ *
+ * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication
+ * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only)
+ * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r)
+ * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP)
+ */
+enum nl80211_auth_type {
+ NL80211_AUTHTYPE_OPEN_SYSTEM,
+ NL80211_AUTHTYPE_SHARED_KEY,
+ NL80211_AUTHTYPE_FT,
+ NL80211_AUTHTYPE_NETWORK_EAP,
+};
+
+/**
+ * enum nl80211_key_type - Key Type
+ * @NL80211_KEYTYPE_GROUP: Group (broadcast/multicast) key
+ * @NL80211_KEYTYPE_PAIRWISE: Pairwise (unicast/individual) key
+ * @NL80211_KEYTYPE_PEERKEY: PeerKey (DLS)
+ */
+enum nl80211_key_type {
+ NL80211_KEYTYPE_GROUP,
+ NL80211_KEYTYPE_PAIRWISE,
+ NL80211_KEYTYPE_PEERKEY,
+};
+
#endif /* __LINUX_NL80211_H */
Modified: iw/trunk/util.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/util.c?rev=1361&op=diff
==============================================================================
--- iw/trunk/util.c (original)
+++ iw/trunk/util.c Sat Apr 25 16:26:41 2009
@@ -48,11 +48,11 @@
static const char *ifmodes[NL80211_IFTYPE_MAX + 1] = {
"unspecified",
"IBSS",
- "Station",
+ "managed",
"AP",
- "AP(VLAN)",
+ "AP/VLAN",
"WDS",
- "Monitor",
+ "monitor",
"mesh point"
};
Modified: iw/trunk/version.sh
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/version.sh?rev=1361&op=diff
==============================================================================
--- iw/trunk/version.sh (original)
+++ iw/trunk/version.sh Sat Apr 25 16:26:41 2009
@@ -1,7 +1,7 @@
#!/bin/sh
-VERSION="0.9.12"
-OUT="version.h"
+VERSION="0.9.13"
+OUT="$1"
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
git update-index --refresh --unmerged > /dev/null
@@ -10,13 +10,14 @@
# on git builds check that the version number above
# is correct...
[ "${descr%%-*}" = "v$VERSION" ] || exit 2
-
- echo -n '#define IW_VERSION "' > "$OUT"
- echo -n "${descr#v}" >> "$OUT"
+
+ echo -n 'const char iw_version[] = "' > "$OUT"
+ v="${descr#v}"
if git diff-index --name-only HEAD | read dummy ; then
- echo -n "-dirty" >> "$OUT"
+ v="$v"-dirty
fi
- echo '"' >> "$OUT"
else
-echo "#define IW_VERSION \"$VERSION-nogit\"" > "$OUT"
+ v="$VERSION"
fi
+
+echo "const char iw_version[] = \"$v\";" > "$OUT"
More information about the Pkg-wpa-devel
mailing list