1185743Ssam#ifndef _DIAG_ 2185743Ssam#define _DIAG_ 3185743Ssam/*- 4185743Ssam * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting 5185743Ssam * All rights reserved. 6185743Ssam * 7185743Ssam * Redistribution and use in source and binary forms, with or without 8185743Ssam * modification, are permitted provided that the following conditions 9185743Ssam * are met: 10185743Ssam * 1. Redistributions of source code must retain the above copyright 11185743Ssam * notice, this list of conditions and the following disclaimer, 12185743Ssam * without modification. 13185743Ssam * 2. Redistributions in binary form must reproduce at minimum a disclaimer 14185743Ssam * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 15185743Ssam * redistribution must be conditioned upon including a substantially 16185743Ssam * similar Disclaimer requirement for further binary redistribution. 17185743Ssam * 18185743Ssam * NO WARRANTY 19185743Ssam * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20185743Ssam * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21185743Ssam * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY 22185743Ssam * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 23185743Ssam * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 24185743Ssam * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25185743Ssam * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26185743Ssam * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 27185743Ssam * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28185743Ssam * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 29185743Ssam * THE POSSIBILITY OF SUCH DAMAGES. 30185743Ssam * 31185743Ssam * $FreeBSD$ 32185743Ssam */ 33185743Ssam#include <sys/types.h> 34185743Ssam#include <sys/file.h> 35185743Ssam#include <sys/ioctl.h> 36185743Ssam#include <sys/socket.h> 37185743Ssam#include <net/if.h> 38185743Ssam#include <stdio.h> 39185743Ssam 40185743Ssam#include <net80211/ieee80211_radiotap.h> 41238651Sadrian#include <net80211/ieee80211.h> 42185743Ssam#include "if_athioctl.h" 43185743Ssam 44185743Ssamstruct statshandler { 45185743Ssam u_long interval; 46185743Ssam void *total; 47185743Ssam void *cur; 48185743Ssam 49185743Ssam void (*getstats)(struct statshandler *, void *); 50185743Ssam void (*update)(struct statshandler *); 51185743Ssam 52185743Ssam void (*printbanner)(struct statshandler *, FILE *); 53185743Ssam void (*reportdelta)(struct statshandler *, FILE *); 54185743Ssam void (*reporttotal)(struct statshandler *, FILE *); 55185743Ssam void (*reportverbose)(struct statshandler *, FILE *); 56185743Ssam}; 57185743Ssam 58185743Ssamextern void reportstats(FILE *fd, struct statshandler *sh); 59185743Ssamextern void runstats(FILE *fd, struct statshandler *sh); 60185743Ssamextern void reportcol(FILE *fd, u_int32_t v, const char *def_fmt, 61185743Ssam u_int32_t max, const char *alt_fmt); 62185743Ssam#endif /* _DIAG_ */ 63