120 #ifndef _FORENSIC_1394_H 121 #define _FORENSIC_1394_H 128 #if defined(FORENSIC1394_DECL) 130 #elif defined(_MSC_VER) 131 # define FORENSIC1394_DECL __declspec(dllexport) 132 #elif (__GNUC__ >= 3) 133 # define FORENSIC1394_DECL __attribute__((visibility("default"))) 135 # define FORENSIC1394_DECL 157 typedef struct _forensic1394_req
175 #define FORENSIC1394_CSR_SZ 256 604 #endif // _FORENSIC_1394_H FORENSIC1394_DECL int64_t forensic1394_get_device_guid(forensic1394_dev *dev)
Returns the GUID of the device.
FORENSIC1394_DECL forensic1394_result forensic1394_enable_sbp2(forensic1394_bus *bus)
Provides an SBP-2 unit directory; required for DMA to Windows systems.
FORENSIC1394_DECL uint16_t forensic1394_get_device_nodeid(forensic1394_dev *dev)
Returns the node ID of the device.
Bad transfer size (normally too large)
Definition: forensic1394.h:222
FORENSIC1394_DECL forensic1394_bus * forensic1394_alloc(void)
Allocates a new forensic1394 handle.
FORENSIC1394_DECL void forensic1394_destroy(forensic1394_bus *bus)
Destroys a bus handle.
FORENSIC1394_DECL void forensic1394_get_device_csr(forensic1394_dev *dev, uint32_t *rom)
Copies the configuration ROM for the device dev into rom.
forensic1394_result
Possible return status codes.
Definition: forensic1394.h:207
#define FORENSIC1394_DECL
Definition: forensic1394.h:135
FORENSIC1394_DECL const char * forensic1394_get_result_str(forensic1394_result r)
Converts a return status code to a string.
size_t len
Length of the buffer in bytes.
Definition: forensic1394.h:163
Sentinel; internal use only.
Definition: forensic1394.h:226
FORENSIC1394_DECL void * forensic1394_get_bus_user_data(forensic1394_bus *bus)
Fetches the user data for bus.
FORENSIC1394_DECL void * forensic1394_get_device_user_data(forensic1394_dev *dev)
Fetches the user data for the device dev.
FORENSIC1394_DECL int forensic1394_get_device_product_id(forensic1394_dev *dev)
Returns the product ID of the device, if any.
void * buf
Data buffer.
Definition: forensic1394.h:166
FORENSIC1394_DECL forensic1394_dev ** forensic1394_get_devices(forensic1394_bus *bus, int *ndev, forensic1394_device_callback ondestroy)
Gets the devices attached to the FireWire bus.
I/O Timeout.
Definition: forensic1394.h:224
FORENSIC1394_DECL forensic1394_result forensic1394_read_device(forensic1394_dev *dev, uint64_t addr, size_t len, void *buf)
Reads len bytes from dev starting at addr into buf.
FORENSIC1394_DECL const char * forensic1394_get_device_vendor_name(forensic1394_dev *dev)
Returns the vendor name of the device, if any.
FORENSIC1394_DECL const char * forensic1394_get_device_product_name(forensic1394_dev *dev)
Returns the product name of the device, if any.
void(* forensic1394_device_callback)(forensic1394_bus *bus, forensic1394_dev *dev)
Definition: forensic1394.h:194
FORENSIC1394_DECL int forensic1394_get_device_request_size(forensic1394_dev *dev)
Returns the maximum request size supported by the device.
struct _forensic1394_dev forensic1394_dev
An opaque device handle.
Definition: forensic1394.h:145
Device is busy.
Definition: forensic1394.h:218
FORENSIC1394_DECL forensic1394_result forensic1394_read_device_v(forensic1394_dev *dev, forensic1394_req *req, size_t nreq)
Reads each request specified in req from dev asynchronously.
FORENSIC1394_DECL void forensic1394_set_bus_user_data(forensic1394_bus *bus, void *u)
Sets the user data for the bus.
General, unspecified, error.
Definition: forensic1394.h:212
uint64_t addr
The address to read/write.
Definition: forensic1394.h:160
FORENSIC1394_DECL forensic1394_result forensic1394_open_device(forensic1394_dev *dev)
Opens the device dev for reading/writing.
FORENSIC1394_DECL forensic1394_result forensic1394_write_device(forensic1394_dev *dev, uint64_t addr, size_t len, void *buf)
Writes len bytes from buf to dev starting at addr.
Permissions related error.
Definition: forensic1394.h:216
FORENSIC1394_DECL int forensic1394_get_device_vendor_id(forensic1394_dev *dev)
Returns the vendor ID of the device, if any.
General I/O error.
Definition: forensic1394.h:220
A bus reset has occured.
Definition: forensic1394.h:214
FORENSIC1394_DECL forensic1394_result forensic1394_write_device_v(forensic1394_dev *dev, const forensic1394_req *req, size_t nreq)
Writes each request specified in req to dev asynchronously.
FORENSIC1394_DECL int forensic1394_is_device_open(forensic1394_dev *dev)
Checks if a device is open or not.
A request structure used for making batch read/write requests.
Definition: forensic1394.h:157
No errors encountered.
Definition: forensic1394.h:210
FORENSIC1394_DECL void forensic1394_close_device(forensic1394_dev *dev)
Closes the device dev.
struct _forensic1394_bus forensic1394_bus
An opaque bus handle.
Definition: forensic1394.h:142
FORENSIC1394_DECL void forensic1394_set_device_user_data(forensic1394_dev *dev, void *u)
Sets the user data for the device dev to u.