raw1394_start_write

Name

raw1394_start_write --  initiate a write transaction

Synopsis

int raw1394_start_write (raw1394handle_t handle, nodeid_t node, nodeaddr_t addr, size_t length, quadlet_t * data, unsigned long tag);

Arguments

handle

libraw1394 handle

node

target node ID

addr

address to write to

length

amount of bytes of data to write

data

pointer to data to be sent

tag

data to identify the request to completion handler

Description

This function starts the specified write request. If length is 4 a quadlet write is initiated and a block write otherwise.

The transaction is only started, no success of the transaction is implied with a successful return of this function. When the transaction completes, a raw1394_loop_iterate will call the tag handler and pass it the tag and error code of the transaction. tag should therefore be set to something that uniquely identifies this transaction (e.g. a struct pointer casted to unsigned long).

Returns

0 on success or -1 on failure (sets errno)