netxen_nic_ioctl.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * Copyright (C) 2003 - 2006 NetXen, Inc.
  3. * All rights reserved.
  4. *
  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.
  9. *
  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.
  14. *
  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.
  19. *
  20. * The full GNU General Public License is included in this distribution
  21. * in the file called LICENSE.
  22. *
  23. * Contact Information:
  24. * info@netxen.com
  25. * NetXen,
  26. * 3965 Freedom Circle, Fourth floor,
  27. * Santa Clara, CA 95054
  28. */
  29. #ifndef __NETXEN_NIC_IOCTL_H__
  30. #define __NETXEN_NIC_IOCTL_H__
  31. #include <linux/sockios.h>
  32. #define NETXEN_CMD_START SIOCDEVPRIVATE
  33. #define NETXEN_NIC_CMD (NETXEN_CMD_START + 1)
  34. #define NETXEN_NIC_NAME (NETXEN_CMD_START + 2)
  35. #define NETXEN_NIC_NAME_LEN 16
  36. #define NETXEN_NIC_NAME_RSP "NETXEN"
  37. typedef enum {
  38. netxen_nic_cmd_none = 0,
  39. netxen_nic_cmd_pci_read,
  40. netxen_nic_cmd_pci_write,
  41. netxen_nic_cmd_pci_mem_read,
  42. netxen_nic_cmd_pci_mem_write,
  43. netxen_nic_cmd_pci_config_read,
  44. netxen_nic_cmd_pci_config_write,
  45. netxen_nic_cmd_get_stats,
  46. netxen_nic_cmd_clear_stats,
  47. netxen_nic_cmd_get_version
  48. } netxen_nic_ioctl_cmd_t;
  49. struct netxen_nic_ioctl_data {
  50. u32 cmd;
  51. u32 unused1;
  52. u64 off;
  53. u32 size;
  54. u32 rv;
  55. char u[64];
  56. void *ptr;
  57. };
  58. struct netxen_statistics {
  59. u64 rx_packets;
  60. u64 tx_packets;
  61. u64 rx_bytes;
  62. u64 rx_errors;
  63. u64 tx_bytes;
  64. u64 tx_errors;
  65. u64 rx_crc_errors;
  66. u64 rx_short_length_error;
  67. u64 rx_long_length_error;
  68. u64 rx_mac_errors;
  69. };
  70. #endif /* __NETXEN_NIC_IOCTL_H_ */