Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Km1WO-0007tR-W7 for qemu-devel@nongnu.org; Sat, 04 Oct 2008 03:25:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Km1WO-0007tB-1l for qemu-devel@nongnu.org; Sat, 04 Oct 2008 03:25:48 -0400 Received: from [199.232.76.173] (port=59150 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Km1WN-0007t8-Tm for qemu-devel@nongnu.org; Sat, 04 Oct 2008 03:25:47 -0400 Received: from savannah.gnu.org ([199.232.41.3]:36607 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Km1WN-0007d7-LI for qemu-devel@nongnu.org; Sat, 04 Oct 2008 03:25:47 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1Km1WM-0007mU-Uq for qemu-devel@nongnu.org; Sat, 04 Oct 2008 07:25:47 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1Km1WM-0007mN-Iz for qemu-devel@nongnu.org; Sat, 04 Oct 2008 07:25:46 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Sat, 04 Oct 2008 07:25:46 +0000 Subject: [Qemu-devel] [5416] Make network packet debug functions more accessible Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5416 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5416 Author: blueswir1 Date: 2008-10-04 07:25:46 +0000 (Sat, 04 Oct 2008) Log Message: ----------- Make network packet debug functions more accessible Modified Paths: -------------- trunk/vl.c Modified: trunk/vl.c =================================================================== --- trunk/vl.c 2008-10-04 07:24:27 UTC (rev 5415) +++ trunk/vl.c 2008-10-04 07:25:46 UTC (rev 5416) @@ -151,6 +151,8 @@ //#define DEBUG_UNUSED_IOPORT //#define DEBUG_IOPORT +//#define DEBUG_NET +//#define DEBUG_SLIRP #ifdef TARGET_PPC #define DEFAULT_RAM_SIZE 144 @@ -3861,7 +3863,7 @@ /***********************************************************/ /* network device redirectors */ -__attribute__ (( unused )) +#if defined(DEBUG_NET) || defined(DEBUG_SLIRP) static void hex_dump(FILE *f, const uint8_t *buf, int size) { int len, i, j, c; @@ -3887,6 +3889,7 @@ fprintf(f, "\n"); } } +#endif static int parse_macaddr(uint8_t *macaddr, const char *p) { @@ -4105,7 +4108,7 @@ VLANState *vlan = vc1->vlan; VLANClientState *vc; -#if 0 +#ifdef DEBUG_NET printf("vlan %d send:\n", vlan->id); hex_dump(stdout, buf, size); #endif @@ -4130,7 +4133,7 @@ void slirp_output(const uint8_t *pkt, int pkt_len) { -#if 0 +#ifdef DEBUG_SLIRP printf("slirp output:\n"); hex_dump(stdout, pkt, pkt_len); #endif @@ -4141,7 +4144,7 @@ static void slirp_receive(void *opaque, const uint8_t *buf, int size) { -#if 0 +#ifdef DEBUG_SLIRP printf("slirp input:\n"); hex_dump(stdout, buf, size); #endif