Cisco Cisco IOS Software Release 12.2(15)T 开发者指南
5-7
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
FreeReadMsgBuffer
This function frees memory that was allocated by the call to GetReadMsgBuffer and ReadMsgBuffer.
This function must be called after processing the information returned by ReadMsgBuffer.
This function must be called after processing the information returned by ReadMsgBuffer.
Input
The input for this function is a pointer to the
structure.
Return
There is no return for this function.
WriteCommandMsg
This function sends a command message to the Cisco IOS Gatekeeper, which can respond with a result
message. This structure, CMD_MSG_TYPE, contains an enumeration of messages that can be sent as
spontaneous commands to the Cisco IOS Gatekeeper. The CMD_HEADER_INFO_TYPE structure must
include the from, to, transaction-id, and notification-only fields.
message. This structure, CMD_MSG_TYPE, contains an enumeration of messages that can be sent as
spontaneous commands to the Cisco IOS Gatekeeper. The CMD_HEADER_INFO_TYPE structure must
include the from, to, transaction-id, and notification-only fields.
Input
The input for this function is:
•
A pointer to the
structure.
•
A pointer to the GK_CMD_MSG_TYPE structure, which contains a union of the structures for the
various command messages that can be sent to the Cisco IOS Gatekeeper. Each structure contains a
header, CMD_HEADERINFO_TYPE, that must be filled in by the application. The msgType field
must be filled in to indicate which command message should be sent to the Cisco IOS Gatekeeper.
various command messages that can be sent to the Cisco IOS Gatekeeper. Each structure contains a
header, CMD_HEADERINFO_TYPE, that must be filled in by the application. The msgType field
must be filled in to indicate which command message should be sent to the Cisco IOS Gatekeeper.
Return
The return for this function is the
. Possible values for STATUS_TYPE are:
•
PROCESSING_SUCCESSFUL—No errors were encountered.
•
CONNECT_IN_PROGRESS—Connection is pending. The application should retry this API call
after some time has passed.
after some time has passed.
•
TCP_WRITE_ERROR—A TCP write 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.
•
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.
•
HEADER_INFO_INCOMPLETE—One of the fields in the header (To, From, TransactionID) is
incomplete.
incomplete.
•
NULL_POINTER_PASSED—The pointer to the GK_CMD_MSG is null.