📄 ckuus4.c
字号:
printf(" WOLLONGONG WIN/TCP");#else#ifdef DEC_TCPIP { static $DESCRIPTOR(tcp_desc,"_TCP0:"); int status; long devclass; static int itmcod = DVI$_DEVCLASS;#ifdef COMMENT status = LIB$GETDVI(&itmcod, 0, &tcp_desc, &devclass);#else /* Martin Zinser 9/96 */ status = lib$getdvi(&itmcod, 0, &tcp_desc, &devclass);#endif /* COMMENT */ if ((status & 1) && (devclass == DC$_SCOM)) printf(" Process Software Corporation TCPware for OpenVMS"); else printf(" DEC TCP/IP Services for (Open)VMS"); }#else#ifdef CMU_TCPIP printf(" CMU-OpenVMS/IP");#else printf(" None");#endif /* CMU_TCPIP */#endif /* DEC_TCPIP */#endif /* WINTCP */#endif /* MULTINET */#ifdef TNCODE printf(", TELNET protocol\n\n"); shotel();#endif /* TNCODE */ printf("\n");#else /* Not VMS */#ifdef SUNX25 printf(" SunLink X.25\n");#endif /* SUNX25 */#ifdef STRATUSX25 printf(" Stratus VOS X.25\n");#endif /* STRATUSX25 */#ifdef DECNET#ifdef OS2 if (dnet_avail) printf(" DECnet, LAT protocol\n"); else printf(" DECnet, LAT protocol - not available\n");#else printf(" DECnet\n");#endif /* OS2 */#endif /* DECNET */#ifdef NPIPE printf(" Named Pipes\n");#endif /* NPIPE */#ifdef CK_NETBIOS if (netbiosAvail) printf(" NETBIOS\n"); else printf(" NETBIOS - not available\n");#endif /* CK_NETBIOS */#ifdef SUPERLAT if (slat_avail) printf(" SuperLAT\n"); else printf(" SuperLAT - not available\n") ;#endif /* SUPERLAT */#ifdef TCPSOCKET if (#ifdef OS2 tcp_avail#else 1#endif /* OS2 */ ) { if ( myipaddr[0] )#ifdef OS2ONLY printf(" TCP/IP [%s] via %s\n", myipaddr, tcpname);#else printf(" TCP/IP [%s]\n",myipaddr);#endif /* OS2ONLY */ else#ifdef OS2ONLY printf(" TCP/IP via %s\n", tcpname);#else printf(" TCP/IP\n");#endif /* OS2ONLY */#ifdef TNCODE if (nettype == NET_TCPB) { printf("\n"); shotel(); }#endif /* TNCODE */#ifdef OS2 } else { printf(" TCP/IP - not available%s\n",tcpname[0] ? tcpname : "" );#endif /* OS2 */ }#endif /* TCPSOCKET */#ifdef CK_NETBIOS if (netbiosAvail && nettype == NET_BIOS) { printf("\n") ; shonb(); } #endif /* CK_NETBIOS */#endif /* VMS */ printf("\nActive network connection:\n"); if (network) { printf(" Host: %s",ttname); if ((nettype == NET_TCPA || nettype == NET_TCPB) && *ipaddr) printf(" [%s]",ipaddr); } else printf(" Host: none"); printf(" via: "); if (nettype == NET_TCPA || nettype == NET_TCPB) printf("tcp/ip\n"); else if (nettype == NET_SX25) printf("SunLink X.25\n"); else if (nettype == NET_VX25) printf("Stratus VOS X.25\n"); else if (nettype == NET_DEC) { if ( ttnproto == NP_LAT ) printf("DECnet LAT\n"); else if ( ttnproto == NP_CTERM ) printf("DECnet CTERM\n"); else printf("DECnet\n"); } else if (nettype == NET_PIPE) printf("Named Pipes\n"); else if (nettype == NET_BIOS) printf("NetBIOS\n"); else if (nettype == NET_SLAT) printf("SuperLAT\n");#ifdef NETFILE else if ( nettype == NET_FILE ) printf("local file\n");#endif /* NETFILE */#ifdef ANYX25 if (nettype == NET_SX25 || nettype == NET_VX25) shox25();#endif /* ANYX25 */#ifdef TCPSOCKET if (nettype == NET_TCPA || nettype == NET_TCPB) {#ifdef SOL_SOCKET#ifdef SO_KEEPALIVE printf(" Keepalive is %s\n", tcp_keepalive ? "on" : "off" );#endif /* SO_KEEPALIVE */#ifdef SO_LINGER printf(" Linger is %s", tcp_linger ? "on, " : "off\n" ); if (tcp_linger) { if (tcp_linger_tmo) printf("%d x 10 milliseconds\n",tcp_linger_tmo); else printf("no timeout\n"); }#endif /* SO_LINGER */#ifdef TCP_NODELAY printf(" Nodelay is %s\n", tcp_nodelay ? "on" : "off");#endif /* TCP_NODELAY */#ifdef SO_SNDBUF if (tcp_sendbuf <= 0) printf(" Send buffer is default size\n"); else printf(" Send buffer is %d bytes\n", tcp_sendbuf);#endif /* SO_SNDBUF */#ifdef SO_RCVBUF if (tcp_recvbuf <= 0) printf(" Receive buffer is default size\n"); else printf(" Receive buffer is %d bytes\n", tcp_recvbuf);#endif /* SO_RCVBUF */#endif /* SOL_SOCKET */ }#ifdef RLOGCODE if (ttnproto == NP_RLOGIN) printf(" LOGIN protocol\n");#endif /* RLOGCODE */#ifdef TNCODE if (ttnproto == NP_TELNET) { printf(" TELNET protocol\n"); printf(" Echoing is currently %s\n",duplex ? "local" : "remote"); }#endif /* TNCODE */#endif /* TCPSOCKET */ printf("\n");#endif /* NETCONN */}#ifndef NODIALVOIDshodial() { if (mdmtyp >= 0 || local != 0) doshodial();}VOIDshods(s) char *s; { /* Show a dial-related string */ char c; if (s == NULL || !(*s)) { /* Empty? */ printf("(none)\n"); } else { /* Not empty. */ while (c = *s++) /* Can contain controls */ if (c > 31 && c < 127) { putchar(c); } /* so display them */ else printf("\\{%d}",c); /* in backslash notation */ printf("\n"); }}intdoshodial() { int i, n; printf(" Dial status: %d", dialsta);#ifdef BIGBUFOK if (dialsta > 90) printf(" = Unknown error"); else if (dialsta < 0) printf(" = (none)"); else if (dialsta < 30 && dialmsg[dialsta]) printf(" = %s", dialmsg[dialsta]);#endif /* BIGBUFOK */ if (ndialdir <= 1) { printf("\n Dial directory: %s\n",dialdir[0] ? dialdir[0] : "(none)"); } else { int i; printf("\n Dial directories:\n"); for (i = 0; i < ndialdir; i++) printf("%2d. %s\n",i+1,dialdir[i]); } printf(" Dial method: "); if (dialmth == XYDM_D) printf("default"); else if (dialmth == XYDM_P) printf("pulse "); else if (dialmth == XYDM_T) printf("tone "); printf(" Dial sort: %s\n",dialsrt ? "on" : "off") ; printf(" Dial hangup: %s Dial display: %s\n", dialhng ? "on " : "off", dialdpy ? "on" : "off") ; printf(" Dial retries: %-6d Dial interval: %d\n", dialrtr, dialint); printf(" Dial timeout: "); if (dialtmo > 0) printf("%4d sec", dialtmo); else printf("0 (auto)"); printf(" Redial number: %s\n",dialnum ? dialnum : "(none)"); printf(" Dial confirmation: %s Dial convert-directory: %s\n", dialcnf ? "on " : "off", dialcvt ? ((dialcvt == 1) ? "on" : "ask") : "off"); printf(" Dial prefix: %s\n", dialnpr ? dialnpr : "(none)"); printf(" Dial suffix: %s\n", dialsfx ? dialsfx : "(none)"); printf(" Dial country-code: %-12s", diallcc ? diallcc : "(none)"); printf("Dial connect: %s", dialcon ? ((dialcon == 1) ? "on" : "auto") : "off"); if (dialcon != CAR_OFF) printf(" %s", dialcq ? "quiet" : "verbose"); printf("\n Dial area-code: %-12s", diallac ? diallac : "(none)"); printf("Dial restrict: "); if (dialrstr == 5) printf("international\n"); else if (dialrstr == 4) printf("long-distance\n"); else if (dialrstr == 2) printf("local\n"); else if (dialrstr == 6) printf("none\n"); else printf("?\n"); printf(" Dial ld-prefix: %s\n", dialldp ? dialldp : "(none)"); printf(" Dial ld-suffix: %s\n", diallds ? diallds : "(none)"); printf(" Dial intl-prefix: %s\n", dialixp ? dialixp : "(none)"); printf(" Dial intl-suffix: %s\n", dialixs ? dialixs : "(none)"); printf(" Dial toll-free-area-code: "); if (ntollfree == 0) printf("(none)"); else for (i = 0; i < ntollfree; i++) printf("%s ", dialtfc[i]); printf("\n Dial toll-free-prefix: %s\n", dialtfp ? dialtfp : (dialldp ? dialldp : "(none)") ); printf(" Dial pbx-exchange: %s\n", dialpxx ? dialpxx : "(none)"); printf(" Dial pbx-internal-prefix: %s\n", dialpxi ? dialpxi : "(none)"); printf(" Dial pbx-outside-prefix: %s\n", dialpxo ? dialpxo : "(none)"); return(0);}#endif /* NODIAL */#ifdef ANYX25VOIDshopad() { int i; printf("\nX.3 PAD Parameters:\n"); for (i = 0; i < npadx3; i++) printf(" [%d] %s %d\n",padx3tab[i].kwval,padx3tab[i].kwd, padparms[padx3tab[i].kwval]);}#endif /* ANYX25 *//* Show File Parameters */VOIDshoparf() { char *s; int i;#ifdef COMMENT printf("\nFile parameters: ");#ifdef COMMENT printf("Blocksize: %5d ",fblksiz);#endif /* COMMENT */ printf(" Attributes: "); if (atcapr) printf("on"); else printf("off");#ifdef VMS printf(" Record-Length: %5d",frecl);#endif /* VMS */ printf("\n Names: "); if (fncnv == XYFN_L) s = "literal"; else if (fncnv == XYFN_C) s = "converted"; else s = "(unknown)" printf("%-12s",s);#ifdef DEBUG#ifndef MAC printf(" Debugging Log: "); if (deblog) printf("%s",debfil); else printf("none");#endif /* MAC */#endif /* DEBUG */ printf("\n Type: "); s = gfmode(binary); printf("%-12s",s);#ifdef COMMENT printf(" Organization: "); switch (forg) { case XYFO_I: printf("%-10s","indexed"); break; case XYFO_R: printf("%-10s","relative"); break; case XYFO_S: printf("%-10s","sequential"); break; }#endif /* COMMENT */#ifndef MAC printf(" Packet Log: "); if (pktlog) printf(pktfil); else printf("none");#endif /* MAC */#ifdef UNIX printf(" Longest filename: %d",maxnam);#endif /* UNIX */ printf("\n Collide: "); for (i = 0; i < ncolx; i++) if (colxtab[i].kwval == fncact) break; printf("%-12s", (i == ncolx) ? "unknown" : colxtab[i].kwd);#ifdef COMMENT printf(" Format: "); switch (frecfm) { case XYFF_F: printf("%-10s","fixed"); break; case XYFF_VB: printf("%-10s","rcw"); break; case XYFF_S: printf("%-10s","stream"); break; case XYFF_U: printf("%-10s","undefined"); break; case XYFF_V: printf("%-10s","variable"); break; }#endif /* COMMENT */#ifndef MAC printf(" Session Log: "); if (seslog) printf(sesfil); else printf("none");#endif /* MAC */#ifdef UNIX printf(" Longest pathname: %d",maxpath);#endif /* UNIX */ printf("\n Send Pathnames: %s", fnspath ? "off" : " on"); printf(" Receive Pathnames: %s\n", fnrpath ? "off" : "on"); printf(" Display: "); switch (fdispla) { case XYFD_N: printf("%-12s","none"); break; case XYFD_R: printf("%-12s","serial"); break; case XYFD_C: printf("%-12s","fullscreen"); break; case XYFD_S: printf("%-12s","crt"); break; }#ifdef COMMENT printf("Carriage-Control: "); switch (fcctrl) { case XYFP_F: printf("%-10s","fortran"); break; case XYFP_N: printf("%-10s","newline"); break; case XYFP_P: printf("%-10s","machine"); break; case XYFP_X: printf("%-10s","none"); break; }#endif /* COMMENT */#ifdef TLOG#ifndef MAC printf(" Transaction Log: "); if (tralog) printf(trafil); else printf("none");#endif /* MAC */#endif /* TLOG */#ifndef NOCSETS if (binary == XYFT_T) { shocharset(); } else#endif /* NOCSETS */ printf("\n"); printf("\nByte Size: %d",(fmask == 0177) ? 7 : 8); printf(", Incomplete: "); if (keep) printf("keep"); else printf("discard");#ifdef KERMRC printf(", Init file: %s",#ifdef CK_SYSINI CK_SYSINI#else kermrc#endif /* CK_SYSINI */ );#endif /* KERMRC */ printf("\n");#else /* not COMMENT -- new format */#ifdef VMS printf(" File record-Length: %5d\n",frecl);#endif /* VMS */ printf(" Transfer mode: %s\n", xfermode == XMODE_A ? "automatic" : "manual" ); printf(" File type: "); switch (binary) { case XYFT_T: s = "text"; break;#ifdef VMS case XYFT_B: s = "binary fixed"; break; case XYFT_I: s = "image"; break; case XYFT_L: s = "labeled"; break; case XYFT_U: s = "binary undef"; break;#else#ifdef MAC case XYFT_B: s = "binary"; break; case XYFT_M: s = "macbinary"; break;#else case XYFT_B: s = "binary"; break;#ifdef CK_LABELED case XYFT_L: s = "labeled"; break;#endif /* CK_LABELED */#endif /* MAC */#endif /* VMS */ default: s = "?"; break; } printf("%s\n",s); if (fncnv == XYFN_L
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -