]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/tools/nxge/xge_info.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / tools / nxge / xge_info.h
1 /*-
2  * Copyright (c) 2002-2007 Neterion, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24  * SUCH DAMAGE.
25  *
26  * $FreeBSD$
27  */
28
29 #ifndef XGE_CMN_H
30 #include "xge_cmn.h"
31 #endif
32
33 #define XGE_QUERY_STATS       1
34 #define XGE_QUERY_PCICONF     2
35 #define XGE_QUERY_DEVSTATS    3
36 #define XGE_QUERY_DEVCONF     4
37 #define XGE_READ_VERSION      5
38 #define XGE_QUERY_SWSTATS     6
39 #define XGE_QUERY_DRIVERSTATS 7
40 #define XGE_SET_BUFFER_MODE_1 8
41 #define XGE_SET_BUFFER_MODE_2 9
42 #define XGE_SET_BUFFER_MODE_5 10
43 #define XGE_QUERY_BUFFER_MODE 11
44
45
46 /* Function declerations */
47 int xge_get_pciconf(void);
48 int xge_get_devconf(void);
49 int xge_get_hwstats(void);
50 int xge_get_registers(void);
51 int xge_get_devstats(void);
52 int xge_get_swstats(void);
53 int xge_get_drvstats(void);
54 int xge_get_register(char *);
55 int xge_set_register(char *,char *);
56 int xge_get_drv_version(void);
57 int xge_get_buffer_mode(void);
58 int xge_change_buffer_mode(char *);
59 void xge_print_hwstats(void *,unsigned short);
60 void xge_print_pciconf(void *);
61 void xge_print_devconf(void *);
62 void xge_print_registers(void *);
63 void xge_print_register(u64,u64);
64 void xge_print_devstats(void *);
65 void xge_print_swstats(void *);
66 void xge_print_drvstats(void *);
67 void xge_print_drv_version(char *);
68
69 extern xge_pci_bar0_t         regInfo[];
70 extern xge_pci_config_t       pciconfInfo[];
71 extern xge_stats_hw_info_t    statsInfo[];
72 extern xge_device_config_t    devconfInfo[];
73 extern xge_stats_intr_info_t  intrInfo[];
74 extern xge_stats_tcode_info_t tcodeInfo[];
75 extern xge_stats_driver_info_t driverInfo[];
76
77 struct ifreq   ifreqp;
78 int    sockfd, indexer, buffer_size = 0;
79