Deleted Added
sdiff udiff text old ( 170263 ) new ( 172771 )
full compact
1/*
2 * Copyright (C) 2006 by Darren Reed.
3 *
4 * See the IPFILTER.LICENCE file for details on licencing.
5 *
6 * $Id: alist_new.c,v 1.1.2.2 2006/08/25 22:43:21 darrenr Exp $
7 */
8
9#include "ipf.h"
10
11alist_t *
12alist_new(int v, char *host)
13{
14 int a, b, c, d, bits;

--- 33 unchanged lines hidden (view full) ---

48 }
49
50 if (*host == '!') {
51 al->al_not = 1;
52 host++;
53 }
54
55 if (gethost(host, &al->al_addr) == -1) {
56 *slash = '/';
57 fprintf(stderr, "Cannot parse hostname\n");
58 free(al);
59 return NULL;
60 }
61 al->al_mask = htonl(mask);
62 *slash = '/';
63 return al;
64}