From owner-freebsd-questions Mon Jun 7 7:32:22 1999 Delivered-To: freebsd-questions@freebsd.org Received: from arthur.axion.bt.co.uk (arthur.axion.bt.co.uk [132.146.5.4]) by hub.freebsd.org (Postfix) with ESMTP id DA57614CAE for ; Mon, 7 Jun 1999 07:32:20 -0700 (PDT) (envelope-from elise.guedin@bt-sys.bt.co.uk) Received: from rambo (actually rambo.futures.bt.co.uk) by arthur (local) with SMTP; Mon, 7 Jun 1999 15:31:33 +0100 Received: from hercules.info.bt.co.uk (actually hercules) by rambo with SMTP (PP); Mon, 7 Jun 1999 15:33:50 +0100 Received: by hercules.info.bt.co.uk with SMTP (Microsoft Exchange Server Internet Mail Connector Version 4.0.996.62) id <01BEB0FB.981F71B0@hercules.info.bt.co.uk>; Mon, 7 Jun 1999 15:37:04 +0100 Message-ID: <01BEB0FB.981F71B0@hercules.info.bt.co.uk> From: Elise Guedin To: "'freebsd-questions@FreeBSD.ORG'" Subject: bpf - "initializer is not constant" Date: Mon, 7 Jun 1999 15:37:03 +0100 X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.996.62 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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