Caution: This version of this document is no longer maintained. For the latest documentation, see


Obtain socket information from the devp-pccard server


#include <sys/pccard.h>

int pccard_info( pccard_t handle, 
                 int socket, 
                 struct _pccard_info* info, 
                 unsigned size );


The handle returned by pccard_attach().
Contains both the socket number as well as the function within the socket. This is achieved by shifting the function number left 8 bits and ORing it with the socket number. The socket number is zero-based.
A pointer to a _pccard_info structure that the function fills with the socket information. For more information, see below.
Size of the _pccard_info structure.



Use the -l pccard option to qcc to link against this library.


The pccard_info() function call retrieves socket setup information from the devp-pccard server. The information is returned in the _pccard_info structure.

_pccard_info structure

The _pccard_info structure is defined in <pccard.h> as:

struct _pccard_info {
    int16_t             socket;         // Socket number (0 based)
    uint16_t            status;         // Card status (from socket services spec)
    uint32_t            flags;          // Flags (_PCCARD_FLAG_*)
    uint8_t             vcc;            // Current Vcc (in tenths of volts)
    uint8_t             vpp;            // Current Vpp (in tenths of volts)
    uint8_t             num_windows;    // Number of windows described below
    uint8_t             index;          // Index for CardBus devices
    uint16_t            manufacturer;   // Manufacturer ID from PCCARD
    uint16_t            card_type;      // Card Type from PCCARD
    uint16_t            device_id;      // CardBus device id
    uint16_t            vendor_id;      // CardBus vendor id
    uint16_t            busnum;         // PCI bus number
    uint16_t            devfuncnum;     // PCI device and function number
    struct _pccard_window {
        uint16_t                window;     // Window type (_PCCARD_WINDOW_*)
        uint16_t                flags;      // Window flags (_PCCARD_WINFLAG_*)
        mpid_t                  pid;        // Locking pid
        uint16_t                device;     // Device type (_PCCARD_DEV_*)
        uint16_t                dummy;
        uint32_t                dev_size;   // Size of memory device
        uint32_t                reserved3;
        union {
            struct _pccard_irq {
                uint16_t            flags;          // (_PCCARD_IRQFLAG_*)
                uint16_t            irq;
            }                       irq;
            struct _pccard_memio {
                uint32_t            base;           // Base address (in host address space)
                uint32_t            size;           // Size of window
                uint32_t            offset;         // offset of region from base of card
                uint16_t            flags;          // (_PCCARD_MEMIOFLAG_*)
                uint16_t            dummy2;
            }                       memio;
        } un;
    } window[_PCCARD_MAX_WINDOWS];


A positive integer
Success. The socket parameter is returned.
An error occurred (errno is set).


Invalid socket parameter.


See pccard_arm().


QNX Neutrino

Cancellation point Yes
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

pccard_arm(), pccard_attach(), pccard_detach(), pccard_lock(), pccard_raw_read(), pccard_unlock()