]>
Commit | Line | Data |
---|---|---|
997358a6 MW |
1 | Content-type: text/html |
2 | ||
3 | <HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE> | |
4 | </HEAD><BODY> | |
5 | <H1>IPSEC_ANYADDR</H1> | |
6 | Section: 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"> </A> | |
11 | <H2>NAME</H2> | |
12 | ||
13 | ipsec sameaddr - are two addresses the same? | |
14 | <BR> | |
15 | ||
16 | ipsec addrcmp - ordered comparison of addresses | |
17 | <BR> | |
18 | ||
19 | ipsec samesubnet - are two subnets the same? | |
20 | <BR> | |
21 | ||
22 | ipsec addrinsubnet - is an address within a subnet? | |
23 | <BR> | |
24 | ||
25 | ipsec subnetinsubnet - is a subnet within another subnet? | |
26 | <BR> | |
27 | ||
28 | ipsec subnetishost - is a subnet a single host? | |
29 | <BR> | |
30 | ||
31 | ipsec samesaid - are two SA IDs the same? | |
32 | <BR> | |
33 | ||
34 | ipsec sameaddrtype - are two addresses of the same address family? | |
35 | <BR> | |
36 | ||
37 | ipsec samesubnettype - are two subnets of the same address family? | |
38 | <A NAME="lbAC"> </A> | |
39 | <H2>SYNOPSIS</H2> | |
40 | ||
41 | <B>#include <<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>></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"> </A> | |
79 | <H2>DESCRIPTION</H2> | |
80 | ||
81 | These functions do various comparisons and tests on the | |
82 | <I>ip_address</I> | |
83 | ||
84 | type and | |
85 | <I>ip_subnet</I> | |
86 | ||
87 | types. | |
88 | <P> | |
89 | ||
90 | <I>Sameaddr</I> | |
91 | ||
92 | returns | |
93 | non-zero | |
94 | if addresses | |
95 | <I>a</I> | |
96 | ||
97 | and | |
98 | <I>b</I> | |
99 | ||
100 | are identical, | |
101 | and | |
102 | <B>0</B> | |
103 | ||
104 | otherwise. | |
105 | Addresses of different families are never identical. | |
106 | <P> | |
107 | ||
108 | <I>Addrcmp</I> | |
109 | ||
110 | returns | |
111 | <B>-1</B>, | |
112 | ||
113 | <B>0</B>, | |
114 | ||
115 | or | |
116 | <B>1</B> | |
117 | ||
118 | respectively | |
119 | if address | |
120 | <I>a</I> | |
121 | ||
122 | is less than, equal to, or greater than | |
123 | <I>b</I>. | |
124 | ||
125 | If they are not of the same address family, | |
126 | they are never equal; | |
127 | the ordering reported in this case is arbitrary | |
128 | (and probably not useful) but consistent. | |
129 | <P> | |
130 | ||
131 | <I>Samesubnet</I> | |
132 | ||
133 | returns | |
134 | non-zero | |
135 | if subnets | |
136 | <I>a</I> | |
137 | ||
138 | and | |
139 | <I>b</I> | |
140 | ||
141 | are identical, | |
142 | and | |
143 | <B>0</B> | |
144 | ||
145 | otherwise. | |
146 | Subnets of different address families are never identical. | |
147 | <P> | |
148 | ||
149 | <I>Addrinsubnet</I> | |
150 | ||
151 | returns | |
152 | non-zero | |
153 | if address | |
154 | <I>a</I> | |
155 | ||
156 | is within subnet | |
157 | <I>s</I> | |
158 | ||
159 | and | |
160 | <B>0</B> | |
161 | ||
162 | otherwise. | |
163 | An address is never within a | |
164 | subnet of a different address family. | |
165 | <P> | |
166 | ||
167 | <I>Subnetinsubnet</I> | |
168 | ||
169 | returns | |
170 | non-zero | |
171 | if subnet | |
172 | <I>a</I> | |
173 | ||
174 | is a subset of subnet | |
175 | <I>b</I> | |
176 | ||
177 | and | |
178 | <B>0</B> | |
179 | ||
180 | otherwise. | |
181 | A subnet is deemed to be a subset of itself. | |
182 | A subnet is never a subset of another | |
183 | subnet if their address families differ. | |
184 | <P> | |
185 | ||
186 | <I>Subnetishost</I> | |
187 | ||
188 | returns | |
189 | non-zero | |
190 | if subnet | |
191 | <I>s</I> | |
192 | ||
193 | is in fact only a single host, | |
194 | and | |
195 | <B>0</B> | |
196 | ||
197 | otherwise. | |
198 | <P> | |
199 | ||
200 | <I>Samesaid</I> | |
201 | ||
202 | returns | |
203 | non-zero | |
204 | if SA IDs | |
205 | <I>a</I> | |
206 | ||
207 | and | |
208 | <I>b</I> | |
209 | ||
210 | are identical, | |
211 | and | |
212 | <B>0</B> | |
213 | ||
214 | otherwise. | |
215 | <P> | |
216 | ||
217 | <I>Sameaddrtype</I> | |
218 | ||
219 | returns | |
220 | non-zero | |
221 | if addresses | |
222 | <I>a</I> | |
223 | ||
224 | and | |
225 | <I>b</I> | |
226 | ||
227 | are of the same address family, | |
228 | and | |
229 | <B>0</B> | |
230 | ||
231 | otherwise. | |
232 | <P> | |
233 | ||
234 | <I>Samesubnettype</I> | |
235 | ||
236 | returns | |
237 | non-zero | |
238 | if subnets | |
239 | <I>a</I> | |
240 | ||
241 | and | |
242 | <I>b</I> | |
243 | ||
244 | are of the same address family, | |
245 | and | |
246 | <B>0</B> | |
247 | ||
248 | otherwise. | |
249 | <A NAME="lbAE"> </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"> </A> | |
254 | <H2>HISTORY</H2> | |
255 | ||
256 | Written for the FreeS/WAN project by Henry Spencer. | |
257 | <P> | |
258 | ||
259 | <HR> | |
260 | <A NAME="index"> </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> | |
269 | This document was created by | |
270 | <A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>, | |
271 | using the manual pages.<BR> | |
272 | Time: 21:40:17 GMT, November 11, 2003 | |
273 | </BODY> | |
274 | </HTML> |