Uninformed: Informative Information for the Uninformed

Vol 8» 2007.Sep

File Descriptor Lists

Two separate file descriptor lists are maintained; destinations for inbound data and sources of outbound data. The data structure for storage of a file descriptor and its data for inclusion in either list is defined in Figure [*] below.

Figure: C structure for File Descriptor List elements.
\begin{figure}\begin{verbatim}/* Structure used for file descriptor informatio...
...fo_t *next;
struct file_info_t *prev;
} file_info;\end{verbatim}

The independence of the file descriptor lists from the outbound data polling and message handler components provides for a flexible and versatile environment within which to expand functionality. In order to include new data types for transfer, all that is required is to define a new data type ID for both applications to correlate messages upon, open a file descriptor to the appropriate place to read or write the data, and include the file descriptor in the appropriate list.