Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man3c/getipsecalgbyname.3c
Real path: /usr/share/man/man3c/getipsecalgbyname.3c
Zurück
'\" te .\" Copyright (c) 2009, 2021, Oracle and/or its affiliates. .TH getipsecalgbyname 3C "2 Feb 2021" "Oracle Solaris 11.4" "Standard C Library Functions" .SH NAME getipsecalgbyname, getipsecalgbynum, freeipsecalgent \- query algorithm mapping entries .SH SYNOPSIS .LP .nf #include <netdb.h> \fBstruct ipsecalgent *\fR\fBgetipsecalgbyname\fR (\fBconst char *\fR\fIalg_name\fR, \fBint\fR \fIprotocol_num\fR, \fBint *\fR\fIerrnop\fR); .fi .LP .nf \fBstruct ipsecalgent *\fR\fBgetipsecalgbynum\fR(\fBint\fR \fIalg_num\fR, \fBint\fR \fIprotocol_num\fR, \fBint *\fR\fIerrnop\fR); .fi .LP .nf \fBvoid\fR \fBfreeipsecalgent\fR(\fBstruct ipsecalgent *\fR\fIptr\fR); .fi .SH DESCRIPTION .sp .LP Use the \fBgetipsecalgbyname()\fR, \fBgetipsecalgbynum()\fR, \fBfreeipsecalgent()\fR functions to obtain the IPsec algorithm mappings that are defined by \fBipsecalgs\fR(8). The IPsec algorithms and associated protocol name spaces are defined by \fIRFC 2407\fR. .sp .LP \fBgetipsecalgbyname()\fR and \fBgetipsecalgbynum()\fR return a structure that describes the algorithm entry found. This structure is described in the \fBRETURN VALUES\fR section below. .sp .LP \fBfreeipsecalgent()\fR must be used by the caller to free the structures returned by \fBgetipsecalgbyname()\fR and \fBgetipsecalgbynum()\fR when they are no longer needed. .sp .LP Both \fBgetipsecalgbyname()\fR and \fBgetipsecalgbynum()\fR take as parameter the protocol identifier in which the algorithm is defined. See \fBgetipsecprotobyname\fR(3C) and \fBgetipsecprotobynum\fR(3C). .sp .LP The following protocol numbers are pre-defined: .sp .ne 2 .mk .na \fB\fBIPSEC_PROTO_ESP\fR\fR .ad .RS 19n .rt Defines the encryption algorithms (transforms) that can be used by IPsec to provide data confidentiality. .RE .sp .ne 2 .mk .na \fB\fBIPSEC_PROTO_AH\fR\fR .ad .RS 19n .rt Defines the authentication algorithms (transforms) that can be used by IPsec to provide authentication. .RE .sp .LP \fBgetipsecalgbyname()\fR looks up the algorithm by its name, while \fBgetipsecalgbynum()\fR looks up the algorithm by its assigned number. .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIerrnop\fR\fR .ad .RS 10n .rt A pointer to an integer used to return an error status value on certain error conditions. See \fBERRORS\fR. .RE .SH RETURN VALUES .sp .LP The \fBgetipsecalgbyname()\fR and \fBgetipsecalgbynum()\fR functions return a pointer to the structure \fBipsecalgent_t\fR, defined in <\fBnetdb.h\fR>. If the requested algorithm cannot be found, these functions return \fBNULL\fR. .sp .LP The structure \fBipsecalgent_t\fR is defined as follows: .sp .in +2 .nf typedef struct ipsecalgent { char ** a_names; /* algorithm names */ int a_proto_num; /* protocol number */ int a_alg_num; /* algorithm number */ char * a_mech_name; /* mechanism name */ int * a_block_sizes; /* supported block sizes */ int * a_key_sizes; /* supported key sizes */ int a_key_increment; /* key size increment */ int * a_mech_params; /* mechanism specific parameters */ int a_alg_flags; /* algorithm flags */ } ipsecalgent_t; .fi .in -2 .sp .sp .LP \fBa_names\fR is an array of algorithm names, terminated by an element containing a \fBNULL\fR pointer. \fBa_names[0]\fR is the primary name for the algorithm. .sp .LP \fBa_proto_num\fR is the protocol identifier of this algorithm. \fBa_alg_num\fR is the algorithm number. \fBa_mech_name\fR contains the mechanism name associated with the algorithm. .sp .LP \fBa_block_sizes\fR is an array containing the supported block lengths or MAC lengths, in bytes, supported by the algorithm. The last valid value in the array is followed by an element containing the value \fB0\fR. .sp .LP If \fBa_key_increment\fR is non-zero, \fBa_key_sizes[0]\fR contains the default key size for the algorithm. \fBa_key_sizes[1]\fR and \fBa_key_sizes[2]\fR specify the smallest and biggest key sizes support by the algorithm, and \fBa_key_increment\fR specifies the valid key size increments in that range. .sp .LP If \fBa_key_increment\fR is zero, the array \fBa_key_sizes\fR contains the set of key sizes, in bits, supported by the algorithm. The last key length in the array is followed by an element of value \fB0\fR. The first element of this array is used as the default key size for the algorithm. .SH ERRORS .sp .LP When the specified algorithm cannot be returned to the caller, \fBgetipsecalgbyname()\fR and \fBgetipsecalgbynum()\fR return a value of \fBNULL\fR and set the integer pointed to by the \fIerrnop\fR parameter to one of the following values: .sp .ne 2 .mk .na \fB\fBENOMEM\fR\fR .ad .RS 10n .rt Not enough memory .RE .sp .ne 2 .mk .na \fB\fBENOENT\fR\fR .ad .RS 10n .rt Specified algorithm not found .RE .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 10n .rt Specified protocol number not found .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Availability system/library/libc _ MT-Level MT-Safe _ Interface Stability Committed .TE .sp .SH SEE ALSO .sp .LP \fBgetipsecprotobyname\fR(3C), \fBgetipsecprotobynum\fR(3C), \fBattributes\fR(7), \fBcryptoadm\fR(8), \fBipsecalgs\fR(8) .sp .LP Piper, D. \fIRFC 2407, The Internet IP Security Domain of Interpretation for ISAKMP\fR. Network Working Group. November, 1998. https://tools.ietf.org/html/rfc2407. .SH HISTORY .sp .LP These functions were added to Oracle Solaris in the Solaris 10 3/05 release.