version 1.25, 2000/04/12 07:45:44 |
version 1.26, 2000/04/14 10:30:32 |
|
|
/* |
/* |
* |
* |
* readconf.c |
* readconf.c |
* |
* |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* |
* |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
* All rights reserved |
* All rights reserved |
* |
* |
* Created: Sat Apr 22 00:03:10 1995 ylo |
* Created: Sat Apr 22 00:03:10 1995 ylo |
* |
* |
* Functions for reading the configuration files. |
* Functions for reading the configuration files. |
* |
* |
*/ |
*/ |
|
|
#include "includes.h" |
#include "includes.h" |
|
|
* error. |
* error. |
*/ |
*/ |
|
|
void |
void |
add_local_forward(Options *options, u_short port, const char *host, |
add_local_forward(Options *options, u_short port, const char *host, |
u_short host_port) |
u_short host_port) |
{ |
{ |
|
|
* an error. |
* an error. |
*/ |
*/ |
|
|
void |
void |
add_remote_forward(Options *options, u_short port, const char *host, |
add_remote_forward(Options *options, u_short port, const char *host, |
u_short host_port) |
u_short host_port) |
{ |
{ |
|
|
* returns if the token is not known. |
* returns if the token is not known. |
*/ |
*/ |
|
|
static OpCodes |
static OpCodes |
parse_token(const char *cp, const char *filename, int linenum) |
parse_token(const char *cp, const char *filename, int linenum) |
{ |
{ |
unsigned int i; |
unsigned int i; |
|
|
* there is an error. If the file does not exist, this returns immediately. |
* there is an error. If the file does not exist, this returns immediately. |
*/ |
*/ |
|
|
void |
void |
read_config_file(const char *filename, const char *host, Options *options) |
read_config_file(const char *filename, const char *host, Options *options) |
{ |
{ |
FILE *f; |
FILE *f; |
|
|
* system config file. Last, fill_default_options is called. |
* system config file. Last, fill_default_options is called. |
*/ |
*/ |
|
|
void |
void |
initialize_options(Options * options) |
initialize_options(Options * options) |
{ |
{ |
memset(options, 'X', sizeof(*options)); |
memset(options, 'X', sizeof(*options)); |
|
|
* options for which no value has been specified with their default values. |
* options for which no value has been specified with their default values. |
*/ |
*/ |
|
|
void |
void |
fill_default_options(Options * options) |
fill_default_options(Options * options) |
{ |
{ |
if (options->forward_agent == -1) |
if (options->forward_agent == -1) |