Transport Layer Interface Library (libtli.a)
#include <tiuser.h>
int t_free(ptr, struct_type) char *ptr; int struct_type;
The t_free subroutine frees memory previously allocated by the t_alloc subroutine. This subroutine frees memory for the specified structure and also frees memory for buffers referenced by the structure.
The t_free subroutine checks the addr , opt , and udata fields of the given structure (as appropriate) and frees the buffers pointed to by the buf field of the netbuf structure. If the buf field is null, the t_free subroutine does not attempt to free memory. After all buffers are freed, the t_free subroutine frees the memory associated with the structure pointed to by the ptr parameter.
Undefined results will occur if the ptr parameter or any of the buf pointers points to a block of memory that was not previously allocated by the t_alloc subroutine.
On successful completion, the t_free subroutine returns a value of 0. Otherwise, it returns a value of -1, and the t_errno variable is set to indicate the error.
If unsuccessful, the t_errno variable is set to the following:
TNOSTRUCTYPE | Unsupported structure type requested. |
TSYSERR | A system error has occurred during execution of this function. |
This subroutine is part of Base Operating System (BOS) Runtime.
The t_alloc subroutine.
List of Streams Programming References and STREAMS Overview in AIX Version 4.3 Communications Programming Concepts.