26.02.2014 Views

Getting Started with QNX Neutrino - QNX Software Systems

Getting Started with QNX Neutrino - QNX Software Systems

Getting Started with QNX Neutrino - QNX Software Systems

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

© 2009, <strong>QNX</strong> <strong>Software</strong> <strong>Systems</strong> GmbH & Co. KG. Alphabetical listing of connect and I/O functions<br />

struct _io_dup i;<br />

} io_dup_t;<br />

Description: This is the dup() message handler. As <strong>with</strong> the io_close_dup(), you won’t<br />

likely handle this message yourself. Instead, the base-layer library will handle it.<br />

Returns: The status via the helper macro _RESMGR_STATUS.<br />

io_fdinfo()<br />

int io_fdinfo (resmgr_context_t *ctp, io_fdinfo_t *msg,<br />

RESMGR_OCB_T *ocb)<br />

Classification: I/O<br />

Default handler: iofunc_fdinfo_default()<br />

Helper functions: iofunc_fdinfo()<br />

Client function: iofdinfo()<br />

Messages: _IO_FDINFO<br />

Data structure:<br />

struct _io_fdinfo {<br />

uint16_t<br />

type;<br />

uint16_t<br />

combine_len;<br />

uint32_t<br />

flags;<br />

int32_t<br />

path_len;<br />

uint32_t<br />

reserved;<br />

};<br />

struct _io_fdinfo_reply {<br />

uint32_t zero [2];<br />

struct _fdinfo info;<br />

};<br />

typedef union {<br />

struct _io_fdinfo i;<br />

struct _io_fdinfo_reply o;<br />

} io_fdinfo_t;<br />

Description: This function is used to allow clients to retrieve information directly<br />

about the attributes and pathname which is associated <strong>with</strong> a file descriptor. The<br />

client-side function iofdinfo() is used. The path string implicitly follows the struct<br />

_io_fdinfo_reply data structure. Use of the default function is sufficient for<br />

discretely-manifested pathname resource managers.<br />

Returns: The length of the path string being returned is set via the helper macro<br />

_IO_SET_FDINFO_LEN.<br />

io_link()<br />

int io_link (resmgr_context_t *ctp, io_link_t *msg,<br />

RESMGR_HANDLE_T *handle, io_link_extra_t *extra)<br />

Classification: Connect<br />

April 30, 2009 Chapter 5 • Resource Managers 235

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!