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"
8 getipsecprotobyname, getipsecprotobynum \- query IPsec protocols entries
12 \fBcc \fR\fB-flag \&.\|.\|.\fR \fIfile \fR\&.\|.\|.\fB-l\fRnsl [\fB -library \&.\|.\|. \fR]
17 \fBint\fR \fBgetipsecprotobyname\fR(\fBconst char *\fR\fIproto_name\fR
22 \fBchar *\fR\fBgetipsecprotobynum\fR(\fBint\fR \fIproto_num\fRp
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.
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
43 \fBgetipsecprotobynum()\fR takes as an argument a protocol number and returns
44 the corresponding protocol name.
47 The following protocol numbers are pre-defined:
51 \fB\fBIPSEC_PROTO_ESP\fR\fR
54 Defines the encryption algorithms (transforms) that can be used by IPsec to
55 provide data confidentiality.
61 \fB\fBIPSEC_PROTO_AH\fR\fR
64 Defines the authentication algorithms (transforms) that can be used by IPsec to
65 provide authentication.
72 \fB\fIproto_name\fR\fR
75 A pointer to the name of an IPsec protocol.
84 A pointer to a protocol number. conditions.
90 The \fBgetipsecprotobyname()\fR function returns a protocol number upon
91 success, or \fB-1\fR if the protocol specified does not exist.
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.
99 See \fBattributes\fR(5) for descriptions of the following attributes:
107 ATTRIBUTE TYPE ATTRIBUTE VALUE
110 Interface Stability Evolving
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.