📄 ndis.h
字号:
NDIS_STATUS (*co_delete_vc)(void *vc_ctx) wstdcall; NDIS_STATUS (*co_activate_vc)(void *vc_ctx, void *call_params) wstdcall; NDIS_STATUS (*co_deactivate_vc)(void *vc_ctx) wstdcall; NDIS_STATUS (*co_send_packets)(void *vc_ctx, void **packets, UINT nr_of_packets) wstdcall; NDIS_STATUS (*co_request)(void *ctx, void *vc_ctx, UINT *req) wstdcall; /* NDIS 5.1 extensions */ void (*cancel_send_packets)(void *ctx, void *id) wstdcall; void (*pnp_event_notify)(void *ctx, enum ndis_device_pnp_event event, void *inf_buf, ULONG inf_buf_len) wstdcall; void (*shutdown)(void *ctx) wstdcall; void *reserved1; void *reserved2; void *reserved3; void *reserved4;};struct ndis_spinlock { NT_SPIN_LOCK klock; KIRQL irql;};union ndis_rw_lock_refcount { UCHAR cache_line[16];};struct ndis_rw_lock { union { struct { NT_SPIN_LOCK klock; void *context; }; UCHAR reserved[16]; }; union { union ndis_rw_lock_refcount ref_count[MAXIMUM_PROCESSORS]; /* ndiswrapper specific */ volatile int count; };};struct lock_state { USHORT state; KIRQL irql;};struct ndis_work_item;typedef void (*NDIS_PROC)(struct ndis_work_item *, void *) wstdcall;struct ndis_work_item { void *ctx; NDIS_PROC func; union { UCHAR reserved[8 * sizeof(void *)]; /* ndiswrapper specific */ struct nt_list list; };};struct alloc_shared_mem { void *ctx; ULONG size; BOOLEAN cached;};struct ndis_miniport_block;/* this is opaque to drivers, so we can use it as we please */struct ndis_mp_interrupt { struct kinterrupt *kinterrupt; /* Taken by ISR, DisableInterrupt and SynchronizeWithInterrupt */ NT_SPIN_LOCK lock; union { void *reserved; unsigned int irq; }; ndis_isr_handler isr; ndis_interrupt_handler mp_dpc; struct kdpc intr_dpc; struct ndis_miniport_block *nmb; UCHAR dpc_count; BOOLEAN enable; struct nt_event dpc_completed_event; BOOLEAN shared; BOOLEAN req_isr;};struct ndis_binary_data { USHORT len; void *buf;};enum ndis_parameter_type { NdisParameterInteger, NdisParameterHexInteger, NdisParameterString, NdisParameterMultiString,};typedef struct unicode_string NDIS_STRING;struct ndis_configuration_parameter { enum ndis_parameter_type type; union { ULONG integer; NDIS_STRING string; } data;};struct wrap_ndis_driver { struct miniport_char miniport;};/* IDs used to store extensions in driver_object's custom extension */#define NDIS_DRIVER_CLIENT_ID 10struct ndis_wireless_stats { ULONG length; LARGE_INTEGER tx_frag; LARGE_INTEGER tx_multi_frag; LARGE_INTEGER failed; LARGE_INTEGER retry; LARGE_INTEGER multi_retry; LARGE_INTEGER rtss_succ; LARGE_INTEGER rtss_fail; LARGE_INTEGER ack_fail; LARGE_INTEGER frame_dup; LARGE_INTEGER rx_frag; LARGE_INTEGER rx_multi_frag; LARGE_INTEGER fcs_err; LARGE_INTEGER tkip_local_mic_failures; LARGE_INTEGER tkip_icv_errors; LARGE_INTEGER tkip_counter_measures_invoked; LARGE_INTEGER tkip_replays; LARGE_INTEGER ccmp_format_errors; LARGE_INTEGER ccmp_replays; LARGE_INTEGER ccmp_decrypt_errors; LARGE_INTEGER fourway_handshake_failures; LARGE_INTEGER wep_undecryptable_count; LARGE_INTEGER wep_icv_errorcount; LARGE_INTEGER decrypt_success_count; LARGE_INTEGER decrypt_failure_count;};enum ndis_status_type { Ndis802_11StatusType_Authentication, Ndis802_11StatusType_MediaStreamMode, Ndis802_11StatusType_PMKID_CandidateList, Ndis802_11StatusType_RadioState,};struct ndis_status_indication { enum ndis_status_type status_type;};enum ndis_radio_status { Ndis802_11RadioStatusOn, Ndis802_11RadioStatusHardwareOff, Ndis802_11RadioStatusSoftwareOff,};struct ndis_radio_status_indication{ enum ndis_status_type status_type; enum ndis_radio_status radio_state;};enum ndis_media_stream_mode { Ndis802_11MediaStreamOff, Ndis802_11MediaStreamOn};enum wrapper_work { LINK_STATUS_CHANGED, SET_MULTICAST_LIST, COLLECT_IW_STATS, MINIPORT_RESET, SHUTDOWN};struct encr_info { struct encr_key { ULONG length; UCHAR key[NDIS_ENCODING_TOKEN_MAX]; } keys[MAX_ENCR_KEYS]; unsigned short tx_key_index;};struct ndis_essid { ULONG length; UCHAR essid[NDIS_ESSID_MAX_SIZE];};enum network_infrastructure { Ndis802_11IBSS, Ndis802_11Infrastructure, Ndis802_11AutoUnknown, Ndis802_11InfrastructureMax};enum authentication_mode { Ndis802_11AuthModeOpen, Ndis802_11AuthModeShared, Ndis802_11AuthModeAutoSwitch, Ndis802_11AuthModeWPA, Ndis802_11AuthModeWPAPSK, Ndis802_11AuthModeWPANone, Ndis802_11AuthModeWPA2, Ndis802_11AuthModeWPA2PSK, Ndis802_11AuthModeMax};enum encryption_status { Ndis802_11WEPEnabled, Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled, Ndis802_11WEPDisabled, Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled, Ndis802_11WEPKeyAbsent, Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent, Ndis802_11WEPNotSupported, Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported, Ndis802_11Encryption2Enabled, Ndis802_11Encryption2KeyAbsent, Ndis802_11Encryption3Enabled, Ndis802_11Encryption3KeyAbsent};struct ndis_auth_encr_pair { enum authentication_mode auth_mode; enum encryption_status encr_mode;};struct ndis_capability { ULONG length; ULONG version; ULONG num_PMKIDs; ULONG num_auth_encr_pair; struct ndis_auth_encr_pair auth_encr_pair[1];};struct ndis_guid { struct guid guid; union { ndis_oid oid; NDIS_STATUS status; }; ULONG size; ULONG flags;};struct ndis_timer { struct nt_timer nt_timer; struct kdpc kdpc;};struct ndis_miniport_timer { struct nt_timer nt_timer; struct kdpc kdpc; DPC func; void *ctx; struct ndis_miniport_block *nmb; struct ndis_miniport_timer *next;};typedef struct cm_partial_resource_list NDIS_RESOURCE_LIST;struct ndis_event { struct nt_event nt_event;};struct ndis_bind_paths { UINT number; struct unicode_string paths[1];};struct ndis_reference { NT_SPIN_LOCK lock; USHORT ref_count; BOOLEAN closing;};struct ndis_filterdbs { union { void *eth_db; void *null_db; }; void *tr_db; void *fddi_db; void *arc_db;};enum ndis_interface_type { NdisInterfaceInternal, NdisInterfaceIsa, NdisInterfaceEisa, NdisInterfaceMca, NdisInterfaceTurboChannel, NdisInterfacePci, NdisInterfacePcMcia,};struct auth_encr_capa { unsigned long auth; unsigned long encr;};enum driver_type { DRIVER_WIRELESS = 1, DRIVER_ETHERNET, };/* * This struct contains function pointers that the drivers references * directly via macros, so it's important that they are at the correct * position. */struct ndis_miniport_block { void *signature; struct ndis_miniport_block *next; struct driver_object *drv_obj; void *adapter_ctx; struct unicode_string name; struct ndis_bind_paths *bindpaths; void *openqueue; struct ndis_reference reference; void *device_ctx; UCHAR padding; UCHAR lock_acquired; UCHAR pmode_opens; UCHAR assigned_cpu; NT_SPIN_LOCK lock; enum ndis_request_type *mediarequest; struct ndis_miniport_interrupt *interrupt; ULONG flags; ULONG pnp_flags; struct nt_list packet_list; struct ndis_packet *first_pending_tx_packet; struct ndis_packet *return_packet_queue; ULONG request_buffer; void *set_mcast_buffer; struct ndis_miniport_block *primary_miniport; void *wrapper_ctx; void *bus_data_ctx; ULONG pnp_capa; void *resources; struct ndis_timer wakeup_dpc_timer; struct unicode_string basename; struct unicode_string symlink_name; ULONG ndis_hangcheck_interval; USHORT hanghcheck_ticks; USHORT hangcheck_tick; NDIS_STATUS ndis_reset_status; void *resetopen; struct ndis_filterdbs filterdbs; void *rx_packet; void *send_complete; void *send_resource_avail; void *reset_complete; enum ndis_medium media_type; ULONG bus_number; enum ndis_interface_type bus_type; enum ndis_interface_type adapter_type; struct device_object *fdo; struct device_object *pdo; struct device_object *next_device; void *mapreg; void *call_mgraflist; void *miniport_thread; void *setinfobuf; USHORT setinfo_buf_len; USHORT max_send_pkts; NDIS_STATUS fake_status; void *lock_handler; struct unicode_string *adapter_instance_name; void *timer_queue; UINT mac_options; void *pending_req; UINT max_long_addrs; UINT max_short_addrs; UINT cur_lookahead; UINT max_lookahead; ndis_interrupt_handler irq_bh; void *disable_intr; void *enable_intr; void *send_pkts; void *deferred_send; void *eth_rx_indicate; void *tr_rx_indicate; void *fddi_rx_indicate; void *eth_rx_complete; void *tr_rx_complete; void *fddi_rx_complete; void *status; void *status_complete; void *td_complete; void *query_complete; void *set_complete; void *wan_tx_complete; void *wan_rx; void *wan_rx_complete; /* ndiswrapper specific */ struct wrap_ndis_device *wnd;};struct wrap_ndis_device { struct ndis_miniport_block *nmb; struct wrap_device *wd; struct net_device *net_dev; void *shutdown_ctx; struct tasklet_struct irq_tasklet; struct ndis_mp_interrupt *mp_interrupt; unsigned long mem_start; unsigned long mem_end; struct net_device_stats net_stats; struct iw_statistics iw_stats; BOOLEAN iw_stats_enabled; struct ndis_wireless_stats ndis_stats; work_struct_t tx_work; struct ndis_packet *tx_ring[TX_RING_SIZE]; u8 tx_ring_start; u8 tx_ring_end; u8 is_tx_ring_full; NT_SPIN_LOCK tx_ring_lock; struct semaphore tx_ring_mutex; unsigned int max_tx_packets; u8 tx_ok; struct semaphore ndis_comm_mutex; struct task_struct *ndis_comm_task; s8 ndis_comm_done; NDIS_STATUS ndis_comm_status; ULONG packet_filter; ULONG sg_dma_size; ULONG dma_map_count; dma_addr_t *dma_map_addr; int hangcheck_interval; struct timer_list hangcheck_timer; int iw_stats_interval; struct timer_list iw_stats_timer; unsigned long scan_timestamp; struct encr_info encr_info; char nick[IW_ESSID_MAX_SIZE]; struct ndis_essid essid; struct auth_encr_capa capa; enum authentication_mode auth_mode; enum encryption_status encr_mode; enum network_infrastructure infrastructure_mode; int num_pmkids; mac_address mac; struct proc_dir_entry *procfs_iface;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -