xref: /freebsd/lib/libsysdecode/sysdecode_sockopt_name.3 (revision 9289f547a2e9780d2a77a78e31b02b357b2ce810)
1*9289f547SJohn Baldwin.\"
2*9289f547SJohn Baldwin.\" Copyright (c) 2016 John Baldwin <jhb@FreeBSD.org>
3*9289f547SJohn Baldwin.\" All rights reserved.
4*9289f547SJohn Baldwin.\"
5*9289f547SJohn Baldwin.\" Redistribution and use in source and binary forms, with or without
6*9289f547SJohn Baldwin.\" modification, are permitted provided that the following conditions
7*9289f547SJohn Baldwin.\" are met:
8*9289f547SJohn Baldwin.\" 1. Redistributions of source code must retain the above copyright
9*9289f547SJohn Baldwin.\"    notice, this list of conditions and the following disclaimer.
10*9289f547SJohn Baldwin.\" 2. Redistributions in binary form must reproduce the above copyright
11*9289f547SJohn Baldwin.\"    notice, this list of conditions and the following disclaimer in the
12*9289f547SJohn Baldwin.\"    documentation and/or other materials provided with the distribution.
13*9289f547SJohn Baldwin.\"
14*9289f547SJohn Baldwin.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15*9289f547SJohn Baldwin.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16*9289f547SJohn Baldwin.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17*9289f547SJohn Baldwin.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18*9289f547SJohn Baldwin.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19*9289f547SJohn Baldwin.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20*9289f547SJohn Baldwin.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21*9289f547SJohn Baldwin.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22*9289f547SJohn Baldwin.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23*9289f547SJohn Baldwin.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24*9289f547SJohn Baldwin.\" SUCH DAMAGE.
25*9289f547SJohn Baldwin.\"
26*9289f547SJohn Baldwin.\" $FreeBSD$
27*9289f547SJohn Baldwin.\"
28*9289f547SJohn Baldwin.Dd October 17, 2016
29*9289f547SJohn Baldwin.Dt sysdecode_sockopt_name 3
30*9289f547SJohn Baldwin.Os
31*9289f547SJohn Baldwin.Sh NAME
32*9289f547SJohn Baldwin.Nm sysdecode_sockopt_name
33*9289f547SJohn Baldwin.Nd lookup name of socket option
34*9289f547SJohn Baldwin.Sh LIBRARY
35*9289f547SJohn Baldwin.Lb libsysdecode
36*9289f547SJohn Baldwin.Sh SYNOPSIS
37*9289f547SJohn Baldwin.In sys/types.h
38*9289f547SJohn Baldwin.In stdbool.h
39*9289f547SJohn Baldwin.In sysdecode.h
40*9289f547SJohn Baldwin.Ft const char *
41*9289f547SJohn Baldwin.Fn sysdecode_sockopt_name "int level" "int optname"
42*9289f547SJohn Baldwin.Sh DESCRIPTION
43*9289f547SJohn BaldwinThe
44*9289f547SJohn Baldwin.Fn sysdecode_sockopt_name
45*9289f547SJohn Baldwinfunction returns a text description of the socket option name passed in the
46*9289f547SJohn Baldwin.Fa optname
47*9289f547SJohn Baldwinargument to
48*9289f547SJohn Baldwin.Xr getsockopt 2 .
49*9289f547SJohn Baldwin.Fn sysdecode_sockopt_name
50*9289f547SJohn Baldwintakes the socket option
51*9289f547SJohn Baldwin.Fa level
52*9289f547SJohn Baldwinas well as the option name to uniquely identify the option.
53*9289f547SJohn Baldwin.Sh SEE ALSO
54*9289f547SJohn Baldwin.Xr sysdecode_sockopt_level 3
55*9289f547SJohn Baldwin.Sh BUGS
56*9289f547SJohn BaldwinSocket option levels and names are protocol-specific.
57*9289f547SJohn BaldwinBoth
58*9289f547SJohn Baldwin.Fn sysdecode_sockopt_level
59*9289f547SJohn Baldwinand
60*9289f547SJohn Baldwin.Fn sysdecode_sockopt_name
61*9289f547SJohn Baldwinshould possibly accept the protocol family as an additional argument.
62