28 /* Function prototypes */
32 int cf_length = 0; /* current length of control_file */
33 int sequence_number; /* sequence number for spooled file names */
34 struct config *cp; /* configuration information */
35 char username[9]; /* name of user */
36 int debug = 0; /* 1 = print debugging info; set with -D option */
38 int ftppassword, /* not used; just to avoid unresolved external */
39 bypass_passwd=0; /* whether to bypass the password check */
41 unsigned char path_name[_MAX_DRIVE+_MAX_DIR], /* character storage for the path name */
42 temp_str[20],s[_MAX_DIR],temp_data[30];
44 /* Do session initialization. Snetinit reads config file. */
50 ptr = getenv("CONFIG.TEL");
51 if (ptr != NULL) Shostfile(ptr);
53 if(i==-2) /* BOOTP server not responding */
54 netshut(); /* release network */
55 crash("network initialization failed.");
61 int ncsaopen( address, port )
62 unsigned long address;
71 bob = (unsigned char *) &address;
72 sprintf(s,"%u.%u.%u.%u\n",bob[0],bob[1],bob[2],bob[3]);
76 /* pick a source port at random from the set of privileged ports */
78 srand((unsigned)time(NULL));
80 source_port = rand() % MAX_PRIV_PORT;
81 handle = open_connection(mr, source_port, port);