diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..3e5bec1 --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,30 @@ + + +.PHONY: all + +all: tcpsnooper netstat + +tcpsnooper : o/cda.a o/nscda.a o/debug.a + iix -DKeepType=cda link o/cda o/nscda o/debug keep=tcpsnooper + +netstat : o/netstat.a + iix link o/netstat keep=netstat + +o: + mkdir o + +cda.mac: cda.asm + iix macgen cda.asm cda.mac 13:ainclude:m16.= 13:orcainclude:m16.= + + +o/cda.a : cda.asm | cda.mac o + iix compile cda.asm keep=o/cda + +o/nscda.a : nscda.c | o + iix compile nscda.c keep=o/nscda + +o/netstat.a : netstat.c | o + iix compile netstat.c keep=o/netstat + +o/debug.a : debug.c ur.c | o + iix compile debug.c keep=o/debug \ No newline at end of file diff --git a/cda.asm b/cda.asm index cc88657..4fb9003 100644 --- a/cda.asm +++ b/cda.asm @@ -25,9 +25,9 @@ *================================================= case on - copy /lang/orca/libraries/ainclude/e16.gsos - copy /lang/orca/libraries/ainclude/e16.event - copy /lang/orca/libraries/ainclude/e16.memory + copy 13/ainclude/e16.gsos + copy 13/ainclude/e16.event + copy 13/ainclude/e16.memory mcopy cda.mac diff --git a/cda.mac b/cda.mac new file mode 100644 index 0000000..bd85a5f --- /dev/null +++ b/cda.mac @@ -0,0 +1,247 @@ + MACRO +&lab _DisposeHandle +&lab ldx #$1002 + jsl $E10000 + MEND + MACRO +&lab _MMStartUp +&lab ldx #$0202 + jsl $E10000 + MEND + MACRO +&lab _GetInGlobals +&lab ldx #$0C0C + jsl $E10000 + MEND + MACRO +&lab _GetInputDevice +&lab ldx #$120C + jsl $E10000 + MEND + MACRO +&lab _GetOutGlobals +&lab ldx #$0D0C + jsl $E10000 + MEND + MACRO +&lab _GetOutputDevice +&lab ldx #$130C + jsl $E10000 + MEND + MACRO +&lab _SetInGlobals +&lab ldx #$090C + jsl $E10000 + MEND + MACRO +&lab _SetInputDevice +&lab ldx #$0F0C + jsl $E10000 + MEND + MACRO +&lab _SetOutGlobals +&lab ldx #$0A0C + jsl $E10000 + MEND + MACRO +&lab _SetOutputDevice +&lab ldx #$100C + jsl $E10000 + MEND + MACRO +&lab _EMStatus +&lab ldx #$0606 + jsl $E10000 + MEND + macro +&l ~GetNextEvent &p1,&p2 +&l ph2 &p1 + ph4 &p2 + ldx #$0A06 + jsl $E10000 + mend + macro +&l ~NewHandle &p1,&p2,&p3,&p4 +&l ph4 &p1 + ph2 &p2 + ph2 &p3 + ph4 &p4 + ldx #$0902 + jsl $E10000 + mend + macro +&l ~InitTextDev &p1 +&l ph2 &p1 + ldx #$150C + jsl $E10000 + mend + macro +&l ~SetInGlobals &p1,&p2 +&l ph2 &p1 + ph2 &p2 + ldx #$090C + jsl $E10000 + mend + macro +&l ~SetInputDevice &p1,&p2 +&l ph2 &p1 + ph4 &p2 + ldx #$0F0C + jsl $E10000 + mend + macro +&l ~SetOutGlobals &p1,&p2 +&l ph2 &p1 + ph2 &p2 + ldx #$0A0C + jsl $E10000 + mend + macro +&l ~SetOutputDevice &p1,&p2 +&l ph2 &p1 + ph4 &p2 + ldx #$100C + jsl $E10000 + mend + macro +&l ~WriteChar &p1 +&l ph2 &p1 + ldx #$180C + jsl $E10000 + mend + macro +&l dw &adr +&l dc i1"l:~&SYSNAME&SYSCNT" +~&SYSNAME&SYSCNT dc c"&adr" + mend + macro +&l long &a,&b + lclb &i + lclb &m +&a amid &a,1,1 +&m setb ("&a"="M").or.("&a"="m") +&i setb ("&a"="I").or.("&a"="i") + aif c:&b=0,.a +&b amid &b,1,1 +&m setb ("&b"="M").or.("&b"="m").or.&m +&i setb ("&b"="I").or.("&b"="i").or.&i +.a +&l rep #&m*32+&i*16 + aif .not.&m,.b + longa on +.b + aif .not.&i,.c + longi on +.c + mend + macro +&l ph2 &n1 +&l anop + aif "&n1"="*",.f + lclc &c +&c amid &n1,1,1 + aif "&c"="#",.d + aif s:longa=1,.a + rep #%00100000 +.a + aif "&c"<>"{",.b +&c amid &n1,l:&n1,1 + aif "&c"<>"}",.g +&n1 amid &n1,2,l:&n1-2 + lda (&n1) + pha + ago .e +.b + aif "&c"="<",.c + lda &n1 + pha + ago .e +.c +&n1 amid &n1,2,l:&n1-1 + pei &n1 + ago .e +.d +&n1 amid &n1,2,l:&n1-1 + pea &n1 + ago .f +.e + aif s:longa=1,.f + sep #%00100000 +.f + mexit +.g + mnote "Missing closing '}'",16 + mend + macro +&l ph4 &n1 +&l anop + aif "&n1"="*",.f + lclc &c +&c amid &n1,1,1 + aif "&c"="#",.d + aif s:longa=1,.a + rep #%00100000 +.a + aif "&c"<>"{",.b +&c amid &n1,l:&n1,1 + aif "&c"<>"}",.g +&n1 amid &n1,2,l:&n1-2 + ldy #2 + lda (&n1),y + pha + lda (&n1) + pha + ago .e +.b + aif "&c"<>"[",.c + ldy #2 + lda &n1,y + pha + lda &n1 + pha + ago .e +.c + aif "&c"<>"<",.c1 +&n1 amid &n1,2,l:&n1-1 + pei &n1+2 + pei &n1 + ago .e +.c1 + lda &n1+2 + pha + lda &n1 + pha + ago .e +.d +&n1 amid &n1,2,l:&n1-1 + pea +(&n1)|-16 + pea &n1 + ago .f +.e + aif s:longa=1,.f + sep #%00100000 +.f + mexit +.g + mnote "Missing closing '}'",16 + mend + macro +&l short &a,&b + lclb &i + lclb &m +&a amid &a,1,1 +&m setb ("&a"="M").or.("&a"="m") +&i setb ("&a"="I").or.("&a"="i") + aif c:&b=0,.a +&b amid &b,1,1 +&m setb ("&b"="M").or.("&b"="m").or.&m +&i setb ("&b"="I").or.("&b"="i").or.&i +.a +&l sep #&m*32+&i*16 + aif .not.&m,.b + longa off +.b + aif .not.&i,.c + longi off +.c + mend diff --git a/debug.c b/debug.c index 29a6d5b..a79f057 100644 --- a/debug.c +++ b/debug.c @@ -36,11 +36,9 @@ #include #include #include +#include -extern int fdprintf(int, const char *, ...); -extern int orca_sprintf(char *, const char *, ...); - char *errStrings[] = { "tcpDGMSTBLEN", @@ -87,27 +85,13 @@ char *tuneStrings[] = }; - -long write(Word fd, const void *data, LongWord size) -{ -static IORecGS ioDCB = { 4, 0, 0, 0}; - - ioDCB.refNum = fd; - ioDCB.dataBuffer = (Pointer)data; - ioDCB.requestCount = size; - - WriteGS(&ioDCB); - return _toolErr ? -1 : ioDCB.transferCount; -} - - // creates a unique file and opens it. -int createFile(void) +FILE *createFile(void) { static GSString32 template = {28, "*:system:tcpip:debugxxxx.txt"}; static CreateRecGS createDCB = {4, (GSString255Ptr)&template, 0xe3, 4, 0}; -static OpenRecGS openDCB = {4, 0, (GSString255Ptr)&template, writeEnable, 0}; +FILE *fp; word i; for (i = 0; i < 9999; i++) @@ -125,15 +109,13 @@ word i; break; } - if (_toolErr) return 0; + if (_toolErr) return NULL; - OpenGS(&openDCB); - if (_toolErr) return 0; - - return openDCB.refNum; + fp = fopen(template.text, "w"); + return fp; } -void dump(Word fd, void *data, Word length) +void dump(FILE *fp, void *data, Word length) { Word i; Word j; @@ -155,8 +137,7 @@ static char buffer[80]; { buffer[j++] = 0; - fdprintf(fd, "%04x: %s\r", i - 15, buffer); - //write(fd, buffer, j); + fprintf(fp, "%04x: %s\r", i - 15, buffer); j = 0; } } @@ -164,8 +145,7 @@ static char buffer[80]; if (i & 0x0f) { buffer[j++] = 0; - fdprintf(fd, "%04x: %s\r", i - 15, buffer); - //write(fd, buffer, j); + fprintf(fp, "%04x: %s\r", i - 15, buffer); } } @@ -192,89 +172,88 @@ static srBuff tcp; Word count; Handle h; Word size; -Word fd; -Word closeDCB[2]; +FILE *fp; - fd = createFile(); - if (fd == 0) return; + fp = createFile(); + if (!fp) return; // version VersionString(0, TCPIPLongVersion(), buffer); - fdprintf(fd, "Version: %b\r", buffer); + fprintf(fp, "Version: %b\r", buffer); // link layer TCPIPGetLinkLayer(&link); - fdprintf(fd, "Link Layer:\r"); - fdprintf(fd, " MethodID: $%04x\r", link.liMethodID); - fdprintf(fd, " Name: %b\r", link.liName); + fprintf(fp, "Link Layer:\r"); + fprintf(fp, " MethodID: $%04x\r", link.liMethodID); + fprintf(fp, " Name: %b\r", link.liName); VersionString(0, link.liVersion, buffer); - fdprintf(fd, " Version: %b\r", buffer); - fdprintf(fd, " Flags: $%04x\r", link.liFlags); + fprintf(fp, " Version: %b\r", buffer); + fprintf(fp, " Flags: $%04x\r", link.liFlags); lv = TCPIPGetLinkVariables(); - fdprintf(fd, "Link Variables\r"); - fdprintf(fd, " Version: %d\r", lv->lvVersion); - fdprintf(fd, " Connected: $%04x\r", lv->lvConnected); + fprintf(fp, "Link Variables\r"); + fprintf(fp, " Version: %d\r", lv->lvVersion); + fprintf(fp, " Connected: $%04x\r", lv->lvConnected); TCPIPConvertIPToASCII(lv->lvIPaddress, buffer, 0); - fdprintf(fd, " IP Address: %b\r", buffer); - fdprintf(fd, " RefCon: $%08lx\r", lv->lvRefCon); - fdprintf(fd, " Errors: $%08lx\r", lv->lvErrors); - fdprintf(fd, " MTU: %d\r", lv->lvMTU); + fprintf(fp, " IP Address: %b\r", buffer); + fprintf(fp, " RefCon: $%08lx\r", lv->lvRefCon); + fprintf(fp, " Errors: $%08lx\r", lv->lvErrors); + fprintf(fp, " MTU: %d\r", lv->lvMTU); // connect status - fdprintf(fd, "Connect Status: $%04x\r", TCPIPGetConnectStatus()); + fprintf(fp, "Connect Status: $%04x\r", TCPIPGetConnectStatus()); // ip address l = TCPIPGetMyIPAddress(); TCPIPConvertIPToASCII(l, buffer, 0); - fdprintf(fd, "IP Address: %b\r", buffer); + fprintf(fp, "IP Address: %b\r", buffer); // dns TCPIPGetDNS(&dns); TCPIPConvertIPToASCII(dns.DNSMain, buffer, 0); - fdprintf(fd, "DNS 1: %b\r", buffer); + fprintf(fp, "DNS 1: %b\r", buffer); TCPIPConvertIPToASCII(dns.DNSAux, buffer, 0); - fdprintf(fd, "DNS 2: %b\r", buffer); + fprintf(fp, "DNS 2: %b\r", buffer); // hostname TCPIPGetHostName((hnBuffPtr)buffer); - fdprintf(fd, "Hostname: %b\r", buffer); + fprintf(fp, "Hostname: %b\r", buffer); //mtu - fdprintf(fd, "MTU: %d\r", TCPIPGetMTU()); - fdprintf(fd, "Alive Flag: $%04x\r", TCPIPGetAliveFlag()); - fdprintf(fd, "Alive Minutes: %d\r", TCPIPGetAliveMinutes()); - fdprintf(fd, "Login Count: %d\r", TCPIPGetLoginCount()); + fprintf(fp, "MTU: %d\r", TCPIPGetMTU()); + fprintf(fp, "Alive Flag: $%04x\r", TCPIPGetAliveFlag()); + fprintf(fp, "Alive Minutes: %d\r", TCPIPGetAliveMinutes()); + fprintf(fp, "Login Count: %d\r", TCPIPGetLoginCount()); // error table - fdprintf(fd, "\rError Table\r"); + fprintf(fp, "\rError Table\r"); lw = (LongWord *)TCPIPGetErrorTable(); count = lw[0] >> 2; if (count > sizeof(errStrings) / 4) count = sizeof(errStrings) / 4; for (i = 0; i < count; i++); { - fdprintf(fd, " %s -- $%08lx\r", errStrings[i], lw[i]); + fprintf(fp, " %s -- $%08lx\r", errStrings[i], lw[i]); } // tuning table tune[0] = 10; - fdprintf(fd, "\rTuning Table\r"); + fprintf(fp, "\rTuning Table\r"); TCPIPGetTuningTable((tunePtr)tune); count = tune[0] >> 1; if (count > sizeof(tuneStrings) / 4) count = sizeof(tuneStrings) / 4; for (i = 0; i < count; i++) { - fdprintf(fd, " %s -- $%04x\r", tuneStrings[i], tune[i]); + fprintf(fp, " %s -- $%04x\r", tuneStrings[i], tune[i]); } - fdprintf(fd, "\rDirect Page\r"); - dump(fd, (void *)TCPIPGetDP(), 0x0100); + fprintf(fp, "\rDirect Page\r"); + dump(fp, (void *)TCPIPGetDP(), 0x0100); // dump all user records. ipid will be even numbers in the range 0..98 for (i = 0; i < 100; i += 2) @@ -285,25 +264,25 @@ Word closeDCB[2]; if (_toolErr) continue; - fdprintf(fd, "\rIpid %d\r", i); + fprintf(fp, "\rIpid %d\r", i); - fdprintf(fd, "Datagram count (all): %d\r", + fprintf(fp, "Datagram count (all): %d\r", TCPIPGetDatagramCount(i, protocolAll)); - fdprintf(fd, "Datagram count (icmp): %d\r", + fprintf(fp, "Datagram count (icmp): %d\r", TCPIPGetDatagramCount(i, protocolICMP)); - fdprintf(fd, "Datagram count (tcp): %d\r", + fprintf(fp, "Datagram count (tcp): %d\r", TCPIPGetDatagramCount(i, protocolTCP)); - fdprintf(fd, "Datagram count (udp): %d\r", + fprintf(fp, "Datagram count (udp): %d\r", TCPIPGetDatagramCount(i, protocolUDP)); - fdprintf(fd, "User statistic 1: $%08lx\r", + fprintf(fp, "User statistic 1: $%08lx\r", TCPIPGetUserStatistic(i, 1)); - fdprintf(fd, "User statistic 2: $%08lx\r", + fprintf(fp, "User statistic 2: $%08lx\r", TCPIPGetUserStatistic(i, 2)); #if 0 // tcpipStatusUDP has a stack imbalance bug. @@ -311,13 +290,13 @@ Word closeDCB[2]; TCPIPStatusUDP(i, &udp); if (_toolErr == 0) { - fdprintf(fd, "\rStatus UDP\r"); - fdprintf(fd, " Queue Size: %d\r", udp.uvQueueSize); - fdprintf(fd, " Error: %d\r", udp.uvError); - fdprintf(fd, " Error Tick: %ld\r", udp.uvErrorTick); - fdprintf(fd, " Count: %ld\r", udp.uvCount); - fdprintf(fd, " Total Count: %ld\r", udp.uvTotalCount); - fdprintf(fd, " Dispatch Flag: %d\r", udp.uvDispatchFlag); + fprintf(fp, "\rStatus UDP\r"); + fprintf(fp, " Queue Size: %d\r", udp.uvQueueSize); + fprintf(fp, " Error: %d\r", udp.uvError); + fprintf(fp, " Error Tick: %ld\r", udp.uvErrorTick); + fprintf(fp, " Count: %ld\r", udp.uvCount); + fprintf(fp, " Total Count: %ld\r", udp.uvTotalCount); + fprintf(fp, " Dispatch Flag: %d\r", udp.uvDispatchFlag); } #endif @@ -325,16 +304,16 @@ Word closeDCB[2]; TCPIPStatusTCP(i, &tcp); if (_toolErr == 0) { - fdprintf(fd, "\rStatus TCP\r"); - fdprintf(fd, " State: %d\r", tcp.srState); - fdprintf(fd, " Network Error: %d\r", tcp.srNetworkError); - fdprintf(fd, " Send Queued: %ld\r", tcp.srSndQueued); - fdprintf(fd, " Recv Queued: %ld\r", tcp.srRcvQueued); + fprintf(fp, "\rStatus TCP\r"); + fprintf(fp, " State: %d\r", tcp.srState); + fprintf(fp, " Network Error: %d\r", tcp.srNetworkError); + fprintf(fp, " Send Queued: %ld\r", tcp.srSndQueued); + fprintf(fp, " Recv Queued: %ld\r", tcp.srRcvQueued); TCPIPConvertIPToASCII(tcp.srDestIP, buffer, 0); - fdprintf(fd, " Dest IP: %b\r", buffer); - fdprintf(fd, " Dest Port: %d\r", tcp.srDestPort); - fdprintf(fd, " Connect Type: %d\r", tcp.srConnectType); - fdprintf(fd, " Accept Count: %d\r", tcp.srAcceptCount); + fprintf(fp, " Dest IP: %b\r", buffer); + fprintf(fp, " Dest Port: %d\r", tcp.srDestPort); + fprintf(fp, " Connect Type: %d\r", tcp.srConnectType); + fprintf(fp, " Accept Count: %d\r", tcp.srAcceptCount); } @@ -343,23 +322,19 @@ Word closeDCB[2]; { GSString255Ptr appName; userRecord *rec = (userRecord *)*h; - fdprintf(fd, "\rUser Record\r"); + fprintf(fp, "\rUser Record\r"); appName = (GSString255Ptr)LGetPathname2(rec->uwUserID, 1); if (_toolErr == 0) { - fdprintf(fd, "\rApplication %B\r", appName); + fprintf(fp, "\rApplication %.*s\r", appName->length, appName->text); } #include "ur.c" } - else dump(fd, *h, size); + else dump(fp, *h, size); HUnlock(h); } - closeDCB[0] = 1; - closeDCB[1] = fd; - CloseGS(closeDCB); - - + fclose(fp); } @@ -373,6 +348,6 @@ void main (void) { _beginStackCheck(); debug(); - fdprintf(2, "%d bytes of stack used\r", _endStackCheck()); + fprintf(fp "%d bytes of stack used\r", _endStackCheck()); } #endif diff --git a/makefile.mk b/makefile.mk index f6aa50f..f77f0b5 100644 --- a/makefile.mk +++ b/makefile.mk @@ -35,7 +35,7 @@ LDLIBS += -l liborca netstat: netstat.o $(CC) $(LDFLAGS) netstat.o $(LDLIBS) -o $@ - + tcpsnooper.cda: cda.o nscda.o debug.o $(CC) $(LDFLAGS) cda.o nscda.o debug.o $(LDLIBS) -o $@ chtyp -t cda $@ diff --git a/nscda.c b/nscda.c index 6b35ebe..3950185 100644 --- a/nscda.c +++ b/nscda.c @@ -33,6 +33,8 @@ #include #include +#include + extern Word GetKey(void); extern void debug(void); diff --git a/ur.c b/ur.c index 59cb493..dbf1ef2 100644 --- a/ur.c +++ b/ur.c @@ -24,61 +24,61 @@ * *=================================================*/ -fdprintf(fd, " uwUserID: %04x\r", rec->uwUserID); -fdprintf(fd, " uwDestIP: %08lx\r", rec->uwDestIP); -fdprintf(fd, " uwDestPort: %04x\r", rec->uwDestPort); -fdprintf(fd, " uwIP_TOS: %04x\r", rec->uwIP_TOS); -fdprintf(fd, " uwIP_TTL: %04x\r", rec->uwIP_TTL); +fprintf(fp, " uwUserID: %04x\r", rec->uwUserID); +fprintf(fp, " uwDestIP: %08lx\r", rec->uwDestIP); +fprintf(fp, " uwDestPort: %04x\r", rec->uwDestPort); +fprintf(fp, " uwIP_TOS: %04x\r", rec->uwIP_TOS); +fprintf(fp, " uwIP_TTL: %04x\r", rec->uwIP_TTL); -fdprintf(fd, " uwSourcePort: %04x\r", rec->uwSourcePort); -fdprintf(fd, " uwLogoutPending: %04x\r", rec->uwLogoutPending); -fdprintf(fd, " uwICMPQueue: %08lx\r", rec->uwICMPQueue); -fdprintf(fd, " uwTCPQueue: %08lx\r", rec->uwTCPQueue); +fprintf(fp, " uwSourcePort: %04x\r", rec->uwSourcePort); +fprintf(fp, " uwLogoutPending: %04x\r", rec->uwLogoutPending); +fprintf(fp, " uwICMPQueue: %08lx\r", rec->uwICMPQueue); +fprintf(fp, " uwTCPQueue: %08lx\r", rec->uwTCPQueue); -fdprintf(fd, " uwTCPMaxSendSeg: %04x\r", rec->uwTCPMaxSendSeg); -fdprintf(fd, " uwTCPMaxReceiveSeg: %04x\r", rec->uwTCPMaxReceiveSeg); -fdprintf(fd, " uwTCPDataInQ: %08lx\r", rec->uwTCPDataInQ); -fdprintf(fd, " uwTCPDataIn: %08lx\r", rec->uwTCPDataIn); -fdprintf(fd, " uwTCPPushInFlag: %04x\r", rec->uwTCPPushInFlag); -fdprintf(fd, " uwTCPPushInOffset: %08lx\r", rec->uwTCPPushInOffset); -fdprintf(fd, " uwTCPPushOutFlag: %04x\r", rec->uwTCPPushOutFlag); -fdprintf(fd, " uwTCPPushOutSEQ: %08lx\r", rec->uwTCPPushOutSEQ); -fdprintf(fd, " uwTCPDataOut: %08lx\r", rec->uwTCPDataOut); -fdprintf(fd, " uwSND_UNA: %08lx\r", rec->uwSND_UNA); -fdprintf(fd, " uwSND_NXT: %08lx\r", rec->uwSND_NXT); -fdprintf(fd, " uwSND_WND: %04x\r", rec->uwSND_WND); -fdprintf(fd, " uwSND_UP: %04x\r", rec->uwSND_UP); -fdprintf(fd, " uwSND_WL1: %08lx\r", rec->uwSND_WL1); -fdprintf(fd, " uwSND_WL2: %08lx\r", rec->uwSND_WL2); -fdprintf(fd, " uwISS: %08lx\r", rec->uwISS); -fdprintf(fd, " uwRCV_NXT: %08lx\r", rec->uwRCV_NXT); -fdprintf(fd, " uwRCV_WND: %04x\r", rec->uwRCV_WND); -fdprintf(fd, " uwRCV_UP: %04x\r", rec->uwRCV_UP); -fdprintf(fd, " uwIRS: %08lx\r", rec->uwIRS); -fdprintf(fd, " uwTCP_State: %04x\r", rec->uwTCP_State); -fdprintf(fd, " uwTCP_StateTick: %08lx\r", rec->uwTCP_StateTick); -fdprintf(fd, " uwTCP_ErrCode: %04x\r", rec->uwTCP_ErrCode); -fdprintf(fd, " uwTCP_ICMPError: %04x\r", rec->uwTCP_ICMPError); -fdprintf(fd, " uwTCP_Server: %04x\r", rec->uwTCP_Server); -fdprintf(fd, " uwTCP_ChildList: %08lx\r", rec->uwTCP_ChildList); -fdprintf(fd, " uwTCP_ACKPending: %04x\r", rec->uwTCP_ACKPending); -fdprintf(fd, " uwTCP_ForceFIN: %04x\r", rec->uwTCP_ForceFIN); -fdprintf(fd, " uwTCP_FINSEQ: %08lx\r", rec->uwTCP_FINSEQ); -fdprintf(fd, " uwTCP_MyFINACKed: %04x\r", rec->uwTCP_MyFINACKed); -fdprintf(fd, " uwTCP_Timer: %08lx\r", rec->uwTCP_Timer); -fdprintf(fd, " uwTCP_TimerState: %04x\r", rec->uwTCP_TimerState); -fdprintf(fd, " uwTCP_rt_timer: %04x\r", rec->uwTCP_rt_timer); -fdprintf(fd, " uwTCP_2MSL_timer: %04x\r", rec->uwTCP_2MSL_timer); -fdprintf(fd, " uwTCP_SaveTTL: %04x\r", rec->uwTCP_SaveTTL); -fdprintf(fd, " uwTCP_SaveTOS: %04x\r", rec->uwTCP_SaveTOS); -fdprintf(fd, " uwTCP_TotalIN: %08lx\r", rec->uwTCP_TotalIN); -fdprintf(fd, " uwTCP_TotalOUT: %08lx\r", rec->uwTCP_TotalOUT); +fprintf(fp, " uwTCPMaxSendSeg: %04x\r", rec->uwTCPMaxSendSeg); +fprintf(fp, " uwTCPMaxReceiveSeg: %04x\r", rec->uwTCPMaxReceiveSeg); +fprintf(fp, " uwTCPDataInQ: %08lx\r", rec->uwTCPDataInQ); +fprintf(fp, " uwTCPDataIn: %08lx\r", rec->uwTCPDataIn); +fprintf(fp, " uwTCPPushInFlag: %04x\r", rec->uwTCPPushInFlag); +fprintf(fp, " uwTCPPushInOffset: %08lx\r", rec->uwTCPPushInOffset); +fprintf(fp, " uwTCPPushOutFlag: %04x\r", rec->uwTCPPushOutFlag); +fprintf(fp, " uwTCPPushOutSEQ: %08lx\r", rec->uwTCPPushOutSEQ); +fprintf(fp, " uwTCPDataOut: %08lx\r", rec->uwTCPDataOut); +fprintf(fp, " uwSND_UNA: %08lx\r", rec->uwSND_UNA); +fprintf(fp, " uwSND_NXT: %08lx\r", rec->uwSND_NXT); +fprintf(fp, " uwSND_WND: %04x\r", rec->uwSND_WND); +fprintf(fp, " uwSND_UP: %04x\r", rec->uwSND_UP); +fprintf(fp, " uwSND_WL1: %08lx\r", rec->uwSND_WL1); +fprintf(fp, " uwSND_WL2: %08lx\r", rec->uwSND_WL2); +fprintf(fp, " uwISS: %08lx\r", rec->uwISS); +fprintf(fp, " uwRCV_NXT: %08lx\r", rec->uwRCV_NXT); +fprintf(fp, " uwRCV_WND: %04x\r", rec->uwRCV_WND); +fprintf(fp, " uwRCV_UP: %04x\r", rec->uwRCV_UP); +fprintf(fp, " uwIRS: %08lx\r", rec->uwIRS); +fprintf(fp, " uwTCP_State: %04x\r", rec->uwTCP_State); +fprintf(fp, " uwTCP_StateTick: %08lx\r", rec->uwTCP_StateTick); +fprintf(fp, " uwTCP_ErrCode: %04x\r", rec->uwTCP_ErrCode); +fprintf(fp, " uwTCP_ICMPError: %04x\r", rec->uwTCP_ICMPError); +fprintf(fp, " uwTCP_Server: %04x\r", rec->uwTCP_Server); +fprintf(fp, " uwTCP_ChildList: %08lx\r", rec->uwTCP_ChildList); +fprintf(fp, " uwTCP_ACKPending: %04x\r", rec->uwTCP_ACKPending); +fprintf(fp, " uwTCP_ForceFIN: %04x\r", rec->uwTCP_ForceFIN); +fprintf(fp, " uwTCP_FINSEQ: %08lx\r", rec->uwTCP_FINSEQ); +fprintf(fp, " uwTCP_MyFINACKed: %04x\r", rec->uwTCP_MyFINACKed); +fprintf(fp, " uwTCP_Timer: %08lx\r", rec->uwTCP_Timer); +fprintf(fp, " uwTCP_TimerState: %04x\r", rec->uwTCP_TimerState); +fprintf(fp, " uwTCP_rt_timer: %04x\r", rec->uwTCP_rt_timer); +fprintf(fp, " uwTCP_2MSL_timer: %04x\r", rec->uwTCP_2MSL_timer); +fprintf(fp, " uwTCP_SaveTTL: %04x\r", rec->uwTCP_SaveTTL); +fprintf(fp, " uwTCP_SaveTOS: %04x\r", rec->uwTCP_SaveTOS); +fprintf(fp, " uwTCP_TotalIN: %08lx\r", rec->uwTCP_TotalIN); +fprintf(fp, " uwTCP_TotalOUT: %08lx\r", rec->uwTCP_TotalOUT); -fdprintf(fd, " uwUDP_Server : %04x\r", rec->uwUDP_Server); -fdprintf(fd, " uwUDPQueue : %08lx\r", rec->uwUDPQueue); -fdprintf(fd, " uwUDPError : %04x\r", rec->uwUDPError); -fdprintf(fd, " uwUDPErrorTick : %08lx\r", rec->uwUDPErrorTick); -fdprintf(fd, " uwUDPCount : %08lx\r", rec->uwUDPCount); +fprintf(fp, " uwUDP_Server : %04x\r", rec->uwUDP_Server); +fprintf(fp, " uwUDPQueue : %08lx\r", rec->uwUDPQueue); +fprintf(fp, " uwUDPError : %04x\r", rec->uwUDPError); +fprintf(fp, " uwUDPErrorTick : %08lx\r", rec->uwUDPErrorTick); +fprintf(fp, " uwUDPCount : %08lx\r", rec->uwUDPCount); -fdprintf(fd, " uwTriggers[0]: %08lx\r", rec->uwTriggers[0]); -fdprintf(fd, " uwSysTriggers[0]: %08lx\r", rec->uwSysTriggers[0]); +fprintf(fp, " uwTriggers[0]: %08lx\r", rec->uwTriggers[0]); +fprintf(fp, " uwSysTriggers[0]: %08lx\r", rec->uwSysTriggers[0]);