debug.c revision 61295d7d43bad84b52068f08d8d2339d0ae9fe06
/*
* Copyright (c) 1995 Danny Gasparovski.
* Portions copyright (c) 2000 Kelly Price.
*
* Please read the file COPYRIGHT for the
* terms and conditions of the copyright.
*/
#include <slirp.h>
#ifdef DEBUG
void dump_packet(void *, int);
#endif
/*
* Dump a packet in the same format as tcpdump -x
*/
#ifdef DEBUG
void
dump_packet(void *dat, int n)
{
}
#endif
#ifdef LOG_ENABLED
static void
{
}
void
{
lprint(" \n");
lprint("IP stats:\n");
lprint(" %6d total packets received (%d were unaligned)\n",
}
void
{
lprint(" \n");
lprint("TCP stats:\n");
lprint(" %6d data packets (%d bytes)\n",
lprint(" %6d data packets retransmitted (%d bytes)\n",
lprint(" %6d ack-only packets (%d delayed)\n",
lprint(" %6d acks (for %d bytes)\n",
lprint(" %6d packets received in sequence (%d bytes)\n",
lprint(" %6d completely duplicate packets (%d bytes)\n",
lprint(" %6d packets with some duplicate data (%d bytes duped)\n",
lprint(" %6d out-of-order packets (%d bytes)\n",
lprint(" %6d packets of data after window (%d bytes)\n",
lprint(" %6d discarded for bad header offset fields\n",
lprint(" %6d connections closed (including %d drop)\n",
lprint(" %6d segments we tried to get rtt (%d succeeded)\n",
lprint(" %6d connections dropped by rxmt timeout\n",
/* lprint(" Packets received too short: %d\n", tcpstat.tcps_rcvshort); */
/* lprint(" Segments dropped due to PAWS: %d\n", tcpstat.tcps_pawsdrop); */
}
void
{
lprint(" \n");
lprint("UDP stats:\n");
}
void
{
lprint(" \n");
lprint("ICMP stats:\n");
}
void
{
struct mbuf *m;
int i;
lprint(" \n");
lprint("Mbuf stats:\n");
i = 0;
i++;
lprint(" %6d mbufs on free list\n", i);
i = 0;
i++;
lprint(" %6d mbufs on used list\n", i);
}
void
{
char buff[256];
int n;
lprint(" \n");
"Proto[state] Sock Local Address, Port Remote Address, Port RecvQ SendQ\n");
{
while (n < 17)
buff[n++] = ' ';
buff[17] = 0;
lprint("%s %3d %15s %5d ",
lprint("%15s %5d %5d %5d\n",
}
{
while (n < 17)
buff[n++] = ' ';
buff[17] = 0;
lprint("%s %3d %15s %5d ",
lprint("%15s %5d %5d %5d\n",
}
}
#endif
static size_t
void *pvUser)
{
}
int
{
int rc = VINF_SUCCESS;
return rc;
}