30 #ifndef WLANSCAN_HANDLER_H
31 #define WLANSCAN_HANDLER_H
33 #include <asm/types.h>
34 #include <netlink/handlers.h>
47 const unsigned int *cmds;
53 extern int scan_handler(
struct nl_msg *msg,
void *arg);
56 extern int family_handler(
struct nl_msg *msg,
void *arg);
57 extern int no_seq_check(
struct nl_msg *msg,
void *arg);
58 extern int wait_event(
struct nl_msg *msg,
void *arg);
61 extern int error_handler(
struct sockaddr_nl *nla,
struct nlmsgerr *err,
void *arg);
62 extern int ack_handler(
struct nl_msg *msg,
void *arg);
63 extern int finish_handler(
struct nl_msg *msg,
void *arg);
static bool MatchMessage(player_msghdr_t *hdr, int type, int subtype, player_devaddr_t addr)
Helper for message processing.
Definition: message.h:159
Generic message header.
Definition: player.h:162
uint8_t type
Message type; must be one of PLAYER_MSGTYPE_*.
Definition: player.h:166
Encapsulates a device (i.e., a driver bound to an interface)
Definition: device.h:75
const char * ReadString(int section, const char *name, const char *value)
Read a string value.
uint8_t subtype
Message subtype; interface specific.
Definition: player.h:168
const char * ReadTupleString(int section, const char *name, int index, const char *value)
Read a string from a tuple field.
#define PLAYER_MSGTYPE_DATA
A data message.
Definition: player.h:95
#define PLAYER_MSGTYPE_RESP_ACK
A positive response message.
Definition: player.h:112
virtual int ProcessMessage(QueuePointer &resp_queue, player_msghdr *hdr, void *data)
Message handler.
#define PLAYER_MSGTYPE_REQ
A request message.
Definition: player.h:106
#define PLAYER_MSGTYPE_RESP_NACK
A negative response message.
Definition: player.h:125
int ReadDeviceAddr(player_devaddr_t *addr, int section, const char *name, int code, int index, const char *key)
Read a device id.
int GetTupleCount(int section, const char *name)
Get the number of values in a tuple.
Class for loading configuration file information.
Definition: configfile.h:197
virtual int Setup()
Initialize the driver.
Definition: driver.h:386
A device address.
Definition: player.h:146
An autopointer for the message queue.
Definition: message.h:74
#define PLAYER_ERROR1(msg, a)
Error message macros.
Definition: error.h:82
#define PLAYER_ERROR(msg)
Error message macros.
Definition: error.h:81
double timestamp
Time associated with message contents (seconds since epoch)
Definition: player.h:170
uint32_t size
Size in bytes of the payload to follow.
Definition: player.h:174
#define PLAYER_MSGTYPE_CMD
A command message.
Definition: player.h:99
virtual int Shutdown()
Finalize the driver.
Definition: driver.h:393
Base class for all drivers.
Definition: driver.h:109
#define PLAYER_MSGTYPE_SYNCH
A synch message.
Definition: player.h:117
player_devaddr_t addr
Device to which this message pertains.
Definition: player.h:164
#define PLAYER_MSGQUEUE_DEFAULT_MAXLEN
Default maximum length for a message queue.
Definition: player.h:76