Amit S. Kale | 3d396eb | 2006-10-21 15:33:03 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2003 - 2006 NetXen, Inc. |
| 3 | * All rights reserved. |
Amit S. Kale | 80922fb | 2006-12-04 09:18:00 -0800 | [diff] [blame] | 4 | * |
Amit S. Kale | 3d396eb | 2006-10-21 15:33:03 -0400 | [diff] [blame] | 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License |
| 7 | * as published by the Free Software Foundation; either version 2 |
| 8 | * of the License, or (at your option) any later version. |
Amit S. Kale | cb8011a | 2006-11-29 09:00:10 -0800 | [diff] [blame] | 9 | * |
Amit S. Kale | 3d396eb | 2006-10-21 15:33:03 -0400 | [diff] [blame] | 10 | * This program is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
Amit S. Kale | cb8011a | 2006-11-29 09:00:10 -0800 | [diff] [blame] | 14 | * |
Amit S. Kale | 3d396eb | 2006-10-21 15:33:03 -0400 | [diff] [blame] | 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
| 18 | * MA 02111-1307, USA. |
Amit S. Kale | 80922fb | 2006-12-04 09:18:00 -0800 | [diff] [blame] | 19 | * |
Amit S. Kale | 3d396eb | 2006-10-21 15:33:03 -0400 | [diff] [blame] | 20 | * The full GNU General Public License is included in this distribution |
| 21 | * in the file called LICENSE. |
Amit S. Kale | 80922fb | 2006-12-04 09:18:00 -0800 | [diff] [blame] | 22 | * |
Amit S. Kale | 3d396eb | 2006-10-21 15:33:03 -0400 | [diff] [blame] | 23 | * Contact Information: |
| 24 | * info@netxen.com |
| 25 | * NetXen, |
| 26 | * 3965 Freedom Circle, Fourth floor, |
| 27 | * Santa Clara, CA 95054 |
| 28 | */ |
| 29 | |
| 30 | #ifndef __NETXEN_NIC_IOCTL_H__ |
| 31 | #define __NETXEN_NIC_IOCTL_H__ |
| 32 | |
| 33 | #include <linux/sockios.h> |
| 34 | |
Amit S. Kale | cb8011a | 2006-11-29 09:00:10 -0800 | [diff] [blame] | 35 | #define NETXEN_CMD_START SIOCDEVPRIVATE |
| 36 | #define NETXEN_NIC_CMD (NETXEN_CMD_START + 1) |
| 37 | #define NETXEN_NIC_NAME (NETXEN_CMD_START + 2) |
| 38 | #define NETXEN_NIC_NAME_LEN 16 |
Amit S. Kale | ed25ffa | 2006-12-04 09:23:25 -0800 | [diff] [blame] | 39 | #define NETXEN_NIC_NAME_RSP "NETXEN-UNM" |
Amit S. Kale | 3d396eb | 2006-10-21 15:33:03 -0400 | [diff] [blame] | 40 | |
| 41 | typedef enum { |
| 42 | netxen_nic_cmd_none = 0, |
| 43 | netxen_nic_cmd_pci_read, |
| 44 | netxen_nic_cmd_pci_write, |
| 45 | netxen_nic_cmd_pci_mem_read, |
| 46 | netxen_nic_cmd_pci_mem_write, |
| 47 | netxen_nic_cmd_pci_config_read, |
| 48 | netxen_nic_cmd_pci_config_write, |
| 49 | netxen_nic_cmd_get_stats, |
| 50 | netxen_nic_cmd_clear_stats, |
| 51 | netxen_nic_cmd_get_version |
| 52 | } netxen_nic_ioctl_cmd_t; |
| 53 | |
| 54 | struct netxen_nic_ioctl_data { |
| 55 | u32 cmd; |
| 56 | u32 unused1; |
| 57 | u64 off; |
| 58 | u32 size; |
| 59 | u32 rv; |
| 60 | char u[64]; |
| 61 | void *ptr; |
| 62 | }; |
| 63 | |
| 64 | struct netxen_statistics { |
| 65 | u64 rx_packets; |
| 66 | u64 tx_packets; |
| 67 | u64 rx_bytes; |
| 68 | u64 rx_errors; |
| 69 | u64 tx_bytes; |
| 70 | u64 tx_errors; |
| 71 | u64 rx_crc_errors; |
| 72 | u64 rx_short_length_error; |
| 73 | u64 rx_long_length_error; |
| 74 | u64 rx_mac_errors; |
| 75 | }; |
| 76 | |
| 77 | #endif /* __NETXEN_NIC_IOCTL_H_ */ |