1.\" Copyright (c) 2017, Joyent, Inc. 2.\" Copyright 1989 AT&T Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved 3.\" The contents of this file are subject to the terms of the 4.\" Common Development and Distribution License (the "License"). 5.\" You may not use this file except in compliance with the License. 6.\" 7.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 8.\" or http://www.opensolaris.org/os/licensing. 9.\" See the License for the specific language governing permissions 10.\" and limitations under the License. 11.\" 12.\" When distributing Covered Code, include this CDDL HEADER in each 13.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 14.\" If applicable, add the following below this CDDL HEADER, with the 15.\" fields enclosed by brackets "[]" replaced with your own identifying 16.\" information: Portions Copyright [yyyy] [name of copyright owner] 17.Dd October 29, 2017 18.Dt SOCKIO 4I 19.Os 20.Sh NAME 21.Nm sockio 22.Nd ioctls that operate directly on sockets 23.Sh SYNOPSIS 24.In sys/sockio.h 25.Sh DESCRIPTION 26The 27.Sy ioctl Ns s 28listed in this manual page apply directly to sockets, 29independent of any underlying protocol. 30The 31.Xr setsockopt 3SOCKET 32call 33.Po 34see 35.Xr getsockopt 3SOCKET 36.Pc 37is the primary method for operating on sockets, 38rather than on the underlying protocol or network interface. 39.Sy ioctl Ns s 40for a specific network interface or protocol are documented in the manual page 41for that interface or protocol. 42.Bl -tag -width SIOCCATMARK 43.It Dv SIOCSPGRP 44The argument is a pointer to an 45.Vt int . 46Set the process-group 47.Sy ID 48that will subsequently receive 49.Dv SIGIO 50or 51.Dv SIGURG 52signals for the socket 53referred to by the descriptor passed to 54.Sy ioctl 55to the value of that 56.Vt int . 57The argument must be either positive (in which case it must be a 58process 59.Sy ID ) 60or negative (in which case it must be a process group). 61.It Dv SIOCGPGRP 62The argument is a pointer to an 63.Vt int . 64Get the value of that 65.Vt int 66to the process-group 67.Sy ID 68that is receiving 69.Dv SIGIO 70or 71.Dv SIGURG 72signals for the socket referred to by the descriptor passed to 73.Sy ioctl . 74.It Dv SIOCCATMARK 75The argument is a pointer to an 76.Vt int . 77Set the value of that 78.Vt int 79to 80.Sy 1 81if the read pointer for the socket referred to by the descriptor passed 82to 83.Xr ioctl 2 84points to a mark in the data stream for an out-of-band message. 85Set the value of that 86.Vt int 87to 88.Sy 0 89if the read pointer for the socket 90referred to by the descriptor passed to 91.Sy ioctl 92does not point to a mark 93in the data stream for an out-of-band message. 94.El 95.Sh SEE ALSO 96.Xr ioctl 2 , 97.Xr getsockopt 3SOCKET 98