/* * netsniff-ng - the packet sniffing beast * Copyright 2013 Daniel Borkmann. * Subject to the GPL, version 2. */ #include #include #include "xmalloc.h" #include "config.h" #include "bpf.h" #include "die.h" void bpf_try_compile(const char *rulefile, struct sock_fprog *bpf, uint32_t link_type) { int i, ret; const struct bpf_insn *ins; struct sock_filter *out; struct bpf_program _bpf; ret = pcap_compile_nopcap(65535, link_type, &_bpf, rulefile, 1, 0xffffffff); if (ret < 0) panic("Cannot compile filter %s\n", rulefile); bpf->len = _bpf.bf_len; bpf->filter = xrealloc(bpf->filter, bpf->len * sizeof(*out)); for (i = 0, ins = _bpf.bf_insns, out = bpf->filter; i < bpf->len; ++i, ++ins, ++out) { out->code = ins->code; out->jt = ins->jt; out->jf = ins->jf; out->k = ins->k; if (out->code == 0x06 && out->k > 0) out->k = 0xFFFFFFFF; } pcap_freecode(&_bpf); if (__bpf_validate(bpf) == 0) panic("This is not a valid BPF program!\n"); } 8da44931'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArchit Taneja <architt@codeaurora.org>2016-06-09 11:51:33 +0530
committerRob Clark <robdclark@gmail.com>2016-07-16 10:08:48 -0400
commitcb9b08e9c11a3413b6db866d11a7c6348da44931 (patch)
treeaaacfbd3e46484e53e48ef1ef9590b39d8a86cb3 /Documentation
parent60282cea5bfa934694decfe836ee4600504bdeb1 (diff)
dt-bindings: msm/dsi: Use standard data lanes binding
The "qcom,data-lane-map" binding mentioned in the document is changed to the more generic "data-lanes" property specified in: Documentation/devicetree/bindings/media/video-interfaces.txt The previous binding expressed physical to logical data lane mappings, the standard "data-lanes" binding uses logical to physical data lane mappings. Update the docs to reflect this change. The example had the property incorrectly named as "lanes", update this too. The MSM DSI DT bindings aren't used anywhere at the moment, so it's okay to update this property. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'Documentation')