/* * netsniff-ng - the packet sniffing beast * Copyright 2009, 2010 Daniel Borkmann. * Subject to the GPL, version 2. */ #include #include #include #include "proto.h" #include "protos.h" #include "pkt_buff.h" void empty(struct pkt_buff *pkt __maybe_unused) {} void _hex(uint8_t *ptr, size_t len) { if (!len) return; tprintf(" [ Hex "); for (; ptr && len-- > 0; ptr++) tprintf(" %.2x", *ptr); tprintf(" ]\n"); } void hex(struct pkt_buff *pkt) { size_t len = pkt_len(pkt); if (!len) return; _hex(pkt_pull(pkt, len), len); tprintf("\n"); } void _ascii(uint8_t *ptr, size_t len) { if (!len) return; tprintf(" [ Chr "); for (; ptr && len-- > 0; ptr++) tprintf("%c", isprint(*ptr) ? *ptr : '.'); tprintf(" ]\n"); } void ascii(struct pkt_buff *pkt) { size_t len = pkt_len(pkt); if (!len) return; _ascii(pkt_pull(pkt, len), len); tprintf("\n"); } void hex_ascii(struct pkt_buff *pkt) { size_t len = pkt_len(pkt); uint8_t *ptr = pkt_pull(pkt, len); if (len) { _ascii(ptr, len); _hex(ptr, len); } tprintf("\n"); } static void none_less(struct pkt_buff *pkt __maybe_unused) { tprintf("\n"); } struct protocol none_ops = { .key = 0x01, .print_full = hex_ascii, .print_less = none_less, }; rx-pump-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-07-15 21:48:03 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-07-19 10:31:40 +0200
commitcb021a3eb6e9870d2f3539e37d8b6de4c9d919f6 (patch)
tree96f46d3664f053090e45ab2da417b6e31834b867
parent212ae8918ce69b4f6ec980b21f27eeadf15197d8 (diff)
drm/dp-mst: Remove tx_down_in_progress
Just replicates whether the list is empty or not. Nuke code to avoid writing docs for it! Cc: Dave Airlie <airlied@redhat.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1468612088-9721-6-git-send-email-daniel.vetter@ffwll.ch