czfree.net PLR compatible snapshot
This commit is contained in:
parent
7c1ef15a32
commit
72c8cb8255
18
ChangeLog
18
ChangeLog
|
|
@ -23,6 +23,24 @@ Version NEXT
|
||||||
fsp_env.7: added info about larger packets
|
fsp_env.7: added info about larger packets
|
||||||
send_file function renamed to serve_file for avoiding name clash
|
send_file function renamed to serve_file for avoiding name clash
|
||||||
on AIX.
|
on AIX.
|
||||||
|
idle resend multiplier descreased from 1.5 to 1.33
|
||||||
|
correctly init first sequence number
|
||||||
|
sequence numbering changed to allow up to 8 packets flying in the
|
||||||
|
network. Old code uses 4. Even CZFREE.net do not drops 8 packets
|
||||||
|
in row unless line is down.
|
||||||
|
allow better debuging of retry alg.
|
||||||
|
Default max packesize supported by server set by 1200 bytes for
|
||||||
|
now. Let's make some experiments.
|
||||||
|
Calculate real RTT using seq. numbers
|
||||||
|
ignore HUP signal in fgetcmd and fputcmd
|
||||||
|
ignore HUP signal in fcatcmd if stdout is not a terminal
|
||||||
|
fspd.1: minor fixes
|
||||||
|
!! retry alg. retuned for lines with higher PLR. It is much better
|
||||||
|
than before.
|
||||||
|
use srandomdev() for seeding server random generator
|
||||||
|
FAQ: added section about key locking, dmachine, FSP stack libraries,
|
||||||
|
lamah FSP Win32 suite.
|
||||||
|
print packet stats after up/downloads if client tracing is enabled.
|
||||||
|
|
||||||
Version 2.8.1b22 - 20 Dec 2004
|
Version 2.8.1b22 - 20 Dec 2004
|
||||||
fixed sf bug 1060594: fspd: owner can't rename files
|
fixed sf bug 1060594: fspd: owner can't rename files
|
||||||
|
|
|
||||||
22
TODO
22
TODO
|
|
@ -1,11 +1,11 @@
|
||||||
FSP SUITE TO DO LIST BY RADIM KOLAR
|
FSP SUITE TO DO LIST
|
||||||
/* maintained by hsn -at- netmag * cz */
|
/* maintained by hsn -at- netmag * cz */
|
||||||
|
|
||||||
Radim Kolar's personal wishlist from 1997
|
Radim Kolar's personal wishlist from 1997
|
||||||
*-high priority-*
|
*-high priority-*
|
||||||
- show loosers online (finfo command) and server statz
|
- show loosers online (finfo command) and server statz
|
||||||
* l o w *
|
* l o w *
|
||||||
- password change command
|
- password change command !?
|
||||||
|
|
||||||
TESTSUITE NEEDED:
|
TESTSUITE NEEDED:
|
||||||
Write a simple FSP protocol testing tool
|
Write a simple FSP protocol testing tool
|
||||||
|
|
@ -22,16 +22,12 @@ we should add real,portable error codes support to CC_ERR extended data area.
|
||||||
|
|
||||||
PORTING
|
PORTING
|
||||||
Sven's Slowaris 8 compile problem
|
Sven's Slowaris 8 compile problem
|
||||||
Sven's AIX compile problem
|
Fixed? Sven's AIX compile problem
|
||||||
still not builds on freebsd 4 and FreeBSD 5 - non intel platforms?
|
still not builds on freebsd 4 and FreeBSD 5 - non intel platforms?
|
||||||
|
|
||||||
NEEDS IMPROVMENT:
|
NEEDS IMPROVMENT:
|
||||||
|
|
||||||
Client LIBRARY
|
Client LIBRARY
|
||||||
:mid:
|
|
||||||
we should retune retry algoritm for better support lines with higher
|
|
||||||
packed loss. On common internet lines current one works okay.
|
|
||||||
add more detailed stats from retry alg.
|
|
||||||
:low:
|
:low:
|
||||||
fver and others add support new syntax fsp://host:port/file
|
fver and others add support new syntax fsp://host:port/file
|
||||||
|
|
||||||
|
|
@ -60,7 +56,8 @@ report number of clients connected, size of hostable in new command
|
||||||
CC_INFO command
|
CC_INFO command
|
||||||
special defence against rapid/double fire clients (burst command in fspclient)
|
special defence against rapid/double fire clients (burst command in fspclient)
|
||||||
Native Supports for symbolic links (needed for mirroring Debian)
|
Native Supports for symbolic links (needed for mirroring Debian)
|
||||||
new LSTAT COMMAND
|
new LSTAT COMMAND, new MAKELINK command
|
||||||
|
Server should save .FSP_CONTENT using 1k size directory blocks
|
||||||
|
|
||||||
:midle:may not be in 2.8.2
|
:midle:may not be in 2.8.2
|
||||||
write FSP_CHANGE_PASSWORD command
|
write FSP_CHANGE_PASSWORD command
|
||||||
|
|
@ -81,14 +78,15 @@ FSP Proxy repeater - take a look at old code, but we have NAT and fspproxy
|
||||||
today.
|
today.
|
||||||
|
|
||||||
PERFORMANCE:
|
PERFORMANCE:
|
||||||
host hashtable shrinking sometimes
|
do host hashtable shrinking/clearing sometimes
|
||||||
stat cache pro FSP_STAT a ostatni staty
|
stat cache pro FSP_STAT a other stat() calls
|
||||||
chage O(N) fifo cache to some more sane lru hashtable code.
|
chage O(N) fifo cache to some more sane lru hashtable code.
|
||||||
background time() alarm() caller
|
background time() alarm() caller
|
||||||
Current performance 1925648B/s
|
Current performance 1925648B/s
|
||||||
|
|
||||||
MAN:
|
MAN:
|
||||||
separate manpage for 7 fsp (protocol definition) == write FSP RFC
|
separate manpage for 7 fsp (protocol definition) == write FSP RFC
|
||||||
|
Register udp/21 for FSP in iana
|
||||||
manual page for fmvcmd.1
|
manual page for fmvcmd.1
|
||||||
|
|
||||||
libraries and support for FSP protocol
|
libraries and support for FSP protocol
|
||||||
|
|
@ -96,7 +94,8 @@ libraries and support for FSP protocol
|
||||||
|
|
||||||
DONE: FSP library for Java
|
DONE: FSP library for Java
|
||||||
DONE: FSP over HTTP
|
DONE: FSP over HTTP
|
||||||
ALMOST DONE: new small,light fsplib for C.
|
DONE: new small,light fsplib for C.
|
||||||
|
|
||||||
FSP plugin for Netscape/MSIE.
|
FSP plugin for Netscape/MSIE.
|
||||||
Not possible to write protocol plugins with Netscape 3 SDK
|
Not possible to write protocol plugins with Netscape 3 SDK
|
||||||
we have fsproxy now.
|
we have fsproxy now.
|
||||||
|
|
@ -106,6 +105,7 @@ FSP support in major ftp programs: lftp,wget,curl,gftp
|
||||||
AVFS plugin http://sourceforge.net/projects/avf
|
AVFS plugin http://sourceforge.net/projects/avf
|
||||||
|
|
||||||
LARGEFILES64 how to turn them on:
|
LARGEFILES64 how to turn them on:
|
||||||
|
*-------------------------------*
|
||||||
|
|
||||||
Cygwin: #define __LARGE64_FILES fopen64,ftello64,fseeko64 _off64_t
|
Cygwin: #define __LARGE64_FILES fopen64,ftello64,fseeko64 _off64_t
|
||||||
glibc 2.3: #define _LARGEFILE64_SOURCE off64_t
|
glibc 2.3: #define _LARGEFILE64_SOURCE off64_t
|
||||||
|
|
|
||||||
48
client/lib.c
48
client/lib.c
|
|
@ -33,6 +33,7 @@ unsigned long target_maxdelay = DEFAULT_MAXDELAY; /* max resend timer */
|
||||||
unsigned long busy_delay = DEFAULT_DELAY; /* busy retransmit timer */
|
unsigned long busy_delay = DEFAULT_DELAY; /* busy retransmit timer */
|
||||||
unsigned long idle_delay = DEFAULT_DELAY; /* idle retransmit timer */
|
unsigned long idle_delay = DEFAULT_DELAY; /* idle retransmit timer */
|
||||||
unsigned long udp_sent_time;
|
unsigned long udp_sent_time;
|
||||||
|
unsigned long stat_resends, stat_iresends, stat_dupes, stat_bad, stat_ok;
|
||||||
|
|
||||||
UBUF *client_interact (unsigned char cmd, unsigned long pos,
|
UBUF *client_interact (unsigned char cmd, unsigned long pos,
|
||||||
unsigned int l1, unsigned const char * p1,
|
unsigned int l1, unsigned const char * p1,
|
||||||
|
|
@ -48,6 +49,7 @@ UBUF *client_interact (unsigned char cmd, unsigned long pos,
|
||||||
socklen_t bytes;
|
socklen_t bytes;
|
||||||
unsigned long w_delay;
|
unsigned long w_delay;
|
||||||
unsigned long total_delay;
|
unsigned long total_delay;
|
||||||
|
struct timeval start[8],stop;
|
||||||
|
|
||||||
FD_ZERO(&mask);
|
FD_ZERO(&mask);
|
||||||
sbuf.cmd = cmd;
|
sbuf.cmd = cmd;
|
||||||
|
|
@ -73,7 +75,7 @@ UBUF *client_interact (unsigned char cmd, unsigned long pos,
|
||||||
total_delay += w_delay;
|
total_delay += w_delay;
|
||||||
BB_WRITE2(sbuf.bb_key,key);
|
BB_WRITE2(sbuf.bb_key,key);
|
||||||
sbuf.bb_seq[0] = seq0 = (myseq >> 8) & 0xff;
|
sbuf.bb_seq[0] = seq0 = (myseq >> 8) & 0xff;
|
||||||
sbuf.bb_seq[1] = seq1 = (myseq & 0xfc) | (retry_send & 0x0003);
|
sbuf.bb_seq[1] = seq1 = (myseq & 0xf8) | (retry_send & 0x0007);
|
||||||
sbuf.sum = 0;
|
sbuf.sum = 0;
|
||||||
|
|
||||||
for(t = (unsigned char *) &sbuf, sum = n = mlen; n--; sum += *t++);
|
for(t = (unsigned char *) &sbuf, sum = n = mlen; n--; sum += *t++);
|
||||||
|
|
@ -81,13 +83,21 @@ UBUF *client_interact (unsigned char cmd, unsigned long pos,
|
||||||
|
|
||||||
switch(retry_send) { /* adaptive retry delay adjustments */
|
switch(retry_send) { /* adaptive retry delay adjustments */
|
||||||
case 0:
|
case 0:
|
||||||
busy_delay = (target_delay+(busy_delay<<3)-busy_delay)>>3;
|
if(target_delay>=busy_delay)
|
||||||
|
w_delay=target_delay;
|
||||||
|
else
|
||||||
|
w_delay=busy_delay+DEFAULT_DELAY;
|
||||||
|
/* classic FSP retry code. Not suitable for CZFREE.NET
|
||||||
|
busy_delay = (target_delay+ (busy_delay<<3)-busy_delay)>>3;
|
||||||
w_delay = busy_delay;
|
w_delay = busy_delay;
|
||||||
|
*/
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
busy_delay = busy_delay * 3 / 2;
|
busy_delay = busy_delay * 3 / 2;
|
||||||
w_delay = busy_delay;
|
w_delay = busy_delay;
|
||||||
|
idle_delay = busy_delay;
|
||||||
if(client_trace) write(2,"R",1);
|
if(client_trace) write(2,"R",1);
|
||||||
|
stat_resends++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
@ -97,10 +107,11 @@ UBUF *client_interact (unsigned char cmd, unsigned long pos,
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
idle_delay = idle_delay * 3 / 2;
|
idle_delay = idle_delay * 4 / 3;
|
||||||
if (idle_delay > target_maxdelay) idle_delay = target_maxdelay;
|
if (idle_delay > target_maxdelay) idle_delay = target_maxdelay;
|
||||||
w_delay = idle_delay;
|
w_delay = idle_delay;
|
||||||
if(client_trace) write(2,"I",1);
|
if(client_trace) write(2,"I",1);
|
||||||
|
stat_iresends++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -120,7 +131,18 @@ UBUF *client_interact (unsigned char cmd, unsigned long pos,
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* Check if w_delay is within limits */
|
||||||
|
if(w_delay < MIN_DELAY)
|
||||||
|
w_delay=MIN_DELAY;
|
||||||
|
else
|
||||||
|
if (w_delay > target_maxdelay)
|
||||||
|
w_delay = target_maxdelay;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("Waiting %lu ms for server response.\n",w_delay);
|
||||||
|
#endif
|
||||||
udp_sent_time = time((time_t *) 0);
|
udp_sent_time = time((time_t *) 0);
|
||||||
|
gettimeofday(&start[retry_send & 0x7],NULL);
|
||||||
FD_SET(myfd,&mask);
|
FD_SET(myfd,&mask);
|
||||||
|
|
||||||
for(retry_recv = 0; ; retry_recv++) {
|
for(retry_recv = 0; ; retry_recv++) {
|
||||||
|
|
@ -133,6 +155,7 @@ UBUF *client_interact (unsigned char cmd, unsigned long pos,
|
||||||
{
|
{
|
||||||
/* too enough bytes for header */
|
/* too enough bytes for header */
|
||||||
if (client_trace) write(2,"H",1);
|
if (client_trace) write(2,"H",1);
|
||||||
|
stat_bad++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,6 +165,7 @@ UBUF *client_interact (unsigned char cmd, unsigned long pos,
|
||||||
{
|
{
|
||||||
/* truncated. */
|
/* truncated. */
|
||||||
if (client_trace) write(2,"T",1);
|
if (client_trace) write(2,"T",1);
|
||||||
|
stat_bad++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -154,20 +178,29 @@ UBUF *client_interact (unsigned char cmd, unsigned long pos,
|
||||||
{
|
{
|
||||||
/* wrong check sum */
|
/* wrong check sum */
|
||||||
if (client_trace) write(2,"C",1);
|
if (client_trace) write(2,"C",1);
|
||||||
|
stat_bad++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( (rbuf.bb_seq[0] ^ seq0) ||
|
if( (rbuf.bb_seq[0] ^ seq0) ||
|
||||||
((rbuf.bb_seq[1] ^ seq1)&0xfc))
|
((rbuf.bb_seq[1] ^ seq1)&0xf8))
|
||||||
{
|
{
|
||||||
/* wrong seq # */
|
/* wrong seq # */
|
||||||
if (client_trace) write(2,"S",1);
|
if (client_trace) write(2,"S",1);
|
||||||
|
stat_dupes++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
myseq = (myseq + 0x0004) & 0xfffc; /* seq for next request */
|
myseq = (myseq + 0x0008) & 0xfff8; /* seq for next request */
|
||||||
key = BB_READ2(rbuf.bb_key); /* key for next request */
|
key = BB_READ2(rbuf.bb_key); /* key for next request */
|
||||||
|
/* calculate real busy delay */
|
||||||
|
gettimeofday(&stop,NULL);
|
||||||
|
busy_delay = 1000*(stop.tv_sec-start[rbuf.bb_seq[1] & 0x7].tv_sec);
|
||||||
|
busy_delay += (stop.tv_usec-start[rbuf.bb_seq[1] & 0x7].tv_usec)/1000;
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("Server reply RTT was %lu ms.\n",busy_delay);
|
||||||
|
#endif
|
||||||
client_set_key(key);
|
client_set_key(key);
|
||||||
|
stat_ok++;
|
||||||
|
|
||||||
if(client_intr_state == 2) {
|
if(client_intr_state == 2) {
|
||||||
if(!key_persists) client_done();
|
if(!key_persists) client_done();
|
||||||
|
|
@ -200,10 +233,11 @@ static RETSIGTYPE client_intr (int signum)
|
||||||
void init_client (const char * host, unsigned short port, unsigned short myport)
|
void init_client (const char * host, unsigned short port, unsigned short myport)
|
||||||
{
|
{
|
||||||
busy_delay = idle_delay = target_delay;
|
busy_delay = idle_delay = target_delay;
|
||||||
|
stat_resends = stat_iresends = stat_dupes = stat_bad = stat_ok;
|
||||||
#ifdef HAVE_SRANDOMDEV
|
#ifdef HAVE_SRANDOMDEV
|
||||||
srandomdev();
|
srandomdev();
|
||||||
#endif
|
#endif
|
||||||
myseq = random();
|
myseq = random() & 0xfff8;
|
||||||
|
|
||||||
if((myfd = _x_udp(env_listen_on,&myport)) == -1) {
|
if((myfd = _x_udp(env_listen_on,&myport)) == -1) {
|
||||||
perror("socket open");
|
perror("socket open");
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,13 @@ char *util_abs_path (const char * s2)
|
||||||
return(path);
|
return(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void util_pktstats(void)
|
||||||
|
{
|
||||||
|
fprintf(stderr,"Packets received: %lu total (%lu bad, %lu duplicate)\nPackets sent: %lu total (%lu first resends, %lu idle resends).\n",stat_ok+stat_bad+stat_dupes,stat_bad,stat_dupes,
|
||||||
|
stat_ok+stat_resends+stat_iresends,stat_resends,stat_iresends);
|
||||||
|
fprintf(stderr,"Line has %lu %% packet loss rate.\n",100*(stat_resends+stat_iresends)/(stat_ok+stat_dupes+stat_resends+stat_iresends));
|
||||||
|
}
|
||||||
|
|
||||||
static int util_split_path (char * path, char ** p1, char ** p2,
|
static int util_split_path (char * path, char ** p1, char ** p2,
|
||||||
char ** p3)
|
char ** p3)
|
||||||
{
|
{
|
||||||
|
|
@ -285,6 +292,7 @@ static int util_download_main (char * path, char * fpath, FILE * fp,
|
||||||
if(client_trace)
|
if(client_trace)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"\r%luk : %s [%ldB/s] \n", 1+(pos>>10), path, downloaded/t);
|
fprintf(stderr,"\r%luk : %s [%ldB/s] \n", 1+(pos>>10), path, downloaded/t);
|
||||||
|
util_pktstats();
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -439,6 +447,7 @@ int util_upload (char * path, FILE * fp, time_t stamp)
|
||||||
if(client_trace)
|
if(client_trace)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"\r%luk : %s [%ldB/s] \n", 1+(pos>>10), path, pos/t);
|
fprintf(stderr,"\r%luk : %s [%ldB/s] \n", 1+(pos>>10), path, pos/t);
|
||||||
|
util_pktstats();
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
free(fpath);
|
free(fpath);
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
static RETSIGTYPE dont_die (int signum)
|
static RETSIGTYPE dont_die (int signum)
|
||||||
{
|
{
|
||||||
#ifndef RELIABLE_SIGNALS
|
#ifndef RELIABLE_SIGNALS
|
||||||
signal(SIGPIPE,dont_die);
|
signal(signum,dont_die);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -34,7 +34,10 @@ int main (int argc, char ** argv)
|
||||||
env_client();
|
env_client();
|
||||||
|
|
||||||
signal(SIGPIPE,dont_die);
|
signal(SIGPIPE,dont_die);
|
||||||
if(isatty(1)) client_trace = 0;
|
if(isatty(1))
|
||||||
|
client_trace = 0;
|
||||||
|
else
|
||||||
|
signal(SIGHUP,dont_die);
|
||||||
|
|
||||||
while(*++argv) {
|
while(*++argv) {
|
||||||
av = glob(*argv);
|
av = glob(*argv);
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ int main (int argc, char ** argv)
|
||||||
char **av, *av2[2], n[1024];
|
char **av, *av2[2], n[1024];
|
||||||
int prompt, mode = 0;
|
int prompt, mode = 0;
|
||||||
|
|
||||||
signal(SIGHUP,fsp_cleanup);
|
signal(SIGHUP,SIG_IGN);
|
||||||
signal(SIGINT,fsp_cleanup);
|
signal(SIGINT,fsp_cleanup);
|
||||||
signal(SIGQUIT,fsp_cleanup);
|
signal(SIGQUIT,fsp_cleanup);
|
||||||
signal(SIGILL,fsp_cleanup);
|
signal(SIGILL,fsp_cleanup);
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ int main (int argc, char ** argv)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
signal(SIGHUP,upload_cleanup);
|
signal(SIGHUP,SIG_IGN);
|
||||||
signal(SIGINT,upload_cleanup);
|
signal(SIGINT,upload_cleanup);
|
||||||
signal(SIGQUIT,upload_cleanup);
|
signal(SIGQUIT,upload_cleanup);
|
||||||
signal(SIGILL,upload_cleanup);
|
signal(SIGILL,upload_cleanup);
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,12 @@
|
||||||
### # # ### L8mer guide to FSP
|
### # # ### L8mer guide to FSP
|
||||||
### ## ## ###
|
### ## ## ###
|
||||||
### ### # ### LQ Version
|
### ### # ### LQ Version
|
||||||
##### # ###### ##### Dec 2004
|
##### # ###### ##### Jan 2005
|
||||||
|
|
||||||
Why you need it
|
Why you need it
|
||||||
|
|
||||||
- stealth operation
|
- stealth operation
|
||||||
|
- few people knows what FSP is
|
||||||
- old proven software with 10 years history
|
- old proven software with 10 years history
|
||||||
- Elite SitEZ has non interrupted operation by
|
- Elite SitEZ has non interrupted operation by
|
||||||
lamerz for more than 10 years!
|
lamerz for more than 10 years!
|
||||||
|
|
@ -32,11 +33,16 @@ Why you need it
|
||||||
- net adminz do not like it
|
- net adminz do not like it
|
||||||
- lamerz can not handle it
|
- lamerz can not handle it
|
||||||
- bandwidth friendly
|
- bandwidth friendly
|
||||||
|
- very ressistant to packet loss
|
||||||
|
|
||||||
STuFF firSt!
|
STuFF firSt!
|
||||||
|
|
||||||
you neeeed to get a p-file called cygwin1.dll. lamerz at www.cygwin.com
|
you neeeed to get a p-file called cygwin1.dll. lamerz at www.cygwin.com
|
||||||
have some. Grab a copy, man. Copy it to your winlost sistema32 dyr.
|
have some. Grab a copy, man. Copy it to your c:\winlost\sistema32 dyr.
|
||||||
|
|
||||||
|
If you can not get it from lamerz listed above and your friends do not have
|
||||||
|
one, last chance for getting this important p-file is to do a minimal
|
||||||
|
installation of CygLose.
|
||||||
|
|
||||||
Have it? Right! You are ready now.
|
Have it? Right! You are ready now.
|
||||||
|
|
||||||
|
|
@ -131,6 +137,7 @@ for HQ version of this guide send
|
||||||
Features included:
|
Features included:
|
||||||
list of 5 hq quality sitez
|
list of 5 hq quality sitez
|
||||||
how to search for new sitez
|
how to search for new sitez
|
||||||
|
how to make FSP faster
|
||||||
special fsp sites seek tool
|
special fsp sites seek tool
|
||||||
and 3 secret bonuzez
|
and 3 secret bonuzez
|
||||||
|
|
||||||
|
|
|
||||||
122
doc/fsp-faq.sgml
122
doc/fsp-faq.sgml
|
|
@ -197,7 +197,7 @@
|
||||||
<para>
|
<para>
|
||||||
There are also some people which likes slower FSP downloads better,
|
There are also some people which likes slower FSP downloads better,
|
||||||
because
|
because
|
||||||
it saves their bandwidth for interactive tasks. This is often prefered
|
it saves their bandwidth for interactive tasks. This is often preferred
|
||||||
way of downloading large files, like CD-ROM images.
|
way of downloading large files, like CD-ROM images.
|
||||||
<para>
|
<para>
|
||||||
It is not true that UDP based protocols are unsecure. &fsp; provides
|
It is not true that UDP based protocols are unsecure. &fsp; provides
|
||||||
|
|
@ -241,7 +241,7 @@
|
||||||
<sect3 id="gethelpml">
|
<sect3 id="gethelpml">
|
||||||
<title>The Mailinglists</title>
|
<title>The Mailinglists</title>
|
||||||
<para>
|
<para>
|
||||||
For developing issue writte to the fsp-dev mainlinglist. For end-user questions
|
For developing issue write to the fsp-dev mainlinglist. For end-user questions
|
||||||
and questions on how to configure your server/client write to the fsp-user Mailinglist.
|
and questions on how to configure your server/client write to the fsp-user Mailinglist.
|
||||||
You can find more information on how to subscribe/unsubscribe to the mailinglist and
|
You can find more information on how to subscribe/unsubscribe to the mailinglist and
|
||||||
the archive on the
|
the archive on the
|
||||||
|
|
@ -327,8 +327,10 @@
|
||||||
<para>
|
<para>
|
||||||
FSP development started in a very old days. From source code and man
|
FSP development started in a very old days. From source code and man
|
||||||
page time stamps we can see that it was working and alive in 1988.
|
page time stamps we can see that it was working and alive in 1988.
|
||||||
FSP versions 1.0 and 2.0 was born in Dec 1991. After that two first
|
FSP versions 1.0 and 2.0 was born in Dec 1991. Release 2.0 was just
|
||||||
releases FSP goes to the active life.
|
bufixed 1.0 but includes man pages. After that two first
|
||||||
|
releases FSP goes to the active life. People starts using it because
|
||||||
|
it was superior to anonymous FTP at that time.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
FSP active development era ends in May 1993 when last official
|
FSP active development era ends in May 1993 when last official
|
||||||
|
|
@ -347,14 +349,21 @@
|
||||||
This version is used on some servers today because Debian Woody has it.
|
This version is used on some servers today because Debian Woody has it.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Last official stable FSP version was 2.7.1. This is still
|
Last official stable FSP version was still 2.7.1 from May '93.
|
||||||
used on some forgotten machines in universities today. It has also
|
This is still used on some forgotten machines in universities today.
|
||||||
|
It has also
|
||||||
known security issue (fspd follows all symlinks), but at this
|
known security issue (fspd follows all symlinks), but at this
|
||||||
time this was viewed as feature, not a bug.
|
time this was viewed as feature, not a bug.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Radim Kolar released 2.8.1b4 in 2001, which was just some bugfixed
|
Radim Kolar released 2.8.1b4 in 2001, which was just some bugfixed
|
||||||
version of 2.8.1b3 untouched from 1997 when I ported it to OS/2.
|
version of 2.8.1b3 untouched from 1997 when I ported it to OS/2.
|
||||||
|
|
||||||
|
<para>
|
||||||
|
With wireless networks Wi-Fi boom in 2002, it becomes clear that
|
||||||
|
large wireless networks can have quite a high packet loss rate
|
||||||
|
and TCP protocol is not very suitable for them.
|
||||||
|
<para>
|
||||||
Active working on FSP again starts on 25 June 2003 when Version
|
Active working on FSP again starts on 25 June 2003 when Version
|
||||||
2.8.1b5 goes out. Major parts of FSP server code was rewrited
|
2.8.1b5 goes out. Major parts of FSP server code was rewrited
|
||||||
for higher performance and many old bugs in FSP code fixed.
|
for higher performance and many old bugs in FSP code fixed.
|
||||||
|
|
@ -373,7 +382,7 @@
|
||||||
on the mailinglists or via e-mail <email>hsn@no.spam.sendmail.cz</email>.
|
on the mailinglists or via e-mail <email>hsn@no.spam.sendmail.cz</email>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Since September 2003 Sven Hoexter is working on parts of the documentation.
|
Since September 2003 Sven Hoexter is working on parts of the documentation and code. He is also doing release management and RPM, deb packaging.
|
||||||
You can reach him on the mailinglists or via e-mail
|
You can reach him on the mailinglists or via e-mail
|
||||||
<email>sven@du-gehoerst-mir.de-nospam</email>.
|
<email>sven@du-gehoerst-mir.de-nospam</email>.
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
@ -436,12 +445,12 @@
|
||||||
line arguments to fspd.
|
line arguments to fspd.
|
||||||
<para>
|
<para>
|
||||||
If you need additional features, such as
|
If you need additional features, such as
|
||||||
logging, you will need to know <xref linkend="fspd.conf">
|
logging, you will need to have <xref linkend="fspd.conf">
|
||||||
</para>
|
</para>
|
||||||
<sect2 id="installserver">
|
<sect2 id="installserver">
|
||||||
<title>How to install fsp server</title>
|
<title>How to install fsp server</title>
|
||||||
<para>
|
<para>
|
||||||
See <xref linkend="installation"> first.
|
FSP server is included in main FSP package. See <xref linkend="installation"> first. FSP server for windows is in the <xref linkend="lamerpack">.
|
||||||
<para>
|
<para>
|
||||||
Server can be installed as inetd service or standalone. I prefer
|
Server can be installed as inetd service or standalone. I prefer
|
||||||
inetd installation, because modification of system startup
|
inetd installation, because modification of system startup
|
||||||
|
|
@ -454,12 +463,15 @@
|
||||||
<title>How to quickly install fsp server</title>
|
<title>How to quickly install fsp server</title>
|
||||||
<para>
|
<para>
|
||||||
Add following line to your /etc/inetd.conf
|
Add following line to your /etc/inetd.conf
|
||||||
<programlisting>
|
<programlisting>
|
||||||
ftp dgram udp wait ftp /usr/local/bin/fspd in.fspd -d /home/ftp
|
ftp dgram udp wait ftp /usr/local/bin/fspd in.fspd -d /home/ftp
|
||||||
</programlisting>
|
</programlisting>
|
||||||
This easy setup will run fsp server on standard port 21, home directory set to /home/ftp and effective user set to ftp. If you do not have configured
|
This easy setup will run fsp server on standard port 21, home directory set to /home/ftp and effective user set to ftp. If you do not have configured
|
||||||
temporary directory in fspd.conf, fsp server will run in read-only
|
temporary directory in fspd.conf, fsp server will run in read-only
|
||||||
mode.
|
mode.
|
||||||
|
<para>
|
||||||
|
Some inetd server uses slightly different syntax of inetd.conf
|
||||||
|
file. Consult your local man pages for inetd and inetd.conf.
|
||||||
<sect2 id="fspd.conf">
|
<sect2 id="fspd.conf">
|
||||||
<title>How to setup a basic fspd.conf</title>
|
<title>How to setup a basic fspd.conf</title>
|
||||||
<para>
|
<para>
|
||||||
|
|
@ -526,16 +538,45 @@
|
||||||
multiple client programs in FSP protocol suite. If you are at least
|
multiple client programs in FSP protocol suite. If you are at least
|
||||||
somewhat familiar with command line FTP and want to try FSP, this
|
somewhat familiar with command line FTP and want to try FSP, this
|
||||||
program is right for you.
|
program is right for you.
|
||||||
|
<para>
|
||||||
|
The old, real hackers prefers <xref linkend="fsptoolchain">, because
|
||||||
|
fspclient is just 'fsp for lamah'.
|
||||||
<para>
|
<para>
|
||||||
FSP client homepage is <ulink url="http://fspclient.sourceforge.net">http://fspclient.sourceforge.net</ulink>.
|
FSP client homepage is <ulink url="http://fspclient.sourceforge.net">http://fspclient.sourceforge.net</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
<sect2 id="gui">
|
<sect2 id="gui">
|
||||||
<title>Using FSP in browser</title>
|
<title>FSP PROXY: Using FSP in browser</title>
|
||||||
<para>
|
<para>
|
||||||
If you want a GUI, the easiest way is to use FSP directly
|
If you want a GUI, the easiest way is to use FSP directly
|
||||||
from your web browser.
|
from your web browser. This is recommended method for using FSP
|
||||||
|
by standard BFU users. They can handle web browser well -- no
|
||||||
|
extra education is necessary.
|
||||||
|
<para>
|
||||||
You need to download and install <ulink url="http://fsp.sf.net/javalib.html">FSP Java LIB</ulink> and <ulink url="http://fsp.sf.net/fsproxy.html">Proxy server</ulink>. Read included docs for install instructions.
|
You need to download and install <ulink url="http://fsp.sf.net/javalib.html">FSP Java LIB</ulink> and <ulink url="http://fsp.sf.net/fsproxy.html">Proxy server</ulink>. Read included docs for install instructions.
|
||||||
|
<sect2 id="dmachine">
|
||||||
|
<title>Download Machine</title>
|
||||||
|
<para>
|
||||||
|
Download Machine is non interactive, non graphical, batch download
|
||||||
|
manager. Tired of GUI Download managers and mouse clicking?
|
||||||
|
Then Download Machine is just for YOU!
|
||||||
|
<para>
|
||||||
|
Download Machine is written in portable Java 1.1 code and supports
|
||||||
|
<ulink url="http://www.w3.org/Protocols/">HTTP</ulink>,
|
||||||
|
FTP and <ulink url="http://fsp.sourceforge.net/">FSP</ulink>
|
||||||
|
protocols.
|
||||||
|
<sect2 id="lamerpack">
|
||||||
|
<title>FSP Win32 Suite</title>
|
||||||
|
<para>
|
||||||
|
Special, easy to use, starting suite targeted at common Windows users.
|
||||||
|
Suite contains 3 valueable items:
|
||||||
|
Easy to use fsp server (works without configration file),
|
||||||
|
windows version of fspclient and
|
||||||
|
Lamah starting guide to FSP.
|
||||||
|
<para>
|
||||||
|
This package is downloadable from
|
||||||
|
<ulink url="http://sourceforge.net/project/showfiles.php?group_id=93841&package_id=133839">Source Forge</ulink> and requires cygwin dll library
|
||||||
|
not included in the package.
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- end how to use the client -->
|
<!-- end how to use the client -->
|
||||||
|
|
||||||
|
|
@ -556,7 +597,8 @@
|
||||||
reliable underlying transport. FSP can operate even without
|
reliable underlying transport. FSP can operate even without
|
||||||
any Layer 2 and Layer 3 transports only with some extra features
|
any Layer 2 and Layer 3 transports only with some extra features
|
||||||
disabled. FSP can be implemented in all kinds of environments.
|
disabled. FSP can be implemented in all kinds of environments.
|
||||||
This makes FSP very suitable for embedded devices area.
|
This makes FSP very suitable for embedded devices area, because
|
||||||
|
it is easier to implement than other transfer protocols like X-Modem.
|
||||||
<para>
|
<para>
|
||||||
When used in TCP/IP based networks,
|
When used in TCP/IP based networks,
|
||||||
UDP is used for transporting of FSP datagrams, this lowers protocol
|
UDP is used for transporting of FSP datagrams, this lowers protocol
|
||||||
|
|
@ -570,7 +612,7 @@
|
||||||
FSP protocol is very simple to implement.
|
FSP protocol is very simple to implement.
|
||||||
</sect2>
|
</sect2>
|
||||||
<sect2 id="keying">
|
<sect2 id="keying">
|
||||||
<title>Network bandwidth protection</title>
|
<title>Keying: Network bandwidth protection</title>
|
||||||
<para>
|
<para>
|
||||||
One of interesting parts of underlying network technology used
|
One of interesting parts of underlying network technology used
|
||||||
by FSP is how protocol design restrict user from sending
|
by FSP is how protocol design restrict user from sending
|
||||||
|
|
@ -584,7 +626,8 @@
|
||||||
<para>
|
<para>
|
||||||
Server remembers for each IP not only nextkey, but also previous
|
Server remembers for each IP not only nextkey, but also previous
|
||||||
key. When packet's key matches previously stored key -- it is
|
key. When packet's key matches previously stored key -- it is
|
||||||
resend from client.
|
resend from client. Server limits replies to resend packets also.
|
||||||
|
Max. allowed reply rate to resend packets is 1 reply per 3 seconds.
|
||||||
This method also allows ignore duplicate requests by server for
|
This method also allows ignore duplicate requests by server for
|
||||||
action which should not be done more than once (for example mkdir).
|
action which should not be done more than once (for example mkdir).
|
||||||
<para>
|
<para>
|
||||||
|
|
@ -599,18 +642,55 @@
|
||||||
by computing packet loss ratio of network, and duplicate
|
by computing packet loss ratio of network, and duplicate
|
||||||
packet rate.
|
packet rate.
|
||||||
<sect2>
|
<sect2>
|
||||||
|
<title>Client side locking</title>
|
||||||
|
<para>
|
||||||
|
FSP server has its secret keys database divided by client ip address,
|
||||||
|
not by client:port. All requests comming from the same machine must
|
||||||
|
shares the same secret key. This is done for bandwidth protection.
|
||||||
|
<para>
|
||||||
|
Client must submit a valid key with request. Where there are 2 programs
|
||||||
|
runnings on the client PC and both wants to talk to the same FSPD at once,
|
||||||
|
they must exchange knowledge of this secret key between themselfs.
|
||||||
|
If they don't, only one program can talk to the FSPD, because others do not
|
||||||
|
knows the next session key. They can try to talk but fspd will ignore them.
|
||||||
|
This is kind of client-side multiplexing.
|
||||||
|
<para>
|
||||||
|
There are several methods how to do this key sharing. Best method is
|
||||||
|
to use semop+shmget, second is to use lockf on file in /tmp. All FSP
|
||||||
|
clients running on the same machine must use the same locking method.
|
||||||
|
<sect2>
|
||||||
<title>Why not use bigger packet size?</title>
|
<title>Why not use bigger packet size?</title>
|
||||||
<para>
|
<para>
|
||||||
&fsp; defines maximum packet size 1024 bytes of data + header.
|
&fsp; defines maximum packet size 1024 bytes of data + header.
|
||||||
|
All FSP compatible protocol stacks must support this packet size.
|
||||||
|
Nearly all networks can transfer 1036 bytes long UDP packets.
|
||||||
|
Some networks allows only 512 bytes long UDP (maximal size required
|
||||||
|
by RFC). To use FSP on that networks, fsp clients must be configured
|
||||||
|
to use only 500 bytes of payload.
|
||||||
|
<para>
|
||||||
Because MTU of most networks is about 1500 bytes. It is true, that
|
Because MTU of most networks is about 1500 bytes. It is true, that
|
||||||
we can use slightly bigger packets for gaining some speed.
|
we can use slightly bigger packets for gaining some speed. FSP
|
||||||
|
server can optionally support larger packet size, but must send
|
||||||
|
them out only on explicit client request.
|
||||||
|
<para>
|
||||||
We have performed some benchmarks and they shows only minor
|
We have performed some benchmarks and they shows only minor
|
||||||
performance increase, about 10-15 percent. Similar testing
|
performance increase, about 10-15 percent. Similar testing
|
||||||
was performed by HP in <ulink url="http://www.ietf.org/rfc/rfc2348.txt">RFC 2348</ulink>.
|
was performed by HP in <ulink url="http://www.ietf.org/rfc/rfc2348.txt">RFC 2348</ulink>.
|
||||||
<para>
|
<para>
|
||||||
For bigger performance enhancement we need to use at least 2KB,
|
For bigger performance enhancement we need to use at least 2.5 KB,
|
||||||
but packets of that size must be fragmented on most network and fragmenting increases possibility of packet loss. We will not increase packet size
|
but packets of that size must be fragmented on most network and fragmenting increases possibility of packet loss.
|
||||||
in FSP v2 codebase, but we are willing to do some experiments in FSP v3.
|
<sect2 id="prog">
|
||||||
|
<title>Using FSP in your programs</title>
|
||||||
|
<para>
|
||||||
|
You can easily add support for FSP v2 protocol into your programs.
|
||||||
|
Currently exists two independend libraries for FSP protocol support
|
||||||
|
and one library is in the work.
|
||||||
|
<para>
|
||||||
|
First library is called <ulink url="http://fsp.sourceforge.net/javalib.html">JFSPlib</ulink>. This is FSP library for Java language.
|
||||||
|
<para>
|
||||||
|
Second library is called <ulink url="http://fsp.sourceforge.net/fsplib.html">FSPlib</ulink>. This is FSP library for C language with POSIX-like API.
|
||||||
|
<para>
|
||||||
|
FSP support for Python <ulink url="http://fsp.sourceforge.net/pyfsp.html">PyFSP</ulink> is currently work in progress. Note: PyFSP uses GPL license, not MIT/X11 like other libraries.
|
||||||
</sect1>
|
</sect1>
|
||||||
</article>
|
</article>
|
||||||
<!-- vim: set expandtab: -->
|
<!-- vim: set expandtab: -->
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ UBUF *client_interact (unsigned char, unsigned long, unsigned int,
|
||||||
void init_client (const char *, unsigned short, unsigned short);
|
void init_client (const char *, unsigned short, unsigned short);
|
||||||
int client_done (void);
|
int client_done (void);
|
||||||
void client_finish(void);
|
void client_finish(void);
|
||||||
|
extern unsigned long stat_resends, stat_iresends, stat_dupes, stat_bad, stat_ok;
|
||||||
|
|
||||||
/* lock.c */
|
/* lock.c */
|
||||||
extern int key_persists;
|
extern int key_persists;
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,8 @@
|
||||||
|
|
||||||
#define UBUF_HSIZE 12 /* 12 bytes for the header */
|
#define UBUF_HSIZE 12 /* 12 bytes for the header */
|
||||||
#define UBUF_SPACE 1024 /* maximum standard payload. */
|
#define UBUF_SPACE 1024 /* maximum standard payload. */
|
||||||
#define UBUF_MAXSPACE 2800 /* maximum payload supported by server */
|
#define UBUF_MAXSPACE 4096 /* maximum payload supported by server */
|
||||||
|
#define DEFAULT_SPACE 1200 /* Default packet size */
|
||||||
|
|
||||||
#define NBSIZE (UBUF_MAXSPACE+UBUF_SPACE)
|
#define NBSIZE (UBUF_MAXSPACE+UBUF_SPACE)
|
||||||
|
|
||||||
|
|
|
||||||
20
man/fbye.1
Normal file
20
man/fbye.1
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
.TH FBYE 1 "Dec 2004" FSP
|
||||||
|
.SH NAME
|
||||||
|
fbye \- terminates session with FSP database
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B fver
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.LP
|
||||||
|
Command
|
||||||
|
.B fbye
|
||||||
|
terminates active session with FSP server database. Using this command
|
||||||
|
is not neceseary, because session times out after at most 60 seconds of
|
||||||
|
inactivity. Main use of this command is to remove cached session keys.
|
||||||
|
.SH ENVIRONMENT
|
||||||
|
.LP
|
||||||
|
See fsp_env(7) for list of used environment variables.
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.PD
|
||||||
|
fcatcmd(1), fcdcmd(1), fgetcmd(1), fgrabcmd(1), flscmd(1), fmkdir(1),
|
||||||
|
fprocmd(1), fput(1), frmcmd(1), frmdircmd(1), fver(1), fducmd(1),
|
||||||
|
fhostcmd(1), fspd(1), fsp_prof(5), ffindcmd(1), fsp_env(7)
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
.TH "FSP ENVIRONMENT" 7 "Oct 2004" FSP "FSP Environment Variables"
|
.TH "FSP ENVIRONMENT" 7 "Dec 2004" FSP "FSP Environment Variables"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
Environment variables used by FSP Clients programs
|
Environment variables used by FSP Clients programs
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|
@ -55,7 +55,8 @@ The default value is 360.
|
||||||
No function if program was compiled without timeout code.
|
No function if program was compiled without timeout code.
|
||||||
.TP
|
.TP
|
||||||
.B FSP_DELAY
|
.B FSP_DELAY
|
||||||
Minimum wait time before resending packet in milliseconds.
|
Minimum wait time before resending packet in milliseconds. This should
|
||||||
|
be set close to expected round trip time.
|
||||||
.TP
|
.TP
|
||||||
.B FSP_MAXDELAY
|
.B FSP_MAXDELAY
|
||||||
Maximum wait time before resending packet in milliseconds.
|
Maximum wait time before resending packet in milliseconds.
|
||||||
|
|
|
||||||
10
man/fspd.1
10
man/fspd.1
|
|
@ -1,4 +1,4 @@
|
||||||
.TH FSPD 1 "18 Oct 2004" FSP
|
.TH FSPD 1 "Dec 2004" FSP
|
||||||
.SH NAME
|
.SH NAME
|
||||||
fspd, in.fspd \- File Service Protocol (FSP) server
|
fspd, in.fspd \- File Service Protocol (FSP) server
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|
@ -83,7 +83,7 @@ bytes per second.
|
||||||
.B -s packetsize
|
.B -s packetsize
|
||||||
Sets maximum allowed packet size or prefered packet size. Server must
|
Sets maximum allowed packet size or prefered packet size. Server must
|
||||||
support packets up to 1024, but may prefer to send smaller packets.
|
support packets up to 1024, but may prefer to send smaller packets.
|
||||||
It may accept packets over 1024 bytes. Default value is 1024 bytes.
|
It may accept packets over 1024 bytes. Default value is 1200 bytes.
|
||||||
|
|
||||||
.LP
|
.LP
|
||||||
.SH FILES
|
.SH FILES
|
||||||
|
|
@ -102,7 +102,7 @@ A text file that is sent to the client when the directory is entered giving
|
||||||
information about the directory. It can only be hand created by the site
|
information about the directory. It can only be hand created by the site
|
||||||
administrator at this time. This text file should be no more than 1022
|
administrator at this time. This text file should be no more than 1022
|
||||||
bytes in size. Any data above this limit will be silently ignored. Name
|
bytes in size. Any data above this limit will be silently ignored. Name
|
||||||
of this file can be configured.
|
of this file can be changed in server configuration file.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B .FSP_OK_DEL
|
.B .FSP_OK_DEL
|
||||||
|
|
@ -180,7 +180,7 @@ to create it.
|
||||||
.B SIGINT | SIGTERM
|
.B SIGINT | SIGTERM
|
||||||
Server performs cleaup and exits. All connected clients will be
|
Server performs cleaup and exits. All connected clients will be
|
||||||
disconnected. Because FSP is stateless protocol, if you start
|
disconnected. Because FSP is stateless protocol, if you start
|
||||||
server later, than can continue without breakage.
|
server later, clients can continue without breakage.
|
||||||
|
|
||||||
.SH EXIT CODES
|
.SH EXIT CODES
|
||||||
.B 1
|
.B 1
|
||||||
|
|
@ -211,4 +211,4 @@ Internal terror
|
||||||
.PD
|
.PD
|
||||||
fcatcmd(1), fcdcmd(1), fgetcmd(1), fgrabcmd(1), flscmd(1), fmkdir(1),
|
fcatcmd(1), fcdcmd(1), fgetcmd(1), fgrabcmd(1), flscmd(1), fmkdir(1),
|
||||||
fprocmd(1), fput(1), frmcmd(1), frmdircmd(1), fver(1), fducmd(1),
|
fprocmd(1), fput(1), frmcmd(1), frmdircmd(1), fver(1), fducmd(1),
|
||||||
fhostcmd(1), fspd(1), fsp_prof(5), ffindcmd(1)
|
fhostcmd(1), fspd(1), fsp_prof(5), ffindcmd(1), fbye(1), fmvcmd(1)
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ int use_directory_mtime =
|
||||||
1;
|
1;
|
||||||
#endif
|
#endif
|
||||||
unsigned int maxthcallowed = 0;
|
unsigned int maxthcallowed = 0;
|
||||||
unsigned short packetsize = UBUF_SPACE;
|
unsigned short packetsize = DEFAULT_SPACE;
|
||||||
time_t retry_timeout = 3;
|
time_t retry_timeout = 3;
|
||||||
time_t session_timeout = 60;
|
time_t session_timeout = 60;
|
||||||
time_t stat_cache_timeout = 25;
|
time_t stat_cache_timeout = 25;
|
||||||
|
|
@ -187,7 +187,7 @@ static void read_configuration (const char * name)
|
||||||
else if(strcasecmp(p, "packetsize") == 0) {
|
else if(strcasecmp(p, "packetsize") == 0) {
|
||||||
packetsize = atoi(q);
|
packetsize = atoi(q);
|
||||||
if(packetsize == 0)
|
if(packetsize == 0)
|
||||||
packetsize = UBUF_SPACE;
|
packetsize = DEFAULT_SPACE;
|
||||||
else
|
else
|
||||||
if(packetsize < 64 )
|
if(packetsize < 64 )
|
||||||
packetsize = 64;
|
packetsize = 64;
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ static void check_required_vars (void)
|
||||||
packetsize = UBUF_MAXSPACE;
|
packetsize = UBUF_MAXSPACE;
|
||||||
else
|
else
|
||||||
if (packetsize == 0)
|
if (packetsize == 0)
|
||||||
packetsize = UBUF_SPACE;
|
packetsize = DEFAULT_SPACE;
|
||||||
else
|
else
|
||||||
if(packetsize < 64)
|
if(packetsize < 64)
|
||||||
packetsize = 64;
|
packetsize = 64;
|
||||||
|
|
@ -125,6 +125,10 @@ static void check_required_vars (void)
|
||||||
|
|
||||||
static void init_random (void)
|
static void init_random (void)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_SRANDOMDEV
|
||||||
|
|
||||||
|
srandomdev();
|
||||||
|
#else
|
||||||
unsigned int seed;
|
unsigned int seed;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
|
|
@ -137,6 +141,7 @@ static void init_random (void)
|
||||||
seed=getpid()*time(NULL);
|
seed=getpid()*time(NULL);
|
||||||
|
|
||||||
srandom(seed);
|
srandom(seed);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int main (int argc, char ** argv)
|
int main (int argc, char ** argv)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user