---
title: FWReadCallback
framework: kernel
role: symbol
role_heading: Type Alias
path: kernel/fwreadcallback
---

# FWReadCallback

Callback called when a read request packet is received for a 'virtual' firewire address.

## Declaration

```occ
typedef UInt32 (*FWReadCallback)(void *refcon, UInt16 nodeID, IOFWSpeed & speed, FWAddress addr, UInt32 len, IOMemoryDescriptor **buf, IOByteCount *offset, IOFWRequestRefCon requestRefcon);
```

## Parameters

- `nodeID`: is the node originating the request
- `speed`: is the FireWire speed of the request, update it if you need to control the speed of the reply, otherwise the response will be the same speed.
- `addr`: is the address the device is requesting to read from
- `len`: is the number of bytes to read
- `buf`: contains the packet data
- `offset`: on return points to the offset into *buf of the packet data
- `requestRefcon`: refcon to pass back if sending a delayed response. Also can be queried for extra info about the request

## Return Value

Return Value return: kFWResponsePending = -1, Pseudo response, real response sent later. kFWResponseComplete = 0, OK! kFWResponseConflictError = 4, Resource conflict, may retry kFWResponseDataError = 5, Data not available kFWResponseTypeError = 6, Operation not supported kFWResponseAddressError = 7 Address not valid in target device A return of kFWResponsePending should be followed at some later time by a call to IOFireWireController::asyncReadResponse

## See Also

### Types

- [IOFWDuplicateGUIDRec](kernel/iofwduplicateguidrec.md)
- [IOFWARxReqIntCompleteHandler](kernel/iofwarxreqintcompletehandler.md)
- [IOFWAVCAsyncCommandState](kernel/iofwavcasynccommandstate.md)
- [IOFWAVCPlugTypes](kernel/iofwavcplugtypes.md)
- [IOFWAVCProtocolUserClientAsyncCommandCodes](kernel/iofwavcprotocoluserclientasynccommandcodes.md)
- [IOFWAVCProtocolUserClientCommandCodes](kernel/iofwavcprotocoluserclientcommandcodes.md)
- [IOFWAVCSubunitPlugMessages](kernel/iofwavcsubunitplugmessages.md)
- [IOFWAVCUserClientAsyncCommandCodes](kernel/iofwavcuserclientasynccommandcodes.md)
- [IOFWAVCUserClientCommandCodes](kernel/iofwavcuserclientcommandcodes.md)
- [IOFWCmdQ](kernel/iofwcmdq.md)
- [IOFWDCLNotificationType](kernel/iofwdclnotificationtype.md)
- [IOFWIsochPortOptions](kernel/iofwisochportoptions.md)
- [IOFWIsochResourceFlags](kernel/iofwisochresourceflags.md)
- [IOFWNodeScan](kernel/iofwnodescan.md)
- [IOFWPhysicalAccessMode](kernel/iofwphysicalaccessmode.md)
- [IOFWReadFlags](kernel/iofwreadflags.md)
- [IOFWRequestRefCon](kernel/iofwrequestrefcon.md)
- [IOFWSBP2UserClientCommandCodes](kernel/iofwsbp2userclientcommandcodes.md)
- [IOFWSecurityMode](kernel/iofwsecuritymode.md)
- [IOFWSpeed](kernel/iofwspeed.md)
- [IOFWWriteFlags](kernel/iofwwriteflags.md)
- [IOFireWireAVCAsynchronousCommandCallback](kernel/iofirewireavcasynchronouscommandcallback.md)
- [IOFireWireAVCSubunitPlugHandlerCallback](kernel/iofirewireavcsubunitplughandlercallback.md)
- [IOFireWireAVCTargetCommandHandlerCallback](kernel/iofirewireavctargetcommandhandlercallback.md)
- [IOFireWirePCRCallback](kernel/iofirewirepcrcallback.md)
- [IOFireWireSessionRef](kernel/iofirewiresessionref.md)
- [IOAVCCommandResponse](kernel/ioavccommandresponse.md)
- [IOAVCFrameFields](kernel/ioavcframefields.md)
- [IOAVCOpcodes](kernel/ioavcopcodes.md)
- [IOAVCUnitTypes](kernel/ioavcunittypes.md)
- [FWAddress](kernel/fwaddress.md)
- [FWAddressPtr](kernel/fwaddressptr.md)
- [FWAsyncPHYCallback](kernel/fwasyncphycallback.md)
- [FWAsyncStreamCallback](kernel/fwasyncstreamcallback.md)
- [FWAsyncStreamReceiveCallback](kernel/fwasyncstreamreceivecallback.md)
- [FWBusCallback](kernel/fwbuscallback.md)
- [FWClientCommandID](kernel/fwclientcommandid.md)
- [FWDeviceCallback](kernel/fwdevicecallback.md)
- [FWIsochChannelForceStopNotificationProc](kernel/fwisochchannelforcestopnotificationproc.md)
- [FWIsochChannelForceStopNotificationProcPtr](kernel/fwisochchannelforcestopnotificationprocptr.md)
- [FWMultiIsochReceiveListenerCallback](kernel/fwmultiisochreceivelistenercallback.md)
- [FWPHYPacketCallback](kernel/fwphypacketcallback.md)
- [FWSegment](kernel/fwsegment.md)
- [FWWriteCallback](kernel/fwwritecallback.md)
