Lines Matching refs:dh
80 #define DCCPH_CCVAL(dh) (((dh)->dccph_ccval_cscov >> 4) & 0xF) argument
81 #define DCCPH_CSCOV(dh) (((dh)->dccph_ccval_cscov) & 0xF) argument
83 #define DCCPH_X(dh) ((dh)->dccph_xtr & 1) argument
84 #define DCCPH_TYPE(dh) (((dh)->dccph_xtr >> 1) & 0xF) argument
191 static inline u_int dccp_csum_coverage(const struct dccp_hdr* dh, u_int len) in dccp_csum_coverage() argument
195 if (DCCPH_CSCOV(dh) == 0) in dccp_csum_coverage()
197 cov = (dh->dccph_doff + DCCPH_CSCOV(dh) - 1) * sizeof(uint32_t); in dccp_csum_coverage()
202 const struct dccp_hdr *dh, u_int len) in dccp_cksum() argument
204 return nextproto4_cksum(ndo, ip, (const uint8_t *)(void *)dh, len, in dccp_cksum()
205 dccp_csum_coverage(dh, len), IPPROTO_DCCP); in dccp_cksum()
209 static int dccp6_cksum(const struct ip6_hdr *ip6, const struct dccp_hdr *dh, u_int len) in dccp6_cksum() argument
211 return nextproto6_cksum(ip6, (const uint8_t *)(void *)dh, len, in dccp6_cksum()
212 dccp_csum_coverage(dh, len), IPPROTO_DCCP); in dccp6_cksum()
225 const struct dccp_hdr *dh = (const struct dccp_hdr *)bp; in dccp_seqno() local
228 if (DCCPH_X(dh) != 0) { in dccp_seqno()
232 seqno = EXTRACT_24BITS(dh->dccph_seq); in dccp_seqno()
238 static inline unsigned int dccp_basic_hdr_len(const struct dccp_hdr *dh) in dccp_basic_hdr_len() argument
240 return DCCPH_X(dh) ? sizeof(struct dccp_hdr_ext) : sizeof(struct dccp_hdr); in dccp_basic_hdr_len()
245 const struct dccp_hdr *dh = (const struct dccp_hdr *)bp; in dccp_print_ack_no() local
246 const u_char *ackp = bp + dccp_basic_hdr_len(dh); in dccp_print_ack_no()
249 if (DCCPH_X(dh) != 0) { in dccp_print_ack_no()
273 const struct dccp_hdr *dh; in dccp_print() local
284 dh = (const struct dccp_hdr *)bp; in dccp_print()
295 cp = (const u_char *)(dh + 1); in dccp_print()
307 fixed_hdrlen = dccp_basic_hdr_len(dh); in dccp_print()
313 ND_TCHECK2(*dh, fixed_hdrlen); in dccp_print()
315 sport = EXTRACT_16BITS(&dh->dccph_sport); in dccp_print()
316 dport = EXTRACT_16BITS(&dh->dccph_dport); in dccp_print()
317 hlen = dh->dccph_doff * 4; in dccp_print()
345 ND_PRINT((ndo, " (CCVal %d, CsCov %d, ", DCCPH_CCVAL(dh), DCCPH_CSCOV(dh))); in dccp_print()
352 dccp_sum = EXTRACT_16BITS(&dh->dccph_checksum); in dccp_print()
355 sum = dccp_cksum(ndo, ip, dh, len); in dccp_print()
358 sum = dccp6_cksum(ip6, dh, len); in dccp_print()
370 dccph_type = DCCPH_TYPE(dh); in dccp_print()
490 if ((DCCPH_TYPE(dh) != DCCP_PKT_DATA) && in dccp_print()
491 (DCCPH_TYPE(dh) != DCCP_PKT_REQUEST)) in dccp_print()