netxen_nic_ioctl.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. typedef enum {
  36. netxen_nic_cmd_none = 0,
  37. netxen_nic_cmd_pci_read,
  38. netxen_nic_cmd_pci_write,
  39. netxen_nic_cmd_pci_mem_read,
  40. netxen_nic_cmd_pci_mem_write,
  41. netxen_nic_cmd_pci_config_read,
  42. netxen_nic_cmd_pci_config_write,
  43. netxen_nic_cmd_get_stats,
  44. netxen_nic_cmd_clear_stats,
  45. netxen_nic_cmd_get_version
  46. } netxen_nic_ioctl_cmd_t;
  47. struct netxen_nic_ioctl_data {
  48. u32 cmd;
  49. u32 unused1;
  50. u64 off;
  51. u32 size;
  52. u32 rv;
  53. char u[64];
  54. void *ptr;
  55. };
  56. struct netxen_statistics {
  57. u64 rx_packets;
  58. u64 tx_packets;
  59. u64 rx_bytes;
  60. u64 rx_errors;
  61. u64 tx_bytes;
  62. u64 tx_errors;
  63. u64 rx_crc_errors;
  64. u64 rx_short_length_error;
  65. u64 rx_long_length_error;
  66. u64 rx_mac_errors;
  67. };
  68. #endif /* __NETXEN_NIC_IOCTL_H_ */