1 |
/* $FreeBSD: src/contrib/ipfilter/lib/make_range.c,v 1.2 2005/04/25 18:20:12 darrenr Exp $ */ |
2 |
|
3 |
/* |
4 |
* Copyright (C) 2002 by Darren Reed. |
5 |
* |
6 |
* See the IPFILTER.LICENCE file for details on licencing. |
7 |
* |
8 |
* Id: make_range.c,v 1.2 2002/05/18 07:27:52 darrenr Exp |
9 |
*/ |
10 |
#include "ipf.h" |
11 |
|
12 |
|
13 |
alist_t *make_range(not, a1, a2) |
14 |
int not; |
15 |
struct in_addr a1, a2; |
16 |
{ |
17 |
alist_t *a; |
18 |
|
19 |
a = (alist_t *)calloc(1, sizeof(*a)); |
20 |
if (a != NULL) { |
21 |
a->al_1 = a1.s_addr; |
22 |
a->al_2 = a2.s_addr; |
23 |
a->al_not = not; |
24 |
} |
25 |
return a; |
26 |
} |