Managing Protocol Services

Get Configuration


Retrieve the configuration data for a connection.

#include "laygo.h"

LResult lgo_GetConfiguration
        LCid           cid,
        LCtlBuffer     buffer,
        LBufferSize    size
cidconnection to get current configuration from
bufferbuffer to hold the configuration
sizesize of buffer in bytes

lgo_GetConfiguration() retrieves the configuration data for a connection if any exists.

The structure of the configuration data returned, if any, is defined by the protocol and may be found in the corresponding xxxx_api.h file.

Return Values

If successful, lgo_GetConfiguration() returns a non-negative value indicating the number of bytes returned into the buffer. A return value of 0 means that there is no configuration data for the connection. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:

See Also


size = lgo_GetConfiguration(cid, buffer, bufferSize);

if (size > 0)
    /* alter configuration here */
    lgo_SetConfiguration(cid, buffer, size);