handler.h
1 /*
2  * Based on code from 'iw':
3  *
4  * Copyright (c) 2007, 2008 Johannes Berg
5  * Copyright (c) 2007 Andy Lutomirski
6  * Copyright (c) 2007 Mike Kershaw
7  * Copyright (c) 2008-2009 Luis R. Rodriguez
8  *
9  * Permission to use, copy, modify, and/or distribute this software for any
10  * purpose with or without fee is hereby granted, provided that the above
11  * copyright notice and this permission notice appear in all copies.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20  *
21  */
22 
23 /*
24  * Integration as a player driver was done by Michael Bienia.
25  *
26  * Copyright © 2010 Michael Bienia <m.bienia@stud.fh-dortmund.de>
27  *
28  */
29 
30 #ifndef WLANSCAN_HANDLER_H
31 #define WLANSCAN_HANDLER_H
32 
33 #include <asm/types.h>
34 #include <netlink/handlers.h>
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
41  const char *group;
42  int id; /* return value */
43  };
44 
45  struct wait_event_args {
46  int n_cmds;
47  const unsigned int *cmds;
48  unsigned int devidx;
49  unsigned int cmd; /* return value */
50  };
51 
52  /* Scan handler */
53  extern int scan_handler(struct nl_msg *msg, void *arg);
54 
55  /* */
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);
59 
60  /* Generic callback handler */
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);
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 #endif
Definition: handler.h:40
Definition: handler.h:45