/* * netsniff-ng - the packet sniffing beast * Copyright 2009, 2010 Daniel Borkmann. * Copyright 2010 Emmanuel Roullit. * Subject to the GPL, version 2. */ #include #include #include /* for ntohs() */ #include "proto.h" #include "vlan.h" #include "dissector_eth.h" #include "pkt_buff.h" struct vlanhdr { uint16_t h_vlan_TCI; uint16_t h_vlan_encapsulated_proto; } __packed; static void vlan(struct pkt_buff *pkt) { uint16_t tci; struct vlanhdr *vlan = (struct vlanhdr *) pkt_pull(pkt, sizeof(*vlan)); if (vlan == NULL) return; tci = ntohs(vlan->h_vlan_TCI); tprintf(" [ VLAN "); tprintf("Prio (%d), ", vlan_tci2prio(tci)); tprintf("CFI (%d), ", vlan_tci2cfi(tci)); tprintf("ID (%d), ", vlan_tci2vid(tci)); tprintf("Proto (0x%.4x)", ntohs(vlan->h_vlan_encapsulated_proto)); tprintf(" ]\n"); pkt_set_dissector(pkt, ð_lay2, ntohs(vlan->h_vlan_encapsulated_proto)); } static void vlan_less(struct pkt_buff *pkt) { uint16_t tci; struct vlanhdr *vlan = (struct vlanhdr *) pkt_pull(pkt, sizeof(*vlan)); if (vlan == NULL) return; tci = ntohs(vlan->h_vlan_TCI); tprintf(" VLAN%d", (tci & 0x0FFF)); pkt_set_dissector(pkt, ð_lay2, ntohs(vlan->h_vlan_encapsulated_proto)); } struct protocol vlan_ops = { .key = 0x8100, .print_full = vlan, .print_less = vlan_less, }; /option> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2016-06-20 12:20:59 +0200
committerMaxime Ripard <maxime.ripard@free-electrons.com>2016-06-30 21:55:32 +0200
commit2cd368300aa5bcec40c079ee5096287847506504 (patch)
tree82820da6967dc2165ae799b184d3549280d5fe1b
parent0b340405fca980b12a2ddafdd4536ad6fb624755 (diff)
drm/sun4i: Send vblank event when the CRTC is disabled
So far, we were missing to send the vblank event when disabling the CRTC, making us never report the last vblank event. This was causing a time out on the page flip, which should be solved now. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>