libraw1394: version 2.0.4
Prev |  | Next

# raw1394_set_port

## Name

raw1394_set_port -- choose port for handle

## Synopsis

``int raw1394_set_port` (raw1394handle_t handle, int port);`

## Arguments

`handle`

  libraw1394 handle

`port`

  port to connect to (corresponds to index of struct raw1394_portinfo)

## Description

This function connects the handle to the port given (as queried with `raw1394_get_port_info`). If successful, `raw1394_get_port_info` and `raw1394_set_port` are not allowed to be called afterwards on this handle. To make up for this, all the other functions (those handling asynchronous and isochronous transmissions) can now be called.

## Returns

`0` for success or -1 for failure with errno set appropriately. A possible failure mode is with errno = `ESTALE`, in this case the configuration has changed since the call to `raw1394_get_port_info` and it has to be called again to update your view of the available ports.

Prev | Home | Next
raw1394_get_port_info | Up | raw1394_reset_bus