9330 stack overflow when creating a deeply nested dataset
[unleashed.git] / usr / src / man / man3nsl / getipsecprotobyname.3nsl
blob41a8a093101767458e4f092882fd5e3ef67df207
1 '\" te
2 .\" Copyright (C) 2003, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH GETIPSECPROTOBYNAME 3NSL "Aug 13, 2003"
7 .SH NAME
8 getipsecprotobyname, getipsecprotobynum \- query IPsec protocols entries
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBcc \fR\fB-flag \&.\|.\|.\fR  \fIfile \fR\&.\|.\|.\fB-l\fRnsl [\fB -library \&.\|.\|. \fR]
13 #include <netdb.h>
17 \fBint\fR \fBgetipsecprotobyname\fR(\fBconst char *\fR\fIproto_name\fR
18 .fi
20 .LP
21 .nf
22 \fBchar *\fR\fBgetipsecprotobynum\fR(\fBint\fR \fIproto_num\fRp
23 .fi
25 .SH DESCRIPTION
26 .sp
27 .LP
28 Use the \fBgetipsecprotobyname()\fR and \fBgetipsecprotobynum()\fR functions to
29 obtain the IPsec algorithm mappings that are defined by \fBipsecalgs\fR(1M).
30 You can also use the \fBgetipsecprotobyname()\fR and \fBgetipsecprotobynum()\fR
31 functions in conjunction with \fBgetipsecalgbyname\fR(3NSL) and
32 \fBgetipsecalgbynum\fR(3NSL) to obtain information about the supported IPsec
33 algorithms. The IPsec algorithms and associated protocol name spaces are
34 defined by \fIRFC 2407\fR.
35 .sp
36 .LP
37 \fBgetipsecprotobyname()\fR takes as an argument the name of an IPsec protocol
38 and returns its assigned protocol number. The character string returned by the
39 \fBgetipsecprotobyname()\fR function must be freed by the called when it is no
40 longer needed.
41 .sp
42 .LP
43 \fBgetipsecprotobynum()\fR takes as an argument a protocol number and returns
44 the corresponding protocol name.
45 .sp
46 .LP
47 The following protocol numbers are pre-defined:
48 .sp
49 .ne 2
50 .na
51 \fB\fBIPSEC_PROTO_ESP\fR\fR
52 .ad
53 .RS 19n
54 Defines the encryption algorithms (transforms) that can be used by IPsec to
55 provide data confidentiality.
56 .RE
58 .sp
59 .ne 2
60 .na
61 \fB\fBIPSEC_PROTO_AH\fR\fR
62 .ad
63 .RS 19n
64 Defines the authentication algorithms (transforms) that can be used by IPsec to
65 provide authentication.
66 .RE
68 .SH PARAMETERS
69 .sp
70 .ne 2
71 .na
72 \fB\fIproto_name\fR\fR
73 .ad
74 .RS 14n
75 A pointer to the name of an IPsec protocol.
76 .RE
78 .sp
79 .ne 2
80 .na
81 \fB\fIproto_num\fR\fR
82 .ad
83 .RS 14n
84 A pointer to a protocol number. conditions.
85 .RE
87 .SH RETURN VALUES
88 .sp
89 .LP
90 The \fBgetipsecprotobyname()\fR function returns a protocol number upon
91 success, or \fB-1\fR if the protocol specified does not exist.
92 .sp
93 .LP
94  The \fBgetipsecprotobynum()\fR function returns a protocol name upon success,
95 or the \fINULL\fR value if the protocol number specified does not exist.
96 .SH ATTRIBUTES
97 .sp
98 .LP
99 See \fBattributes\fR(5)  for descriptions of the following attributes:
104 box;
105 c | c
106 l | l .
107 ATTRIBUTE TYPE  ATTRIBUTE VALUE
108 MT Level        MT Safe
110 Interface Stability     Evolving
113 .SH SEE ALSO
116 \fBipsecalgs\fR(1M), \fBgetipsecalgbyname\fR(3NSL),
117 \fBgetipsecalgbyname\fR(3NSL), \fBattributes\fR(5)
120 Piper, D. \fIRFC 2407, The Internet IP Security Domain of Interpretation for
121 ISAKMP\fR. Network Working Group. November, 1998.