diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-09-10 16:45:45 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-09-10 16:55:33 +0200 |
commit | b7a834b4cb6a0cdd53d4fb06c1981e8d2af1c949 (patch) | |
tree | 9e9f287d2e387bfb66017772bc6e0d07edce671f /include | |
parent | 07d96eb65441e46647d05e690c557ed3c14cb79b (diff) |
gprs: Add a custom GPRS filter
Allow to inspect UDP messages and check for GPRS, NS, BSSGP
and then filter LLC frames. Parsing the vL datastructure with
the libpcap syntax is a pain. It could be done using BPF but
we do not want to use bpf asm to specify the entire ruleset.
I looked into using libepan/libwireshark but this has memory
issues and is painful too. So let's parse UDP, NS, BSSGP using
the info we already have. I tried a bit of editcap to generate
a bit of broken data. The length check might still be bad.
I used my crash_20100602.pcap file to count the LLC frames we
detect and compare that to wireshark it ended with the right
number.
pcap add-filter gprs
can be used to enable the new filtering option after the OS
has received the packet.
Fixes: ONW#1314
Diffstat (limited to 'include')
-rw-r--r-- | include/osmo-pcap/osmo_pcap_client.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmo-pcap/osmo_pcap_client.h b/include/osmo-pcap/osmo_pcap_client.h index 7aae7ca..30b55ee 100644 --- a/include/osmo-pcap/osmo_pcap_client.h +++ b/include/osmo-pcap/osmo_pcap_client.h @@ -36,6 +36,7 @@ struct osmo_pcap_client { struct bpf_program bpf; char *filter_string; int filter_itself; + int gprs_filtering; struct osmo_fd fd; char *srv_ip; |