2 * Copyright (C) 1993-2001 by Darren Reed.
4 * See the IPFILTER.LICENCE file for details on licencing.
6 * $Id: addipopt.c,v 1.7 2002/01/28 06:50:45 darrenr Exp $
12 int addipopt(op
, io
, len
, class)
14 struct ipopt_names
*io
;
24 if ((len
+ io
->on_siz
) > 48) {
25 fprintf(stderr
, "options too long\n");
39 lvl
= seclevel(class);
44 ipadr
.s_addr
= inet_addr(class);
45 s
[IPOPT_OLEN
] = IPOPT_MINOFF
- 1 + 4;
46 bcopy((char *)&ipadr
, op
, sizeof(ipadr
));
50 bcopy((char *)&val
, op
, 2);
62 fprintf(stderr
, "bo: %s %d %#x: %d\n",
63 io
->on_name
, io
->on_value
, io
->on_bit
, len
);