• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/netatalk-2.2.5/etc/afpd/

Lines Matching defs:options

6  * modified from main.c. this handles afp options.
149 /* initialize options */
150 void afp_options_init(struct afp_options *options)
152 memset(options, 0, sizeof(struct afp_options));
153 options->connections = 20;
154 options->pidfile = _PATH_AFPDLOCK;
155 options->defaultvol.name = _PATH_AFPDDEFVOL;
156 options->systemvol.name = _PATH_AFPDSYSVOL;
157 options->configfile = _PATH_AFPDCONF;
158 options->sigconffile = _PATH_AFPDSIGCONF;
159 options->uuidconf = _PATH_AFPDUUIDCONF;
160 options->uampath = _PATH_AFPDUAMPATH;
161 options->uamlist = "uams_dhx.so,uams_dhx2.so";
162 options->guest = "nobody";
163 options->loginmesg = "";
164 options->transports = AFPTRANS_TCP; /* TCP only */
165 options->passwdfile = _PATH_AFPDPWFILE;
166 options->tickleval = 30;
167 options->timeout = 4; /* 4 tickles = 2 minutes */
168 options->sleep = 10 * 60 * 2; /* 10 h in 30 seconds tick */
169 options->disconnected = 10 * 60 * 2; /* 10 h in 30 seconds tick */
170 options->server_notif = 1;
171 options->authprintdir = NULL;
172 options->signatureopt = "auto";
173 options->umask = 0;
175 options->admingid = 0;
177 options->k5service = NULL;
178 options->k5realm = NULL;
179 options->k5keytab = NULL;
180 options->unixcharset = CH_UNIX;
181 options->unixcodepage = "LOCALE";
182 options->maccharset = CH_MAC;
183 options->maccodepage = "MAC_ROMAN";
184 options->volnamelen = 80; /* spec: 255, 10.1: 73, 10.4/10.5: 80 */
185 options->ntdomain = NULL;
186 options->ntseparator = NULL;
189 options->flags |= OPTION_NOSLP;
191 options->dircachesize = DEFAULT_MAX_DIRCACHE_SIZE;
192 options->flags |= OPTION_ACL2MACCESS;
193 options->flags |= OPTION_UUID;
194 options->tcp_sndbuf = 0; /* 0 means don't change OS default */
195 options->tcp_rcvbuf = 0; /* 0 means don't change OS default */
196 options->dsireadbuf = 12;
197 options->mimicmodel = NULL;
198 options->fce_fmodwait = 60; /* put fmod events 60 seconds on hold */
199 options->adminauthuser = NULL;
208 * NOTE: this ignores unknown options
210 int afp_options_parseline(char *buf, struct afp_options *options)
216 options->server = opt;
220 options->flags &= ~OPTION_DEBUG;
223 options->flags &= ~OPTION_NOSLP;
227 options->flags |= OPTION_NOZEROCONF;
230 options->flags &= ~OPTION_USERVOLFIRST;
232 options->flags |= OPTION_USERVOLFIRST;
234 options->flags |= OPTION_NOUSERVOL;
236 options->flags &= ~OPTION_NOUSERVOL;
238 options->flags |= OPTION_PROXY;
240 options->flags &= ~OPTION_CUSTOMICON;
242 options->flags |= OPTION_CUSTOMICON;
244 options->flags |= OPTION_ANNOUNCESSH;
246 options->flags &= ~OPTION_ACL2MACCESS;
249 options->flags |= OPTION_KEEPSESSIONS;
254 options->passwdbits |= PASSWD_NOSAVE;
256 options->passwdbits &= ~PASSWD_NOSAVE;
258 options->passwdbits &= ~PASSWD_SET;
260 options->passwdbits |= PASSWD_SET;
264 options->transports = AFPTRANS_ALL;
266 options->transports = AFPTRANS_NONE;
268 options->transports |= AFPTRANS_TCP;
270 options->transports &= ~AFPTRANS_TCP;
272 options->transports |= AFPTRANS_DDP;
274 options->transports &= ~AFPTRANS_DDP;
276 options->server_notif = 0;
278 /* figure out options w/ values. currently, this will ignore the setting
284 memcpy(options->hostname, c, len);
285 options->hostname[len] = 0;
292 options->defaultvol.name = opt;
294 options->systemvol.name = opt;
308 options->loginmesg = opt;
312 options->guest = opt;
314 options->passwdfile = opt;
316 options->passwdminlen = MIN(1, atoi(c));
318 options->loginmaxfail = atoi(c);
320 options->tickleval = atoi(c);
321 if (options->tickleval <= 0) {
322 options->tickleval = 30;
326 options->timeout = atoi(c);
327 if (options->timeout <= 0) {
328 options->timeout = 4;
333 options->disconnected = options->sleep = atoi(c) * 120;
334 if (options->sleep <= 4) {
335 options->disconnected = options->sleep = 4;
340 options->dsireadbuf = atoi(c);
341 if (options->dsireadbuf < 6)
342 options->dsireadbuf = 6;
346 options->server_quantum = strtoul(c, NULL, 0);
349 options->volnamelen = atoi(c);
350 if (options->volnamelen < 8) {
351 options->volnamelen = 8; /* max mangled volname "???#FFFF" */
353 if (options->volnamelen > 255) {
354 options->volnamelen = 255; /* AFP3 spec */
365 /* hokey2: options->logconfig must be converted to store an array of logstrings */
366 if (options->logconfig)
367 free(options->logconfig);
368 options->logconfig = strdup(optstr);
381 options->admingid = gr->gr_gid;
387 options->k5service = opt;
389 options->k5realm = opt;
391 if ( NULL == (options->k5keytab = (char *) malloc(sizeof(char)*(strlen(c)+14)) )) {
395 snprintf(options->k5keytab, strlen(c)+14, "KRB5_KTNAME=%s", c);
396 putenv(options->k5keytab);
400 options->authprintdir = opt;
402 options->uampath = opt;
404 options->uamlist = opt;
412 options->ipaddr = opt;
418 options->ipaddr = strdup(c);
433 options->port = strdup(c);
436 atalk_aton(c, &options->ddpaddr);
439 options->signatureopt = opt;
450 options->fqdn = opt;
458 if ((charset_t)-1 == ( options->unixcharset = add_charset(c)) ) {
459 options->unixcharset = CH_UNIX;
464 options->unixcodepage = opt;
469 if ((charset_t)-1 == ( options->maccharset = add_charset(c)) ) {
470 options->maccharset = CH_MAC;
475 options->maccodepage = opt;
480 options->closevol= 1;
484 options->ntdomain = opt;
487 options->ntseparator = opt;
490 options->dircachesize = atoi(c);
493 options->tcp_sndbuf = atoi(c);
496 options->tcp_rcvbuf = atoi(c);
512 options->fce_fmodwait = atoi(c);
515 options->mimicmodel = opt;
518 options->adminauthuser = opt;
705 int afp_options_parse(int ac, char **av, struct afp_options *options)
714 if (gethostname(options->hostname, sizeof(options->hostname )) < 0 ) {
718 if (NULL != ( p = strchr(options->hostname, '.' )) ) {
734 options->flags |= OPTION_DEBUG;
737 options->server = optarg;
740 options->defaultvol.name = optarg;
743 options->systemvol.name = optarg;
746 options->flags |= OPTION_USERVOLFIRST;
749 options->connections = atoi( optarg );
752 options->guest = optarg;
756 options->pidfile = optarg;
760 options->passwdbits |= PASSWD_NOSAVE;
763 options->passwdbits |= PASSWD_SET;
767 options->transports &= ~AFPTRANS_DDP;
770 options->port = optarg;
773 options->transports &= ~AFPTRANS_TCP;
776 options->loginmesg = optarg;
779 options->configfile = optarg;
782 options->uamlist = optarg;
799 options->flags |= OPTION_CUSTOMICON;
802 options->umask = strtoul(optarg, &tmp, 8);
803 if ((options->umask > 0777)) {