Re: [linux-audio-user] ANN: hearnet 0.0.4--Don't Paniq

From: Mario Lang <mlang@email-addr-hidden>
Date: Fri Sep 30 2005 - 14:43:49 EEST

Hans Fugal <hans@email-addr-hidden> writes:

> Leonard paniq Ritter sent me a nifty patch for hearnet some time ago. I
> really dig it, and I finally got around to incorporating the patch and
> releasing a new version. Here's what paniq has to say about it:
>
> changed code so that it uses 32-voice polyphony and plays bridges /
> chromatic orders.
>
> as an effect, you get very harmonic sounds if packet sizes on a site
> are the same, and quite weird stuff if packet sizes vary.
>
> Go get it and see how much cooler it sounds!
>
> http://hans.fugal.net/src/hearnet

Wow, I love this! Below is a patch to add filter expression
support to hearnet, so now you can say
./hearnet eth0 "udp port 53"
or whatever kind of filter expression you can think of. Very nice
for listening in on just specific traffic patterns!

--- hearnet-0.0.4/hearnet.cpp.orig 2005-09-23 03:02:40.000000000 +0200
+++ hearnet-0.0.4/hearnet.cpp 2005-09-30 13:36:26.000000000 +0200
@@ -163,7 +163,7 @@
 {
     fprintf(stderr,
             "\n"
- "usage: hearnet [interface]\n"
+ "usage: hearnet [interface [filter-expression]]\n"
             "Default interface is eth0.\n"
             );
     exit(1);
@@ -228,7 +228,15 @@
         fprintf(stderr,"pcap_open_live; %s\n", perrbuf);
         usage();
     }
-
+
+ if (argc > 2) {
+ bpf_program bpfprog;
+ if (pcap_compile(hdl_pcap, &bpfprog, argv[2], 1, 0XFFFFFFFF) != -1) {
+ pcap_setfilter(hdl_pcap, &bpfprog);
+ } else {
+ printf("%s", pcap_geterr(hdl_pcap));
+ }
+ }
     /*}}}*/
 
         timeval tv_start;

-- 
CYa,
  Mario

Received on Fri Sep 30 16:15:16 2005

This archive was generated by hypermail 2.1.8 : Fri Sep 30 2005 - 16:15:17 EEST