xref: /freebsd/usr.sbin/wlanstats/wlanstats.h (revision 61ce422531805307d413bf04c9ad1aabd7f3a879)
1*61ce4225SBjoern A. Zeeb /*-
2*61ce4225SBjoern A. Zeeb  * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting
3*61ce4225SBjoern A. Zeeb  * All rights reserved.
4*61ce4225SBjoern A. Zeeb  *
5*61ce4225SBjoern A. Zeeb  * Redistribution and use in source and binary forms, with or without
6*61ce4225SBjoern A. Zeeb  * modification, are permitted provided that the following conditions
7*61ce4225SBjoern A. Zeeb  * are met:
8*61ce4225SBjoern A. Zeeb  * 1. Redistributions of source code must retain the above copyright
9*61ce4225SBjoern A. Zeeb  *    notice, this list of conditions and the following disclaimer,
10*61ce4225SBjoern A. Zeeb  *    without modification.
11*61ce4225SBjoern A. Zeeb  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
12*61ce4225SBjoern A. Zeeb  *    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
13*61ce4225SBjoern A. Zeeb  *    redistribution must be conditioned upon including a substantially
14*61ce4225SBjoern A. Zeeb  *    similar Disclaimer requirement for further binary redistribution.
15*61ce4225SBjoern A. Zeeb  *
16*61ce4225SBjoern A. Zeeb  * NO WARRANTY
17*61ce4225SBjoern A. Zeeb  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18*61ce4225SBjoern A. Zeeb  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19*61ce4225SBjoern A. Zeeb  * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
20*61ce4225SBjoern A. Zeeb  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
21*61ce4225SBjoern A. Zeeb  * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22*61ce4225SBjoern A. Zeeb  * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23*61ce4225SBjoern A. Zeeb  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24*61ce4225SBjoern A. Zeeb  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25*61ce4225SBjoern A. Zeeb  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26*61ce4225SBjoern A. Zeeb  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27*61ce4225SBjoern A. Zeeb  * THE POSSIBILITY OF SUCH DAMAGES.
28*61ce4225SBjoern A. Zeeb  */
29*61ce4225SBjoern A. Zeeb 
30*61ce4225SBjoern A. Zeeb #ifndef _WLANSTATS_H_
31*61ce4225SBjoern A. Zeeb #define	_WLANSTATS_H_
32*61ce4225SBjoern A. Zeeb 
33*61ce4225SBjoern A. Zeeb #include "bsdstat.h"
34*61ce4225SBjoern A. Zeeb 
35*61ce4225SBjoern A. Zeeb /*
36*61ce4225SBjoern A. Zeeb  * wlan statistics class.
37*61ce4225SBjoern A. Zeeb  */
38*61ce4225SBjoern A. Zeeb struct wlanstatfoo {
39*61ce4225SBjoern A. Zeeb 	struct bsdstat base;
40*61ce4225SBjoern A. Zeeb 
41*61ce4225SBjoern A. Zeeb 	BSDSTAT_DECL_METHODS(struct wlanstatfoo *);
42*61ce4225SBjoern A. Zeeb 
43*61ce4225SBjoern A. Zeeb 	/* set the network interface name for collection */
44*61ce4225SBjoern A. Zeeb 	void (*setifname)(struct wlanstatfoo *, const char *ifname);
45*61ce4225SBjoern A. Zeeb 	/* get the network interface name */
46*61ce4225SBjoern A. Zeeb 	const char *(*getifname)(struct wlanstatfoo *);
47*61ce4225SBjoern A. Zeeb 	/* get the wireless operating mode */
48*61ce4225SBjoern A. Zeeb 	int (*getopmode)(struct wlanstatfoo *);
49*61ce4225SBjoern A. Zeeb 	/* set the mac address of the associated station/ap */
50*61ce4225SBjoern A. Zeeb 	void (*setstamac)(struct wlanstatfoo *, const uint8_t mac[]);
51*61ce4225SBjoern A. Zeeb };
52*61ce4225SBjoern A. Zeeb 
53*61ce4225SBjoern A. Zeeb struct wlanstatfoo *wlanstats_new(const char *ifname, const char *fmtstring);
54*61ce4225SBjoern A. Zeeb #endif /* _WLANSTATS_H_ */
55