diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2004-09-28 08:46:54 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2004-09-28 08:46:54 +0000 |
commit | 85153fb164bc1b847c21b59b344974af17159c95 (patch) | |
tree | b8a034461093b35abbeac65d03847ec1ca94848b /winsup/w32api/include/ddk/ndis.h | |
parent | e3e443e4df7faa1de17ed4b472ecf6d3068f86d1 (diff) | |
download | cygnal-85153fb164bc1b847c21b59b344974af17159c95.tar.gz cygnal-85153fb164bc1b847c21b59b344974af17159c95.tar.bz2 cygnal-85153fb164bc1b847c21b59b344974af17159c95.zip |
2004-09-29 Filip Navara <xnavara@volny.cz>
* include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, mcd.h, miniport.h,
mountdev.h, mountmgr.h, ndis.h, ndistapi.h, ndiswan.h, netpnp.h,
newdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h, ntddcdvd.h,
ntddchgr.h, ntdddisk.h, ntddkbd.h, ntddmou.h, ntddpar.h, ntddpcm.h,
ntddscsi.h, ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h,
ntddvdeo.h, ntddvol.h, ntpoapi.h, parallel.h, pfhook.h, poclass.h,
scsi.h, scsiscan.h, smbus.h, srb.h, storport.h, tdiinfo.h,
tdikrnl.h, tvout.h, upssvc.h, usb.h, usb100.h, usbdi.h, usbioctl.h,
usbiodef.h, usbscan.h, usbuser.h, videoagp.h, winddi.h, winddk.h,
winnt4.h, ws2san.h): Fixed packing.
* include/ddk/atm.h (ATM_TRAFFIC_DESCRIPTOR_IE): Fixed declaration.
* include/ddk/hidclass.h (HID_INTERFACE_HIDPARSE,
HID_INTERFACE_NOTIFY_PNP): Likewise.
* include/ddk/ndis.h (NDIS_DMA_BLOCK, CO_FLOW_PARAMETERS): Likewise.
(NdisQueryPacketLength): Added macro. Thanks to Art Yerkes
<ayerkes@speakeasy.net>.
* include/ddk/usb100.h (USB_CONFIGURATION_DESCRIPTOR): Fixed
declaration.
* include/ddk/winddi.h (PATHDATA, GLYPHPOS): Likewise.
* include/ddk/winddk.h (PDRIVER_CONTROL, PDRIVER_LIST_CONTROL,
PDRIVER_ADD_DEVICE, PIO_COMPLETION_ROUTINE, PDRIVER_CANCEL,
PKDEFERRED_ROUTINE, PDRIVER_DISPATCH, PIO_DPC_ROUTINE,
PMM_DLL_INITIALIZE, PMM_DLL_UNLOAD, PDRIVER_ENTRY,
PDRIVER_INITIALIZE, PKSERVICE_ROUTINE, PIO_TIMER_ROUTINE,
PDRIVER_REINITIALIZE, PDRIVER_STARTIO, PKSYNCHRONIZE_ROUTINE,
PDRIVER_UNLOAD, DRIVER_OBJECT): Fixed callback declarations.
(struct FILE_BASIC_INFORMATION): Renamed to _FILE_BASIC_INFORMATION.
(SYNCH_LEVEL): Added definition.
(KPCR, KPCR_TIB): Fixed declaration.
(Interlocked[Push/Pop]EntrySList): Declare only if winbase.h isn't
included and _WIN32_WINNT >= 0x0501.
(RtlEqualLuid): Fixed macro definition.
(KfLowerIrql, KfRaiseIrql): Declare and use instead of KeLowerIrql and
KeRaiseIrql on i386 architectures.
Diffstat (limited to 'winsup/w32api/include/ddk/ndis.h')
-rw-r--r-- | winsup/w32api/include/ddk/ndis.h | 52 |
1 files changed, 45 insertions, 7 deletions
diff --git a/winsup/w32api/include/ddk/ndis.h b/winsup/w32api/include/ddk/ndis.h index 216249df4..8ab5d5c98 100644 --- a/winsup/w32api/include/ddk/ndis.h +++ b/winsup/w32api/include/ddk/ndis.h @@ -37,8 +37,6 @@ extern "C" { #endif -#pragma pack(push,4) - #include "ntddk.h" #include "ntddndis.h" #include "netpnp.h" @@ -537,6 +535,7 @@ typedef struct _NDIS_DMA_BLOCK { PVOID MapRegisterBase; KEVENT AllocationEvent; PADAPTER_OBJECT SystemAdapterObject; + PVOID Miniport; BOOLEAN InProgress; } NDIS_DMA_BLOCK, *PNDIS_DMA_BLOCK; @@ -703,10 +702,9 @@ typedef struct _CO_FLOW_PARAMETERS { ULONG PeakBandwidth; ULONG Latency; ULONG DelayVariation; - GUARANTEE LevelOfGuarantee; - ULONG CostOfCall; - ULONG NetworkAvailability; + SERVICETYPE ServiceType; ULONG MaxSduSize; + ULONG MinimumPolicedSize; } CO_FLOW_PARAMETERS, *PCO_FLOW_PARAMETERS; typedef struct _CO_SPECIFIC_PARAMETERS { @@ -2026,6 +2024,48 @@ NdisFreeBuffer( } \ } +/* + * VOID + * NdisQueryPacketLength( + * IN PNDIS_PACKET Packet, + * OUT PUINT PhysicalBufferCount OPTIONAL, + * OUT PUINT BufferCount OPTIONAL, + * OUT PNDIS_BUFFER *FirstBuffer OPTIONAL, + * OUT PUINT TotalPacketLength OPTIONAL); + */ +#define NdisQueryPacketLength(Packet, \ + TotalPacketLength) \ +{ \ + if ((TotalPacketLength)) \ + { \ + if (!(Packet)->Private.ValidCounts) { \ + UINT _Offset; \ + UINT _PacketLength; \ + PNDIS_BUFFER _NdisBuffer; \ + UINT _PhysicalBufferCount = 0; \ + UINT _TotalPacketLength = 0; \ + UINT _Count = 0; \ + \ + for (_NdisBuffer = (Packet)->Private.Head; \ + _NdisBuffer != (PNDIS_BUFFER)NULL; \ + _NdisBuffer = _NdisBuffer->Next) \ + { \ + _PhysicalBufferCount += NDIS_BUFFER_TO_SPAN_PAGES(_NdisBuffer); \ + NdisQueryBufferOffset(_NdisBuffer, &_Offset, &_PacketLength); \ + _TotalPacketLength += _PacketLength; \ + _Count++; \ + } \ + (Packet)->Private.PhysicalCount = _PhysicalBufferCount; \ + (Packet)->Private.TotalLength = _TotalPacketLength; \ + (Packet)->Private.Count = _Count; \ + (Packet)->Private.ValidCounts = TRUE; \ + } \ + \ + if (TotalPacketLength) \ + *((PUINT)TotalPacketLength) = (Packet)->Private.TotalLength; \ + } \ +} + /* * VOID @@ -5178,8 +5218,6 @@ typedef struct _NDIS_MAC_CHARACTERISTICS { typedef NDIS_MAC_CHARACTERISTICS NDIS_WAN_MAC_CHARACTERISTICS; typedef NDIS_WAN_MAC_CHARACTERISTICS *PNDIS_WAN_MAC_CHARACTERISTICS; -#pragma pack(pop) - #ifdef __cplusplus } #endif |