/* * Minimal BPF assembler * * Instead of libpcap high-level filter expressions, it can be quite * useful to define filters in low-level BPF assembler (that is kept * close to Steven McCanne and Van Jacobson's original BPF paper). * In particular for BPF JIT implementors, JIT security auditors, or * just for defining BPF expressions that contain extensions which are * not supported by compilers. * * How to get into it: * * 1) read Documentation/networking/filter.txt * 2) Run `bpf_asm [-c] ` to translate into binary * blob that is loadable with xt_bpf, cls_bpf et al. Note: -c will * pretty print a C-like construct. * * Copyright 2013 Daniel Borkmann * Licensed under the GNU General Public License, version 2.0 (GPLv2) */ #include #include #include extern void bpf_asm_compile(FILE *fp, bool cstyle); int main(int argc, char **argv) { FILE *fp = stdin; bool cstyle = false; int i; for (i = 1; i < argc; i++) { if (!strncmp("-c", argv[i], 2)) { cstyle = true; continue; } fp = fopen(argv[i], "r"); if (!fp) { fp = stdin; continue; } break; } bpf_asm_compile(fp, cstyle); return 0; } vate-remove net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2016-10-20 15:44:19 +0200
committerTobias Klauser <tklauser@distanz.ch>2017-02-15 10:34:18 +0100
commit5db4992d8f040b8d8db0b86d42806e0c417f7ccf (patch)
tree5b06e952af482d45f3ade64e77824662e34b7fa2 /arch/mips/bcm63xx/gpio.c
parent370ebb0ef6255132373ed35d13e7b1d8d2eb7003 (diff)
usbnet: pegasus: Use net_device_stats from struct net_devicends-private-remove
Instead of using a private copy of struct net_device_stats in struct pegasus, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Cc: Petko Manolov <petkan@nucleusys.com> Cc: linux-usb@vger.kernel.org Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'arch/mips/bcm63xx/gpio.c')