Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Feb 2002 14:41:42 +1100
From:      Edwin Groothuis <edwin@mavetju.org>
To:        "Ronald F. Guilmette" <rfg@monkeys.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Need a simple Berkeley Packet Filter state machine `program'
Message-ID:  <20020205144142.R1599@k7.mavetju.org>
In-Reply-To: <8743.1012876193@monkeys.com>; from rfg@monkeys.com on Mon, Feb 04, 2002 at 06:29:53PM -0800
References:  <8743.1012876193@monkeys.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 04, 2002 at 06:29:53PM -0800, Ronald F. Guilmette wrote:
> I could probably figure out how to do this all myself, but my sense
> of it is that it would take me some time, and I'd have to look at a LOT
> of other BPF examples first.
> 
> If somebody who is already fluent in the BPF state machine language
> could just give me the appropriate state-machine code, that would
> probably save me quite a lot of time.

If you like, you can use the ngrep-lib there is in the ports-collection.
It uses the same syntax as you can use with tcpdump for its filter
and has callback functions for when it receives data. See
/usr/ports/net/ngrep-lib or http://www.mavetju.org/networking/programming.php

Edwin

-- 
Edwin Groothuis   |              Personal website: http://www.MavEtJu.org
edwin@mavetju.org |           Interested in MUDs? Visit Fatal Dimensions:
------------------+                       http://www.FatalDimensions.org/

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?20020205144142.R1599>