xref: /freebsd/tools/tools/ath/athaggrstats/athaggrstats.h (revision b3e7694832e81d7a904a10f525f8797b753bf0d3)
1343de113SAdrian Chadd /*-
2343de113SAdrian Chadd  * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting
3343de113SAdrian Chadd  * All rights reserved.
4343de113SAdrian Chadd  *
5343de113SAdrian Chadd  * Redistribution and use in source and binary forms, with or without
6343de113SAdrian Chadd  * modification, are permitted provided that the following conditions
7343de113SAdrian Chadd  * are met:
8343de113SAdrian Chadd  * 1. Redistributions of source code must retain the above copyright
9343de113SAdrian Chadd  *    notice, this list of conditions and the following disclaimer,
10343de113SAdrian Chadd  *    without modification.
11343de113SAdrian Chadd  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
12343de113SAdrian Chadd  *    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
13343de113SAdrian Chadd  *    redistribution must be conditioned upon including a substantially
14343de113SAdrian Chadd  *    similar Disclaimer requirement for further binary redistribution.
15343de113SAdrian Chadd  *
16343de113SAdrian Chadd  * NO WARRANTY
17343de113SAdrian Chadd  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18343de113SAdrian Chadd  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19343de113SAdrian Chadd  * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
20343de113SAdrian Chadd  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
21343de113SAdrian Chadd  * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22343de113SAdrian Chadd  * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23343de113SAdrian Chadd  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24343de113SAdrian Chadd  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25343de113SAdrian Chadd  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26343de113SAdrian Chadd  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27343de113SAdrian Chadd  * THE POSSIBILITY OF SUCH DAMAGES.
28343de113SAdrian Chadd  */
29343de113SAdrian Chadd 
30343de113SAdrian Chadd #ifndef _ATHAGGRSTATS_H_
31343de113SAdrian Chadd #define	_ATHAGGRSTATS_H_
32343de113SAdrian Chadd 
33*6f6103b2SAdrian Chadd #include "bsdstat.h"
34343de113SAdrian Chadd 
35343de113SAdrian Chadd /*
36343de113SAdrian Chadd  * ath statistics class.
37343de113SAdrian Chadd  */
38343de113SAdrian Chadd struct athaggrstatfoo {
39*6f6103b2SAdrian Chadd 	struct bsdstat base;
40343de113SAdrian Chadd 
41*6f6103b2SAdrian Chadd 	BSDSTAT_DECL_METHODS(struct athaggrstatfoo *);
42343de113SAdrian Chadd 
43343de113SAdrian Chadd 	/* set the network interface name for collection */
44343de113SAdrian Chadd 	void (*setifname)(struct athaggrstatfoo *, const char *ifname);
45343de113SAdrian Chadd 	/* set the mac address of the associated station/ap */
46343de113SAdrian Chadd 	void (*setstamac)(struct athaggrstatfoo *, const uint8_t mac[]);
47343de113SAdrian Chadd 	/* zero in-kernel statistics */
48343de113SAdrian Chadd 	void (*zerostats)(struct athaggrstatfoo *);
49343de113SAdrian Chadd };
50343de113SAdrian Chadd 
51343de113SAdrian Chadd struct athaggrstatfoo *athaggrstats_new(const char *ifname,
52343de113SAdrian Chadd     const char *fmtstring);
53343de113SAdrian Chadd 
54343de113SAdrian Chadd #endif /* _ATHAGGRSTATS_H_ */
55