bsnmp-pcap is a module for bsnmpd which allows you to measure arbitrary traffic flows. The flows are defined in the tcpdump filter syntax.
You can get a snapshot of the source with git:
$ git clone git://thewalter.net/bsnmp-pcap.git
Source code repository:
See the license. Contact me when bugs are found.