Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

SRC/sock_dbu.c

Go to the documentation of this file.
00001 00004 #include <stdio.h> 00005 00006 #include "copyrigh.h" 00007 #include "wattcp.h" 00008 #include "strings.h" 00009 #include "misc.h" 00010 #include "timer.h" 00011 #include "pcdbug.h" 00012 #include "pcbuf.h" 00013 00014 void sock_debugdump (const sock_type *s) 00015 { 00016 #if defined(USE_DEBUG) 00017 const _tcp_Socket *tcp = &s->tcp; 00018 00019 if (s->raw.ip_type == IP4_TYPE) 00020 return; 00021 00022 #if defined(__SMALL16__) 00023 (*_printf) ("next %04X\n", s->tcp.next); 00024 #elif defined(__LARGE__) 00025 (*_printf) ("next %04X:%04X\n", FP_SEG(s->tcp.next), FP_OFF(s->tcp.next)); 00026 #else 00027 (*_printf) ("next %08lX\n", (DWORD_PTR)s->tcp.next); 00028 #endif 00029 00030 (*_printf) ("type %d\n", s->tcp.ip_type); 00031 00032 (*_printf) ("stat/error %s\n", s->tcp.err_msg ? s->tcp.err_msg : "(none)"); 00033 (*_printf) ("usr-timer %08lX (%sexpired)\n", 00034 s->tcp.usertimer, chk_timeout(s->tcp.usertimer) ? "" : "not "); 00035 00036 switch (s->tcp.ip_type) 00037 { 00038 case UDP_PROTO: 00039 (*_printf) ("udp rxdata %u `%.*s'\n", 00040 s->tcp.rx_datalen, s->tcp.rx_datalen, s->tcp.rx_data); 00041 break; 00042 case TCP_PROTO: 00043 (*_printf) ("tcp rxdata %u `%.*s'\n", 00044 tcp->rx_datalen, tcp->rx_datalen, tcp->rx_data); 00045 (*_printf) ("tcp state %u (%s)\n", 00046 tcp->state, tcpStateName(tcp->state)); 00047 break; 00048 } 00049 #else 00050 ARGSUSED (s); 00051 #endif 00052 }

Generated on Wed Aug 4 08:55:53 2010 for Watt-32 tcp/ip by doxygen 1.3.8