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 7I
  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
  26 The
  27 .Sy ioctl Ns s
  28 listed in this manual page apply directly to sockets,
  29 independent of any underlying protocol.
  30 The
  31 .Xr setsockopt 3SOCKET
  32 call
  33 .Po
  34 see
  35 .Xr getsockopt 3SOCKET
  36 .Pc
  37 is the primary method for operating on sockets,
  38 rather than on the underlying protocol or network interface.
  39 .Sy ioctl Ns s
  40 for a specific network interface or protocol are documented in the manual page
  41 for that interface or protocol.
  42 .Bl -tag -width SIOCCATMARK
  43 .It Dv SIOCSPGRP
  44 The argument is a pointer to an
  45 .Vt int .
  46 Set the process-group
  47 .Sy ID
  48 that will subsequently receive
  49 .Dv SIGIO
  50 or
  51 .Dv SIGURG
  52 signals for the socket
  53 referred to by the descriptor passed to
  54 .Sy ioctl
  55 to the value of that
  56 .Vt int .
  57 The argument must be either positive (in which case it must be a
  58 process
  59 .Sy ID )
  60 or negative (in which case it must be a process group).
  61 .It Dv SIOCGPGRP
  62 The argument is a pointer to an
  63 .Vt int .
  64 Get the value of that
  65 .Vt int
  66 to the process-group
  67 .Sy ID
  68 that is receiving
  69 .Dv SIGIO
  70 or
  71 .Dv SIGURG
  72 signals for the socket referred to by the descriptor passed to
  73 .Sy ioctl .
  74 .It Dv SIOCCATMARK
  75 The argument is a pointer to an
  76 .Vt int .
  77 Set the value of that
  78 .Vt int
  79 to
  80 .Sy 1
  81 if the read pointer for the socket referred to by the descriptor passed
  82 to
  83 .Xr ioctl 2
  84 points to a mark in the data stream for an out-of-band message.
  85 Set the value of that
  86 .Vt int
  87 to
  88 .Sy 0
  89 if the read pointer for the socket
  90 referred to by the descriptor passed to
  91 .Sy ioctl
  92 does not point to a mark
  93 in the data stream for an out-of-band message.
  94 .El
  95 .Sh SEE ALSO
  96 .Xr ioctl 2 ,
  97 .Xr getsockopt 3SOCKET