static int
VmbusChannelCreateGpadlHeader(
void * Kbuffer, // must be phys and virt contiguous
- UINT32 Size, // page-size multiple
+ u32 Size, // page-size multiple
VMBUS_CHANNEL_MSGINFO **msgInfo,
- UINT32 *MessageCount
+ u32 *MessageCount
);
static void
{
for (j=0; j<32; j++)
{
- DPRINT_DBG(VMBUS, "param-conn id (%d)(%d) - %d", i, j, MonitorPage->Parameter[i][j].ConnectionId.AsUINT32);
+ DPRINT_DBG(VMBUS, "param-conn id (%d)(%d) - %d", i, j, MonitorPage->Parameter[i][j].ConnectionId.Asu32);
DPRINT_DBG(VMBUS, "param-flag (%d)(%d) - %d", i, j, MonitorPage->Parameter[i][j].FlagNumber);
}
if (Channel->OfferMsg.MonitorAllocated)
{
- // Each UINT32 represents 32 channels
- BitSet((UINT32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31);
+ // Each u32 represents 32 channels
+ BitSet((u32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31);
monitorPage = (HV_MONITOR_PAGE*)gVmbusConnection.MonitorPages;
monitorPage++; // Get the child to parent monitor page
- BitSet((UINT32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit);
+ BitSet((u32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit);
}
else
{
if (Channel->OfferMsg.MonitorAllocated)
{
- // Each UINT32 represents 32 channels
- BitClear((UINT32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31);
+ // Each u32 represents 32 channels
+ BitClear((u32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31);
monitorPage = (HV_MONITOR_PAGE*)gVmbusConnection.MonitorPages;
monitorPage++; // Get the child to parent monitor page
- BitClear((UINT32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit);
+ BitClear((u32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit);
}
DPRINT_EXIT(VMBUS);
HV_MONITOR_PAGE *monitorPage;
u8 monitorGroup = (u8)Channel->OfferMsg.MonitorId / 32;
u8 monitorOffset = (u8)Channel->OfferMsg.MonitorId % 32;
- //UINT32 monitorBit = 1 << monitorOffset;
+ //u32 monitorBit = 1 << monitorOffset;
DebugInfo->RelId = Channel->OfferMsg.ChildRelId;
DebugInfo->State = Channel->State;
int
VmbusChannelOpen(
VMBUS_CHANNEL *NewChannel,
- UINT32 SendRingBufferSize,
- UINT32 RecvRingBufferSize,
+ u32 SendRingBufferSize,
+ u32 RecvRingBufferSize,
void * UserData,
- UINT32 UserDataLen,
+ u32 UserDataLen,
PFN_CHANNEL_CALLBACK pfnOnChannelCallback,
void * Context
)
--*/
static void DumpGpadlBody(
VMBUS_CHANNEL_GPADL_BODY *Gpadl,
- UINT32 Len)
+ u32 Len)
{
int i=0;
int pfnCount=0;
static int
VmbusChannelCreateGpadlHeader(
void * Kbuffer, // from kmalloc()
- UINT32 Size, // page-size multiple
+ u32 Size, // page-size multiple
VMBUS_CHANNEL_MSGINFO **MsgInfo,
- UINT32 *MessageCount)
+ u32 *MessageCount)
{
int i;
int pageCount;
VMBUS_CHANNEL_GPADL_BODY* gpadlBody;
VMBUS_CHANNEL_MSGINFO* msgHeader;
VMBUS_CHANNEL_MSGINFO* msgBody;
- UINT32 msgSize;
+ u32 msgSize;
int pfnSum, pfnCount, pfnLeft, pfnCurr, pfnSize;
(*MessageCount)++;
gpadlBody = (VMBUS_CHANNEL_GPADL_BODY*)msgBody->Msg;
- // FIXME: Gpadl is UINT32 and we are using a pointer which could be 64-bit
+ // FIXME: Gpadl is u32 and we are using a pointer which could be 64-bit
//gpadlBody->Gpadl = kbuffer;
for (i=0; i<pfnCurr; i++)
{
VmbusChannelEstablishGpadl(
VMBUS_CHANNEL *Channel,
void * Kbuffer, // from kmalloc()
- UINT32 Size, // page-size multiple
- UINT32 *GpadlHandle
+ u32 Size, // page-size multiple
+ u32 *GpadlHandle
)
{
int ret=0;
VMBUS_CHANNEL_MSGINFO *msgInfo;
VMBUS_CHANNEL_MSGINFO *subMsgInfo;
- UINT32 msgCount;
+ u32 msgCount;
LIST_ENTRY* anchor;
LIST_ENTRY* curr;
- UINT32 nextGpadlHandle;
+ u32 nextGpadlHandle;
DPRINT_ENTER(VMBUS);
int
VmbusChannelTeardownGpadl(
VMBUS_CHANNEL *Channel,
- UINT32 GpadlHandle
+ u32 GpadlHandle
)
{
int ret=0;
VmbusChannelSendPacket(
VMBUS_CHANNEL *Channel,
const void * Buffer,
- UINT32 BufferLen,
+ u32 BufferLen,
UINT64 RequestId,
VMBUS_PACKET_TYPE Type,
- UINT32 Flags
+ u32 Flags
)
{
int ret=0;
VMPACKET_DESCRIPTOR desc;
- UINT32 packetLen = sizeof(VMPACKET_DESCRIPTOR) + BufferLen;
- UINT32 packetLenAligned = ALIGN_UP(packetLen, sizeof(UINT64));
+ u32 packetLen = sizeof(VMPACKET_DESCRIPTOR) + BufferLen;
+ u32 packetLenAligned = ALIGN_UP(packetLen, sizeof(UINT64));
SG_BUFFER_LIST bufferList[3];
UINT64 alignedData=0;
VmbusChannelSendPacketPageBuffer(
VMBUS_CHANNEL *Channel,
PAGE_BUFFER PageBuffers[],
- UINT32 PageCount,
+ u32 PageCount,
void * Buffer,
- UINT32 BufferLen,
+ u32 BufferLen,
UINT64 RequestId
)
{
int ret=0;
int i=0;
VMBUS_CHANNEL_PACKET_PAGE_BUFFER desc;
- UINT32 descSize;
- UINT32 packetLen;
- UINT32 packetLenAligned;
+ u32 descSize;
+ u32 packetLen;
+ u32 packetLenAligned;
SG_BUFFER_LIST bufferList[3];
UINT64 alignedData=0;
VMBUS_CHANNEL *Channel,
MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer,
- UINT32 BufferLen,
+ u32 BufferLen,
UINT64 RequestId
)
{
int ret=0;
VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER desc;
- UINT32 descSize;
- UINT32 packetLen;
- UINT32 packetLenAligned;
+ u32 descSize;
+ u32 packetLen;
+ u32 packetLenAligned;
SG_BUFFER_LIST bufferList[3];
UINT64 alignedData=0;
- UINT32 PfnCount = NUM_PAGES_SPANNED(MultiPageBuffer->Offset, MultiPageBuffer->Length);
+ u32 PfnCount = NUM_PAGES_SPANNED(MultiPageBuffer->Offset, MultiPageBuffer->Length);
DPRINT_ENTER(VMBUS);
VmbusChannelRecvPacket(
VMBUS_CHANNEL *Channel,
void * Buffer,
- UINT32 BufferLen,
- UINT32* BufferActualLen,
+ u32 BufferLen,
+ u32* BufferActualLen,
UINT64* RequestId
)
{
VMPACKET_DESCRIPTOR desc;
- UINT32 packetLen;
- UINT32 userLen;
+ u32 packetLen;
+ u32 userLen;
int ret;
DPRINT_ENTER(VMBUS);
VmbusChannelRecvPacketRaw(
VMBUS_CHANNEL *Channel,
void * Buffer,
- UINT32 BufferLen,
- UINT32* BufferActualLen,
+ u32 BufferLen,
+ u32* BufferActualLen,
UINT64* RequestId
)
{
VMPACKET_DESCRIPTOR desc;
- UINT32 packetLen;
- UINT32 userLen;
+ u32 packetLen;
+ u32 userLen;
int ret;
DPRINT_ENTER(VMBUS);
u16 Length8;
u16 Flags;
UINT64 TransactionId;
- UINT32 Reserved;
- UINT32 RangeCount;
+ u32 Reserved;
+ u32 RangeCount;
PAGE_BUFFER Range[MAX_PAGE_BUFFER_COUNT];
} VMBUS_CHANNEL_PACKET_PAGE_BUFFER;
u16 Length8;
u16 Flags;
UINT64 TransactionId;
- UINT32 Reserved;
- UINT32 RangeCount; // Always 1 in this case
+ u32 Reserved;
+ u32 RangeCount; // Always 1 in this case
MULTIPAGE_BUFFER Range;
} VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER;
static int
VmbusChannelOpen(
VMBUS_CHANNEL *Channel,
- UINT32 SendRingBufferSize,
- UINT32 RecvRingBufferSize,
+ u32 SendRingBufferSize,
+ u32 RecvRingBufferSize,
void * UserData,
- UINT32 UserDataLen,
+ u32 UserDataLen,
PFN_CHANNEL_CALLBACK pfnOnChannelCallback,
void * Context
);
VmbusChannelSendPacket(
VMBUS_CHANNEL *Channel,
const void * Buffer,
- UINT32 BufferLen,
+ u32 BufferLen,
UINT64 RequestId,
VMBUS_PACKET_TYPE Type,
- UINT32 Flags
+ u32 Flags
);
static int
VmbusChannelSendPacketPageBuffer(
VMBUS_CHANNEL *Channel,
PAGE_BUFFER PageBuffers[],
- UINT32 PageCount,
+ u32 PageCount,
void * Buffer,
- UINT32 BufferLen,
+ u32 BufferLen,
UINT64 RequestId
);
VMBUS_CHANNEL *Channel,
MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer,
- UINT32 BufferLen,
+ u32 BufferLen,
UINT64 RequestId
);
VmbusChannelEstablishGpadl(
VMBUS_CHANNEL *Channel,
void * Kbuffer, // from kmalloc()
- UINT32 Size, // page-size multiple
- UINT32 *GpadlHandle
+ u32 Size, // page-size multiple
+ u32 *GpadlHandle
);
static int
VmbusChannelTeardownGpadl(
VMBUS_CHANNEL *Channel,
- UINT32 GpadlHandle
+ u32 GpadlHandle
);
static int
VmbusChannelRecvPacket(
VMBUS_CHANNEL *Channel,
void * Buffer,
- UINT32 BufferLen,
- UINT32* BufferActualLen,
+ u32 BufferLen,
+ u32* BufferActualLen,
UINT64* RequestId
);
VmbusChannelRecvPacketRaw(
VMBUS_CHANNEL *Channel,
void * Buffer,
- UINT32 BufferLen,
- UINT32* BufferActualLen,
+ u32 BufferLen,
+ u32* BufferActualLen,
UINT64* RequestId
);
static int
IVmbusChannelOpen(
PDEVICE_OBJECT Device,
- UINT32 SendBufferSize,
- UINT32 RecvRingBufferSize,
+ u32 SendBufferSize,
+ u32 RecvRingBufferSize,
void * UserData,
- UINT32 UserDataLen,
+ u32 UserDataLen,
VMBUS_CHANNEL_CALLBACK ChannelCallback,
void * Context
)
IVmbusChannelSendPacket(
PDEVICE_OBJECT Device,
const void * Buffer,
- UINT32 BufferLen,
+ u32 BufferLen,
UINT64 RequestId,
- UINT32 Type,
- UINT32 Flags
+ u32 Type,
+ u32 Flags
)
{
return VmbusChannelSendPacket((VMBUS_CHANNEL*)Device->context,
IVmbusChannelSendPacketPageBuffer(
PDEVICE_OBJECT Device,
PAGE_BUFFER PageBuffers[],
- UINT32 PageCount,
+ u32 PageCount,
void * Buffer,
- UINT32 BufferLen,
+ u32 BufferLen,
UINT64 RequestId
)
{
PDEVICE_OBJECT Device,
MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer,
- UINT32 BufferLen,
+ u32 BufferLen,
UINT64 RequestId
)
{
IVmbusChannelRecvPacket (
PDEVICE_OBJECT Device,
void * Buffer,
- UINT32 BufferLen,
- UINT32* BufferActualLen,
+ u32 BufferLen,
+ u32* BufferActualLen,
UINT64* RequestId
)
{
IVmbusChannelRecvPacketRaw(
PDEVICE_OBJECT Device,
void * Buffer,
- UINT32 BufferLen,
- UINT32* BufferActualLen,
+ u32 BufferLen,
+ u32* BufferActualLen,
UINT64* RequestId
)
{
IVmbusChannelEstablishGpadl(
PDEVICE_OBJECT Device,
void * Buffer,
- UINT32 BufferLen,
- UINT32* GpadlHandle
+ u32 BufferLen,
+ u32* GpadlHandle
)
{
return VmbusChannelEstablishGpadl((VMBUS_CHANNEL*)Device->context,
static int
IVmbusChannelTeardownGpadl(
PDEVICE_OBJECT Device,
- UINT32 GpadlHandle
+ u32 GpadlHandle
)
{
return VmbusChannelTeardownGpadl((VMBUS_CHANNEL*)Device->context,
u8 MonitorGroup;
u8 MonitorBit;
- UINT32 RingBufferGpadlHandle;
+ u32 RingBufferGpadlHandle;
// Allocated memory for ring buffer
void * RingBufferPages;
- UINT32 RingBufferPageCount;
+ u32 RingBufferPageCount;
RING_BUFFER_INFO Outbound; // send to parent
RING_BUFFER_INFO Inbound; // receive from parent
HANDLE InboundLock;
typedef struct _VMBUS_CHANNEL_DEBUG_INFO {
- UINT32 RelId;
+ u32 RelId;
VMBUS_CHANNEL_STATE State;
GUID InterfaceType;
GUID InterfaceInstance;
- UINT32 MonitorId;
- UINT32 ServerMonitorPending;
- UINT32 ServerMonitorLatency;
- UINT32 ServerMonitorConnectionId;
- UINT32 ClientMonitorPending;
- UINT32 ClientMonitorLatency;
- UINT32 ClientMonitorConnectionId;
+ u32 MonitorId;
+ u32 ServerMonitorPending;
+ u32 ServerMonitorLatency;
+ u32 ServerMonitorConnectionId;
+ u32 ClientMonitorPending;
+ u32 ClientMonitorLatency;
+ u32 ClientMonitorConnectionId;
RING_BUFFER_DEBUG_INFO Inbound;
RING_BUFFER_DEBUG_INFO Outbound;
VMBUS_CHANNEL_MESSAGE_RESPONSE Response;
- UINT32 MessageSize;
+ u32 MessageSize;
// The channel message that goes out on the "wire".
// It will contain at minimum the VMBUS_CHANNEL_MESSAGE_HEADER header
unsigned char Msg[0];
--*/
VMBUS_CHANNEL*
GetChannelFromRelId(
- UINT32 relId
+ u32 relId
)
{
VMBUS_CHANNEL* channel;
)
{
VMBUS_CHANNEL* channel;
- UINT32 relId = (UINT32)(ULONG_PTR)context;
+ u32 relId = (u32)(ULONG_PTR)context;
ASSERT(relId > 0);
int maxdword = MAX_NUM_CHANNELS_SUPPORTED >> 5;
int bit;
int relid;
- UINT32* recvInterruptPage = gVmbusConnection.RecvInterruptPage;
+ u32* recvInterruptPage = gVmbusConnection.RecvInterruptPage;
//VMBUS_CHANNEL_MESSAGE* receiveMsg;
DPRINT_ENTER(VMBUS);
HV_CONNECTION_ID connId;
- connId.AsUINT32 =0;
+ connId.Asu32 =0;
connId.u.Id = VMBUS_MESSAGE_CONNECTION_ID;
ret = HvPostMessage(
connId,
--*/
int
-VmbusSetEvent(UINT32 childRelId)
+VmbusSetEvent(u32 childRelId)
{
int ret=0;
DPRINT_ENTER(VMBUS);
- // Each UINT32 represents 32 channels
- BitSet((UINT32*)gVmbusConnection.SendInterruptPage + (childRelId >> 5), childRelId & 31);
+ // Each u32 represents 32 channels
+ BitSet((u32*)gVmbusConnection.SendInterruptPage + (childRelId >> 5), childRelId & 31);
ret = HvSignalEvent();
DPRINT_EXIT(VMBUS);
#else
- UINT32 controlHi = Control >> 32;
- UINT32 controlLo = Control & 0xFFFFFFFF;
- UINT32 hvStatusHi = 1;
- UINT32 hvStatusLo = 1;
+ u32 controlHi = Control >> 32;
+ u32 controlLo = Control & 0xFFFFFFFF;
+ u32 hvStatusHi = 1;
+ u32 hvStatusLo = 1;
UINT64 inputAddress = (Input) ? GetPhysicalAddress(Input) : 0;
- UINT32 inputAddressHi = inputAddress >> 32;
- UINT32 inputAddressLo = inputAddress & 0xFFFFFFFF;
+ u32 inputAddressHi = inputAddress >> 32;
+ u32 inputAddressLo = inputAddress & 0xFFFFFFFF;
UINT64 outputAddress = (Output) ?GetPhysicalAddress(Output) : 0;
- UINT32 outputAddressHi = outputAddress >> 32;
- UINT32 outputAddressLo = outputAddress & 0xFFFFFFFF;
+ u32 outputAddressHi = outputAddress >> 32;
+ u32 outputAddressLo = outputAddress & 0xFFFFFFFF;
volatile void* hypercallPage = gHvContext.HypercallPage;
DPRINT_DBG(VMBUS, "Hypercall <control %llx input %p output %p>",
}
gHvContext.SignalEventParam = (PHV_INPUT_SIGNAL_EVENT)(ALIGN_UP((ULONG_PTR)gHvContext.SignalEventBuffer, HV_HYPERCALL_PARAM_ALIGN));
- gHvContext.SignalEventParam->ConnectionId.AsUINT32 = 0;
+ gHvContext.SignalEventParam->ConnectionId.Asu32 = 0;
gHvContext.SignalEventParam->ConnectionId.u.Id = VMBUS_EVENT_CONNECTION_ID;
gHvContext.SignalEventParam->FlagNumber = 0;
gHvContext.SignalEventParam->RsvdZ = 0;
--*/
int
HvSynicInit (
- UINT32 irqVector
+ u32 irqVector
)
{
UINT64 version;
static int
HvSynicInit(
- UINT32 irqVector
+ u32 irqVector
);
static void
DEVICE_OBJECT *device=(DEVICE_OBJECT*)Context;
NETVSC_DEVICE *netDevice;
- UINT32 bytesRecvd;
+ u32 bytesRecvd;
UINT64 requestId;
UCHAR packet[netPacketSize];
VMPACKET_DESCRIPTOR *desc;
// Send buffer allocated by us but manages by NetVSP
void * SendBuffer;
- UINT32 SendBufferSize;
- UINT32 SendBufferGpadlHandle;
- UINT32 SendSectionSize;
+ u32 SendBufferSize;
+ u32 SendBufferGpadlHandle;
+ u32 SendSectionSize;
// Receive buffer allocated by us but manages by NetVSP
void * ReceiveBuffer;
- UINT32 ReceiveBufferSize;
- UINT32 ReceiveBufferGpadlHandle;
- UINT32 ReceiveSectionCount;
+ u32 ReceiveBufferSize;
+ u32 ReceiveBufferGpadlHandle;
+ u32 ReceiveSectionCount;
PNVSP_1_RECEIVE_BUFFER_SECTION ReceiveSections;
// Used for NetVSP initialization protocol
--*/
static inline void
-GetRingBufferAvailBytes(RING_BUFFER_INFO *rbi, UINT32 *read, UINT32 *write)
+GetRingBufferAvailBytes(RING_BUFFER_INFO *rbi, u32 *read, u32 *write)
{
- UINT32 read_loc,write_loc;
+ u32 read_loc,write_loc;
// Capture the read/write indices before they changed
read_loc = rbi->RingBuffer->ReadIndex;
Get the next write location for the specified ring buffer
--*/
-static inline UINT32
+static inline u32
GetNextWriteLocation(RING_BUFFER_INFO* RingInfo)
{
- UINT32 next = RingInfo->RingBuffer->WriteIndex;
+ u32 next = RingInfo->RingBuffer->WriteIndex;
ASSERT(next < RingInfo->RingDataSize);
--*/
static inline void
-SetNextWriteLocation(RING_BUFFER_INFO* RingInfo, UINT32 NextWriteLocation)
+SetNextWriteLocation(RING_BUFFER_INFO* RingInfo, u32 NextWriteLocation)
{
RingInfo->RingBuffer->WriteIndex = NextWriteLocation;
}
Get the next read location for the specified ring buffer
--*/
-static inline UINT32
+static inline u32
GetNextReadLocation(RING_BUFFER_INFO* RingInfo)
{
- UINT32 next = RingInfo->RingBuffer->ReadIndex;
+ u32 next = RingInfo->RingBuffer->ReadIndex;
ASSERT(next < RingInfo->RingDataSize);
This allows the caller to skip
--*/
-static inline UINT32
-GetNextReadLocationWithOffset(RING_BUFFER_INFO* RingInfo, UINT32 Offset)
+static inline u32
+GetNextReadLocationWithOffset(RING_BUFFER_INFO* RingInfo, u32 Offset)
{
- UINT32 next = RingInfo->RingBuffer->ReadIndex;
+ u32 next = RingInfo->RingBuffer->ReadIndex;
ASSERT(next < RingInfo->RingDataSize);
next += Offset;
--*/
static inline void
-SetNextReadLocation(RING_BUFFER_INFO* RingInfo, UINT32 NextReadLocation)
+SetNextReadLocation(RING_BUFFER_INFO* RingInfo, u32 NextReadLocation)
{
RingInfo->RingBuffer->ReadIndex = NextReadLocation;
}
Get the size of the ring buffer
--*/
-static inline UINT32
+static inline u32
GetRingBufferSize(RING_BUFFER_INFO* RingInfo)
{
return RingInfo->RingDataSize;
void
DumpRingInfo(RING_BUFFER_INFO* RingInfo, char *Prefix)
{
- UINT32 bytesAvailToWrite;
- UINT32 bytesAvailToRead;
+ u32 bytesAvailToWrite;
+ u32 bytesAvailToRead;
GetRingBufferAvailBytes(RingInfo, &bytesAvailToRead, &bytesAvailToWrite);
//
// Internal routines
//
-static UINT32
+static u32
CopyToRingBuffer(
RING_BUFFER_INFO *RingInfo,
- UINT32 StartWriteOffset,
+ u32 StartWriteOffset,
void * Src,
- UINT32 SrcLen);
+ u32 SrcLen);
-static UINT32
+static u32
CopyFromRingBuffer(
RING_BUFFER_INFO *RingInfo,
void * Dest,
- UINT32 DestLen,
- UINT32 StartReadOffset);
+ u32 DestLen,
+ u32 StartReadOffset);
RING_BUFFER_DEBUG_INFO *DebugInfo
)
{
- UINT32 bytesAvailToWrite;
- UINT32 bytesAvailToRead;
+ u32 bytesAvailToWrite;
+ u32 bytesAvailToRead;
if (RingInfo->RingBuffer)
{
Get the interrupt mask for the specified ring buffer
--*/
-UINT32
+u32
GetRingBufferInterruptMask(
RING_BUFFER_INFO *rbi
)
RingBufferInit(
RING_BUFFER_INFO *RingInfo,
void *Buffer,
- UINT32 BufferLen
+ u32 BufferLen
)
{
ASSERT(sizeof(RING_BUFFER) == PAGE_SIZE);
RingBufferWrite(
RING_BUFFER_INFO* OutRingInfo,
SG_BUFFER_LIST SgBuffers[],
- UINT32 SgBufferCount
+ u32 SgBufferCount
)
{
int i=0;
- UINT32 byteAvailToWrite;
- UINT32 byteAvailToRead;
- UINT32 totalBytesToWrite=0;
+ u32 byteAvailToWrite;
+ u32 byteAvailToRead;
+ u32 totalBytesToWrite=0;
- volatile UINT32 nextWriteLocation;
+ volatile u32 nextWriteLocation;
UINT64 prevIndices=0;
DPRINT_ENTER(VMBUS);
RingBufferPeek(
RING_BUFFER_INFO* InRingInfo,
void* Buffer,
- UINT32 BufferLen
+ u32 BufferLen
)
{
- UINT32 bytesAvailToWrite;
- UINT32 bytesAvailToRead;
- UINT32 nextReadLocation=0;
+ u32 bytesAvailToWrite;
+ u32 bytesAvailToRead;
+ u32 nextReadLocation=0;
SpinlockAcquire(InRingInfo->RingLock);
RingBufferRead(
RING_BUFFER_INFO* InRingInfo,
void * Buffer,
- UINT32 BufferLen,
- UINT32 Offset
+ u32 BufferLen,
+ u32 Offset
)
{
- UINT32 bytesAvailToWrite;
- UINT32 bytesAvailToRead;
- UINT32 nextReadLocation=0;
+ u32 bytesAvailToWrite;
+ u32 bytesAvailToRead;
+ u32 nextReadLocation=0;
UINT64 prevIndices=0;
ASSERT(BufferLen > 0);
Assume there is enough room. Handles wrap-around in dest case only!!
--*/
-UINT32
+u32
CopyToRingBuffer(
RING_BUFFER_INFO *RingInfo,
- UINT32 StartWriteOffset,
+ u32 StartWriteOffset,
void * Src,
- UINT32 SrcLen)
+ u32 SrcLen)
{
void * ringBuffer=GetRingBuffer(RingInfo);
- UINT32 ringBufferSize=GetRingBufferSize(RingInfo);
- UINT32 fragLen;
+ u32 ringBufferSize=GetRingBufferSize(RingInfo);
+ u32 fragLen;
if (SrcLen > ringBufferSize - StartWriteOffset) // wrap-around detected!
{
Assume there is enough room. Handles wrap-around in src case only!!
--*/
-UINT32
+u32
CopyFromRingBuffer(
RING_BUFFER_INFO *RingInfo,
void * Dest,
- UINT32 DestLen,
- UINT32 StartReadOffset)
+ u32 DestLen,
+ u32 StartReadOffset)
{
void * ringBuffer=GetRingBuffer(RingInfo);
- UINT32 ringBufferSize=GetRingBufferSize(RingInfo);
+ u32 ringBufferSize=GetRingBufferSize(RingInfo);
- UINT32 fragLen;
+ u32 fragLen;
if (DestLen > ringBufferSize - StartReadOffset) // wrap-around detected at the src
{
typedef struct _SG_BUFFER_LIST {
void * Data;
- UINT32 Length;
+ u32 Length;
} SG_BUFFER_LIST;
typedef struct _RING_BUFFER {
- volatile UINT32 WriteIndex; // Offset in bytes from the start of ring data below
- volatile UINT32 ReadIndex; // Offset in bytes from the start of ring data below
+ volatile u32 WriteIndex; // Offset in bytes from the start of ring data below
+ volatile u32 ReadIndex; // Offset in bytes from the start of ring data below
- volatile UINT32 InterruptMask;
+ volatile u32 InterruptMask;
u8 Reserved[4084]; // Pad it to PAGE_SIZE so that data starts on page boundary
// NOTE: The InterruptMask field is used only for channels but since our vmbus connection
// also uses this data structure and its data starts here, we commented out this field.
- // volatile UINT32 InterruptMask;
+ // volatile u32 InterruptMask;
// Ring data starts here + RingDataStartOffset !!! DO NOT place any fields below this !!!
u8 Buffer[0];
} STRUCT_PACKED RING_BUFFER;
typedef struct _RING_BUFFER_INFO {
RING_BUFFER* RingBuffer;
- UINT32 RingSize; // Include the shared header
+ u32 RingSize; // Include the shared header
HANDLE RingLock;
- UINT32 RingDataSize; // < ringSize
- UINT32 RingDataStartOffset;
+ u32 RingDataSize; // < ringSize
+ u32 RingDataStartOffset;
} RING_BUFFER_INFO;
typedef struct _RING_BUFFER_DEBUG_INFO {
- UINT32 CurrentInterruptMask;
- UINT32 CurrentReadIndex;
- UINT32 CurrentWriteIndex;
- UINT32 BytesAvailToRead;
- UINT32 BytesAvailToWrite;
+ u32 CurrentInterruptMask;
+ u32 CurrentReadIndex;
+ u32 CurrentWriteIndex;
+ u32 BytesAvailToRead;
+ u32 BytesAvailToWrite;
}RING_BUFFER_DEBUG_INFO;
RingBufferInit(
RING_BUFFER_INFO *RingInfo,
void * Buffer,
- UINT32 BufferLen
+ u32 BufferLen
);
static void
RingBufferWrite(
RING_BUFFER_INFO *RingInfo,
SG_BUFFER_LIST SgBuffers[],
- UINT32 SgBufferCount
+ u32 SgBufferCount
);
static int
RingBufferPeek(
RING_BUFFER_INFO *RingInfo,
void * Buffer,
- UINT32 BufferLen
+ u32 BufferLen
);
static int
RingBufferRead(
RING_BUFFER_INFO *RingInfo,
void * Buffer,
- UINT32 BufferLen,
- UINT32 Offset
+ u32 BufferLen,
+ u32 Offset
);
-static UINT32
+static u32
GetRingBufferInterruptMask(
RING_BUFFER_INFO *RingInfo
);
NETVSC_DEVICE *NetDevice;
RNDIS_DEVICE_STATE State;
- UINT32 LinkStatus;
- UINT32 NewRequestId;
+ u32 LinkStatus;
+ u32 NewRequestId;
HANDLE RequestLock;
LIST_ENTRY RequestList;
static int
RndisFilterQueryDevice(
RNDIS_DEVICE *Device,
- UINT32 Oid,
+ u32 Oid,
void *Result,
- UINT32 *ResultSize
+ u32 *ResultSize
);
static inline int
static int
RndisFilterSetPacketFilter(
RNDIS_DEVICE *Device,
- UINT32 NewFilter
+ u32 NewFilter
);
static int
MemFree(Device);
}
-static inline RNDIS_REQUEST* GetRndisRequest(RNDIS_DEVICE *Device, UINT32 MessageType, UINT32 MessageLength)
+static inline RNDIS_REQUEST* GetRndisRequest(RNDIS_DEVICE *Device, u32 MessageType, u32 MessageLength)
{
RNDIS_REQUEST *request;
RNDIS_MESSAGE *rndisMessage;
)
{
RNDIS_PACKET *rndisPacket;
- UINT32 dataOffset;
+ u32 dataOffset;
DPRINT_ENTER(NETVSC);
static int
RndisFilterQueryDevice(
RNDIS_DEVICE *Device,
- UINT32 Oid,
+ u32 Oid,
void *Result,
- UINT32 *ResultSize
+ u32 *ResultSize
)
{
RNDIS_REQUEST *request;
- UINT32 inresultSize = *ResultSize;
+ u32 inresultSize = *ResultSize;
RNDIS_QUERY_REQUEST *query;
RNDIS_QUERY_COMPLETE *queryComplete;
int ret=0;
RNDIS_DEVICE *Device
)
{
- UINT32 size=HW_MACADDR_LEN;
+ u32 size=HW_MACADDR_LEN;
return RndisFilterQueryDevice(Device,
RNDIS_OID_802_3_PERMANENT_ADDRESS,
RNDIS_DEVICE *Device
)
{
- UINT32 size=sizeof(UINT32);
+ u32 size=sizeof(u32);
return RndisFilterQueryDevice(Device,
RNDIS_OID_GEN_MEDIA_CONNECT_STATUS,
static int
RndisFilterSetPacketFilter(
RNDIS_DEVICE *Device,
- UINT32 NewFilter
+ u32 NewFilter
)
{
RNDIS_REQUEST *request;
RNDIS_SET_REQUEST *set;
RNDIS_SET_COMPLETE *setComplete;
- UINT32 status;
+ u32 status;
int ret;
DPRINT_ENTER(NETVSC);
- ASSERT(RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(UINT32) <= sizeof(RNDIS_MESSAGE));
+ ASSERT(RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(u32) <= sizeof(RNDIS_MESSAGE));
- request = GetRndisRequest(Device, REMOTE_NDIS_SET_MSG, RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(UINT32));
+ request = GetRndisRequest(Device, REMOTE_NDIS_SET_MSG, RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(u32));
if (!request)
{
ret = -1;
// Setup the rndis set
set = &request->RequestMessage.Message.SetRequest;
set->Oid = RNDIS_OID_GEN_CURRENT_PACKET_FILTER;
- set->InformationBufferLength = sizeof(UINT32);
+ set->InformationBufferLength = sizeof(u32);
set->InformationBufferOffset = sizeof(RNDIS_SET_REQUEST);
- memcpy((void*)(ULONG_PTR)set + sizeof(RNDIS_SET_REQUEST), &NewFilter, sizeof(UINT32));
+ memcpy((void*)(ULONG_PTR)set + sizeof(RNDIS_SET_REQUEST), &NewFilter, sizeof(u32));
ret = RndisFilterSendRequest(Device, request);
if (ret != 0)
RNDIS_REQUEST *request;
RNDIS_INITIALIZE_REQUEST *init;
RNDIS_INITIALIZE_COMPLETE *initComplete;
- UINT32 status;
+ u32 status;
int ret;
DPRINT_ENTER(NETVSC);
RNDIS_FILTER_PACKET *filterPacket;
RNDIS_MESSAGE *rndisMessage;
RNDIS_PACKET *rndisPacket;
- UINT32 rndisMessageSize;
+ u32 rndisMessageSize;
DPRINT_ENTER(NETVSC);
int ret=0;
DEVICE_OBJECT *device = (DEVICE_OBJECT*)Context;
STORVSC_DEVICE *storDevice;
- UINT32 bytesRecvd;
+ u32 bytesRecvd;
UINT64 requestId;
UCHAR packet[ALIGN_UP(sizeof(VSTOR_PACKET),8)];
STORVSC_REQUEST_EXTENSION *request;
void *AdditionalInfo
)
{
- UINT32 *irqvector = (UINT32*) AdditionalInfo;
+ u32 *irqvector = (u32*) AdditionalInfo;
int ret=0;
DPRINT_ENTER(VMBUS);
VMBUS_CONNECT_STATE ConnectState;
- UINT32 NextGpadlHandle;
+ u32 NextGpadlHandle;
// Represents channel interrupts. Each bit position
// represents a channel.
static VMBUS_CHANNEL*
GetChannelFromRelId(
- UINT32 relId
+ u32 relId
);
//
static int
VmbusSetEvent(
- UINT32 childRelId
+ u32 childRelId
);
static void
#include "VmbusPacketFormat.h"
#define C_ASSERT(x)
-typedef UINT32 NTSTATUS;
+typedef u32 NTSTATUS;
#pragma pack(push,1)
typedef struct _VMBUS_CHANNEL_MESSAGE_HEADER
{
VMBUS_CHANNEL_MESSAGE_TYPE MessageType;
- UINT32 Padding;
+ u32 Padding;
} VMBUS_CHANNEL_MESSAGE_HEADER, *PVMBUS_CHANNEL_MESSAGE_HEADER;
// Query VMBus Version parameters
typedef struct _VMBUS_CHANNEL_QUERY_VMBUS_VERSION
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
- UINT32 Version;
+ u32 Version;
} VMBUS_CHANNEL_QUERY_VMBUS_VERSION, *PVMBUS_CHANNEL_QUERY_VMBUS_VERSION;
// VMBus Version Supported parameters
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
VMBUS_CHANNEL_OFFER Offer;
- UINT32 ChildRelId;
+ u32 ChildRelId;
u8 MonitorId;
BOOLEAN MonitorAllocated;
} VMBUS_CHANNEL_OFFER_CHANNEL, *PVMBUS_CHANNEL_OFFER_CHANNEL;
typedef struct _VMBUS_CHANNEL_RESCIND_OFFER
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
- UINT32 ChildRelId;
+ u32 ChildRelId;
} VMBUS_CHANNEL_RESCIND_OFFER, *PVMBUS_CHANNEL_RESCIND_OFFER;
// Request Offer -- no parameters, SynIC message contains the partition ID
//
// Identifies the specific VMBus channel that is being opened.
//
- UINT32 ChildRelId;
+ u32 ChildRelId;
//
// ID making a particular open request at a channel offer unique.
//
- UINT32 OpenId;
+ u32 OpenId;
//
// GPADL for the channel's ring buffer.
// by RingBufferGpadlHandle. The downstream ring buffer follows it at this
// offset (in pages).
//
- UINT32 DownstreamRingBufferPageOffset;
+ u32 DownstreamRingBufferPageOffset;
//
// User-specific data to be passed along to the server endpoint.
typedef struct _VMBUS_CHANNEL_OPEN_RESULT
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
- UINT32 ChildRelId;
- UINT32 OpenId;
+ u32 ChildRelId;
+ u32 OpenId;
NTSTATUS Status;
} VMBUS_CHANNEL_OPEN_RESULT, *PVMBUS_CHANNEL_OPEN_RESULT;
typedef struct _VMBUS_CHANNEL_CLOSE_CHANNEL
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
- UINT32 ChildRelId;
+ u32 ChildRelId;
} VMBUS_CHANNEL_CLOSE_CHANNEL, *PVMBUS_CHANNEL_CLOSE_CHANNEL;
// Channel Message GPADL
typedef struct _VMBUS_CHANNEL_GPADL_HEADER
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
- UINT32 ChildRelId;
- UINT32 Gpadl;
+ u32 ChildRelId;
+ u32 Gpadl;
u16 RangeBufLen;
u16 RangeCount;
GPA_RANGE Range[0];
typedef struct _VMBUS_CHANNEL_GPADL_BODY
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
- UINT32 MessageNumber;
- UINT32 Gpadl;
+ u32 MessageNumber;
+ u32 Gpadl;
UINT64 Pfn[0];
} VMBUS_CHANNEL_GPADL_BODY, *PVMBUS_CHANNEL_GPADL_BODY;
typedef struct _VMBUS_CHANNEL_GPADL_CREATED
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
- UINT32 ChildRelId;
- UINT32 Gpadl;
- UINT32 CreationStatus;
+ u32 ChildRelId;
+ u32 Gpadl;
+ u32 CreationStatus;
} VMBUS_CHANNEL_GPADL_CREATED, *PVMBUS_CHANNEL_GPADL_CREATED;
typedef struct _VMBUS_CHANNEL_GPADL_TEARDOWN
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
- UINT32 ChildRelId;
- UINT32 Gpadl;
+ u32 ChildRelId;
+ u32 Gpadl;
} VMBUS_CHANNEL_GPADL_TEARDOWN, *PVMBUS_CHANNEL_GPADL_TEARDOWN;
typedef struct _VMBUS_CHANNEL_GPADL_TORNDOWN
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
- UINT32 Gpadl;
+ u32 Gpadl;
} VMBUS_CHANNEL_GPADL_TORNDOWN, *PVMBUS_CHANNEL_GPADL_TORNDOWN;
#ifdef VMBUS_FEATURE_PARENT_OR_PEER_MEMORY_MAPPED_INTO_A_CHILD
VMBUS_CHANNEL_MESSAGE_HEADER Header;
PHYSICAL_ADDRESS ViewRangeBase;
UINT64 ViewRangeLength;
- UINT32 ChildRelId;
+ u32 ChildRelId;
} VMBUS_CHANNEL_VIEW_RANGE_ADD, *PVMBUS_CHANNEL_VIEW_RANGE_ADD;
typedef struct _VMBUS_CHANNEL_VIEW_RANGE_REMOVE
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
PHYSICAL_ADDRESS ViewRangeBase;
- UINT32 ChildRelId;
+ u32 ChildRelId;
} VMBUS_CHANNEL_VIEW_RANGE_REMOVE, *PVMBUS_CHANNEL_VIEW_RANGE_REMOVE;
#endif
typedef struct _VMBUS_CHANNEL_RELID_RELEASED
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
- UINT32 ChildRelId;
+ u32 ChildRelId;
} VMBUS_CHANNEL_RELID_RELEASED, *PVMBUS_CHANNEL_RELID_RELEASED;
typedef struct _VMBUS_CHANNEL_INITIATE_CONTACT
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
- UINT32 VMBusVersionRequested;
- UINT32 Padding2;
+ u32 VMBusVersionRequested;
+ u32 Padding2;
UINT64 InterruptPage;
UINT64 MonitorPage1;
UINT64 MonitorPage2;
typedef struct _HV_INPUT_POST_MESSAGE
{
HV_CONNECTION_ID ConnectionId;
- UINT32 Reserved;
+ u32 Reserved;
HV_MESSAGE_TYPE MessageType;
- UINT32 PayloadSize;
+ u32 PayloadSize;
UINT64 Payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT];
} HV_INPUT_POST_MESSAGE, *PHV_INPUT_POST_MESSAGE;
#define HV_EVENT_FLAGS_COUNT (256 * 8)
#define HV_EVENT_FLAGS_BYTE_COUNT (256)
-#define HV_EVENT_FLAGS_DWORD_COUNT (256 / sizeof(UINT32))
+#define HV_EVENT_FLAGS_DWORD_COUNT (256 / sizeof(u32))
//
// Define hypervisor message types.
// Define the synthetic interrupt source index type.
//
-typedef UINT32 HV_SYNIC_SINT_INDEX, *PHV_SYNIC_SINT_INDEX;
+typedef u32 HV_SYNIC_SINT_INDEX, *PHV_SYNIC_SINT_INDEX;
//
// Define partition identifier type.
typedef union _HV_CONNECTION_ID
{
- UINT32 AsUINT32;
+ u32 Asu32;
struct
{
- UINT32 Id:24;
- UINT32 Reserved:8;
+ u32 Id:24;
+ u32 Reserved:8;
} u;
} HV_CONNECTION_ID, *PHV_CONNECTION_ID;
typedef union _HV_PORT_ID
{
- UINT32 AsUINT32;
+ u32 Asu32;
struct
{
- UINT32 Id:24;
- UINT32 Reserved:8;
+ u32 Id:24;
+ u32 Reserved:8;
} u ;
} HV_PORT_ID, *PHV_PORT_ID;
typedef struct _HV_PORT_INFO
{
HV_PORT_TYPE PortType;
- UINT32 Padding;
+ u32 Padding;
union
{
HV_VP_INDEX TargetVp;
u16 BaseFlagNumber;
u16 FlagCount;
- UINT32 RsvdZ;
+ u32 RsvdZ;
} EventPortInfo;
struct
typedef struct _HV_CONNECTION_INFO
{
HV_PORT_TYPE PortType;
- UINT32 Padding;
+ u32 Padding;
union
{
//
typedef struct _HV_TIMER_MESSAGE_PAYLOAD
{
- UINT32 TimerIndex;
- UINT32 Reserved;
+ u32 TimerIndex;
+ u32 Reserved;
HV_NANO100_TIME ExpirationTime; // When the timer expired
HV_NANO100_TIME DeliveryTime; // When the message was delivered
} HV_TIMER_MESSAGE_PAYLOAD, *PHV_TIMER_MESSAGE_PAYLOAD;
typedef union _HV_SYNIC_EVENT_FLAGS
{
u8 Flags8[HV_EVENT_FLAGS_BYTE_COUNT];
- UINT32 Flags32[HV_EVENT_FLAGS_DWORD_COUNT];
+ u32 Flags32[HV_EVENT_FLAGS_DWORD_COUNT];
} HV_SYNIC_EVENT_FLAGS, *PHV_SYNIC_EVENT_FLAGS;
struct
{
- UINT32 Pending;
- UINT32 Armed;
+ u32 Pending;
+ u32 Armed;
};
} HV_MONITOR_TRIGGER_GROUP, *PHV_MONITOR_TRIGGER_GROUP;
typedef union _HV_MONITOR_TRIGGER_STATE
{
- UINT32 AsUINT32;
+ u32 Asu32;
struct
{
- UINT32 GroupEnable : 4;
- UINT32 RsvdZ : 28;
+ u32 GroupEnable : 4;
+ u32 RsvdZ : 28;
};
} HV_MONITOR_TRIGGER_STATE, *PHV_MONITOR_TRIGGER_STATE;
typedef struct _HV_MONITOR_PAGE
{
HV_MONITOR_TRIGGER_STATE TriggerState;
- UINT32 RsvdZ1;
+ u32 RsvdZ1;
HV_MONITOR_TRIGGER_GROUP TriggerGroup[4];
UINT64 RsvdZ2[3];
- INT32 NextCheckTime[4][32];
+ s32 NextCheckTime[4][32];
u16 Latency[4][32];
UINT64 RsvdZ3[32];
//
// Virtual Processor Indices
//
-typedef UINT32 HV_VP_INDEX, *PHV_VP_INDEX;
+typedef u32 HV_VP_INDEX, *PHV_VP_INDEX;
//
// The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent
typedef void (*PFN_ON_SENDRECVCOMPLETION)(void * Context);
typedef int (*PFN_ON_RECVCALLBACK)(DEVICE_OBJECT *dev, PNETVSC_PACKET packet);
-typedef void (*PFN_ON_LINKSTATUS_CHANGED)(DEVICE_OBJECT *dev, UINT32 Status);
+typedef void (*PFN_ON_LINKSTATUS_CHANGED)(DEVICE_OBJECT *dev, u32 Status);
// Represent the xfer page packet which contains 1 or more netvsc packet
typedef struct _XFERPAGE_PACKET {
DLIST_ENTRY ListEntry;
// # of netvsc packets this xfer packet contains
- UINT32 Count;
+ u32 Count;
} XFERPAGE_PACKET;
// This points to the memory after PageBuffers
void * Extension;
- UINT32 TotalDataBufferLength;
+ u32 TotalDataBufferLength;
// Points to the send/receive buffer where the ethernet frame is
- UINT32 PageBufferCount;
+ u32 PageBufferCount;
PAGE_BUFFER PageBuffers[NETVSC_PACKET_MAXPAGE];
} NETVSC_PACKET;
typedef struct _NETVSC_DRIVER_OBJECT {
DRIVER_OBJECT Base; // Must be the first field
- UINT32 RingBufferSize;
- UINT32 RequestExtSize;
+ u32 RingBufferSize;
+ u32 RequestExtSize;
// Additional num of page buffers to allocate
- UINT32 AdditionalRequestPageBufferCount;
+ u32 AdditionalRequestPageBufferCount;
// This is set by the caller to allow us to callback when we receive a packet
// from the "wire"
typedef struct _STORVSC_REQUEST {
STORVSC_REQUEST_TYPE Type;
- UINT32 Host;
- UINT32 Bus;
- UINT32 TargetId;
- UINT32 LunId;
+ u32 Host;
+ u32 Bus;
+ u32 TargetId;
+ u32 LunId;
u8 * Cdb;
- UINT32 CdbLen;
- UINT32 Status;
- UINT32 BytesXfer;
+ u32 CdbLen;
+ u32 Status;
+ u32 BytesXfer;
UCHAR* SenseBuffer;
- UINT32 SenseBufferSize;
+ u32 SenseBufferSize;
void * Context;
DRIVER_OBJECT Base; // Must be the first field
// Set by caller (in bytes)
- UINT32 RingBufferSize;
+ u32 RingBufferSize;
// Allocate this much private extension for each I/O request
- UINT32 RequestExtSize;
+ u32 RequestExtSize;
// Maximum # of requests in flight per channel/device
- UINT32 MaxOutstandingRequestsPerChannel;
+ u32 MaxOutstandingRequestsPerChannel;
// Set by the caller to allow us to re-enumerate the bus on the host
PFN_ON_HOST_RESCAN OnHostRescan;
// Single-page buffer
typedef struct _PAGE_BUFFER {
- UINT32 Length;
- UINT32 Offset;
+ u32 Length;
+ u32 Offset;
UINT64 Pfn;
} PAGE_BUFFER;
// Multiple-page buffer
typedef struct _MULTIPAGE_BUFFER {
// Length and Offset determines the # of pfns in the array
- UINT32 Length;
- UINT32 Offset;
+ u32 Length;
+ u32 Offset;
UINT64 PfnArray[MAX_MULTIPAGE_BUFFER_COUNT];
}MULTIPAGE_BUFFER;
typedef int (*VMBUS_CHANNEL_OPEN)(
PDEVICE_OBJECT Device,
- UINT32 SendBufferSize,
- UINT32 RecvRingBufferSize,
+ u32 SendBufferSize,
+ u32 RecvRingBufferSize,
void * UserData,
- UINT32 UserDataLen,
+ u32 UserDataLen,
VMBUS_CHANNEL_CALLBACK ChannelCallback,
void * Context
);
typedef int (*VMBUS_CHANNEL_SEND_PACKET)(
PDEVICE_OBJECT Device,
const void * Buffer,
- UINT32 BufferLen,
+ u32 BufferLen,
UINT64 RequestId,
- UINT32 Type,
- UINT32 Flags
+ u32 Type,
+ u32 Flags
);
typedef int (*VMBUS_CHANNEL_SEND_PACKET_PAGEBUFFER)(
PDEVICE_OBJECT Device,
PAGE_BUFFER PageBuffers[],
- UINT32 PageCount,
+ u32 PageCount,
void * Buffer,
- UINT32 BufferLen,
+ u32 BufferLen,
UINT64 RequestId
);
PDEVICE_OBJECT Device,
MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer,
- UINT32 BufferLen,
+ u32 BufferLen,
UINT64 RequestId
);
typedef int (*VMBUS_CHANNEL_RECV_PACKET)(
PDEVICE_OBJECT Device,
void * Buffer,
- UINT32 BufferLen,
- UINT32* BufferActualLen,
+ u32 BufferLen,
+ u32* BufferActualLen,
UINT64* RequestId
);
typedef int (*VMBUS_CHANNEL_RECV_PACKET_PAW)(
PDEVICE_OBJECT Device,
void * Buffer,
- UINT32 BufferLen,
- UINT32* BufferActualLen,
+ u32 BufferLen,
+ u32* BufferActualLen,
UINT64* RequestId
);
typedef int (*VMBUS_CHANNEL_ESTABLISH_GPADL)(
PDEVICE_OBJECT Device,
void * Buffer, // from kmalloc()
- UINT32 BufferLen, // page-size multiple
- UINT32* GpadlHandle
+ u32 BufferLen, // page-size multiple
+ u32* GpadlHandle
);
typedef int (*VMBUS_CHANNEL_TEARDOWN_GPADL)(
PDEVICE_OBJECT Device,
- UINT32 GpadlHandle
+ u32 GpadlHandle
);
typedef struct _PORT_INFO {
- UINT32 InterruptMask;
- UINT32 ReadIndex;
- UINT32 WriteIndex;
- UINT32 BytesAvailToRead;
- UINT32 BytesAvailToWrite;
+ u32 InterruptMask;
+ u32 ReadIndex;
+ u32 WriteIndex;
+ u32 BytesAvailToRead;
+ u32 BytesAvailToWrite;
} PORT_INFO;
typedef struct _DEVICE_INFO {
- UINT32 ChannelId;
- UINT32 ChannelState;
+ u32 ChannelId;
+ u32 ChannelState;
GUID ChannelType;
GUID ChannelInstance;
- UINT32 MonitorId;
- UINT32 ServerMonitorPending;
- UINT32 ServerMonitorLatency;
- UINT32 ServerMonitorConnectionId;
- UINT32 ClientMonitorPending;
- UINT32 ClientMonitorLatency;
- UINT32 ClientMonitorConnectionId;
+ u32 MonitorId;
+ u32 ServerMonitorPending;
+ u32 ServerMonitorLatency;
+ u32 ServerMonitorConnectionId;
+ u32 ClientMonitorPending;
+ u32 ClientMonitorLatency;
+ u32 ClientMonitorConnectionId;
PORT_INFO Inbound;
PORT_INFO Outbound;
GUID InterfaceType;
GUID InterfaceInstance;
UINT64 InterruptLatencyIn100nsUnits;
- UINT32 InterfaceRevision;
- UINT32 ServerContextAreaSize; // in bytes
+ u32 InterfaceRevision;
+ u32 ServerContextAreaSize; // in bytes
u16 ChannelFlags;
u16 MmioMegabytes; // in bytes * 1024 * 1024
//
struct
{
- UINT32 PipeMode;
+ u32 PipeMode;
UCHAR UserDefined[MAX_PIPE_USER_DEFINED_BYTES];
} Pipe;
} u;
- UINT32 Padding;
+ u32 Padding;
} VMBUS_CHANNEL_OFFER, *PVMBUS_CHANNEL_OFFER;
#pragma pack(pop)
// FIELD_OFFSET(VMBUS_CHANNEL_OFFER, u.Standard.UserDefined)));
//
-typedef UINT32 GPADL_HANDLE;
+typedef u32 GPADL_HANDLE;
//
// Server Flags
{
struct
{
- volatile UINT32 In; // Offset in bytes from the ring base
- volatile UINT32 Out; // Offset in bytes from the ring base
+ volatile u32 In; // Offset in bytes from the ring base
+ volatile u32 Out; // Offset in bytes from the ring base
};
volatile LONGLONG InOut;
};
// endpoint should not send any interrupts.
//
- volatile UINT32 InterruptMask;
+ volatile u32 InterruptMask;
} VMRCB, *PVMRCB;
UINT64 TransactionId;
} VMPACKET_DESCRIPTOR, *PVMPACKET_DESCRIPTOR;
-typedef UINT32 PREVIOUS_PACKET_OFFSET, *PPREVIOUS_PACKET_OFFSET;
+typedef u32 PREVIOUS_PACKET_OFFSET, *PPREVIOUS_PACKET_OFFSET;
typedef struct
{
typedef struct
{
- UINT32 ByteCount;
- UINT32 ByteOffset;
+ u32 ByteCount;
+ u32 ByteOffset;
} VMTRANSFER_PAGE_RANGE, *PVMTRANSFER_PAGE_RANGE;
#ifdef __cplusplus
u16 TransferPageSetId;
BOOLEAN SenderOwnsSet;
u8 Reserved;
- UINT32 RangeCount;
+ u32 RangeCount;
VMTRANSFER_PAGE_RANGE Ranges[1];
} VMTRANSFER_PAGE_PACKET_HEADER, *PVMTRANSFER_PAGE_PACKET_HEADER;
#endif
- UINT32 Gpadl;
- UINT32 Reserved;
+ u32 Gpadl;
+ u32 Reserved;
} VMGPADL_PACKET_HEADER, *PVMGPADL_PACKET_HEADER;
#endif
- UINT32 Gpadl;
+ u32 Gpadl;
u16 TransferPageSetId;
u16 Reserved;
typedef struct _GPA_RANGE {
- UINT32 ByteCount;
- UINT32 ByteOffset;
+ u32 ByteCount;
+ u32 ByteOffset;
UINT64 PfnArray[0];
} GPA_RANGE, *PGPA_RANGE;
#endif
- UINT32 Gpadl;
- UINT32 RangeCount;
+ u32 Gpadl;
+ u32 RangeCount;
GPA_RANGE Range[1];
} VMESTABLISH_GPADL, *PVMESTABLISH_GPADL;
#endif
- UINT32 Gpadl;
- UINT32 Reserved; // for alignment to a 8-byte boundary
+ u32 Gpadl;
+ u32 Reserved; // for alignment to a 8-byte boundary
} VMTEARDOWN_GPADL, *PVMTEARDOWN_GPADL;
#endif
- UINT32 Reserved;
- UINT32 RangeCount;
+ u32 Reserved;
+ u32 RangeCount;
GPA_RANGE Range[1];
} VMDATA_GPA_DIRECT, *PVMDATA_GPA_DIRECT;
#endif
UINT64 TotalBytes;
- UINT32 ByteOffset;
- UINT32 ByteCount;
+ u32 ByteOffset;
+ u32 ByteCount;
UCHAR Data[1];
} VMADDITIONAL_DATA, *PVMADDITIONAL_DATA;
#include "VmbusChannelInterface.h"
-#define NVSP_INVALID_PROTOCOL_VERSION ((UINT32)0xFFFFFFFF)
+#define NVSP_INVALID_PROTOCOL_VERSION ((u32)0xFFFFFFFF)
#define NVSP_PROTOCOL_VERSION_1 2
#define NVSP_MIN_PROTOCOL_VERSION NVSP_PROTOCOL_VERSION_1
typedef struct _NVSP_MESSAGE_HEADER
{
- UINT32 MessageType;
+ u32 MessageType;
} NVSP_MESSAGE_HEADER, *PNVSP_MESSAGE_HEADER;
//
//
typedef struct _NVSP_MESSAGE_INIT
{
- UINT32 MinProtocolVersion;
- UINT32 MaxProtocolVersion;
+ u32 MinProtocolVersion;
+ u32 MaxProtocolVersion;
} NVSP_MESSAGE_INIT, *PNVSP_MESSAGE_INIT;
//
//
typedef struct _NVSP_MESSAGE_INIT_COMPLETE
{
- UINT32 NegotiatedProtocolVersion;
- UINT32 MaximumMdlChainLength;
- UINT32 Status;
+ u32 NegotiatedProtocolVersion;
+ u32 MaximumMdlChainLength;
+ u32 Status;
} NVSP_MESSAGE_INIT_COMPLETE, *PNVSP_MESSAGE_INIT_COMPLETE;
typedef union _NVSP_MESSAGE_INIT_UBER
//
typedef struct _NVSP_1_MESSAGE_SEND_NDIS_VERSION
{
- UINT32 NdisMajorVersion;
- UINT32 NdisMinorVersion;
+ u32 NdisMajorVersion;
+ u32 NdisMinorVersion;
} NVSP_1_MESSAGE_SEND_NDIS_VERSION, *PNVSP_1_MESSAGE_SEND_NDIS_VERSION;
//
typedef struct _NVSP_1_RECEIVE_BUFFER_SECTION
{
- UINT32 Offset;
- UINT32 SubAllocationSize;
- UINT32 NumSubAllocations;
- UINT32 EndOffset;
+ u32 Offset;
+ u32 SubAllocationSize;
+ u32 NumSubAllocations;
+ u32 EndOffset;
} NVSP_1_RECEIVE_BUFFER_SECTION, *PNVSP_1_RECEIVE_BUFFER_SECTION;
//
//
typedef struct _NVSP_1_MESSAGE_SEND_RECEIVE_BUFFER_COMPLETE
{
- UINT32 Status;
- UINT32 NumSections;
+ u32 Status;
+ u32 NumSections;
//
// The receive buffer is split into two parts, a large
//
typedef struct _NVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE
{
- UINT32 Status;
+ u32 Status;
//
// The VSC gets to choose the size of the send buffer and
// This was done to enable dynamic reconfigurations when
// the cost of GPA-direct buffers decreases.
//
- UINT32 SectionSize;
+ u32 SectionSize;
} NVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE, *PNVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE;
//
// the Network VSP only has one. Therefore, the channel
// travels with the RNDIS packet.
//
- UINT32 ChannelType;
+ u32 ChannelType;
//
// This field is used to send part or all of the data
// and all of the data was sent through other VMBus
// mechanisms.
//
- UINT32 SendBufferSectionIndex;
- UINT32 SendBufferSectionSize;
+ u32 SendBufferSectionIndex;
+ u32 SendBufferSectionSize;
} NVSP_1_MESSAGE_SEND_RNDIS_PACKET, *PNVSP_1_MESSAGE_SEND_RNDIS_PACKET;
//
//
typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET_COMPLETE
{
- UINT32 Status;
+ u32 Status;
} NVSP_1_MESSAGE_SEND_RNDIS_PACKET_COMPLETE, *PNVSP_1_MESSAGE_SEND_RNDIS_PACKET_COMPLETE;
typedef union _NVSP_MESSAGE_1_UBER
//
// unsigned types
//
-typedef unsigned int UINT32;
#ifdef __x86_64__
typedef unsigned long UINT64;
#else
//
// signed types
//
-typedef int INT32;
#ifdef __x86_64__
typedef long INT64;
#else
typedef unsigned char BOOL;
typedef unsigned char BOOLEAN;
typedef void* HANDLE;
-typedef UINT32 DWORD;
+typedef u32 DWORD;
typedef char* PCHAR;
typedef unsigned char BYTE;
#ifdef __x86_64__
#define RDMSR(reg, v) { \
- UINT32 h, l; \
+ u32 h, l; \
__asm__ __volatile__("rdmsr" \
: "=a" (l), "=d" (h) \
: "c" (reg)); \
}
#define WRMSR(reg, v) { \
- UINT32 h, l; \
- l = (UINT32)(((UINT64)(v)) & 0xFFFFFFFF); \
- h = (UINT32)((((UINT64)(v)) >> 32) & 0xFFFFFFFF); \
+ u32 h, l; \
+ l = (u32)(((UINT64)(v)) & 0xFFFFFFFF); \
+ h = (u32)((((UINT64)(v)) >> 32) & 0xFFFFFFFF); \
__asm__ __volatile__("wrmsr" \
: /* no outputs */ \
: "c" (reg), "a" (l), "d" (h)); \
extern HANDLE TimerCreate(PFN_TIMER_CALLBACK pfnTimerCB, void* context);
extern void TimerClose(HANDLE hTimer);
extern int TimerStop(HANDLE hTimer);
-extern void TimerStart(HANDLE hTimer, UINT32 expirationInUs);
+extern void TimerStart(HANDLE hTimer, u32 expirationInUs);
extern SIZE_T GetTickCount(void);
extern HANDLE WaitEventCreate(void);
extern int WaitEventWait(HANDLE hWait);
// If >0, hWait got signaled. If ==0, timeout. If < 0, error
-extern int WaitEventWaitEx(HANDLE hWait, UINT32 TimeoutInMs);
+extern int WaitEventWaitEx(HANDLE hWait, u32 TimeoutInMs);
extern HANDLE SpinlockCreate(void);
extern void SpinlockClose(HANDLE hSpin);
//
// Basic types
//
-typedef UINT32 RNDIS_REQUEST_ID;
-typedef UINT32 RNDIS_HANDLE;
-typedef UINT32 RNDIS_STATUS;
-typedef UINT32 RNDIS_REQUEST_TYPE;
-typedef UINT32 RNDIS_OID;
-typedef UINT32 RNDIS_CLASS_ID;
-typedef UINT32 RNDIS_MEDIUM;
-typedef UINT32 *PRNDIS_REQUEST_ID;
-typedef UINT32 *PRNDIS_HANDLE;
-typedef UINT32 *PRNDIS_STATUS;
-typedef UINT32 *PRNDIS_REQUEST_TYPE;
-typedef UINT32 *PRNDIS_OID;
-typedef UINT32 *PRNDIS_CLASS_ID;
-typedef UINT32 *PRNDIS_MEDIUM;
-typedef UINT32 RNDIS_AF;
+typedef u32 RNDIS_REQUEST_ID;
+typedef u32 RNDIS_HANDLE;
+typedef u32 RNDIS_STATUS;
+typedef u32 RNDIS_REQUEST_TYPE;
+typedef u32 RNDIS_OID;
+typedef u32 RNDIS_CLASS_ID;
+typedef u32 RNDIS_MEDIUM;
+typedef u32 *PRNDIS_REQUEST_ID;
+typedef u32 *PRNDIS_HANDLE;
+typedef u32 *PRNDIS_STATUS;
+typedef u32 *PRNDIS_REQUEST_TYPE;
+typedef u32 *PRNDIS_OID;
+typedef u32 *PRNDIS_CLASS_ID;
+typedef u32 *PRNDIS_MEDIUM;
+typedef u32 RNDIS_AF;
//
// Status codes
typedef struct _RNDIS_INITIALIZE_REQUEST
{
RNDIS_REQUEST_ID RequestId;
- UINT32 MajorVersion;
- UINT32 MinorVersion;
- UINT32 MaxTransferSize;
+ u32 MajorVersion;
+ u32 MinorVersion;
+ u32 MaxTransferSize;
} RNDIS_INITIALIZE_REQUEST, *PRNDIS_INITIALIZE_REQUEST;
{
RNDIS_REQUEST_ID RequestId;
RNDIS_STATUS Status;
- UINT32 MajorVersion;
- UINT32 MinorVersion;
- UINT32 DeviceFlags;
+ u32 MajorVersion;
+ u32 MinorVersion;
+ u32 DeviceFlags;
RNDIS_MEDIUM Medium;
- UINT32 MaxPacketsPerMessage;
- UINT32 MaxTransferSize;
- UINT32 PacketAlignmentFactor;
- UINT32 AFListOffset;
- UINT32 AFListSize;
+ u32 MaxPacketsPerMessage;
+ u32 MaxTransferSize;
+ u32 PacketAlignmentFactor;
+ u32 AFListOffset;
+ u32 AFListSize;
} RNDIS_INITIALIZE_COMPLETE, *PRNDIS_INITIALIZE_COMPLETE;
typedef struct _RNDIS_CO_ADDRESS_FAMILY
{
RNDIS_AF AddressFamily;
- UINT32 MajorVersion;
- UINT32 MinorVersion;
+ u32 MajorVersion;
+ u32 MinorVersion;
} RNDIS_CO_ADDRESS_FAMILY, *PRNDIS_CO_ADDRESS_FAMILY;
{
RNDIS_REQUEST_ID RequestId;
RNDIS_OID Oid;
- UINT32 InformationBufferLength;
- UINT32 InformationBufferOffset;
+ u32 InformationBufferLength;
+ u32 InformationBufferOffset;
RNDIS_HANDLE DeviceVcHandle;
} RNDIS_QUERY_REQUEST, *PRNDIS_QUERY_REQUEST;
{
RNDIS_REQUEST_ID RequestId;
RNDIS_STATUS Status;
- UINT32 InformationBufferLength;
- UINT32 InformationBufferOffset;
+ u32 InformationBufferLength;
+ u32 InformationBufferOffset;
} RNDIS_QUERY_COMPLETE, *PRNDIS_QUERY_COMPLETE;
{
RNDIS_REQUEST_ID RequestId;
RNDIS_OID Oid;
- UINT32 InformationBufferLength;
- UINT32 InformationBufferOffset;
+ u32 InformationBufferLength;
+ u32 InformationBufferOffset;
RNDIS_HANDLE DeviceVcHandle;
} RNDIS_SET_REQUEST, *PRNDIS_SET_REQUEST;
//
typedef struct _RNDIS_RESET_REQUEST
{
- UINT32 Reserved;
+ u32 Reserved;
} RNDIS_RESET_REQUEST, *PRNDIS_RESET_REQUEST;
//
typedef struct _RNDIS_RESET_COMPLETE
{
RNDIS_STATUS Status;
- UINT32 AddressingReset;
+ u32 AddressingReset;
} RNDIS_RESET_COMPLETE, *PRNDIS_RESET_COMPLETE;
typedef struct _RNDIS_INDICATE_STATUS
{
RNDIS_STATUS Status;
- UINT32 StatusBufferLength;
- UINT32 StatusBufferOffset;
+ u32 StatusBufferLength;
+ u32 StatusBufferOffset;
} RNDIS_INDICATE_STATUS, *PRNDIS_INDICATE_STATUS;
typedef struct _RNDIS_DIAGNOSTIC_INFO
{
RNDIS_STATUS DiagStatus;
- UINT32 ErrorOffset;
+ u32 ErrorOffset;
} RNDIS_DIAGNOSTIC_INFO, *PRNDIS_DIAGNOSTIC_INFO;
//
typedef struct _RNDIS_PACKET
{
- UINT32 DataOffset;
- UINT32 DataLength;
- UINT32 OOBDataOffset;
- UINT32 OOBDataLength;
- UINT32 NumOOBDataElements;
- UINT32 PerPacketInfoOffset;
- UINT32 PerPacketInfoLength;
+ u32 DataOffset;
+ u32 DataLength;
+ u32 OOBDataOffset;
+ u32 OOBDataLength;
+ u32 NumOOBDataElements;
+ u32 PerPacketInfoOffset;
+ u32 PerPacketInfoLength;
RNDIS_HANDLE VcHandle;
- UINT32 Reserved;
+ u32 Reserved;
} RNDIS_PACKET, *PRNDIS_PACKET;
//
//
typedef struct _RNDIS_OOBD
{
- UINT32 Size;
+ u32 Size;
RNDIS_CLASS_ID Type;
- UINT32 ClassInformationOffset;
+ u32 ClassInformationOffset;
} RNDIS_OOBD, *PRNDIS_OOBD;
//
//
typedef struct _RNDIS_PER_PACKET_INFO
{
- UINT32 Size;
- UINT32 Type;
- UINT32 PerPacketInformationOffset;
+ u32 Size;
+ u32 Type;
+ u32 PerPacketInformationOffset;
} RNDIS_PER_PACKET_INFO, *PRNDIS_PER_PACKET_INFO;
//
typedef struct _RNDIS_CONFIG_PARAMETER_INFO
{
- UINT32 ParameterNameOffset;
- UINT32 ParameterNameLength;
- UINT32 ParameterType;
- UINT32 ParameterValueOffset;
- UINT32 ParameterValueLength;
+ u32 ParameterNameOffset;
+ u32 ParameterNameLength;
+ u32 ParameterType;
+ u32 ParameterValueOffset;
+ u32 ParameterValueLength;
} RNDIS_CONFIG_PARAMETER_INFO, *PRNDIS_CONFIG_PARAMETER_INFO;
//
RNDIS_REQUEST_TYPE RequestType;
RNDIS_OID Oid;
RNDIS_HANDLE DeviceVcHandle;
- UINT32 InformationBufferLength;
- UINT32 InformationBufferOffset;
+ u32 InformationBufferLength;
+ u32 InformationBufferOffset;
} RCONDIS_MP_QUERY_REQUEST, *PRCONDIS_MP_QUERY_REQUEST;
RNDIS_REQUEST_TYPE RequestType;
RNDIS_OID Oid;
RNDIS_HANDLE DeviceVcHandle;
- UINT32 InformationBufferLength;
- UINT32 InformationBufferOffset;
+ u32 InformationBufferLength;
+ u32 InformationBufferOffset;
} RCONDIS_MP_SET_REQUEST, *PRCONDIS_MP_SET_REQUEST;
{
RNDIS_HANDLE NdisVcHandle;
RNDIS_STATUS Status;
- UINT32 StatusBufferLength;
- UINT32 StatusBufferOffset;
+ u32 StatusBufferLength;
+ u32 StatusBufferOffset;
} RCONDIS_INDICATE_STATUS, *PRCONDIS_INDICATE_STATUS;
typedef struct _RCONDIS_SPECIFIC_PARAMETERS
{
- UINT32 ParameterType;
- UINT32 ParameterLength;
- UINT32 ParameterOffset;
+ u32 ParameterType;
+ u32 ParameterLength;
+ u32 ParameterOffset;
} RCONDIS_SPECIFIC_PARAMETERS, *PRCONDIS_SPECIFIC_PARAMETERS;
typedef struct _RCONDIS_MEDIA_PARAMETERS
{
- UINT32 Flags;
- UINT32 Reserved1;
- UINT32 Reserved2;
+ u32 Flags;
+ u32 Reserved1;
+ u32 Reserved2;
RCONDIS_SPECIFIC_PARAMETERS MediaSpecific;
} RCONDIS_MEDIA_PARAMETERS, *PRCONDIS_MEDIA_PARAMETERS;
typedef struct _RNDIS_FLOWSPEC
{
- UINT32 TokenRate;
- UINT32 TokenBucketSize;
- UINT32 PeakBandwidth;
- UINT32 Latency;
- UINT32 DelayVariation;
- UINT32 ServiceType;
- UINT32 MaxSduSize;
- UINT32 MinimumPolicedSize;
+ u32 TokenRate;
+ u32 TokenBucketSize;
+ u32 PeakBandwidth;
+ u32 Latency;
+ u32 DelayVariation;
+ u32 ServiceType;
+ u32 MaxSduSize;
+ u32 MinimumPolicedSize;
} RNDIS_FLOWSPEC, *PRNDIS_FLOWSPEC;
typedef struct _RCONDIS_CALL_MANAGER_PARAMETERS
typedef struct _RCONDIS_MP_ACTIVATE_VC_REQUEST
{
RNDIS_REQUEST_ID RequestId;
- UINT32 Flags;
+ u32 Flags;
RNDIS_HANDLE DeviceVcHandle;
- UINT32 MediaParamsOffset;
- UINT32 MediaParamsLength;
- UINT32 CallMgrParamsOffset;
- UINT32 CallMgrParamsLength;
+ u32 MediaParamsOffset;
+ u32 MediaParamsLength;
+ u32 CallMgrParamsOffset;
+ u32 CallMgrParamsLength;
} RCONDIS_MP_ACTIVATE_VC_REQUEST, *PRCONDIS_MP_ACTIVATE_VC_REQUEST;
//
typedef struct _RCONDIS_MP_DEACTIVATE_VC_REQUEST
{
RNDIS_REQUEST_ID RequestId;
- UINT32 Flags;
+ u32 Flags;
RNDIS_HANDLE DeviceVcHandle;
} RCONDIS_MP_DEACTIVATE_VC_REQUEST, *PRCONDIS_MP_DEACTIVATE_VC_REQUEST;
//
typedef __struct_bcount(MessageLength) struct _RNDIS_MESSAGE
{
- UINT32 NdisMessageType;
+ u32 NdisMessageType;
//
// Total length of this message, from the beginning
// of the RNDIS_MESSAGE struct, in bytes.
//
- UINT32 MessageLength;
+ u32 MessageLength;
// Actual message
RNDIS_MESSAGE_CONTAINER Message;
return t;
}
-void TimerStart(HANDLE hTimer, UINT32 expirationInUs)
+void TimerStart(HANDLE hTimer, u32 expirationInUs)
{
TIMER* t = (TIMER* )hTimer;
return ret;
}
-int WaitEventWaitEx(HANDLE hWait, UINT32 TimeoutInMs)
+int WaitEventWaitEx(HANDLE hWait, u32 TimeoutInMs)
{
int ret=0;
WAITEVENT* waitEvent = (WAITEVENT* )hWait;