/* * 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, }; et-rx-pump-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuneshwor Singh <guneshwor.o.singh@intel.com>2016-08-04 15:46:04 +0530
committerTakashi Iwai <tiwai@suse.de>2016-08-09 08:53:56 +0200
commitbfcba288b97f10c22fb84f0898ebfb6b468b80ea (patch)
tree0802d1756f4195e6a331b6aeef0a8b471e532124
parent50279d9b5facde811280afe13dd8c79f0e7b21ed (diff)
ALSA - hda: Add support for link audio time reporting
The HDA controller from SKL onwards support additional timestamp reporting of the link time. The link time is read from HW registers and converted to audio values. Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>