tcpdump mailing list archives
PATCH DCCP translate service code to host byte order
From: Andrea Bittau <a.bittau () cs ucl ac uk>
Date: Thu, 16 Feb 2006 19:59:49 +0000
The DCCP service code is a u32 in network byte order. The current DCCP code
does not call htonl() or equivalent.
Fix attached.
---
diff -crN tcpdump/print-dccp.c tcpdump-sorbo/print-dccp.c
*** tcpdump/print-dccp.c Mon Dec 5 21:36:24 2005
--- tcpdump-sorbo/print-dccp.c Wed Jan 25 10:34:50 2006
***************
*** 312,318 ****
struct dccp_hdr_request *dhr =
(struct dccp_hdr_request *)(bp + dccp_basic_hdr_len(dh));
TCHECK(*dhr);
! (void)printf("request (service=%d) ", dhr->dccph_req_service);
extlen += 4;
break;
}
--- 312,319 ----
struct dccp_hdr_request *dhr =
(struct dccp_hdr_request *)(bp + dccp_basic_hdr_len(dh));
TCHECK(*dhr);
! (void)printf("request (service=%d) ",
! EXTRACT_32BITS(&dhr->dccph_req_service));
extlen += 4;
break;
}
***************
*** 320,326 ****
struct dccp_hdr_response *dhr =
(struct dccp_hdr_response *)(bp + dccp_basic_hdr_len(dh));
TCHECK(*dhr);
! (void)printf("response (service=%d) ", dhr->dccph_resp_service);
extlen += 12;
break;
}
--- 321,328 ----
struct dccp_hdr_response *dhr =
(struct dccp_hdr_response *)(bp + dccp_basic_hdr_len(dh));
TCHECK(*dhr);
! (void)printf("response (service=%d) ",
! EXTRACT_32BITS(&dhr->dccph_resp_service));
extlen += 12;
break;
}
-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.
Current thread:
- PATCH DCCP translate service code to host byte order Andrea Bittau (Feb 16)
- Re: PATCH DCCP translate service code to host byte Guy Harris (Feb 18)
