IOFireWireSBP2Lib.h

Overview

Use the links in the table of contents to the left to access the documentation.



C Pseudoclasses

IOFireWireSBP2LibLoginInterface

Supplies the login maintenance and Normal Command ORB execution portions of the API.

IOFireWireSBP2LibLUNInterface

Initial interface disovered for all drivers.

IOFireWireSBP2LibMgmtORBInterface

Supplies non login related management ORBs. Management ORBs can be executed independent of a login, if necessary. Management ORBs are created using the IOFireWireSBP2LibLUNInterface.

IOFireWireSBP2LibORBInterface

Represents an SBP2 normal command ORB. Supplies the APIs for configuring normal command ORBs. This includes setting the command block and writing the page tables for I/O. The ORBs are executed using the submitORB method in IOFireWireSBP2LibLoginInterface.



Typedefs

FWSBP2LoginCompleteParams
FWSBP2LoginResponse
FWSBP2LogoutCompleteParams
FWSBP2NotifyParams
FWSBP2ReconnectParams
FWSBP2StatusBlock
FWSBP2VirtualRange
IOFWSBP2FetchAgentWriteCallback
IOFWSBP2LoginCallback
IOFWSBP2LogoutCallback
IOFWSBP2NotifyCallback
IOFWSBP2ORBAppendCallback
IOFWSBP2ORBCompleteCallback
IOFWSBP2StatusCallback

FWSBP2LoginCompleteParams


typedef struct { 
    void *refCon; // refCon from login object 
    UInt32 generation; // generation this login was attempted in 
    IOReturn status; // status of login attempt 
    FWSBP2LoginResponse *loginResponse; // pointer to loginResponse buffer 
    FWSBP2StatusBlock *statusBlock; // pointer to statusBlock buffer 
    UInt32 statusBlockLength; // size of statusBlock buffer 
} FWSBP2LoginCompleteParams;  
Fields
refCon

refCon set on login object.

generation

FireWire generation value.

status

Status of login attempt.

loginResponse

Pointer to login response struct.

statusBlock

Pointer to status block buffer.

statusBlockLength

Length of entire status block.


FWSBP2LoginResponse


typedef struct { 
    UInt16 length; 
    UInt16 loginID; 
    UInt32 commandBlockAgentAddressHi; 
    UInt32 commandBlockAgentAddressLo; 
    UInt16 reserved; 
    UInt16 reconnectHold; 
} FWSBP2LoginResponse;  
Fields
length

Length of login response.

loginID

Unique id representing this login.

commandBlockAgentAddressHi

High 32 bits of command block agent address.

commandBlockAgentAddressLo

Low 32 bits of command block agent address.

reserved

Reserved.

reconnectHold

Reconnect timeout encoded as 2^reconnectHold seconds.


FWSBP2LogoutCompleteParams


typedef struct { 
    void *refCon; // refCon from login object 
    UInt32 generation; // generation this login was attempted in 
    IOReturn status; // status of login attempt 
    FWSBP2StatusBlock *statusBlock; // pointer to statusBlock buffer 
    UInt32 statusBlockLength; // size of statusBlock buffer 
} FWSBP2LogoutCompleteParams;  
Fields
refCon

refCon set on login object.

generation

FireWire generation value.

status

Status of login attempt.

statusBlock

Pointer to status block buffer.

statusBlockLength

Length of entire status block.


FWSBP2NotifyParams


typedef struct { 
    void *refCon; // refCon from ORB object 
    UInt32 notificationEvent; 
    const void * message; 
    UInt32 length; 
    UInt32 generation; 
} FWSBP2NotifyParams;  
Fields
refCon

refCon set on Login object for unsolicited status or refCon set ORB for normal status.

notificationEvent

Type of event we are being notified of.

message

buffer containing message.

length

length of message field.

generation

FireWire generation value.


FWSBP2ReconnectParams


typedef struct { 
    void *refCon; // refCon from lun object 
    UInt32 generation; // generation this login was attempted in  
    IOReturn status; // status of reconnect attempt  
    FWSBP2StatusBlock *reconnectStatusBlock; // pointer to statusBlock buffer 
    UInt32 reconnectStatusBlockLength; // size of statusBlock buffer 
} FWSBP2ReconnectParams;  
Fields
refCon

refCon set on LUN object.

generation

FireWire generation value.

status

Status of reconnect attempt.

reconnectStatusBlock

Pointer to status block buffer.

reconnectStatusBlockLength

Length of entire status block.


FWSBP2StatusBlock


typedef struct { 
    UInt8 details; 
    UInt8 sbpStatus; 
    UInt16 orbOffsetHi; 
    UInt32 orbOffsetLo; 
    UInt32 status[6]; 
} FWSBP2StatusBlock;  
Fields
details

Src, Resp, D, Len fields of status block format

sbpStatus

SBP2 specific status

orbOffsetHi

High 32 bits of address of orb status is for.

orbOffsetLo

Low 32 bits of address of orb status is for.

status

Up to 48 bytes of additional data. Length is determined by len field.


FWSBP2VirtualRange


typedef struct { 
    void *address; 
    UInt32 length; 
} FWSBP2VirtualRange;  
Discussion

Virtual address range for SBP2.


IOFWSBP2FetchAgentWriteCallback


typedef void ( *IOFWSBP2FetchAgentWriteCallback)(
    void *refCon,
    IOReturn status,
    void *orbRefCon );  
Fields
refCon

Reference constant supplied when the notification was registered.

status

Indicates success or failure of operation.

orbRefCon

refCon from last orb in chain.


IOFWSBP2LoginCallback


typedef void ( *IOFWSBP2LoginCallback)(
    void *refCon,
    FWSBP2LoginCompleteParams *params );  
Fields
refCon

Reference constant supplied when the notification was registered.

params

Structure containing additional information about the status of the login.


IOFWSBP2LogoutCallback


typedef void ( *IOFWSBP2LogoutCallback)(
    void *refCon,
    FWSBP2LogoutCompleteParams *params );  
Fields
refCon

Reference constant supplied when the notification was registered.

params

Structure containing additional information about the status of the logout.


IOFWSBP2NotifyCallback


typedef void ( *IOFWSBP2NotifyCallback)(
    void *refCon,
    FWSBP2NotifyParams *params);  
Fields
refCon

Reference constant supplied when the notification was registered.

params

FWSBP2NotifyParams containing notification information.


IOFWSBP2ORBAppendCallback


typedef void ( *IOFWSBP2ORBAppendCallback)(
    void *refCon,
    IOReturn status,
    void *orb );  
Fields
refCon

Reference constant supplied when the notification was registered.

status

Indicates success or failure of operation.

orb

refCon set on management orb.


IOFWSBP2ORBCompleteCallback


typedef void ( *IOFWSBP2ORBCompleteCallback)(
    void *refCon,
    IOReturn status,
    void *orb );  
Fields
refCon

Reference constant supplied when the notification was registered.

status

Indicates success or failure of operation.

orb

refCon set on management orb.


IOFWSBP2StatusCallback


typedef void ( *IOFWSBP2StatusCallback)(
    void *refCon,
    IOReturn status);  
Fields
refCon

Reference constant supplied when the notification was registered.

status

Indicates success or failure of operation.

Enumerated Types

IODirection
Login Option Flags
ORB Option Flags
SBP2 Notification Events
SBP2 setCommandFunction values

IODirection


enum IODirection { 
    kIODirectionNone = 0, 
    kIODirectionIn = 1, // User land 'read' 
    kIODirectionOut = 2, // User land 'write' 
    kIODirectionOutIn = 3 
};  
Discussion

Direction of transfer, with respect to the described memory.


Login Option Flags


enum { 
    kFWSBP2DontSynchronizeMgmtAgent = (
        1 << 0), 
    kFWSBP2ExclusiveLogin = (
        1 << 5) 
};  
Discussion

Passed to the setLoginFlags member function.


ORB Option Flags


enum { 
    kFWSBP2CommandCompleteNotify = (
        1 << 0), 
    kFWSBP2CommandTransferDataFromTarget = (
        1 << 1), 
    kFWSBP2CommandImmediate = (
        1 << 2),  
    kFWSBP2CommandNormalORB = (
        1 << 5), 
    kFWSBP2CommandReservedORB = (
        1 << 6), 
    kFWSBP2CommandVendorORB = (
        1 << 7), 
    kFWSBP2CommandDummyORB = (
        1 << 8), 
    kFWSBP2CommandCheckGeneration = (
        1 << 9),  
    kFWSBP2CommandFixedSize = (
        1 << 10), 
    kFWSBP2CommandVirtualORBs = (
        1 << 11) // handy for debugging 
};  
Discussion

Passed to the setCommandFlags member function.


SBP2 Notification Events


enum { 
    kFWSBP2NormalCommandStatus = 6, 
    kFWSBP2NormalCommandTimeout = 7, 
    kFWSBP2UnsolicitedStatus = 8, 
    kFWSBP2NormalCommandReset = 9 
};  
Discussion

Passed to the setStatusNotifyProc member function.


SBP2 setCommandFunction values


enum { 
    kFWSBP2QueryLogins = 1, 
    kFWSBP2AbortTask = 0xb, 
    kFWSBP2AbortTaskSet = 0xc, 
    kFWSBP2LogicalUnitReset = 0xe, 
    kFWSBP2TargetReset = 0xf 
};  
Discussion

Passed to the setCommandFunction member function.

 

Did this document help you? Yes It's good, but... Not helpful...

 

Last Updated: 2009-10-15