2 .\" Copyright (c) 2015 Apple Inc. All rights reserved.
4 .\" @APPLE_OSREFERENCE_LICENSE_HEADER_START@
6 .\" This file contains Original Code and/or Modifications of Original Code
7 .\" as defined in and that are subject to the Apple Public Source License
8 .\" Version 2.0 (the 'License'). You may not use this file except in
9 .\" compliance with the License. The rights granted to you under the License
10 .\" may not be used to create, or enable the creation or redistribution of,
11 .\" unlawful or unlicensed copies of an Apple operating system, or to
12 .\" circumvent, violate, or enable the circumvention or violation of, any
13 .\" terms of an Apple operating system software license agreement.
15 .\" Please obtain a copy of the License at
16 .\" http://www.opensource.apple.com/apsl/ and read it before using this file.
18 .\" The Original Code and all software distributed under the License are
19 .\" distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 .\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 .\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 .\" FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 .\" Please see the License for the specific language governing rights and
24 .\" limitations under the License.
26 .\" @APPLE_OSREFERENCE_LICENSE_HEADER_END@
33 .Nd disconnects a connection on a socket
35 .Fd #include <sys/socket.h>
39 .Fa "sae_associd_t associd"
40 .Fa "sae_connid_t connid"
45 is a socket. The communication domain of the socket determines the
46 availability and behavior of
48 For connection-oriented socket,
53 issued on the socket. For connectionless socket, it disassociates any existing
54 association to the peer socket.
57 .\" or on all connections associated with the
63 specifies the association identifier. It should be set to
65 .\"when there is only one association present;
66 .\".Dv SAE_ASSOCID_ALL
67 .\"to specify all existing associations; or one of the identifiers returned from
68 .\".Xr getassocids 3 .
73 .\" specifies the connection identifier. It may be set to
76 .\".Dv SAE_CONNID_ALL ,
77 .\" in which case the association represented by
79 .\" will be dissolved; or the value returned from
82 .\" .Xr getconnids 3 ,
83 .\" which indicates that the disconnection occurs only on that connection
84 .\" while keeping the session association intact. For the latter, the connection
87 .\" will no longer be valid upon success.
90 is currently supported only on AF_INET and AF_INET6 sockets of type SOCK_DGRAM
95 function returns the value 0 if successful; otherwise the value of -1 is
96 returned and the global integer variable
98 is set to indicate the error.
102 system call succeeds unless:
106 Operation already in progress.
107 .\" for the session association represented by
112 is not a valid descriptor.
119 argument is invalid or the underlying protocol is no longer attached to
123 .\" The session association repreresented by
125 .\" is not connected.
132 is a file, not a socket.
138 .\" .Xr getassocids 3 ,
139 .\" .Xr getconnids 3 ,
140 .\" .Xr getconninfo 3 ,
145 function call appeared in Darwin 15.0.0