gtpc1m78Transmission Control Protocol/Internet Protocol

claw_disconnect -- Remove a Logical Link from an Adapter

ISO-C only

The claw_disconnect function is not available in the TARGET(TPF) C library.

The claw_disconnect function removes a logical link from an adapter.

Format

include  <claw.h>
int  claw_disconnect(unsigned int adapter_id,
              unsigned int path_id);

adapter_id
A 4-byte field that contains the adapter ID for the adapter that was returned from the claw_openadapter request.

path_id
A 4-byte field that contains the path ID assigned to this path when the claw_connect function was issued.

Normal Return

Return code 0 indicates that the function was successful.

Error Return

Following is a list of return codes that can be returned to the program that calls the claw_disconnect function. See CLAW Return Codes for a complete list of the return codes and their definitions.

RC_CLAW_INVALID_FUNCTION

RC_CLAW_NOT_INITED

RC_CLAW_ADAPTER_NOT_OPEN

RC_CLAW_ACQUIRE_ERROR

RC_CLAW_DISCONNECT_ERROR

RC_CLAW_PATH_NOT_THERE

Programming Considerations

Examples

The following example issues the claw_disconnect function to deactivate a logical link.

     #include  <claw.h>
 
     unsigned int adapter_id;
     unsigned int path_id;
     int       claw_rc;
 
/* Set up adapter_id with the value returned from the
claw_openadapter function and path_id with the value returned from
the claw_connect function */

·
·
·
claw_rc = claw_disconnect(adapter_id,path_id); /*normal processing path */
·
·
·

Related Information