1getipsecprotobyname(3NNSeLt)working Services Library Functgieotnispsecprotobyname(3NSL)
2
3
4
6 getipsecprotobyname, getipsecprotobynum - query IPsec protocols entries
7
9 cc -flag ... file ...-lnsl [ -library ... ]
10 #include <netdb.h>
11
12
13
14 int getipsecprotobyname(const char *proto_name
15
16
17 char *getipsecprotobynum(int proto_nump
18
19
21 Use the getipsecprotobyname() and getipsecprotobynum() functions to
22 obtain the IPsec algorithm mappings that are defined by ipsecalgs(1M).
23 You can also use the getipsecprotobyname() and getipsecprotobynum()
24 functions in conjunction with getipsecalgbyname(3NSL) and getipsecal‐
25 gbynum(3NSL) to obtain information about the supported IPsec algo‐
26 rithms. The IPsec algorithms and associated protocol name spaces are
27 defined by RFC 2407.
28
29
30 getipsecprotobyname() takes as an argument the name of an IPsec proto‐
31 col and returns its assigned protocol number. The character string
32 returned by the getipsecprotobyname() function must be freed by the
33 called when it is no longer needed.
34
35
36 getipsecprotobynum() takes as an argument a protocol number and returns
37 the corresponding protocol name.
38
39
40 The following protocol numbers are pre-defined:
41
42 IPSEC_PROTO_ESP Defines the encryption algorithms (transforms) that
43 can be used by IPsec to provide data confidential‐
44 ity.
45
46
47 IPSEC_PROTO_AH Defines the authentication algorithms (transforms)
48 that can be used by IPsec to provide authentication.
49
50
52 proto_name A pointer to the name of an IPsec protocol.
53
54
55 proto_num A pointer to a protocol number. conditions.
56
57
59 The getipsecprotobyname() function returns a protocol number upon suc‐
60 cess, or -1 if the protocol specified does not exist.
61
62
63 The getipsecprotobynum() function returns a protocol name upon suc‐
64 cess, or the NULL value if the protocol number specified does not
65 exist.
66
68 See attributes(5) for descriptions of the following attributes:
69
70
71
72
73 ┌─────────────────────────────┬─────────────────────────────┐
74 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
75 ├─────────────────────────────┼─────────────────────────────┤
76 │Availability │SUNWcsl (32 bit) │
77 │ │SUNWcslx (64 bit) │
78 ├─────────────────────────────┼─────────────────────────────┤
79 │MT Level │MT Safe │
80 ├─────────────────────────────┼─────────────────────────────┤
81 │Interface Stability │Evolving │
82 └─────────────────────────────┴─────────────────────────────┘
83
85 ipsecalgs(1M), getipsecalgbyname(3NSL), getipsecalgbyname(3NSL),
86 attributes(5)
87
88
89 Piper, D. RFC 2407, The Internet IP Security Domain of Interpretation
90 for ISAKMP. Network Working Group. November, 1998.
91
92
93
94SunOS 5.11 13 Aug 2003 getipsecprotobyname(3NSL)