|GETIPSECPROTOBYNAME(3NSL)||Networking Services Library Functions||GETIPSECPROTOBYNAME(3NSL)|
getipsecprotobyname, getipsecprotobynum - query IPsec protocols entries
cc -flag ... file ...-lnsl [ -library ... ] #include <netdb.h> int getipsecprotobyname(const char *proto_name);
char *getipsecprotobynum(int proto_num);
Use the getipsecprotobyname() and getipsecprotobynum() functions to obtain the IPsec algorithm mappings that are defined by ipsecalgs(8). You can also use the getipsecprotobyname() and getipsecprotobynum() functions in conjunction with getipsecalgbyname(3NSL) and getipsecalgbynum(3NSL) to obtain information about the supported IPsec algorithms. The IPsec algorithms and associated protocol name spaces are defined by RFC 2407.
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:
The getipsecprotobyname() function returns a protocol number upon success, or -1 if the protocol specified does not exist.
The getipsecprotobynum() function returns a protocol name upon success, or the NULL value if the protocol number specified does not exist.
See attributes(7) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|
|MT Level||MT Safe|
Piper, D. RFC 2407, The Internet IP Security Domain of Interpretation for ISAKMP. Network Working Group. November, 1998.
|February 21, 2023||OmniOS|