hostmask.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* $Id: hostmask.c,v 1.10 2002/01/28 06:50:46 darrenr Exp $
*/
#include "ipf.h"
/*
* found in the line segments, there is an error processing this information,
* or there is an error processing ports information.
*/
int linenum;
{
char *s;
*s++ = '\0';
return 1;
}
}
/*
*/
*s++ ='\0';
return -1;
}
return -1;
}
(*seg)++;
return 0;
}
/*
* look for extra segments if "mask" found in right spot
*/
return -1;
}
(*seg)++;
(*seg)++;
return -1;
}
(*seg)++;
return 0;
}
if (**seg) {
u_32_t k;
return -1;
}
(*seg)++;
k = *sa ? 0xffffffff : 0;
#ifdef USE_INET6
if (use_inet6) {
msk[1] = k;
msk[2] = k;
msk[3] = k;
}
#endif
*msk = k;
return 0;
}
return -1;
}