/* * netsniff-ng - the packet sniffing beast * Copyright 2012 Markus Amend , Deutsche Flugsicherung GmbH * Subject to the GPL, version 2. * * IPv6 Fragmentation Header described in RFC2460 */ #include #include #include /* for ntohs() */ #include "proto.h" #include "dissector_eth.h" #include "built_in.h" #include "pkt_buff.h" struct fragmhdr { uint8_t h_fragm_next_header; uint8_t h_fragm_reserved; uint16_t h_fragm_off_res_M; uint32_t h_fragm_identification; } __packed; static void fragm(struct pkt_buff *pkt) { uint16_t off_res_M; struct fragmhdr *fragm_ops; fragm_ops = (struct fragmhdr *) pkt_pull(pkt, sizeof(*fragm_ops)); if (fragm_ops == NULL) return; off_res_M = ntohs(fragm_ops->h_fragm_off_res_M); tprintf("\t [ Fragment "); tprintf("NextHdr (%u), ", fragm_ops->h_fragm_next_header); tprintf("Reserved (%u), ", fragm_ops->h_fragm_reserved); tprintf("Offset (%u), ", off_res_M >> 3); tprintf("Res (%u), ", (off_res_M >> 1) & 0x3); tprintf("M flag (%u), ", off_res_M & 0x1); tprintf("Identification (%u)", ntohl(fragm_ops->h_fragm_identification)); tprintf(" ]\n"); pkt_set_dissector(pkt, ð_lay3, fragm_ops->h_fragm_next_header); } static void fragm_less(struct pkt_buff *pkt) { uint16_t off_res_M; struct fragmhdr *fragm_ops; fragm_ops = (struct fragmhdr *) pkt_pull(pkt, sizeof(*fragm_ops)); if (fragm_ops == NULL) return; off_res_M = ntohs(fragm_ops->h_fragm_off_res_M); tprintf(" FragmOffs %u", off_res_M >> 3); pkt_set_dissector(pkt, ð_lay3, fragm_ops->h_fragm_next_header); } struct protocol ipv6_fragm_ops = { .key = 0x2C, .print_full = fragm, .print_less = fragm_less, }; i/linux/net-next.git/log/?h=nds-private-remove'>logtreecommitdiff
diff options
context:
space:
mode:
authorUrsula Braun <ubraun@linux.vnet.ibm.com>2017-01-09 16:55:14 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-09 16:07:38 -0500
commita4cf0443c4143b19e42389a1674b5b65224544ce (patch)
treeddb307b528feb0c8bc38e64a7caa9ee51f9d8da5
parentac7138746e14137a451f8539614cdd349153e0c0 (diff)
smc: introduce SMC as an IB-client
* create a list of SMC IB-devices Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/smc/Makefile2
-rw-r--r--net/smc/af_smc.c10
-rw-r--r--net/smc/smc.h6
-rw-r--r--net/smc/smc_ib.c143
-rw-r--r--net/smc/smc_ib.h40
5 files changed, 200 insertions, 1 deletions
diff --git a/net/smc/Makefile b/net/smc/Makefile