示例#1
0
/*
int SimpleCommModel::Iteration(struct timeval tCurrent)
{
	if (CarCommModel::Iteration(tCurrent))
		return 1;

	std::map<PacketSequence, MessageHistory>::iterator iterMsgHistory;
	for (iterMsgHistory = m_mapMsgHistory.begin(); iterMsgHistory != m_mapMsgHistory.end(); ++iterMsgHistory)
		iterMsgHistory->second.tRelevant = tCurrent;

	while (!m_vecRebroadcast.empty() && m_vecRebroadcast.front().tNext <= tCurrent)
	{
		pop_heap(m_vecRebroadcast.begin(), m_vecRebroadcast.end());
		RebroadcastMessage & msgRebroadcast = m_vecRebroadcast.back();
		// setup for next rebroadcast
		if (msgRebroadcast.msg.m_tTime + msgRebroadcast.msg.m_tLifetime < tCurrent)
		{
			m_mapMsgHistory.erase(msgRebroadcast.msg.m_ID.srcID);
			m_vecRebroadcast.pop_back();
		}
		else
		{
			msgRebroadcast.msg.m_tTX = msgRebroadcast.tNext;
			TransmitMessage(msgRebroadcast.msg); // only rebroadcast if there's time left
			msgRebroadcast.tIntervalLow = msgRebroadcast.tIntervalHigh;
			msgRebroadcast.tIntervalHigh = msgRebroadcast.tIntervalHigh + m_tRebroadcastInterval;
			msgRebroadcast.tNext = msgRebroadcast.tIntervalLow + MakeTime(RandDouble(0., ToDouble(m_tRebroadcastInterval)));
			push_heap(m_vecRebroadcast.begin(), m_vecRebroadcast.end());
		}
	}
	return 0;
}
*/
int SimpleCommModel::Save(std::map<QString, QString> & mapParams)
{
	if (CarCommModel::Save(mapParams))
		return 1;

	mapParams[SIMPLECOMMMODEL_REBROADCASTINTERVAL_PARAM] = QString("%1").arg(ToDouble(m_tRebroadcastInterval));
	mapParams[SIMPLECOMMMODEL_DOREBROADCAST_PARAM] = BooleanToString(m_bRebroadcast);
	mapParams[SIMPLECOMMMODEL_MOBILEGATEWAY_PARAM] = BooleanToString(m_bGateway);
	mapParams[SIMPLECOMMMODEL_RBXJITTER_PARAM] = BooleanToString(m_bJitter);
	return 0;
}
示例#2
0
int CarModel::Save(std::map<QString, QString> & mapParams)
{
	if (Model::Save(mapParams))
		return 1;

	mapParams[CARMODEL_PARAM_DELAY] = QString("%1").arg(ToDouble(m_tDelay));
	mapParams[CARMODEL_PARAM_CARIP] = IPAddressToString(m_ipCar);
	mapParams[CARMODEL_PARAM_LOGCAR] = BooleanToString(m_bLogThisCar);
	mapParams[CARMODEL_LINK_PARAM] = m_pLinkModel == NULL ? "NULL" : m_pLinkModel->GetModelName();
	mapParams[CARMODEL_PHYS_PARAM] = m_pPhysModel == NULL ? "NULL" : m_pPhysModel->GetModelName();
	mapParams[CARMODEL_COMM_PARAM] = m_pCommModel == NULL ? "NULL" : m_pCommModel->GetModelName();
	mapParams[CARMODEL_TRACKSPEED_PARAM] = BooleanToString(m_bTrackSpeed);

	return 0;
}
示例#3
0
		void		c_gbuffer_system::SaveSettings(TiXmlElement* dx9_element)
		{
			TiXmlElement* gbuffer_element = NULL;

			gbuffer_element = new TiXmlElement("GBuffer");
				dx9_element->LinkEndChild(gbuffer_element);

			gbuffer_element->SetAttribute("enabled", BooleanToString(g_system_enabled));
		}
示例#4
0
		void SaveSettings(TiXmlElement* dx9_element)
		{
			if(dx9_element != NULL)
			{
				TiXmlElement* camo_element = new TiXmlElement("nVidiaActiveCamouflage");
				dx9_element->LinkEndChild(camo_element);

				camo_element->SetAttribute("basic", BooleanToString(g_nvidia_use_basic_camo));
			}

			DX9::c_gbuffer_system::SaveSettings(dx9_element);
			PostProcessing::SaveSettings(dx9_element);
			g_render_upgrades.SaveSettings(dx9_element);
			ShaderExtension::SaveSettings(dx9_element);
		}
示例#5
0
void CStringVariable::SetBoolean(const bool Value)
{
 m_Value = BooleanToString(Value);
}
示例#6
0
文件: qgl.cpp 项目: janisl/jlquake
static void APIENTRY logDepthMask( GLboolean flag ) {
	QGL_Log( "glDepthMask( %s )\n", BooleanToString( flag ) );
	glDepthMask( flag );
}
示例#7
0
static void APIENTRY logDepthMask(GLboolean flag)
{
	fprintf(log_fp, "glDepthMask( %s )\n", BooleanToString(flag));
	dllDepthMask(flag);
}
示例#8
0
VOID
DumpAfdConnection(
    PAFD_CONNECTION Connection,
    DWORD ActualAddress
)

/*++

Routine Description:

    Dumps the specified AFD_CONNECTION structures.

Arguments:

    Connection - Points to the AFD_CONNECTION structure to dump.

    ActualAddress - The actual address where the structure resides on the
        debugee.

Return Value:

    None.

--*/

{

    UCHAR address[MAX_TRANSPORT_ADDR];
    ULONG result;

    dprintf(
        "AFD_CONNECTION @ %08lx:\n",
        ActualAddress
    );

    dprintf(
        "    Type                         = %04X (%s)\n",
        Connection->Type,
        StructureTypeToString( Connection->Type )
    );

    dprintf(
        "    ReferenceCount               = %d\n",
        Connection->ReferenceCount
    );

    dprintf(
        "    State                        = %08X (%s)\n",
        Connection->State,
        ConnectionStateToString( Connection->State )
    );

    dprintf(
        "    Handle                       = %08lx\n",
        Connection->Handle
    );

    dprintf(
        "    FileObject                   = %08lx\n",
        Connection->FileObject
    );

    dprintf(
        "    ConnectTime                  = %s\n",
        SystemTimeToString( Connection->ConnectTime )
    );

    if( Connection->TdiBufferring )
    {
        dprintf(
            "    ReceiveBytesIndicated        = %s\n",
            LongLongToString( Connection->Common.Bufferring.ReceiveBytesIndicated.QuadPart )
        );

        dprintf(
            "    ReceiveBytesTaken            = %s\n",
            LongLongToString( Connection->Common.Bufferring.ReceiveBytesTaken.QuadPart )
        );

        dprintf(
            "    ReceiveBytesOutstanding      = %s\n",
            LongLongToString( Connection->Common.Bufferring.ReceiveBytesOutstanding.QuadPart )
        );

        dprintf(
            "    ReceiveExpeditedBytesIndicated   = %s\n",
            LongLongToString( Connection->Common.Bufferring.ReceiveExpeditedBytesIndicated.QuadPart )
        );

        dprintf(
            "    ReceiveExpeditedBytesTaken       = %s\n",
            LongLongToString( Connection->Common.Bufferring.ReceiveExpeditedBytesTaken.QuadPart )
        );

        dprintf(
            "    ReceiveExpeditedBytesOutstanding = %s\n",
            LongLongToString( Connection->Common.Bufferring.ReceiveExpeditedBytesOutstanding.QuadPart )
        );

        dprintf(
            "    NonBlockingSendPossible      = %s\n",
            BooleanToString( Connection->Common.Bufferring.NonBlockingSendPossible )
        );

        dprintf(
            "    ZeroByteReceiveIndicated     = %s\n",
            BooleanToString( Connection->Common.Bufferring.ZeroByteReceiveIndicated )
        );
    }
    else
    {
        if( IS_LIST_EMPTY(
                    ActualAddress,
                    Connection,
                    Common.NonBufferring.ReceiveIrpListHead ) ) {

            dprintf(
                "    ReceiveIrpListHead           = EMPTY\n"
            );

        } else {

            dprintf(
                "    ReceiveIrpListHead           @ %08lx\n",
                ACTUAL_ADDRESS(
                    ActualAddress,
                    Connection,
                    Common.NonBufferring.ReceiveIrpListHead
                )
            );

        }

        if( IS_LIST_EMPTY(
                    ActualAddress,
                    Connection,
                    Common.NonBufferring.ReceiveBufferListHead ) ) {

            dprintf(
                "    ReceiveBufferListHead        = EMPTY\n"
            );

        } else {

            dprintf(
                "    ReceiveBufferListHead        @ %08lx\n",
                ACTUAL_ADDRESS(
                    ActualAddress,
                    Connection,
                    Common.NonBufferring.ReceiveBufferListHead
                )
            );

        }

        if( IS_LIST_EMPTY(
                    ActualAddress,
                    Connection,
                    Common.NonBufferring.SendIrpListHead ) ) {

            dprintf(
                "    SendIrpListHead              = EMPTY\n"
            );

        } else {

            dprintf(
                "    SendIrpListHead              @ %08lx\n",
                ACTUAL_ADDRESS(
                    ActualAddress,
                    Connection,
                    Common.NonBufferring.SendIrpListHead
                )
            );

        }

        dprintf(
            "    BufferredReceiveBytes        = %lu\n",
            Connection->Common.NonBufferring.BufferredReceiveBytes
        );

        dprintf(
            "    BufferredExpeditedBytes      = %lu\n",
            Connection->Common.NonBufferring.BufferredExpeditedBytes
        );

        dprintf(
            "    BufferredReceiveCount        = %u\n",
            Connection->Common.NonBufferring.BufferredReceiveCount
        );

        dprintf(
            "    BufferredExpeditedCount      = %u\n",
            Connection->Common.NonBufferring.BufferredExpeditedCount
        );

        dprintf(
            "    ReceiveBytesInTransport      = %lu\n",
            Connection->Common.NonBufferring.ReceiveBytesInTransport
        );

        dprintf(
            "    BufferredSendBytes           = %lu\n",
            Connection->Common.NonBufferring.BufferredSendBytes
        );

        dprintf(
            "    ReceiveCountInTransport      = %u\n",
            Connection->Common.NonBufferring.ReceiveCountInTransport
        );

        dprintf(
            "    BufferredSendCount           = %u\n",
            Connection->Common.NonBufferring.BufferredSendCount
        );

        dprintf(
            "    DisconnectIrp                = %08lx\n",
            Connection->Common.NonBufferring.DisconnectIrp
        );
    }

    dprintf(
        "    Endpoint                     = %08lx\n",
        Connection->Endpoint
    );

    dprintf(
        "    MaxBufferredReceiveBytes     = %lu\n",
        Connection->MaxBufferredReceiveBytes
    );

    dprintf(
        "    MaxBufferredSendBytes        = %lu\n",
        Connection->MaxBufferredSendBytes
    );

    dprintf(
        "    MaxBufferredReceiveCount     = %u\n",
        Connection->MaxBufferredReceiveCount
    );

    dprintf(
        "    MaxBufferredSendCount        = %u\n",
        Connection->MaxBufferredSendCount
    );

    dprintf(
        "    ConnectDataBuffers           = %08lx\n",
        Connection->ConnectDataBuffers
    );

    dprintf(
        "    OwningProcess                = %08lx\n",
        Connection->OwningProcess
    );

    dprintf(
        "    DeviceObject                 = %08lx\n",
        Connection->DeviceObject
    );

    dprintf(
        "    RemoteAddress                = %08lx\n",
        Connection->RemoteAddress
    );

    dprintf(
        "    RemoteAddressLength          = %lu\n",
        Connection->RemoteAddressLength
    );

    if( Connection->RemoteAddressLength <= sizeof(address) &&
            Connection->RemoteAddress != NULL ) {

        if( ReadMemory(
                    (DWORD)Connection->RemoteAddress,
                    address,
                    sizeof(address),
                    &result
                ) ) {

            DumpTransportAddress(
                "    ",
                (PTRANSPORT_ADDRESS)address,
                (DWORD)Connection->RemoteAddress
            );

        }

    }

    dprintf(
        "    DisconnectIndicated          = %s\n",
        BooleanToString( Connection->DisconnectIndicated )
    );

    dprintf(
        "    AbortIndicated               = %s\n",
        BooleanToString( Connection->AbortIndicated )
    );

    dprintf(
        "    TdiBufferring                = %s\n",
        BooleanToString( Connection->TdiBufferring )
    );

    dprintf(
        "    ConnectedReferenceAdded      = %s\n",
        BooleanToString( Connection->ConnectedReferenceAdded )
    );

    dprintf(
        "    SpecialCondition             = %s\n",
        BooleanToString( Connection->SpecialCondition )
    );

    dprintf(
        "    CleanupBegun                 = %s\n",
        BooleanToString( Connection->CleanupBegun )
    );

    dprintf(
        "    ClosePendedTransmit          = %s\n",
        BooleanToString( Connection->ClosePendedTransmit )
    );

    if( IsCheckedAfd ) {

        dprintf(
            "    CurrentReferenceSlot         = %lu\n",
            Connection->CurrentReferenceSlot % MAX_REFERENCE
        );

        dprintf(
            "    ReferenceDebug               = %08lx\n",
            ACTUAL_ADDRESS(
                ActualAddress,
                Connection,
                ReferenceDebug
            )
        );

    }

    dprintf( "\n" );

}   // DumpAfdConnection
示例#9
0
VOID
DumpAfdBuffer(
    PAFD_BUFFER Buffer,
    DWORD ActualAddress
)
{

    dprintf(
        "AFD_BUFFER @ %08lx\n",
        ActualAddress
    );

    dprintf(
        "    BufferListHead         = %08lx\n",
        Buffer->BufferListHead
    );

    dprintf(
        "    NextBuffer             = %08lx\n",
        Buffer->NextBuffer
    );

    dprintf(
        "    Buffer                 = %08lx\n",
        Buffer->Buffer
    );

    dprintf(
        "    BufferLength           = %08lx\n",
        Buffer->BufferLength
    );

    dprintf(
        "    DataLength             = %08lx\n",
        Buffer->DataLength
    );

    dprintf(
        "    DataOffset             = %08lx\n",
        Buffer->DataOffset
    );

    dprintf(
        "    Irp                    = %08lx\n",
        Buffer->Irp
    );

    dprintf(
        "    Mdl                    = %08lx\n",
        Buffer->Mdl
    );

    dprintf(
        "    Context                = %08lx\n",
        Buffer->Context
    );

    dprintf(
        "    SourceAddress          = %08lx\n",
        Buffer->SourceAddress
    );

    dprintf(
        "    SourceAddressLength    = %08lx\n",
        Buffer->SourceAddressLength
    );

    dprintf(
        "    FileObject             = %08lx\n",
        Buffer->FileObject
    );

    dprintf(
        "    AllocatedAddressLength = %04X\n",
        Buffer->AllocatedAddressLength
    );

    dprintf(
        "    ExpeditedData          = %s\n",
        BooleanToString( Buffer->ExpeditedData )
    );

    dprintf(
        "    PartialMessage         = %s\n",
        BooleanToString( Buffer->PartialMessage )
    );

#if DBG
    if( IsCheckedAfd ) {

        dprintf(
            "    TotalChainLength       = %08lx\n",
            Buffer->TotalChainLength
        );

    }
#endif

    dprintf( "\n" );

}   // DumpAfdBuffer
示例#10
0
VOID
DumpAfdTransmitInfo(
    PAFD_TRANSMIT_FILE_INFO_INTERNAL TransmitInfo,
    DWORD ActualAddress
)
{

    dprintf(
        "AFD_TRANSMIT_FILE_INFO_INTERNAL @ %08lx\n",
        ActualAddress
    );

    dprintf(
        "    Offset                 = %s\n",
        LongLongToString( TransmitInfo->Offset )
    );

    dprintf(
        "    FileWriteLength        = %s\n",
        LongLongToString( TransmitInfo->FileWriteLength )
    );

    dprintf(
        "    SendPacketLength       = %08lx\n",
        TransmitInfo->SendPacketLength
    );

    dprintf(
        "    FileHandle             = %08lx\n",
        TransmitInfo->FileHandle
    );

    dprintf(
        "    Head                   = %08lx\n",
        TransmitInfo->Head
    );

    dprintf(
        "    HeadLength             = %08lx\n",
        TransmitInfo->HeadLength
    );

    dprintf(
        "    Tail                   = %08lx\n",
        TransmitInfo->Tail
    );

    dprintf(
        "    TailLength             = %08lx\n",
        TransmitInfo->TailLength
    );

    dprintf(
        "    Flags                  = %08lx\n",
        TransmitInfo->Flags
    );

    dprintf(
        "    _Dummy                 = %08lx\n",
        TransmitInfo->_Dummy
    );

    dprintf(
        "    TotalBytesToSend       = %s\n",
        LongLongToString( TransmitInfo->TotalBytesToSend )
    );

    dprintf(
        "    BytesRead              = %s\n",
        LongLongToString( TransmitInfo->BytesRead )
    );

    dprintf(
        "    BytesSent              = %s\n",
        LongLongToString( TransmitInfo->BytesSent )
    );

    dprintf(
        "    FileObject             = %08lx\n",
        TransmitInfo->FileObject
    );

    dprintf(
        "    DeviceObject           = %08lx\n",
        TransmitInfo->DeviceObject
    );

    dprintf(
        "    TdiFileObject          = %08lx\n",
        TransmitInfo->TdiFileObject
    );

    dprintf(
        "    TdiDeviceObject        = %08lx\n",
        TransmitInfo->TdiDeviceObject
    );

    dprintf(
        "    TransmitIrp            = %08lx\n",
        TransmitInfo->TransmitIrp
    );

    dprintf(
        "    Endpoint               = %08lx\n",
        TransmitInfo->Endpoint
    );

    dprintf(
        "    FileMdl                = %08lx\n",
        TransmitInfo->FileMdl
    );

    dprintf(
        "    HeadMdl                = %08lx\n",
        TransmitInfo->HeadMdl
    );

    dprintf(
        "    TailMdl                = %08lx\n",
        TransmitInfo->TailMdl
    );

    dprintf(
        "    FirstFileMdlAfterHead  = %08lx\n",
        TransmitInfo->FirstFileMdlAfterHead
    );

    dprintf(
        "    LastFileMdlBeforeTail  = %08lx\n",
        TransmitInfo->LastFileMdlBeforeTail
    );

    dprintf(
        "    IrpUsedTOSendTail      = %08lx\n",
        TransmitInfo->IrpUsedToSendTail
    );

    dprintf(
        "    FileMdlLength          = %08lx\n",
        TransmitInfo->FileMdlLength
    );

    dprintf(
        "    ReadPending            = %s\n",
        BooleanToString( TransmitInfo->ReadPending )
    );

    dprintf(
        "    CompletionPending      = %s\n",
        BooleanToString( TransmitInfo->CompletionPending )
    );

    dprintf(
        "    NeedToSendHead         = %s\n",
        BooleanToString( TransmitInfo->NeedToSendHead )
    );

    dprintf(
        "    Queued                 = %s\n",
        BooleanToString( TransmitInfo->Queued )
    );

    dprintf(
        "    Read.Irp               = %08lx%s\n",
        TransmitInfo->Read.Irp,
        IsTransmitIrpBusy( TransmitInfo->Read.Irp )
        ? " (BUSY)"
        : ""
    );

    dprintf(
        "    Read.AfdBuffer         = %08lx\n",
        TransmitInfo->Read.AfdBuffer
    );

    dprintf(
        "    Read.Length            = %08lx\n",
        TransmitInfo->Read.Length
    );

    dprintf(
        "    Send1.Irp              = %08lx%s\n",
        TransmitInfo->Send1.Irp,
        IsTransmitIrpBusy( TransmitInfo->Send1.Irp )
        ? " (BUSY)"
        : ""
    );

    dprintf(
        "    Send1.AfdBuffer        = %08lx\n",
        TransmitInfo->Send1.AfdBuffer
    );

    dprintf(
        "    Send1.Length           = %08lx\n",
        TransmitInfo->Send1.Length
    );

    dprintf(
        "    Send2.Irp              = %08lx%s\n",
        TransmitInfo->Send2.Irp,
        IsTransmitIrpBusy( TransmitInfo->Send2.Irp )
        ? " (BUSY)"
        : ""
    );

    dprintf(
        "    Send2.AfdBuffer        = %08lx\n",
        TransmitInfo->Send2.AfdBuffer
    );

    dprintf(
        "    Send2.Length           = %08lx\n",
        TransmitInfo->Send2.Length
    );

    dprintf( "\n" );

}   // DumpAfdTransmitInfo
示例#11
0
VOID
DumpAfdEndpoint(
    PAFD_ENDPOINT Endpoint,
    DWORD ActualAddress
)

/*++

Routine Description:

    Dumps the specified AFD_ENDPOINT structure.

Arguments:

    Endpoint - Points to the AFD_ENDPOINT to dump.

    ActualAddress - The actual address where the structure resides on the
        debugee.

Return Value:

    None.

--*/

{

    AFD_TRANSPORT_INFO transportInfo;
    UNICODE_STRING unicodeString;
    WCHAR buffer[MAX_PATH];
    UCHAR address[MAX_TRANSPORT_ADDR];
    ULONG result;

    dprintf(
        "AFD_ENDPOINT @ %08lx:\n",
        ActualAddress
    );

    dprintf(
        "    Type                         = %04X (%s)\n",
        Endpoint->Type,
        StructureTypeToString( Endpoint->Type )
    );

    dprintf(
        "    ReferenceCount               = %d\n",
        Endpoint->ReferenceCount
    );

    dprintf(
        "    State                        = %02X (%s)\n",
        Endpoint->State,
        EndpointStateToString( Endpoint->State )
    );

    dprintf(
        "    NonBlocking                  = %s\n",
        BooleanToString( Endpoint->NonBlocking )
    );

    dprintf(
        "    InLine                       = %s\n",
        BooleanToString( Endpoint->InLine )
    );

    dprintf(
        "    TdiBufferring                = %s\n",
        BooleanToString( Endpoint->TdiBufferring )
    );

    dprintf(
        "    TransportInfo                = %08lx\n",
        Endpoint->TransportInfo
    );

    if( ReadMemory(
                (DWORD)Endpoint->TransportInfo,
                &transportInfo,
                sizeof(transportInfo),
                &result
            ) &&
            ReadMemory(
                (DWORD)transportInfo.TransportDeviceName.Buffer,
                buffer,
                sizeof(buffer),
                &result
            ) ) {

        unicodeString = transportInfo.TransportDeviceName;
        unicodeString.Buffer = buffer;

        dprintf(
            "        TransportDeviceName      = %wZ\n",
            &unicodeString
        );

    }

    dprintf(
        "    EndpointType                 = %08lx (%s)\n",
        Endpoint->EndpointType,
        EndpointTypeToString( Endpoint->EndpointType )
    );

    dprintf(
        "    AddressHandle                = %08lx\n",
        Endpoint->AddressHandle
    );

    dprintf(
        "    AddressFileObject            = %08lx\n",
        Endpoint->AddressFileObject
    );

    switch( Endpoint->Type ) {

    case AfdBlockTypeVcConnecting :

        dprintf(
            "    Connection                   = %08lx\n",
            Endpoint->Common.VcConnecting.Connection
        );

        dprintf(
            "    ConnectStatus                = %08lx\n",
            Endpoint->Common.VcConnecting.ConnectStatus
        );

        dprintf(
            "    ListenEndpoint               = %08lx\n",
            Endpoint->Common.VcConnecting.ListenEndpoint
        );

        break;

    case AfdBlockTypeVcListening :

        if( IS_LIST_EMPTY(
                    ActualAddress,
                    Endpoint,
                    Common.VcListening.FreeConnectionListHead ) ) {

            dprintf(
                "    FreeConnectionListHead       = EMPTY\n"
            );

        } else {

            dprintf(
                "    FreeConnectionListHead       @ %08lx\n",
                ACTUAL_ADDRESS(
                    ActualAddress,
                    Endpoint,
                    Common.VcListening.FreeConnectionListHead
                )
            );

        }

        if( IS_LIST_EMPTY(
                    ActualAddress,
                    Endpoint,
                    Common.VcListening.UnacceptedConnectionListHead ) ) {

            dprintf(
                "    UnacceptedConnectionListHead = EMPTY\n"
            );

        } else {

            dprintf(
                "    UnacceptedConnectionListHead @ %08lx\n",
                ACTUAL_ADDRESS(
                    ActualAddress,
                    Endpoint,
                    Common.VcListening.UnacceptedConnectionListHead
                )
            );

        }

        if( IS_LIST_EMPTY(
                    ActualAddress,
                    Endpoint,
                    Common.VcListening.ReturnedConnectionListHead ) ) {

            dprintf(
                "    ReturnedConnectionListHead   = EMPTY\n"
            );

        } else {

            dprintf(
                "    ReturnedConnectionListHead   @ %08lx\n",
                ACTUAL_ADDRESS(
                    ActualAddress,
                    Endpoint,
                    Common.VcListening.ReturnedConnectionListHead
                )
            );

        }

        if( IS_LIST_EMPTY(
                    ActualAddress,
                    Endpoint,
                    Common.VcListening.ListeningIrpListHead ) ) {

            dprintf(
                "    ListeningIrpListHead         = EMPTY\n"
            );

        } else {

            dprintf(
                "    ListeningIrpListHead         @ %08lx\n",
                ACTUAL_ADDRESS(
                    ActualAddress,
                    Endpoint,
                    Common.VcListening.ListeningIrpListHead
                )
            );

        }

        dprintf(
            "    FailedConnectionAdds         = %08lx\n",
            Endpoint->Common.VcListening.FailedConnectionAdds
        );

        break;

    case AfdBlockTypeDatagram :

        dprintf(
            "    RemoteAddress                = %08lx\n",
            Endpoint->Common.Datagram.RemoteAddress
        );

        dprintf(
            "    RemoteAddressLength          = %08lx\n",
            Endpoint->Common.Datagram.RemoteAddressLength
        );

        if( IS_LIST_EMPTY(
                    ActualAddress,
                    Endpoint,
                    Common.Datagram.ReceiveIrpListHead ) ) {

            dprintf(
                "    ReceiveIrpListHead           = EMPTY\n"
            );

        } else {

            dprintf(
                "    ReceiveIrpListHead           @ %08lx\n",
                ACTUAL_ADDRESS(
                    ActualAddress,
                    Endpoint,
                    Common.Datagram.ReceiveIrpListHead
                )
            );

        }

        if( IS_LIST_EMPTY(
                    ActualAddress,
                    Endpoint,
                    Common.Datagram.PeekIrpListHead ) ) {

            dprintf(
                "    PeekIrpListHead              = EMPTY\n"
            );

        } else {

            dprintf(
                "    PeekIrpListHead              @ %08lx\n",
                ACTUAL_ADDRESS(
                    ActualAddress,
                    Endpoint,
                    Common.Datagram.PeekIrpListHead
                )
            );

        }

        if( IS_LIST_EMPTY(
                    ActualAddress,
                    Endpoint,
                    Common.Datagram.ReceiveBufferListHead ) ) {

            dprintf(
                "    ReceiveBufferListHead        = EMPTY\n"
            );

        } else {

            dprintf(
                "    ReceiveBufferListHead        @ %08lx\n",
                ACTUAL_ADDRESS(
                    ActualAddress,
                    Endpoint,
                    Common.Datagram.ReceiveBufferListHead
                )
            );

        }

        dprintf(
            "    BufferredDatagramBytes       = %08lx\n",
            Endpoint->BufferredDatagramBytes
        );

        dprintf(
            "    BufferredDatagramCount       = %04X\n",
            Endpoint->BufferredDatagramCount
        );

        dprintf(
            "    MaxBufferredReceiveBytes     = %08lx\n",
            Endpoint->Common.Datagram.MaxBufferredReceiveBytes
        );

        dprintf(
            "    MaxBufferredSendBytes        = %08lx\n",
            Endpoint->Common.Datagram.MaxBufferredSendBytes
        );

        dprintf(
            "    MaxBufferredReceiveCount     = %04X\n",
            Endpoint->Common.Datagram.MaxBufferredReceiveCount
        );

        dprintf(
            "    MaxBufferredSendCount        = %04X\n",
            Endpoint->Common.Datagram.MaxBufferredSendCount
        );

        dprintf(
            "    CircularQueueing             = %s\n",
            BooleanToString( Endpoint->Common.Datagram.CircularQueueing )
        );

        break;

    }

    dprintf(
        "    DisconnectMode               = %08lx\n",
        Endpoint->DisconnectMode
    );

    dprintf(
        "    OutstandingIrpCount          = %08lx\n",
        Endpoint->OutstandingIrpCount
    );

    dprintf(
        "    LocalAddress                 = %08lx\n",
        Endpoint->LocalAddress
    );

    dprintf(
        "    LocalAddressLength           = %08lx\n",
        Endpoint->LocalAddressLength
    );

    if( Endpoint->LocalAddressLength <= sizeof(address) &&
            Endpoint->LocalAddress != NULL ) {

        if( ReadMemory(
                    (DWORD)Endpoint->LocalAddress,
                    address,
                    sizeof(address),
                    &result
                ) ) {

            DumpTransportAddress(
                "    ",
                (PTRANSPORT_ADDRESS)address,
                (DWORD)Endpoint->LocalAddress
            );

        }

    }

    dprintf(
        "    Context                      = %08lx\n",
        Endpoint->Context
    );

    dprintf(
        "    ContextLength                = %08lx\n",
        Endpoint->ContextLength
    );

    dprintf(
        "    OwningProcess                = %08lx\n",
        Endpoint->OwningProcess
    );

    dprintf(
        "    ConnectDataBuffers           = %08lx\n",
        Endpoint->ConnectDataBuffers
    );

    dprintf(
        "    TransmitIrp                  = %08lx\n",
        Endpoint->TransmitIrp
    );

    dprintf(
        "    TransmitInfo                 = %08lx\n",
        Endpoint->TransmitInfo
    );

    dprintf(
        "    AddressDeviceObject          = %08lx\n",
        Endpoint->AddressDeviceObject
    );

    dprintf(
        "    ConnectOutstanding           = %s\n",
        BooleanToString( Endpoint->ConnectOutstanding )
    );

    dprintf(
        "    SendDisconnected             = %s\n",
        BooleanToString( Endpoint->SendDisconnected )
    );

    dprintf(
        "    EndpointCleanedUp            = %s\n",
        BooleanToString( Endpoint->EndpointCleanedUp )
    );

    dprintf(
        "    TdiMessageMode               = %s\n",
        BooleanToString( Endpoint->TdiMessageMode )
    );

#if !defined(NT351)
    dprintf(
        "    EventObject                  = %08lx\n",
        Endpoint->EventObject
    );

    dprintf(
        "    EventsEnabled                = %08lx\n",
        Endpoint->EventsEnabled
    );

    dprintf(
        "    EventsDisabled               = %08lx\n",
        Endpoint->EventsDisabled
    );

    dprintf(
        "    EventsActive                 = %08lx\n",
        Endpoint->EventsActive
    );

    dprintf(
        "    EventStatus                  = %08lx\n",
        ACTUAL_ADDRESS( ActualAddress, Endpoint, EventStatus[0] )
    );

    dprintf(
        "    GroupID                      = %08lx\n",
        Endpoint->GroupID
    );

    dprintf(
        "    GroupType                    = %s\n",
        GroupTypeToString( Endpoint->GroupType )
    );
#endif

    if( IsCheckedAfd ) {

        dprintf(
            "    ReferenceDebug               = %08lx\n",
            Endpoint->ReferenceDebug
        );

        dprintf(
            "    CurrentReferenceSlot         = %lu\n",
            Endpoint->CurrentReferenceSlot % MAX_REFERENCE
        );

    }

    dprintf( "\n" );

}   // DumpAfdEndpoint