Cisco Cisco IOS Software Release 12.2(15)T Guide Du Développeur
![Cisco](https://files.manualsbrain.com/attachments/7380d0050044647c30f5c24bbbf5d0c0b6d9bb84/common/fit/150/50/faa183d287233c52228cfea3dbc2a127fe780f60564fcb0955d9c3d1cd23/brand_logo.png)
5-6
Cisco Gatekeeper External Interface Reference, Version 4.2
Cisco IOS Release 12.2(15)T
Chapter 5 Gatekeeper API Functions and Structures
Gatekeeper API Functions
After reading a message, this function sets the message type and populates the appropriate structure. For
example, if an ARQ message has been received from the Cisco IOS Gatekeeper, the msgType parameter
is set to ARQ_REQUEST_MSG and the ARQ_REQUEST_MSG structure is populated.
example, if an ARQ message has been received from the Cisco IOS Gatekeeper, the msgType parameter
is set to ARQ_REQUEST_MSG and the ARQ_REQUEST_MSG structure is populated.
Because some parameters are optional, these parameters might not be received for a particular message.
Structure members that are character pointers are initialized to NULL. Integers and enumerations are set
to their initialization values. Therefore, the API can assume that if a structure member has a pointer set
to NULL or to its initialization value, that particular parameter has not been received.
Structure members that are character pointers are initialized to NULL. Integers and enumerations are set
to their initialization values. Therefore, the API can assume that if a structure member has a pointer set
to NULL or to its initialization value, that particular parameter has not been received.
The following initialization values indicate that the parameter was not received from the
Cisco IOS Gatekeeper:
Cisco IOS Gatekeeper:
•
canMapAlias—INITIALIZE_CAN_MAP_ALIAS_VALUE
•
bandWidthPresent—TRUE (indicating that bandWidth has been received and filled in) or FALSE
(indicating that bandWidth has not been received)
(indicating that bandWidth has not been received)
•
answerCall—INITIALIZE_ANSWER_CALL_VALUE
•
REDIRECT_REASON_TYPE—REDIRECT_REASON_INFO_NOT_RCVD
•
ENDPOINT_TYPE—ENDPOINT_INFO_NOT_RCVD
Input
The input for this function is:
•
A pointer to the
•
A pointer to the
structure that was allocated by the GetReadMsgBuffer function.
The GK_READ_MSG structure contains an enumeration of the message types expected from the
Cisco IOS Gatekeeper and a union of structures for various messages expected from the
Cisco IOS Gatekeeper.
Cisco IOS Gatekeeper and a union of structures for various messages expected from the
Cisco IOS Gatekeeper.
Return
The return for this function is the
. Possible values for STATUS_TYPE are:
•
PROCESSING_SUCCESSFUL—No errors were encountered.
•
TCP_READ_ERROR—A TCP read error was encountered. The application should call
CloseGateKeeperConnection to close the connection to the Cisco IOS Gatekeeper.
CloseGateKeeperConnection to close the connection to the Cisco IOS Gatekeeper.
•
MEM_ALLOC_FAIL—Memory allocation failed. This function, dynamically allocates memory for
fields within the GK_READ_MSG structure.
fields within the GK_READ_MSG structure.
•
MSG_READ_ERROR—The message read was not understood by the API function. The application
should call CloseGateKeeperConnection to close the connection to the Cisco IOS Gatekeeper.
should call CloseGateKeeperConnection to close the connection to the Cisco IOS Gatekeeper.
•
INCOMPLETE_MSG_READ—The message was not completely read from the TCP connection
because of network conditions. The application should call the function again in order to continue
reading the data. In this situation, FreeMsgBuffer should not be called. After all the data has been
read, the STATUS_TYPE is set to one of the other
because of network conditions. The application should call the function again in order to continue
reading the data. In this situation, FreeMsgBuffer should not be called. After all the data has been
read, the STATUS_TYPE is set to one of the other
possible values, and after processing the message
type the FreeMsgBuffer can be called.
•
TCP_CONNECTION_CLOSED—The connection to the Cisco IOS Gatekeeper has been closed.
The application must call CloseGateKeeperConnection to free resources such as gkHandle in the
GKAPI_SOCK_INFO structure.
The application must call CloseGateKeeperConnection to free resources such as gkHandle in the
GKAPI_SOCK_INFO structure.
•
NULL_POINTER_PASSED—The pointer to the GK_READ_MSG is null.