1 /* 2 * This file contains NDIS5.X specific procedure definitions in NDIS driver. 3 * 4 * Copyright (c) 2008-2017 Red Hat, Inc. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met : 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and / or other materials provided with the distribution. 14 * 3. Neither the names of the copyright holders nor the names of their contributors 15 * may be used to endorse or promote products derived from this software 16 * without specific prior written permission. 17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND 18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 * ARE DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 #ifndef _PARA_NDIS5_H 30 #define _PARA_NDIS5_H 31 32 #include "ndis56common.h" 33 34 35 NDIS_STATUS NTAPI ParaNdis5_SetOID(IN NDIS_HANDLE MiniportAdapterContext, 36 IN NDIS_OID Oid, 37 IN PVOID InformationBuffer, 38 IN ULONG InformationBufferLength, 39 OUT PULONG BytesRead, 40 OUT PULONG BytesNeeded); 41 42 NDIS_STATUS NTAPI ParaNdis5_QueryOID(IN NDIS_HANDLE MiniportAdapterContext, 43 IN NDIS_OID Oid, 44 IN PVOID InformationBuffer, 45 IN ULONG InformationBufferLength, 46 OUT PULONG BytesWritten, 47 OUT PULONG BytesNeeded); 48 49 50 VOID NTAPI ParaNdis5_SendPackets(IN NDIS_HANDLE MiniportAdapterContext, 51 IN PPNDIS_PACKET PacketArray, 52 IN UINT NumberOfPackets); 53 54 55 VOID NTAPI ParaNdis5_ReturnPacket(IN NDIS_HANDLE MiniportAdapterContext,IN PNDIS_PACKET Packet); 56 57 VOID ParaNdis5_IndicateConnect(PARANDIS_ADAPTER *pContext, BOOLEAN bConnected); 58 59 60 //NDIS 5.1 related functions 61 VOID NTAPI ParaNdis5_CancelSendPackets(IN NDIS_HANDLE MiniportAdapterContext,IN PVOID CancelId); 62 63 NDIS_STATUS ParaNdis5_StopSend( 64 PARANDIS_ADAPTER *pContext, 65 BOOLEAN bStop, 66 ONPAUSECOMPLETEPROC Callback); 67 NDIS_STATUS ParaNdis5_StopReceive( 68 PARANDIS_ADAPTER *pContext, 69 BOOLEAN bStop, 70 ONPAUSECOMPLETEPROC Callback 71 ); 72 VOID NTAPI ParaNdis5_HandleDPC( 73 IN NDIS_HANDLE MiniportAdapterContext); 74 75 typedef struct _tagPowerWorkItem 76 { 77 NDIS_WORK_ITEM wi; 78 PPARANDIS_ADAPTER pContext; 79 NDIS_DEVICE_POWER_STATE state; 80 }tPowerWorkItem; 81 82 typedef struct _tagGeneralWorkItem 83 { 84 NDIS_WORK_ITEM wi; 85 PPARANDIS_ADAPTER pContext; 86 }tGeneralWorkItem; 87 88 #endif // _PARA_NDIS5_H 89