Date: Mon, 7 Jun 1999 15:37:03 +0100 From: Elise Guedin <elise.guedin@bt-sys.bt.co.uk> To: "'freebsd-questions@FreeBSD.ORG'" <freebsd-questions@FreeBSD.ORG> Subject: bpf - "initializer is not constant" Message-ID: <01BEB0FB.981F71B0@hercules.info.bt.co.uk>
next in thread | raw e-mail | index | archive | help
Hi, I am trying to use bpf to filter some IP packets . It works well (as I didn't forget to put pseudo-device bpfilter ...) When I am specifying an IP address (i.e 0xac191b25..) to forward, no problem. BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K,0xac191b25,0,1) The problem is when I am putting "ipaddress" (which is a u_long) instead of 0xac191b25. I get "initializer for insns[5].k is not constant" . I really need to configure my filter depending on some other events, so I don't know before which IPaddress to forward. That's why I need to put a variable instead of a constant in the bpf filter. Anyone has a clue to cope with this ? Thanks in advance Elise GUEDIN To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01BEB0FB.981F71B0>