91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 113KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-12
  • 語言: 其他
  • 標簽: linux??tftp??server??源碼??

資源簡介

linux下的tftp server端的源碼,大家共同來研究

資源截圖

代碼片段和文件信息


*
*?Copyright?(c)?1983?Regents?of?the?University?of?California.
*?All?rights?reserved.
*
*?Redistribution?and?use?in?source?and?binary?forms?are?permitted
*?provided?that?the?above?copyright?notice?and?this?paragraph?are
*?duplicated?in?all?such?forms?and?that?any?documentation
*?advertising?materials?and?other?materials?related?to?such
*?distribution?and?use?acknowledge?that?the?software?was?developed
*?by?the?University?of?California?Berkeley.??The?name?of?the
*?University?may?not?be?used?to?endorse?or?promote?products?derived
*?from?this?software?without?specific?prior?written?permission.
*?THIS?SOFTWARE?IS?PROVIDED?‘‘AS?IS‘‘?AND?WITHOUT?ANY?EXPRESS?OR
*?IMPLIED?WARRANTIES?INCLUDING?WITHOUT?LIMITATION?THE?IMPLIED
*?WARRANTIES?OF?MERCHANTIBILITY?AND?FITNESS?FOR?A?PARTICULAR?PURPOSE.
*/

#ifndef?lint
char?copyright[]?=
“@(#)?Copyright?(c)?1983?Regents?of?the?University?of?California.\n\
All?rights?reserved.\n“;
#endif?/*?not?lint?*/

#ifndef?lint
static?char?sccsid[]?=?“@(#)tftpd.c????5.8?(Berkeley)?6/18/88“;
#endif?/*?not?lint?*/

/*
*?Trivial?file?transfer?protocol?server.
*
*?This?version?includes?many?modifications?by?Jim?Guyton?
*
*?Further?modifications?by?Markus?Gutschke?
*??-?RFC1782?option?parsing
*??-?RFC1783?extended?blocksize
*??-?“-c“?option?for?changing?the?root?directory
*??-?“-d“?option?for?debugging?output
*/

#include?
#include?
#include?
#include?
#include?

#include?

#include?

#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?

#define????TIMEOUT????????5

#ifndef????OACK
#define????OACK????06
#endif

#ifndef?EOPTNEG
#define????EOPTNEG????8
#endif

extern????int?errno;
struct????sockaddr_in?sin?=?{?AF_INET?};
int????peer;
int????rexmtval?=?TIMEOUT;
int????maxtimeout?=?5*TIMEOUT;

#define????PKTSIZE????(1432+4)?/*?SEGSIZE+4?*/
int????segsize?=?SEGSIZE;
char????buf[PKTSIZE];
char????ackbuf[PKTSIZE];
struct????sockaddr_in?from;
int????fromlen;

char????*rootdir?=?NULL;
int????debug?=?0;

struct?filters?{
????struct?filters?*next;
????char???????????*fname;
}?*filters?=?NULL;
int?????isfilter?=?0;

main(argc?argv)
????char?*argv[];
{
????register?struct?tftphdr?*tp;
????register?int?n;
????int?on?=?1;
????extern?int?optind;
????extern?char?*optarg;

????openlog(argv[0]?LOG_PID?LOG_DAEMON);

????while?((n?=?getopt(argc?argv?“c:dr:“))?>=?0)?{
????????switch?(n)?{
????????case?‘c‘:
????????????if?(rootdir)
????????????????goto?usage;
????????????rootdir?=?optarg;
????????????break;
????????case?‘d‘:
????????????debug++;
????????????break;
????????case?‘r‘:?{
????????????struct?filters?*fp?=?(void?*)
?????????????????????????????malloc(sizeof(struc

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????268517??2006-09-26?18:45??rfc1350.pdf

?????文件??????20841??2004-12-23?15:31??tftp_server_linux.c

-----------?---------??----------?-----??----

???????????????289576????????????????????3


評論

共有 條評論