X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/1c902dcdf37353a7967f69b53fe469e409eb4907..refs/heads/tcpdump-4.1:/dccp.h diff --git a/dccp.h b/dccp.h index 2c479aad..5c66e23c 100644 --- a/dccp.h +++ b/dccp.h @@ -1,5 +1,4 @@ -#ifndef __DCCP_HDR__ -#define __DCCP_HDR__ +/* @(#) $Header: /tcpdump/master/tcpdump/dccp.h,v 1.5 2006-11-02 09:05:23 hannes Exp $ (LBL) */ /* * Copyright (C) Arnaldo Carvalho de Melo 2004 * Copyright (C) Ian McDonald 2005 @@ -9,6 +8,9 @@ * BSD-style license that accompanies tcpdump or the GNU GPL version 2 */ +#ifndef __DCCP_HDR__ +#define __DCCP_HDR__ + /** * struct dccp_hdr - generic part of DCCP packet header * @@ -34,8 +36,8 @@ struct dccp_hdr { } dccph_xtrs; }; -#define DCCPH_CCVAL(dh) (((dh)->dccph_ccval_cscov) & 0x0F) -#define DCCPH_CSCOV(dh) (((dh)->dccph_ccval_cscov >> 4) & 0x0F) +#define DCCPH_CCVAL(dh) (((dh)->dccph_ccval_cscov >> 4) & 0xF) +#define DCCPH_CSCOV(dh) (((dh)->dccph_ccval_cscov) & 0xF) #define DCCPH_X(dh) ((dh)->dccph_xtrs.dccph_xtr & 1) #define DCCPH_TYPE(dh) (((dh)->dccph_xtrs.dccph_xtr >> 1) & 0xF) @@ -84,12 +86,14 @@ struct dccp_hdr_response { u_int32_t dccph_resp_service; }; +#if 0 static inline struct dccp_hdr_data *dccp_hdr_data(struct dccp_hdr *hdrg) { const int ext = DCCPH_X(hdrg) ? sizeof(struct dccp_hdr_ext) : 0; return (struct dccp_hdr_data *)(((u_char *)hdrg) + sizeof(hdrg) + ext); } +#endif /** * struct dccp_hdr_reset - Unconditionally shut down a connection @@ -113,7 +117,7 @@ enum dccp_pkt_type { DCCP_PKT_RESET, DCCP_PKT_SYNC, DCCP_PKT_SYNCACK, - DCCP_PKT_INVALID, + DCCP_PKT_INVALID }; enum dccp_reset_codes { @@ -129,7 +133,7 @@ enum dccp_reset_codes { DCCP_RESET_CODE_TOO_BUSY, DCCP_RESET_CODE_BAD_INIT_COOKIE, DCCP_RESET_CODE_AGGRESSION_PENALTY, - __DCCP_RESET_CODE_LAST, + __DCCP_RESET_CODE_LAST }; #endif /* __DCCP_HDR__ */