[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU Mach interface to packet filters

From: Richard Braun
Subject: GNU Mach interface to packet filters
Date: Sun, 19 Mar 2006 11:59:17 +0100
User-agent: Mutt/1.5.9i


During the work on the implementation of BPF, we (Guillaume Libersat and
myself) found that the NETF packet filter only sends ingress packets to
listeners. Injecting egress packets into packet filters is easy to
implement but we decided not to do it for now because there are other
problems implied that we were not able to solve (like rearranging the
filters queues to separate ingress and egress filters, adapting the GC
processing, etc...). However, the GNU Mach interface to packet filters
should be modified to allow listeners to specify the direction of the
packets they want to capture (ingress/egress/both), and there should be
a way for listeners to know the direction of the packets they capture.

As a result, we decided to use the first filter_t object of a filter as a
header with two parts, one to specify the type of filter - NETF or BPF - and
another for flags - NETF_IN and NETF_OUT. In addition, a field was added
to struct net_rcv_msg (device/net_status.h) which tells about the direction
of the packet captured.

Here you can find patches for GNU Mach and pfinet (since pfinet uses a
catch-all filter, it was necessary to alter it). The GNU Mach patch
improves BPF support, alters the interface to packet filters and uncomment
some declarations in device/bpf.h.

There are also Debian packages available (gnumach and hurd) at

Richard Braun

Attachment: 18_net_filter_fix.patch
Description: Text document

Attachment: pfinet_net_filter.patch
Description: Text document

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]