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.3 2007/06/06 08:05:33 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 if (slash != NULL) 57 *slash = '/'; |
58 fprintf(stderr, "Cannot parse hostname\n"); 59 free(al); 60 return NULL; 61 } 62 al->al_mask = htonl(mask); |
63 if (slash != NULL) 64 *slash = '/'; |
65 return al; 66} |