Table of Contents
linx_types.h - data types for LINX
#include <linx_types.h>
In
addition to the definitions below, the linx_types.h includes the system
headers <stdint.h>, <stdlib.h> and <linux/types.h>.
This linx_types.h header may be included automatically by the linx.h header
file.
The header file contains the following definitions of LINX types and constants:
- LINX
- The LINX handle, returned from linx_open(3)
. It is used to access the
LINX endpoint with all other LINX API fuctions.
- LINX_FALSE
- defined to 0.
- LINX_TRUE
- defined to 1.
- LINX_ILLEGAL_ATTREF
- defined to ((LINX_OSATTREF)0).
It can be returned instead of a valid LINX_OSATTREF value, e.g. from linx_attach(3)
.
- LINX_ILLEGAL_SPID
- defined to ((LINX_SPID)0). It can be returned instead
of a valid LINX_SPID value, e.g. from linx_get_sped(3)
.
- LINX_NIL
- defined
to ((union LINX_SIGNAL *) 0). This null pointer value indicates that a signal
buffer pointer no longer points to any buffer, e.g. after freeing the signal
buffer.
- LINX_OS_ATTACH_SIG
- defined to ((LINX_SIGSELECT)252). This is the
reserved signal number of the default attach signal buffer, used if the
application does not provide a signal buffer with the linx_attach(3)
call.
- LINX_OS_HUNT_SIG
- defined to ((LINX_SIGSELECT)251). This is the reserved
signal number of the default hunt signal buffer, used if the application
does not provide a signal buffer with the linx_hunt(3)
call.
- LINX_OSATTREF
- A uint32_t used for attach references.
- LINX_OSBOOLEAN
- An int used for boolean
operations.
- LINX_OSBUFSIZE
- An ssize_t used for signal buffer sizes.
- LINX_OSTIME
- A uint32_t used for time in micro-seconds (us).
- LINX_SIGSELECT
- A uint32_t
used for signal numbers.
- LINX_SPID
- A uint32_t used for LINX endpoint binary
identifiers (also called spid).
The following LINX definition is not explicitely
done in this header file, but is used in the LINX API.
- union LINX_SIGNAL
- is an opaque structure, containing any signal buffer
of any size, with a 32-bit signal number of type LINX_SIGSELECT in the
first four bytes. This signal number can be accessed as the sig_no struct
member of the signal buffer. The application allocates various sized signal
buffers with linx_alloc(3)
, which returns a union LINX_SIGNAL *.
linx(7)
, linx_alloc(3)
, linx_attach(3)
, linx_get_spid(3)
,
linx_hunt(3)
, linx_open(3)
Enea LINX team
Copyright
(c) 2006-2007, Enea Software AB All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. Redistributions in
binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials
provided with the distribution. Neither the name of Enea Software AB nor
the names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
Table of Contents