/* * netsniff-ng - the packet sniffing beast * Copyright 2009, 2010 Daniel Borkmann. * Subject to the GPL, version 2. */ #include #include #include /* for ntohs() */ #include "proto.h" #include "protos.h" #include "csum.h" #include "dissector_eth.h" #include "pkt_buff.h" #include "built_in.h" struct icmphdr { uint8_t type; uint8_t code; uint16_t checksum; union { struct { uint16_t id; uint16_t sequence; } echo; uint32_t gateway; struct { uint16_t ____unused; uint16_t mtu; } frag; } un; } __packed; static void icmp(struct pkt_buff *pkt) { struct icmphdr *icmp = (struct icmphdr *) pkt_pull(pkt, sizeof(*icmp)); uint16_t csum; if (icmp == NULL) return; csum = calc_csum(icmp, pkt_len(pkt) + sizeof(*icmp), 0); tprintf(" [ ICMP "); tprintf("Type (%u), ", icmp->type); tprintf("Code (%u), ", icmp->code); tprintf("CSum (0x%.4x) is %s", ntohs(icmp->checksum), csum ? colorize_start_full(black, red) "bogus (!)" colorize_end() : "ok"); tprintf(" ]\n"); } static void icmp_less(struct pkt_buff *pkt) { struct icmphdr *icmp = (struct icmphdr *) pkt_pull(pkt, sizeof(*icmp)); if (icmp == NULL) return; tprintf(" Type %u Code %u", icmp->type, icmp->code); } struct protocol icmpv4_ops = { .key = 0x01, .print_full = icmp, .print_less = icmp_less, }; net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-08-25 17:56:09 +0200
committerTakashi Iwai <tiwai@suse.de>2016-08-25 17:56:09 +0200
commita820cd3d25c2891028b5f296a8a871ce6dd92c0d (patch)
tree3e86aeb1b898e9ca0dd6754dc7e6ff68865ee175
parentabaa2274811d607679e8687b4118c4922a3517ac (diff)
parentcfb89f2e7505c6823020a18bbdc5410284305234 (diff)
Merge tag 'asoc-fix-v4.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v4.8 A clutch of fixes for v4.8. These are mainly driver specific, the most notable ones being those for OMAP which fix a series of issues that broke boot on some platforms there when deferred probe kicked in. There's also one core fix for an issue when unbinding a card which for some reason had managed to not manifest until recently.