]> The Tcpdump Group git mirrors - tcpdump/commitdiff
From Andrea Bittau: fetch the service code in network byte order.
authorguy <guy>
Sun, 19 Feb 2006 05:08:44 +0000 (05:08 +0000)
committerguy <guy>
Sun, 19 Feb 2006 05:08:44 +0000 (05:08 +0000)
print-dccp.c

index 9c0cee6f14bab019b6c7d6ca5ee8b723b8da936f..3d6ada42773296374be2d8668c7eac04f166a82b 100644 (file)
@@ -9,7 +9,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-dccp.c,v 1.1.2.5 2005-12-05 21:48:10 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-dccp.c,v 1.1.2.6 2006-02-19 05:08:44 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -312,7 +312,8 @@ void dccp_print(const u_char *bp, const u_char *data2, u_int len)
                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);
+               (void)printf("request (service=%d) ",
+                            EXTRACT_32BITS(&dhr->dccph_req_service));
                extlen += 4;
                break;
        }
@@ -320,7 +321,8 @@ void dccp_print(const u_char *bp, const u_char *data2, u_int len)
                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);
+               (void)printf("response (service=%d) ",
+                            EXTRACT_32BITS(&dhr->dccph_resp_service));
                extlen += 12;
                break;
        }