setChecksumResult
Encodes a received packet with the checksum result reported by the hardware.
Declaration
virtual bool setChecksumResult(
mbuf_t packet,
UInt32 checksumFamily,
UInt32 resultMask,
UInt32 validMask,
UInt32 param0 = 0,
UInt32 param1 = 0 );Parameters
- packet:
An mbuf containing a packet that has been checksummed by the hardware.
- checksumFamily:
A value that specifies the checksum family.
- resultMask:
A mask of all checksums that were checked or computed. Setting a bit implies that the driver is able to report the result of the checksum computation, by asserting the validity of the checksum, or by returning a partial checksum value.
- validMask:
A mask of all checksums are were computed and verified by the hardware as valid. Certain types of checksum performed by the hardware are inheritely incomplete, and therefore should never be marked as valid. A checksum cannot be marked valid unless it has also been checked.
- param0:
Optional parameter 0, defaults to 0.
- param1:
Optional parameter 1, defaults to 0.
Return Value
Returns true if the checksum family is valid and the packet has been encoded with the checksum result provided, false otherwise.
Overview
A network controller that can verify the checksum(s) for a received packet, should call this method to encode the result on the packet, before passing it up towards the protocol stacks.
See Also
Miscellaneous
allocatePacketattachDebuggerClientattachInterfaceconfigureInterfacecopyMediumDictionarycopyPacketcreateInterfacecreateOutputQueuecreateWorkLoopdetachDebuggerClientdetachInterfacedisabledisable(IONetworkInterface *)disable(IOService *)disablePacketFilterdoDisabledoEnableenableenable(IONetworkInterface *)enable(IOService *)enablePacketFilterexecuteCommandfreefreePacketgetChecksumDemandgetChecksumSupportgetCommandClientgetCommandGategetDebuggerLinkStatusgetFeaturesgetHardwareAddressgetMaxPacketSizegetMediumDictionarygetMinPacketSizegetOutputHandlergetOutputQueuegetPacketBufferConstraintsgetPacketFiltersgetSelectedMediumhandleClosehandleIsOpenhandleOpeninitmessagenewModelStringnewRevisionStringnewVendorStringoutputPacketpreparepublishMediumDictionarypublishPropertiesreceivePacketregisterWithPolicyMakerreleaseDebuggerLockreleaseFreePacketsreplaceOrCopyPacketreplacePacketreserveDebuggerLockselectMediumselectMediumWithNamesendPacketsetDebuggerModesetHardwareAddresssetLinkStatussetMaxPacketSizesetSelectedMediumstartstopsystemWillShutdown