Cisco Cisco IOS Software Release 12.2(15)T Guide Du Développeur
5-2
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
GkapiSetupClient
This function sets up the socket for the application to communicate as a client with the
Cisco IOS Gatekeeper. In this situation, the application is the client and the Gatekeeper is the server,
which means the application must initiate the communication with the Cisco IOS Gatekeeper.
Cisco IOS Gatekeeper. In this situation, the application is the client and the Gatekeeper is the server,
which means the application must initiate the communication with the Cisco IOS Gatekeeper.
Input
The input to this function is:
•
A pointer to the
structure. The application must set up the TCPPort and
IPAddress fields and must preserve this structure for the duration of the connection.
•
A pointer to the
enumeration. Possible values for STATUS_TYPE are:
–
PROCESSING_SUCCESSFUL—Successful connection to the Cisco IOS Gatekeeper.
–
CONNECT_IN_PROGRESS—Connection is pending.
–
TCP_HANDLE_ERROR—Error was encountered in handle creation.
–
TCP_CONNECT_ERROR—Error was encountered in connecting to the Cisco IOS Gatekeeper.
–
TCP_NONBLOCK_ERROR—Error was encountered when setting up the socket for
nonblocking I/O
nonblocking I/O
•
A boolean value that allows the application to specify if the socket I/O should be nonblocking or
blocking. If the application specifies blocking, the Gatekeeper API calls to setup the connection and
read a message that does not return until the action is complete.
blocking. If the application specifies blocking, the Gatekeeper API calls to setup the connection and
read a message that does not return until the action is complete.
Return
The return for this function is an integer. If the client socket connection has been set up successfully or
is in progress, a connection handle is returned. This connection handle is the socket descriptor that the
application uses to wait on a connection completion or read socket event. If an error occurs while setting
up the client connection, the value -1 is returned. In this case, the error information is provided in the
STATUS_TYPE.
is in progress, a connection handle is returned. This connection handle is the socket descriptor that the
application uses to wait on a connection completion or read socket event. If an error occurs while setting
up the client connection, the value -1 is returned. In this case, the error information is provided in the
STATUS_TYPE.
GkapiSetupServer
This function sets up the socket for the application to communicate as a server with the
Cisco IOS Gatekeeper. In this situation, the application is the server and the Gatekeeper is the client,
which means that the application will accept incoming connections from Cisco IOS Gatekeeper clients.
Cisco IOS Gatekeeper. In this situation, the application is the server and the Gatekeeper is the client,
which means that the application will accept incoming connections from Cisco IOS Gatekeeper clients.
Input
•
A pointer to the
structure. The application must set up the TCPPort and
IPAddress fields and must preserve this structure for the duration of the connection.
•
A pointer to the
enumeration. Possible values for STATUS_TYPE are:
–
PROCESSING_SUCCESSFUL—Successful connection to the Cisco IOS Gatekeeper.
–
TCP_HANDLE_ERROR—Error was encountered in handle creation.
–
TCP_ADDRESS_ALREADY_IN_USE—Specified local IP address is already in use.