dev_GetProtocolCid()
Retrieve the CID of a given protocol layer.
#include "device.h" LCid dev_GetProtocolCid ( LDevice device, LProtocol protocol );
device | device to query |
protocol | id of protocol |
dev_GetProtocolCid() returns the current CID for a given protocol. If the device is not open and attached, the CID will be invalid.
If successful, dev_GetProtocolCid() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
if (dev_Open(device) < 0) { LOG("Open failure"); } else { if ((cid = dev_GetProtocolCid(device, lgo_PROTOCOL_X21_BIS) < 0) { LOG("No X.21 bis layer in device"); } }