#include <stdbool.h>
#include <errno.h>
-#include <net/if.h>
#include <strings.h>
#include <sys/param.h>
#include <sys/stat.h>
#include "iw.h"
static int handle_name(struct nl80211_state *state,
- struct nl_cb *cb,
struct nl_msg *msg,
int argc, char **argv,
enum id_input id)
{ .name = "160", .val = NL80211_CHAN_WIDTH_160, },
};
uint32_t freq;
- int i, bwval = NL80211_CHAN_WIDTH_20_NOHT;
+ unsigned int i, bwval = NL80211_CHAN_WIDTH_20_NOHT;
char *end;
if (argc < 1)
};
unsigned int htval = NL80211_CHAN_NO_HT;
unsigned int freq;
- int i;
+ unsigned int i;
if (!argc || argc > 4)
return 1;
return -ENOBUFS;
}
-static int handle_freq(struct nl80211_state *state,
- struct nl_cb *cb, struct nl_msg *msg,
+static int handle_freq(struct nl80211_state *state, struct nl_msg *msg,
int argc, char **argv,
enum id_input id)
{
"<control freq> [20|40|80|80+80|160] [<center freq 1>] [<center freq 2>]",
NL80211_CMD_SET_WIPHY, 0, CIB_NETDEV, handle_freq, NULL);
-static int handle_chan(struct nl80211_state *state,
- struct nl_cb *cb, struct nl_msg *msg,
+static int handle_chan(struct nl80211_state *state, struct nl_msg *msg,
int argc, char **argv,
enum id_input id)
{
NL80211_CMD_SET_WIPHY, 0, CIB_NETDEV, handle_chan, NULL);
static int handle_fragmentation(struct nl80211_state *state,
- struct nl_cb *cb, struct nl_msg *msg,
+ struct nl_msg *msg,
int argc, char **argv,
enum id_input id)
{
"Set fragmentation threshold.");
static int handle_rts(struct nl80211_state *state,
- struct nl_cb *cb, struct nl_msg *msg,
+ struct nl_msg *msg,
int argc, char **argv,
enum id_input id)
{
"Set rts threshold.");
static int handle_retry(struct nl80211_state *state,
- struct nl_cb *cb, struct nl_msg *msg,
+ struct nl_msg *msg,
int argc, char **argv, enum id_input id)
{
unsigned int retry_short = 0, retry_long = 0;
#ifndef NETNS_RUN_DIR
#define NETNS_RUN_DIR "/var/run/netns"
#endif
-int netns_get_fd(const char *name)
+static int netns_get_fd(const char *name)
{
char pathbuf[MAXPATHLEN];
const char *path, *ptr;
}
static int handle_netns(struct nl80211_state *state,
- struct nl_cb *cb,
struct nl_msg *msg,
int argc, char **argv,
enum id_input id)
" or by absolute path (man ip-netns)\n");
static int handle_coverage(struct nl80211_state *state,
- struct nl_cb *cb,
struct nl_msg *msg,
int argc, char **argv,
enum id_input id)
"Valid values: 0 - 255.");
static int handle_distance(struct nl80211_state *state,
- struct nl_cb *cb,
struct nl_msg *msg,
int argc, char **argv,
enum id_input id)
"Valid values: 0 - 114750");
static int handle_txpower(struct nl80211_state *state,
- struct nl_cb *cb,
struct nl_msg *msg,
int argc, char **argv,
enum id_input id)
"Specify transmit power level and setting type.");
static int handle_antenna(struct nl80211_state *state,
- struct nl_cb *cb,
struct nl_msg *msg,
int argc, char **argv,
enum id_input id)