From 9c8997d54dc9df184bfcedeabf0b3c85cf5e6753 Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 10 Oct 2012 12:32:29 +0000 Subject: packages: sort network related packages into package/network/ git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33688 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/ead/src/pfc.c | 54 --------------------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 package/ead/src/pfc.c (limited to 'package/ead/src/pfc.c') diff --git a/package/ead/src/pfc.c b/package/ead/src/pfc.c deleted file mode 100644 index 402e37f31..000000000 --- a/package/ead/src/pfc.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Small pcap precompiler - * Copyright (C) 2008 Felix Fietkau - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#include -#include -#include -#include -#include - -int main (int argc, char ** argv) -{ - struct bpf_program filter; - pcap_t *pc; - int i; - - if (argc != 2) - { - printf ("Usage: %s \n", argv[0]); - return 1; - } - - pc = pcap_open_dead(DLT_EN10MB, 1500); - if (pcap_compile(pc, &filter, argv[1], 1, 0) != 0) { - printf("error in active-filter expression: %s\n", pcap_geterr(pc)); - return 1; - } - - printf("/* precompiled expression: %s */\n\n" - "static struct bpf_insn pktfilter_insns[] = {\n", - argv[1]); - - for (i = 0; i < filter.bf_len; i++) { - struct bpf_insn *in = &filter.bf_insns[i]; - printf("\t{ .code = 0x%04x, .jt = 0x%02x, .jf = 0x%02x, .k = 0x%08x },\n", in->code, in->jt, in->jf, in->k); - } - printf("};\n\n" - "static struct bpf_program pktfilter = {\n" - "\t.bf_len = %d,\n" - "\t.bf_insns = pktfilter_insns,\n" - "};\n", filter.bf_len); - return 0; - -} -- cgit v1.2.3