clean up a bit
This commit is contained in:
parent
f96d3817e6
commit
156ed0030a
158
nscda.c
158
nscda.c
|
@ -278,141 +278,139 @@ void DisplayLinkLayer(void) {
|
||||||
static linkInfoBlk link;
|
static linkInfoBlk link;
|
||||||
variablesPtr lv;
|
variablesPtr lv;
|
||||||
|
|
||||||
unsigned c;
|
|
||||||
|
|
||||||
TCPIPGetLinkLayer(&link);
|
TCPIPGetLinkLayer(&link);
|
||||||
lv = TCPIPGetLinkVariables();
|
lv = TCPIPGetLinkVariables();
|
||||||
|
|
||||||
putchar(0x0c);
|
putchar(0x0c);
|
||||||
print_tab("Link Layer Status", 17);
|
print_tab("Link Layer Status", 17);
|
||||||
|
|
||||||
printf("MethodID: $%04x\r", link.liMethodID);
|
printf(" MethodID: $%04x\r", link.liMethodID);
|
||||||
printf("Name: %b\r", link.liName);
|
printf(" Name: %b\r", link.liName);
|
||||||
VersionString(0, link.liVersion, buffer);
|
VersionString(0, link.liVersion, buffer);
|
||||||
printf("Version: %b\r", buffer);
|
printf(" Version: %b\r", buffer);
|
||||||
printf("Flags: $%04x\r", link.liFlags);
|
printf(" Flags: $%04x\r", link.liFlags);
|
||||||
fputs("\r", stdout);
|
|
||||||
|
|
||||||
printf("Variables:\r");
|
printf("\r Variables:\r");
|
||||||
printf("Version: %d\r", lv->lvVersion);
|
|
||||||
printf("Connected: $%04x\r", lv->lvConnected);
|
printf(" Version: %d\r", lv->lvVersion);
|
||||||
|
printf(" Connected: $%04x\r", lv->lvConnected);
|
||||||
TCPIPConvertIPToASCII(lv->lvIPaddress, buffer, 0);
|
TCPIPConvertIPToASCII(lv->lvIPaddress, buffer, 0);
|
||||||
printf("IP Address: %b\r", buffer);
|
printf(" IP Address: %b\r", buffer);
|
||||||
printf("RefCon: $%08lx\r", lv->lvRefCon);
|
printf(" RefCon: $%08lx\r", lv->lvRefCon);
|
||||||
printf("Errors: $%08lx\r", lv->lvErrors);
|
printf(" Errors: $%08lx\r", lv->lvErrors);
|
||||||
printf("MTU: %d\r", lv->lvMTU);
|
printf(" MTU: %d\r", lv->lvMTU);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayTCP(void) {
|
void DisplayTCP(void) {
|
||||||
|
|
||||||
static DNSRec dns;
|
static DNSRec dns;
|
||||||
Long l;
|
Long l;
|
||||||
unsigned c;
|
|
||||||
|
|
||||||
putchar(0x0c);
|
putchar(0x0c);
|
||||||
print_tab("TCP Status", 10);
|
print_tab("TCP Status", 10);
|
||||||
|
|
||||||
// version
|
// version
|
||||||
VersionString(0, TCPIPLongVersion(), buffer);
|
VersionString(0, TCPIPLongVersion(), buffer);
|
||||||
printf("Version: %b\r", buffer);
|
printf(" Version: %b\r", buffer);
|
||||||
printf("Connect Status: $%04x\r", TCPIPGetConnectStatus());
|
printf(" Connect Status: $%04x\r", TCPIPGetConnectStatus());
|
||||||
|
|
||||||
// ip address
|
// ip address
|
||||||
l = TCPIPGetMyIPAddress();
|
l = TCPIPGetMyIPAddress();
|
||||||
TCPIPConvertIPToASCII(l, buffer, 0);
|
TCPIPConvertIPToASCII(l, buffer, 0);
|
||||||
printf("IP Address: %b\r", buffer);
|
printf(" IP Address: %b\r", buffer);
|
||||||
|
|
||||||
// dns
|
// dns
|
||||||
TCPIPGetDNS(&dns);
|
TCPIPGetDNS(&dns);
|
||||||
TCPIPConvertIPToASCII(dns.DNSMain, buffer, 0);
|
TCPIPConvertIPToASCII(dns.DNSMain, buffer, 0);
|
||||||
printf("DNS 1: %b\r", buffer);
|
printf(" DNS 1: %b\r", buffer);
|
||||||
TCPIPConvertIPToASCII(dns.DNSAux, buffer, 0);
|
TCPIPConvertIPToASCII(dns.DNSAux, buffer, 0);
|
||||||
printf("DNS 2: %b\r", buffer);
|
printf(" DNS 2: %b\r", buffer);
|
||||||
|
|
||||||
// hostname
|
// hostname
|
||||||
TCPIPGetHostName((hnBuffPtr)buffer);
|
TCPIPGetHostName((hnBuffPtr)buffer);
|
||||||
printf("Hostname: %b\r", buffer);
|
printf(" Hostname: %b\r", buffer);
|
||||||
|
|
||||||
// mtu
|
// mtu
|
||||||
printf("MTU: %d\r", TCPIPGetMTU());
|
printf(" MTU: %d\r", TCPIPGetMTU());
|
||||||
printf("Alive Flag: $%04x\r", TCPIPGetAliveFlag());
|
printf(" Alive Flag: $%04x\r", TCPIPGetAliveFlag());
|
||||||
printf("Alive Minutes: %d\r", TCPIPGetAliveMinutes());
|
printf(" Alive Minutes: %d\r", TCPIPGetAliveMinutes());
|
||||||
printf("Login Count: %d\r", TCPIPGetLoginCount());
|
printf(" Login Count: %d\r", TCPIPGetLoginCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void DisplayIpid2(unsigned page, userRecord *rec) {
|
void DisplayIpid2(unsigned page, userRecord *rec) {
|
||||||
|
|
||||||
print_tab("User Record", 11);
|
print_tab("User Record", 11);
|
||||||
|
|
||||||
if (page == 0) {
|
if (page == 0) {
|
||||||
printf(" uwUserID: %04x\r", rec->uwUserID);
|
TCPIPConvertIPToASCII(rec->uwDestIP, buffer, 0);
|
||||||
printf(" uwDestIP: %08lx\r", rec->uwDestIP);
|
|
||||||
printf(" uwDestPort: %04x\r", rec->uwDestPort);
|
|
||||||
printf(" uwIP_TOS: %04x\r", rec->uwIP_TOS);
|
|
||||||
printf(" uwIP_TTL: %04x\r", rec->uwIP_TTL);
|
|
||||||
|
|
||||||
printf(" uwSourcePort: %04x\r", rec->uwSourcePort);
|
printf(" uwUserID: $%04x\r", rec->uwUserID);
|
||||||
printf(" uwLogoutPending: %04x\r", rec->uwLogoutPending);
|
printf(" uwDestIP: $%08lx (%b)\r", rec->uwDestIP, buffer);
|
||||||
printf(" uwICMPQueue: %08lx\r", rec->uwICMPQueue);
|
printf(" uwDestPort: $%04x (%u)\r", rec->uwDestPort, rec->uwDestPort);
|
||||||
printf(" uwTCPQueue: %08lx\r", rec->uwTCPQueue);
|
printf(" uwIP_TOS: $%04x\r", rec->uwIP_TOS);
|
||||||
|
printf(" uwIP_TTL: $%04x\r", rec->uwIP_TTL);
|
||||||
|
|
||||||
printf(" uwTCPMaxSendSeg: %04x\r", rec->uwTCPMaxSendSeg);
|
printf(" uwSourcePort: $%04x (%u)\r", rec->uwSourcePort, rec->uwSourcePort);
|
||||||
printf(" uwTCPMaxReceiveSeg: %04x\r", rec->uwTCPMaxReceiveSeg);
|
printf(" uwLogoutPending: $%04x\r", rec->uwLogoutPending);
|
||||||
printf(" uwTCPDataInQ: %08lx\r", rec->uwTCPDataInQ);
|
printf(" uwICMPQueue: $%08lx\r", rec->uwICMPQueue);
|
||||||
printf(" uwTCPDataIn: %08lx\r", rec->uwTCPDataIn);
|
printf(" uwTCPQueue: $%08lx\r", rec->uwTCPQueue);
|
||||||
printf(" uwTCPPushInFlag: %04x\r", rec->uwTCPPushInFlag);
|
|
||||||
printf(" uwTCPPushInOffset: %08lx\r", rec->uwTCPPushInOffset);
|
printf(" uwTCPMaxSendSeg: $%04x\r", rec->uwTCPMaxSendSeg);
|
||||||
printf(" uwTCPPushOutFlag: %04x\r", rec->uwTCPPushOutFlag);
|
printf(" uwTCPMaxReceiveSeg: $%04x\r", rec->uwTCPMaxReceiveSeg);
|
||||||
printf(" uwTCPPushOutSEQ: %08lx\r", rec->uwTCPPushOutSEQ);
|
printf(" uwTCPDataInQ: $%08lx\r", rec->uwTCPDataInQ);
|
||||||
printf(" uwTCPDataOut: %08lx\r", rec->uwTCPDataOut);
|
printf(" uwTCPDataIn: $%08lx\r", rec->uwTCPDataIn);
|
||||||
|
printf(" uwTCPPushInFlag: $%04x\r", rec->uwTCPPushInFlag);
|
||||||
|
printf(" uwTCPPushInOffset: $%08lx\r", rec->uwTCPPushInOffset);
|
||||||
|
printf(" uwTCPPushOutFlag: $%04x\r", rec->uwTCPPushOutFlag);
|
||||||
|
printf(" uwTCPPushOutSEQ: $%08lx\r", rec->uwTCPPushOutSEQ);
|
||||||
|
printf(" uwTCPDataOut: $%08lx\r", rec->uwTCPDataOut);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (page == 1) {
|
if (page == 1) {
|
||||||
printf(" uwSND_UNA: %08lx\r", rec->uwSND_UNA);
|
printf(" uwSND_UNA: $%08lx\r", rec->uwSND_UNA);
|
||||||
printf(" uwSND_NXT: %08lx\r", rec->uwSND_NXT);
|
printf(" uwSND_NXT: $%08lx\r", rec->uwSND_NXT);
|
||||||
printf(" uwSND_WND: %04x\r", rec->uwSND_WND);
|
printf(" uwSND_WND: $%04x\r", rec->uwSND_WND);
|
||||||
printf(" uwSND_UP: %04x\r", rec->uwSND_UP);
|
printf(" uwSND_UP: $%04x\r", rec->uwSND_UP);
|
||||||
printf(" uwSND_WL1: %08lx\r", rec->uwSND_WL1);
|
printf(" uwSND_WL1: $%08lx\r", rec->uwSND_WL1);
|
||||||
printf(" uwSND_WL2: %08lx\r", rec->uwSND_WL2);
|
printf(" uwSND_WL2: $%08lx\r", rec->uwSND_WL2);
|
||||||
printf(" uwISS: %08lx\r", rec->uwISS);
|
printf(" uwISS: $%08lx\r", rec->uwISS);
|
||||||
printf(" uwRCV_NXT: %08lx\r", rec->uwRCV_NXT);
|
printf(" uwRCV_NXT: $%08lx\r", rec->uwRCV_NXT);
|
||||||
printf(" uwRCV_WND: %04x\r", rec->uwRCV_WND);
|
printf(" uwRCV_WND: $%04x\r", rec->uwRCV_WND);
|
||||||
printf(" uwRCV_UP: %04x\r", rec->uwRCV_UP);
|
printf(" uwRCV_UP: $%04x\r", rec->uwRCV_UP);
|
||||||
printf(" uwIRS: %08lx\r", rec->uwIRS);
|
printf(" uwIRS: $%08lx\r", rec->uwIRS);
|
||||||
printf(" uwTCP_State: %04x\r", rec->uwTCP_State);
|
printf(" uwTCP_State: $%04x\r", rec->uwTCP_State);
|
||||||
printf(" uwTCP_StateTick: %08lx\r", rec->uwTCP_StateTick);
|
printf(" uwTCP_StateTick: $%08lx\r", rec->uwTCP_StateTick);
|
||||||
printf(" uwTCP_ErrCode: %04x\r", rec->uwTCP_ErrCode);
|
printf(" uwTCP_ErrCode: $%04x\r", rec->uwTCP_ErrCode);
|
||||||
printf(" uwTCP_ICMPError: %04x\r", rec->uwTCP_ICMPError);
|
printf(" uwTCP_ICMPError: $%04x\r", rec->uwTCP_ICMPError);
|
||||||
printf(" uwTCP_Server: %04x\r", rec->uwTCP_Server);
|
printf(" uwTCP_Server: $%04x\r", rec->uwTCP_Server);
|
||||||
printf(" uwTCP_ChildList: %08lx\r", rec->uwTCP_ChildList);
|
printf(" uwTCP_ChildList: $%08lx\r", rec->uwTCP_ChildList);
|
||||||
printf(" uwTCP_ACKPending: %04x\r", rec->uwTCP_ACKPending);
|
printf(" uwTCP_ACKPending: $%04x\r", rec->uwTCP_ACKPending);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (page == 2) {
|
if (page == 2) {
|
||||||
printf(" uwTCP_ForceFIN: %04x\r", rec->uwTCP_ForceFIN);
|
printf(" uwTCP_ForceFIN: $%04x\r", rec->uwTCP_ForceFIN);
|
||||||
printf(" uwTCP_FINSEQ: %08lx\r", rec->uwTCP_FINSEQ);
|
printf(" uwTCP_FINSEQ: $%08lx\r", rec->uwTCP_FINSEQ);
|
||||||
printf(" uwTCP_MyFINACKed: %04x\r", rec->uwTCP_MyFINACKed);
|
printf(" uwTCP_MyFINACKed: $%04x\r", rec->uwTCP_MyFINACKed);
|
||||||
printf(" uwTCP_Timer: %08lx\r", rec->uwTCP_Timer);
|
printf(" uwTCP_Timer: $%08lx\r", rec->uwTCP_Timer);
|
||||||
printf(" uwTCP_TimerState: %04x\r", rec->uwTCP_TimerState);
|
printf(" uwTCP_TimerState: $%04x\r", rec->uwTCP_TimerState);
|
||||||
printf(" uwTCP_rt_timer: %04x\r", rec->uwTCP_rt_timer);
|
printf(" uwTCP_rt_timer: $%04x\r", rec->uwTCP_rt_timer);
|
||||||
printf(" uwTCP_2MSL_timer: %04x\r", rec->uwTCP_2MSL_timer);
|
printf(" uwTCP_2MSL_timer: $%04x\r", rec->uwTCP_2MSL_timer);
|
||||||
printf(" uwTCP_SaveTTL: %04x\r", rec->uwTCP_SaveTTL);
|
printf(" uwTCP_SaveTTL: $%04x\r", rec->uwTCP_SaveTTL);
|
||||||
printf(" uwTCP_SaveTOS: %04x\r", rec->uwTCP_SaveTOS);
|
printf(" uwTCP_SaveTOS: $%04x\r", rec->uwTCP_SaveTOS);
|
||||||
printf(" uwTCP_TotalIN: %08lx\r", rec->uwTCP_TotalIN);
|
printf(" uwTCP_TotalIN: $%08lx\r", rec->uwTCP_TotalIN);
|
||||||
printf(" uwTCP_TotalOUT: %08lx\r", rec->uwTCP_TotalOUT);
|
printf(" uwTCP_TotalOUT: $%08lx\r", rec->uwTCP_TotalOUT);
|
||||||
|
|
||||||
printf(" uwUDP_Server : %04x\r", rec->uwUDP_Server);
|
printf(" uwUDP_Server: $%04x\r", rec->uwUDP_Server);
|
||||||
printf(" uwUDPQueue : %08lx\r", rec->uwUDPQueue);
|
printf(" uwUDPQueue: $%08lx\r", rec->uwUDPQueue);
|
||||||
printf(" uwUDPError : %04x\r", rec->uwUDPError);
|
printf(" uwUDPError: $%04x\r", rec->uwUDPError);
|
||||||
printf(" uwUDPErrorTick : %08lx\r", rec->uwUDPErrorTick);
|
printf(" uwUDPErrorTick: $%08lx\r", rec->uwUDPErrorTick);
|
||||||
printf(" uwUDPCount : %08lx\r", rec->uwUDPCount);
|
printf(" uwUDPCount: $%08lx\r", rec->uwUDPCount);
|
||||||
|
|
||||||
printf(" uwTriggers[0]: %08lx\r", rec->uwTriggers[0]);
|
printf(" uwTriggers[0]: $%08lx\r", rec->uwTriggers[0]);
|
||||||
printf(" uwSysTriggers[0]: %08lx\r", rec->uwSysTriggers[0]);
|
printf(" uwSysTriggers[0]: $%08lx\r", rec->uwSysTriggers[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue