4 * Copyright (C) 2000-2002 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
8 * Id: addipopt.c,v 1.7.4.1 2006/06/16 17:20:56 darrenr Exp
14 int addipopt(op
, io
, len
, class)
16 struct ipopt_names
*io
;
26 if ((len
+ io
->on_siz
) > 48) {
27 fprintf(stderr
, "options too long\n");
41 lvl
= seclevel(class);
46 ipadr
.s_addr
= inet_addr(class);
47 s
[IPOPT_OLEN
] = IPOPT_MINOFF
- 1 + 4;
48 bcopy((char *)&ipadr
, op
, sizeof(ipadr
));
52 bcopy((char *)&val
, op
, 2);
64 fprintf(stderr
, "bo: %s %d %#x: %d\n",
65 io
->on_name
, io
->on_value
, io
->on_bit
, len
);