#ifndef __UNM_NIC_IOCTL_H__
#define __UNM_NIC_IOCTL_H__
#ifdef __cplusplus
extern "C" {
#endif
#define UNM_CMD_START 0
#define UNM_NIC_CMD (UNM_CMD_START + 1)
#define UNM_NIC_NAME (UNM_CMD_START + 2)
typedef enum {
unm_nic_cmd_none = 0,
unm_nic_cmd_pci_read,
unm_nic_cmd_pci_write,
unm_nic_cmd_pci_mem_read,
unm_nic_cmd_pci_mem_write,
unm_nic_cmd_pci_config_read,
unm_nic_cmd_pci_config_write,
unm_nic_cmd_get_stats,
unm_nic_cmd_clear_stats,
unm_nic_cmd_get_version,
unm_nic_cmd_get_phy_type,
unm_nic_cmd_efuse_chip_id,
unm_nic_cmd_flash_read = 50,
unm_nic_cmd_flash_write,
unm_nic_cmd_flash_se
} unm_nic_ioctl_cmd_t;
#pragma pack(1)
typedef struct {
__uint32_t cmd;
__uint32_t unused1;
__uint64_t off;
__uint32_t size;
__uint32_t rv;
char uabc[64];
void *ptr;
} unm_nic_ioctl_data_t;
struct unm_statistics {
__uint64_t rx_packets;
__uint64_t tx_packets;
__uint64_t rx_bytes;
__uint64_t rx_errors;
__uint64_t tx_bytes;
__uint64_t tx_errors;
__uint64_t rx_CRC_errors;
__uint64_t rx_short_length_error;
__uint64_t rx_long_length_error;
__uint64_t rx_MAC_errors;
};
#pragma pack()
#ifdef __cplusplus
}
#endif
#endif