Ejemplo n.º 1
0
	EFSYS_PROBE1(fail1, efx_rc_t, rc);

	epp->ep_loopback_type = old_loopback_type;
	epp->ep_loopback_link_mode = old_loopback_link_mode;

	return (rc);
}

#endif	/* EFSYS_OPT_LOOPBACK */

#if EFSYS_OPT_MAC_STATS

	__checkReturn			efx_rc_t
siena_mac_stats_get_mask(
	__in				efx_nic_t *enp,
	__inout_bcount(mask_size)	uint32_t *maskp,
	__in				size_t mask_size)
{
	const struct efx_mac_stats_range siena_stats[] = {
		{ EFX_MAC_RX_OCTETS, EFX_MAC_RX_GE_15XX_PKTS },
		/* EFX_MAC_RX_ERRORS is not supported */
		{ EFX_MAC_RX_FCS_ERRORS, EFX_MAC_TX_EX_DEF_PKTS },
	};
	efx_rc_t rc;

	_NOTE(ARGUNUSED(enp))

	if ((rc = efx_mac_stats_mask_add_ranges(maskp, mask_size,
	    siena_stats, EFX_ARRAY_SIZE(siena_stats))) != 0)
		goto fail1;
Ejemplo n.º 2
0
    }
    else
    {
        hr = SHStrDupW(L"", ppwzProtectedPassword);
    }

    return hr;
}

//
// Unpack a KERB_INTERACTIVE_UNLOCK_LOGON *in place*.  That is, reset the Buffers from being offsets to
// being real pointers.  This means, of course, that passing the resultant struct across any sort of 
// memory space boundary is not going to work -- repack it if necessary!
//
void KerbInteractiveUnlockLogonUnpackInPlace(
    __inout_bcount(cb) KERB_INTERACTIVE_UNLOCK_LOGON* pkiul,
    DWORD cb
    )
{
    if (sizeof(KERB_INTERACTIVE_UNLOCK_LOGON) <= cb)
    {
        KERB_INTERACTIVE_LOGON* pkil = &pkiul->Logon;

        // Sanity check: if the range described by each (Buffer + MaximumSize) falls within the total bytecount,
        // we can be pretty confident that the Buffers are actually offsets and that this is a packed credential.
        if (((ULONG_PTR)pkil->LogonDomainName.Buffer + pkil->LogonDomainName.MaximumLength <= cb) &&
            ((ULONG_PTR)pkil->UserName.Buffer + pkil->UserName.MaximumLength <= cb) &&
            ((ULONG_PTR)pkil->Password.Buffer + pkil->Password.MaximumLength <= cb))
        {
            pkil->LogonDomainName.Buffer = pkil->LogonDomainName.Buffer
                ? (PWSTR)((BYTE*)pkiul + (ULONG_PTR)pkil->LogonDomainName.Buffer)
Ejemplo n.º 3
0
	IO_SCSI_CAPABILITIES IoScsiCapabilities;

	STORAGE_BUS_TYPE StorageBusType;
	USHORT StorageBusMajorVersion;
	USHORT StorageBusMinorVersion;

	PVOID StorageData;

} RAMDISK_EXTENSION, *PRAMDISK_EXTENSION;

VOID
FORCEINLINE
RamDiskInitializeIoScsiCapabilities(
	__in PRAMDISK_EXTENSION RamDiskExtension,
	__inout_bcount(sizeof(IO_SCSI_CAPABILITIES)) 
		PIO_SCSI_CAPABILITIES IoScsiCapabilities);

VOID
RamDiskGetInquiryData(
	__in PRAMDISK_EXTENSION RamDiskExtension,
	__inout PINQUIRYDATA InquiryData);

VOID
RamDiskThreadRoutine(
	__in PVOID Context);

VOID
RamDiskCreateThreadWorkItemRoutine(
	__in PDEVICE_OBJECT DeviceObject,
	__in PVOID Context);
Ejemplo n.º 4
0
    McbEntryOffset = CdFindMcbEntry( IrpContext, Fcb, StartingFileOffset );

    //
    //  Now set the current size of the mcb to this point.
    //

    Fcb->Mcb.CurrentEntryCount = McbEntryOffset;

    return;
}


VOID
CdInitializeMcb (
    __in PIRP_CONTEXT IrpContext,
    __inout_bcount(Fcb->NodeByteSize) PFCB Fcb
    )

/*++

Routine Description:

    This routine is called to initialize the Mcb in an Fcb.  We initialize
    this with an entry count of one and point to the entry in the Fcb
    itself.

    Fcb should be acquired exclusively when this is called.

Arguments:

    Fcb - Fcb containing the Mcb to initialize.