75
76 Ancillary data is also possible at the socket level. The
77 <sys/socket.h> header defines the following macros for use
78 as the cmsg_type values when cmsg_level is SOL_SOCKET.
79
80 SCM_RIGHTS Indicates that the data array contains the
81 access rights to be sent or received.
82
83
84 SCM_UCRED Indicates that the data array contains a
85 ucred_t to be received. The ucred_t is the
86 credential of the sending process at the time
87 the message was sent. This is a Sun-specific,
88 Evolving interface. See ucred_get(3C).
89
90
91
92 The IPv4 data formats generally use the same values for data
93 passed back in cmsghdr as for setsockopt() to enable the
94 feature. The IPv4 data formats are listed below with the
95 assocated payload for each.
96
97 IPPROTO_IP
98 IP_RECVDSTADDR
99
100 ipaddr_t, IP address
101
102
103 IPPROTO_IP
104 IP_RECVOPTS
105
106 variable-length IP options, up to 40 bytes
107
108
109 IPPROTO_IP
110 IP_RECVIF
111
112 uint_t, ifIndex number
113
114
115 IPPROTO_IP
130
131
132
133 Headers socket.h(3HEAD)
134
135
136
137 uint8_t
138
139
140 SOL_SOCKET
141 SO_RECVUCRED
142
143 ucred_t - cmsghdr.cmsg_type is SCM_UCRED, not
144 SO_RECVUCRED
145
146
147
148 The IPv6 data formats use different values for enabling the
149 option and for passing the value back to the application.
150 The IPv6 data formats are listed below with the assocated
151 payload for each.
152
153 IPPROTO_IPV6
154 IPV6_RECVPKTINFO
155
156 in_pktinfo, cmsg_type IPV6_PKTINFO
157
158
159 IPPROTO_IPV6
160 IPV6_RECVTCLASS
161
162 uint_t, cmsg_type IPV6_TCLASS
163
164
165 IPPROTO_IPV6
166 IPV6_RECVPATHMTU
167
168 ip6_mtuinfo, cmsg_type IPV6_PATHMTU
169
170
282 The <sys/socket.h> header defines the linger structure that
283 includes the following members:
284
285 int l_onoff /* indicates whether linger option is enabled */
286 int l_linger /* linger time, in seconds */
287
288
289
290 The <sys/socket.h> header defines the following macros:
291
292 SOCK_DGRAM Datagram socket
293
294
295 SOCK_STREAM Byte-stream socket
296
297
298 SOCK_SEQPACKET Sequenced-packet socket
299
300
301
302 The <sys/socket.h> header defines the following macro for
303 use as the level argument of setsockopt() and getsockopt().
304
305 SOL_SOCKET Options to be accessed at socket level, not
306 protocol level.
307
308
309
310 The <sys/socket.h> header defines the following macros for
311 use as the option_name argument in getsockopt() or set-
312 sockopt() calls:
313
314 SO_DEBUG Debugging information is being recorded.
315
316
317 SO_ACCEPTCONN Socket is accepting connections.
318
319
320
321
322
323
324 SunOS 5.11 Last change: 03 Aug 2006 5
325
326
327
|
75
76 Ancillary data is also possible at the socket level. The
77 <sys/socket.h> header defines the following macros for use
78 as the cmsg_type values when cmsg_level is SOL_SOCKET.
79
80 SCM_RIGHTS Indicates that the data array contains the
81 access rights to be sent or received.
82
83
84 SCM_UCRED Indicates that the data array contains a
85 ucred_t to be received. The ucred_t is the
86 credential of the sending process at the time
87 the message was sent. This is a Sun-specific,
88 Evolving interface. See ucred_get(3C).
89
90
91
92 The IPv4 data formats generally use the same values for data
93 passed back in cmsghdr as for setsockopt() to enable the
94 feature. The IPv4 data formats are listed below with the
95 associated payload for each.
96
97 IPPROTO_IP
98 IP_RECVDSTADDR
99
100 ipaddr_t, IP address
101
102
103 IPPROTO_IP
104 IP_RECVOPTS
105
106 variable-length IP options, up to 40 bytes
107
108
109 IPPROTO_IP
110 IP_RECVIF
111
112 uint_t, ifIndex number
113
114
115 IPPROTO_IP
130
131
132
133 Headers socket.h(3HEAD)
134
135
136
137 uint8_t
138
139
140 SOL_SOCKET
141 SO_RECVUCRED
142
143 ucred_t - cmsghdr.cmsg_type is SCM_UCRED, not
144 SO_RECVUCRED
145
146
147
148 The IPv6 data formats use different values for enabling the
149 option and for passing the value back to the application.
150 The IPv6 data formats are listed below with the associated
151 payload for each.
152
153 IPPROTO_IPV6
154 IPV6_RECVPKTINFO
155
156 in_pktinfo, cmsg_type IPV6_PKTINFO
157
158
159 IPPROTO_IPV6
160 IPV6_RECVTCLASS
161
162 uint_t, cmsg_type IPV6_TCLASS
163
164
165 IPPROTO_IPV6
166 IPV6_RECVPATHMTU
167
168 ip6_mtuinfo, cmsg_type IPV6_PATHMTU
169
170
282 The <sys/socket.h> header defines the linger structure that
283 includes the following members:
284
285 int l_onoff /* indicates whether linger option is enabled */
286 int l_linger /* linger time, in seconds */
287
288
289
290 The <sys/socket.h> header defines the following macros:
291
292 SOCK_DGRAM Datagram socket
293
294
295 SOCK_STREAM Byte-stream socket
296
297
298 SOCK_SEQPACKET Sequenced-packet socket
299
300
301
302 The *<sys/socket.h>* header defines the following macros for
303 use as the *level* argument of *setsockopt()* and
304 getsockopt()*.
305
306 *SOL_SOCKET* Options to be accessed at the socket level,
307 not the protocol level.
308
309 *SOL_ROUTE* Options to be accessed at the routing socket
310 level, not the protocol level.
311
312
313 The <sys/socket.h> header defines the following macros for
314 use as the option_name argument in getsockopt() or set-
315 sockopt() calls:
316
317 SO_DEBUG Debugging information is being recorded.
318
319
320 SO_ACCEPTCONN Socket is accepting connections.
321
322
323
324
325
326
327 SunOS 5.11 Last change: 03 Aug 2006 5
328
329
330
|