]> git.ipfire.org Git - thirdparty/strongswan.git/blame - doc/manpage.d/ipsec_samesaid.3.html
- import of strongswan-2.7.0
[thirdparty/strongswan.git] / doc / manpage.d / ipsec_samesaid.3.html
CommitLineData
997358a6
MW
1Content-type: text/html
2
3<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
4</HEAD><BODY>
5<H1>IPSEC_ANYADDR</H1>
6Section: C Library Functions (3)<BR>Updated: 28 Nov 2000<BR><A HREF="#index">Index</A>
7<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
8
9
10<A NAME="lbAB">&nbsp;</A>
11<H2>NAME</H2>
12
13ipsec sameaddr - are two addresses the same?
14<BR>
15
16ipsec addrcmp - ordered comparison of addresses
17<BR>
18
19ipsec samesubnet - are two subnets the same?
20<BR>
21
22ipsec addrinsubnet - is an address within a subnet?
23<BR>
24
25ipsec subnetinsubnet - is a subnet within another subnet?
26<BR>
27
28ipsec subnetishost - is a subnet a single host?
29<BR>
30
31ipsec samesaid - are two SA IDs the same?
32<BR>
33
34ipsec sameaddrtype - are two addresses of the same address family?
35<BR>
36
37ipsec samesubnettype - are two subnets of the same address family?
38<A NAME="lbAC">&nbsp;</A>
39<H2>SYNOPSIS</H2>
40
41<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
42
43<P>
44<B>int sameaddr(const ip_address *a, const ip_address *b);</B>
45
46<BR>
47
48<B>int addrcmp(const ip_address *a, const ip_address *b);</B>
49
50<BR>
51
52<B>int samesubnet(const ip_subnet *a, const ip_subnet *b);</B>
53
54<BR>
55
56<B>int addrinsubnet(const ip_address *a, const ip_subnet *s);</B>
57
58<BR>
59
60<B>int subnetinsubnet(const ip_subnet *a, const ip_subnet *b);</B>
61
62<BR>
63
64<B>int subnetishost(const ip_subnet *s);</B>
65
66<BR>
67
68<B>int samesaid(const ip_said *a, const ip_said *b);</B>
69
70<BR>
71
72<B>int sameaddrtype(const ip_address *a, const ip_address *b);</B>
73
74<BR>
75
76<B>int samesubnettype(const ip_subnet *a, const ip_subnet *b);</B>
77
78<A NAME="lbAD">&nbsp;</A>
79<H2>DESCRIPTION</H2>
80
81These functions do various comparisons and tests on the
82<I>ip_address</I>
83
84type and
85<I>ip_subnet</I>
86
87types.
88<P>
89
90<I>Sameaddr</I>
91
92returns
93non-zero
94if addresses
95<I>a</I>
96
97and
98<I>b</I>
99
100are identical,
101and
102<B>0</B>
103
104otherwise.
105Addresses of different families are never identical.
106<P>
107
108<I>Addrcmp</I>
109
110returns
111<B>-1</B>,
112
113<B>0</B>,
114
115or
116<B>1</B>
117
118respectively
119if address
120<I>a</I>
121
122is less than, equal to, or greater than
123<I>b</I>.
124
125If they are not of the same address family,
126they are never equal;
127the ordering reported in this case is arbitrary
128(and probably not useful) but consistent.
129<P>
130
131<I>Samesubnet</I>
132
133returns
134non-zero
135if subnets
136<I>a</I>
137
138and
139<I>b</I>
140
141are identical,
142and
143<B>0</B>
144
145otherwise.
146Subnets of different address families are never identical.
147<P>
148
149<I>Addrinsubnet</I>
150
151returns
152non-zero
153if address
154<I>a</I>
155
156is within subnet
157<I>s</I>
158
159and
160<B>0</B>
161
162otherwise.
163An address is never within a
164subnet of a different address family.
165<P>
166
167<I>Subnetinsubnet</I>
168
169returns
170non-zero
171if subnet
172<I>a</I>
173
174is a subset of subnet
175<I>b</I>
176
177and
178<B>0</B>
179
180otherwise.
181A subnet is deemed to be a subset of itself.
182A subnet is never a subset of another
183subnet if their address families differ.
184<P>
185
186<I>Subnetishost</I>
187
188returns
189non-zero
190if subnet
191<I>s</I>
192
193is in fact only a single host,
194and
195<B>0</B>
196
197otherwise.
198<P>
199
200<I>Samesaid</I>
201
202returns
203non-zero
204if SA IDs
205<I>a</I>
206
207and
208<I>b</I>
209
210are identical,
211and
212<B>0</B>
213
214otherwise.
215<P>
216
217<I>Sameaddrtype</I>
218
219returns
220non-zero
221if addresses
222<I>a</I>
223
224and
225<I>b</I>
226
227are of the same address family,
228and
229<B>0</B>
230
231otherwise.
232<P>
233
234<I>Samesubnettype</I>
235
236returns
237non-zero
238if subnets
239<I>a</I>
240
241and
242<I>b</I>
243
244are of the same address family,
245and
246<B>0</B>
247
248otherwise.
249<A NAME="lbAE">&nbsp;</A>
250<H2>SEE ALSO</H2>
251
252<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_initaddr.3.html">ipsec_initaddr</A>(3)
253<A NAME="lbAF">&nbsp;</A>
254<H2>HISTORY</H2>
255
256Written for the FreeS/WAN project by Henry Spencer.
257<P>
258
259<HR>
260<A NAME="index">&nbsp;</A><H2>Index</H2>
261<DL>
262<DT><A HREF="#lbAB">NAME</A><DD>
263<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
264<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
265<DT><A HREF="#lbAE">SEE ALSO</A><DD>
266<DT><A HREF="#lbAF">HISTORY</A><DD>
267</DL>
268<HR>
269This document was created by
270<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
271using the manual pages.<BR>
272Time: 21:40:18 GMT, November 11, 2003
273</BODY>
274</HTML>