1t_close(3NSL)        Networking Services Library Functions       t_close(3NSL)
2
3
4

NAME

6       t_close - close a transport endpoint
7

SYNOPSIS

9       #include <xti.h>
10
11
12
13
14       int t_close(int fd);
15
16

DESCRIPTION

18       This  routine  is part of the XTI interfaces which evolved from the TLI
19       interfaces. XTI represents the future evolution  of  these  interfaces.
20       However,  TLI  interfaces are supported for compatibility. When using a
21       TLI routine that has the same name as an  XTI  routine,  the   tiuser.h
22       header  file must be used.  Refer to the  TLI COMPATIBILITY section for
23       a description of differences between the two interfaces.
24
25
26       The t_close() function informs the transport provider that the user  is
27       finished  with  the  transport  endpoint specified by fd, and frees any
28       local library resources associated  with  the  endpoint.  In  addition,
29       t_close() closes the file associated with the transport endpoint.
30
31
32       The  function  t_close()  should  be called from the T_UNBND state. See
33       t_getstate(3NSL). However, this function does not check state  informa‐
34       tion, so it may be called from any state to close a transport endpoint.
35       If this occurs, the local library resources associated  with  the  end‐
36       point  will  be  freed  automatically.   In  addition, close(2) will be
37       issued for that file descriptor; if there are no other  descriptors  in
38       this  process  or in another process which references the communication
39       endpoint, any connection that may be associated with that  endpoint  is
40       broken. The connection may be terminated in an orderly or abortive man‐
41       ner.
42
43
44       A t_close() issued on a connection endpoint may cause  data  previously
45       sent, or data not yet received, to be lost. It is the responsibility of
46       the transport user to ensure that data is received by the remote peer.
47

RETURN VALUES

49       Upon successful completion, a value of  0 is  returned.   Otherwise,  a
50       value of  -1 is returned and t_errno is set to indicate an error.
51

VALID STATES

53       T_UNBND
54

ERRORS

56       On failure, t_errno is set to the following:
57
58       TBADF      The  specified file descriptor does not refer to a transport
59                  endpoint.
60
61
62       TPROTO     This error indicates that a communication problem  has  been
63                  detected  between  XTI  and the transport provider for which
64                  there is no other suitable XTI error (t_errno).
65
66
67       TSYSERR    A system error has occurred during execution of  this  func‐
68                  tion.
69
70

TLI COMPATIBILITY

72       The XTI and TLI interface definitions have common names but use differ‐
73       ent header files. This, and other semantic differences between the  two
74       interfaces are described in the subsections below.
75
76   Interface Header
77       The  XTI  interfaces  use the header file, xti.h. TLI interfaces should
78       not use this header.  They should use the header:
79
80
81       #include <tiuser.h>
82
83   Error Description Values
84       The t_errno value that can be set by the XTI interface  and  cannot  be
85       set by the TLI interface is:
86
87       TPROTO
88
89

ATTRIBUTES

91       See attributes(5)  for descriptions of the following attributes:
92
93
94
95
96       ┌─────────────────────────────┬─────────────────────────────┐
97       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
98       ├─────────────────────────────┼─────────────────────────────┤
99       │MT Level                     │Safe                         │
100       └─────────────────────────────┴─────────────────────────────┘
101

SEE ALSO

103       close(2), t_getstate(3NSL), t_open(3NSL), t_unbind(3NSL), attributes(5)
104
105
106
107SunOS 5.11                        7 May 1998                     t_close(3NSL)
Impressum