#include <copyright.h>
#include <stdio.h>
#include <conio.h>

#include "wattcp.h"
#include "elib.h"

extern tcp_Socket *tcp_allsocs;
extern char *kthreadname(void);

void showsock( char *file, int linenum )
{
    tcp_Socket *s, **sp;

    sp = &tcp_allsocs;
    for (;;) {
        s = *sp;
        if ( s == NULL ) break;

        if ( s->myport == 0 ) {
          cprintf(" TCP port %u state %u linenum %s : %s : %u  \r\n",
                s->myport,  s->state, kthreadname(), file, linenum );
          cprintf(" yikes!!! ");
//          rt_halt(NULL);
        }
        sp = &s->next;
    }
}

