/* * 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 "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)); 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, }; alue='switch'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-11-29 11:42:18 +0000
committerMark Brown <broonie@linaro.org>2013-11-29 12:28:44 +0000
commit69ae8489076fa0fa98609155434f3c286c7364a0 (patch)
tree84c8c55b1817577ffa3d40a4f5b809a4cca0fa96 /sound/soc
parent3a85ca9d8a06c873b7a5fb24319572926fa20e10 (diff)
ASoC: cs42l52: Fix build
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc')