Copyright (C) 2003, Sun Microsystems, Inc. All Rights Reserved
Copyright (C) 2020, Sergio Aguayo. All Rights Reserved
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.
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.
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]
cc -flag .\|.\|. file .\|.\|.-lnsl [ -library .\|.\|. ] #include <netdb.h> int getipsecprotobyname(const char *proto_name);
char *getipsecprotobynum(int proto_num);
getipsecprotobyname() takes as an argument the name of an IPsec protocol and returns its assigned protocol number. The character string returned by the getipsecprotobyname() function must be freed by the called when it is no longer needed.
getipsecprotobynum() takes as an argument a protocol number and returns the corresponding protocol name.
The following protocol numbers are pre-defined: IPSEC_PROTO_ESP
Defines the encryption algorithms (transforms) that can be used by IPsec to provide data confidentiality.
Defines the authentication algorithms (transforms) that can be used by IPsec to provide authentication.
A pointer to the name of an IPsec protocol.
A pointer to a protocol number.
The getipsecprotobynum() function returns a protocol name upon success, or the NULL value if the protocol number specified does not exist.
ATTRIBUTE TYPE ATTRIBUTE VALUE |
MT Level MT Safe |
Interface Stability Evolving |
Piper, D. RFC 2407, The Internet IP Security Domain of Interpretation for ISAKMP. Network Working Group. November, 1998.