資源簡介
該程序是linux下telnet的完整實現,編譯已經通過。喜歡linux程序設計的朋友可以研究一下。

代碼片段和文件信息
/*-
?*?Copyright?(c)?1991?1993
?* The?Regents?of?the?University?of?California.??All?rights?reserved.
?*
?*?Redistribution?and?use?in?source?and?binary?forms?with?or?without
?*?modification?are?permitted?provided?that?the?following?conditions
?*?are?met:
?*?1.?Redistributions?of?source?code?must?retain?the?above?copyright
?*????notice?this?list?of?conditions?and?the?following?disclaimer.
?*?2.?Redistributions?in?binary?form?must?reproduce?the?above?copyright
?*????notice?this?list?of?conditions?and?the?following?disclaimer?in?the
?*????documentation?and/or?other?materials?provided?with?the?distribution.
?*?3.?All?advertising?materials?mentioning?features?or?use?of?this?software
?*????must?display?the?following?acknowledgement:
?* This?product?includes?software?developed?by?the?University?of
?* California?Berkeley?and?its?contributors.
?*?4.?Neither?the?name?of?the?University?nor?the?names?of?its?contributors
?*????may?be?used?to?endorse?or?promote?products?derived?from?this?software
?*????without?specific?prior?written?permission.
?*
?*?THIS?SOFTWARE?IS?PROVIDED?BY?THE?REGENTS?AND?CONTRIBUTORS?‘‘AS?IS‘‘?AND
?*?ANY?EXPRESS?OR?IMPLIED?WARRANTIES?INCLUDING?BUT?NOT?LIMITED?TO?THE
?*?IMPLIED?WARRANTIES?OF?MERCHANTABILITY?AND?FITNESS?FOR?A?PARTICULAR?PURPOSE
?*?ARE?DISCLAIMED.??IN?NO?EVENT?SHALL?THE?REGENTS?OR?CONTRIBUTORS?BE?LIABLE
?*?FOR?ANY?DIRECT?INDIRECT?INCIDENTAL?SPECIAL?EXEMPLARY?OR?CONSEQUENTIAL
?*?DAMAGES?(INCLUDING?BUT?NOT?LIMITED?TO?PROCUREMENT?OF?SUBSTITUTE?GOODS
?*?OR?SERVICES;?LOSS?OF?USE?DATA?OR?PROFITS;?OR?BUSINESS?INTERRUPTION)
?*?HOWEVER?CAUSED?AND?ON?ANY?THEORY?OF?LIABILITY?WHETHER?IN?CONTRACT?STRICT
?*?LIABILITY?OR?TORT?(INCLUDING?NEGLIGENCE?OR?OTHERWISE)?ARISING?IN?ANY?WAY
?*?OUT?OF?THE?USE?OF?THIS?SOFTWARE?EVEN?IF?ADVISED?OF?THE?POSSIBILITY?OF
?*?SUCH?DAMAGE.
?*/
#ifndef?lint
static?char?sccsid[]?=?“@(#)authenc.c 8.1?(Berkeley)?6/6/93“;
#endif?/*?not?lint?*/
#if defined(AUTHENTICATION)
#include?
#include?
#include?
#include?
#include?“general.h“
#include?“ring.h“
#include?“externs.h“
#include?“defines.h“
#include?“types.h“
int
net_write(str?len)
unsigned?char?*str;
int?len;
{
if?(NETROOM()?>?len)?{
ring_supply_data(&netoring?str?len);
if?(str[0]?==?IAC?&&?str[1]?==?SE)
printsub(‘>‘?&str[2]?len-2);
return(len);
}
return(0);
}
void
net_encrypt()
{
}
int
telnet_spin()
{
return(-1);
}
char?*
telnet_getenv(val)
char?*val;
{
return((char?*)env_getvalue((unsigned?char?*)val));
}
char?*
telnet_gets(prompt?result?length?echo)
char?*prompt;
char?*result;
int?length;
int?echo;
{
extern?char?*getpass();
extern?int?globalmode;
int?om?=?globalmode;
char?*res;
TerminalNewMode(-1);
if?(echo)?{
printf(“%s“?prompt);
res?=?fgets(result?length?stdin);
}?else?if?(res?=?getpass(prompt))?{
strncpy(result?res?length);
res?=?result;
}
TerminalNewMode(om);
return(res);
}
#endif /*?defined(AUTHENTICATION)
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-12-06?14:36??mytelnet\
?????文件????????1408??2013-03-01?20:21??mytelnet\Makefile
?????文件?????????590??2013-03-01?19:24??mytelnet\Makefile_bark
?????文件????????1418??2013-03-01?20:21??mytelnet\Makefile~
?????文件???????25373??2003-08-18?13:40??mytelnet\README
?????文件????????3004??2003-08-18?13:40??mytelnet\authenc.c
?????文件????????1280??2013-03-01?19:55??mytelnet\authenc.o
?????文件???????65408??2013-03-01?14:27??mytelnet\commands.c
?????文件????????2654??2003-08-18?13:40??mytelnet\defines.h
?????文件???????14137??2003-08-18?13:40??mytelnet\externs.h
?????文件????????2211??2003-08-18?13:40??mytelnet\fdset.h
?????文件????????2104??2003-08-18?13:40??mytelnet\general.h
?????文件????????3223??2003-08-18?13:40??mytelnet\genget.c
?????文件????????2378??2003-08-18?13:40??mytelnet\getent.c
?????文件????????7602??2013-03-01?20:12??mytelnet\main.c
?????文件????????7602??2013-03-01?19:43??mytelnet\main.c~
?????文件????????8620??2013-03-01?20:15??mytelnet\main.o
?????文件????????3388??2003-08-18?13:40??mytelnet\misc-proto.h
?????文件????????2752??2003-08-18?13:40??mytelnet\misc.c
?????文件????????2038??2003-08-18?13:40??mytelnet\misc.h
?????文件???????94631??2013-03-01?19:25??mytelnet\mytelnet
?????文件????????4544??2003-08-18?13:40??mytelnet\network.c
?????文件????????7240??2013-03-01?20:15??mytelnet\network.o
?????文件????????7404??2003-08-18?13:40??mytelnet\ring.c
?????文件????????3316??2003-08-18?13:40??mytelnet\ring.h
?????文件????????7228??2013-03-01?20:15??mytelnet\ring.o
?????文件???????26245??2003-08-18?13:40??mytelnet\sys_bsd.c
?????文件???????54378??2013-03-01?15:32??mytelnet\telnet.c
?????文件????????5089??2003-08-18?13:40??mytelnet\terminal.c
?????文件????????9500??2003-08-18?13:40??mytelnet\tn3270.c
?????文件????????2304??2003-08-18?13:40??mytelnet\types.h
............此處省略1個文件信息
- 上一篇:Qt下基于snap7西門子PLC通信.zip
- 下一篇:Excel文件比對并替換
評論
共有 條評論