Transferring Data

Ioctl

lgo_Ioctl()

Perform a protocol-specific function on a connection.

Syntax
#include "laygo.h"

LResult lgo_Ioctl
    (
        LCid             cid,
        LFunction        function,
        LCtlBuffer       inBuffer,
        LBufferSize      inSize,
        LCtlBuffer       outBuffer,
        LBufferSize *    outSize
    );
cidconnection to perform IOCTL function on
functionprotocol-specific IOCTL function ID
inBufferIOCTL input parameter block
inSizesize of input parameter block in bytes
outBufferbuffer for output data, if any
outSizesize of output buffer on input; size of data returned on output
Description

lgo_Ioctl() performs protocol-specific functions on a connection. Calls to lgo_Ioctl() are directed to the LayGO module directly below the API on the connection. The protocol implemented by this module depends on the service specified when the connection is opened. So the Ioctl functions available on a CID depend on the service specified when the connection was opened.

Each LayGO module exports a list of the Ioctl functions it supports.

Return Values

If successful, lgo_Ioctl() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:

See Also

lgo_Event()
lgo_Poll()

Example
short          newline = 1;
LBufferSize    size    = 0;
LResult        result;

result = lgo_Ioctl(physicalCid, phys_IOCTL_SWITCH_LINES,
             &newLine,
             sizeof(newLine),
             NULL,
             &size);