diff options
Diffstat (limited to 'readconf.h')
-rw-r--r-- | readconf.h | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/readconf.h b/readconf.h index aeec53a75..d594a46d7 100644 --- a/readconf.h +++ b/readconf.h | |||
@@ -13,7 +13,7 @@ | |||
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
16 | /* RCSID("$Id: readconf.h,v 1.4 1999/11/24 13:26:22 damien Exp $"); */ | 16 | /* RCSID("$Id: readconf.h,v 1.5 1999/11/25 00:54:59 damien Exp $"); */ |
17 | 17 | ||
18 | #ifndef READCONF_H | 18 | #ifndef READCONF_H |
19 | #define READCONF_H | 19 | #define READCONF_H |
@@ -85,42 +85,53 @@ typedef struct { | |||
85 | } Options; | 85 | } Options; |
86 | 86 | ||
87 | 87 | ||
88 | /* Initializes options to special values that indicate that they have not | 88 | /* |
89 | yet been set. Read_config_file will only set options with this value. | 89 | * Initializes options to special values that indicate that they have not yet |
90 | Options are processed in the following order: command line, user config | 90 | * been set. Read_config_file will only set options with this value. Options |
91 | file, system config file. Last, fill_default_options is called. */ | 91 | * are processed in the following order: command line, user config file, |
92 | * system config file. Last, fill_default_options is called. | ||
93 | */ | ||
92 | void initialize_options(Options * options); | 94 | void initialize_options(Options * options); |
93 | 95 | ||
94 | /* Called after processing other sources of option data, this fills those | 96 | /* |
95 | options for which no value has been specified with their default values. */ | 97 | * Called after processing other sources of option data, this fills those |
98 | * options for which no value has been specified with their default values. | ||
99 | */ | ||
96 | void fill_default_options(Options * options); | 100 | void fill_default_options(Options * options); |
97 | 101 | ||
98 | /* Processes a single option line as used in the configuration files. | 102 | /* |
99 | This only sets those values that have not already been set. | 103 | * Processes a single option line as used in the configuration files. This |
100 | Returns 0 for legal options */ | 104 | * only sets those values that have not already been set. Returns 0 for legal |
105 | * options | ||
106 | */ | ||
101 | int | 107 | int |
102 | process_config_line(Options * options, const char *host, | 108 | process_config_line(Options * options, const char *host, |
103 | char *line, const char *filename, int linenum, | 109 | char *line, const char *filename, int linenum, |
104 | int *activep); | 110 | int *activep); |
105 | 111 | ||
106 | /* Reads the config file and modifies the options accordingly. Options should | 112 | /* |
107 | already be initialized before this call. This never returns if there | 113 | * Reads the config file and modifies the options accordingly. Options |
108 | is an error. If the file does not exist, this returns immediately. */ | 114 | * should already be initialized before this call. This never returns if |
115 | * there is an error. If the file does not exist, this returns immediately. | ||
116 | */ | ||
109 | void | 117 | void |
110 | read_config_file(const char *filename, const char *host, | 118 | read_config_file(const char *filename, const char *host, |
111 | Options * options); | 119 | Options * options); |
112 | 120 | ||
113 | /* Adds a local TCP/IP port forward to options. Never returns if there | 121 | /* |
114 | is an error. */ | 122 | * Adds a local TCP/IP port forward to options. Never returns if there is an |
123 | * error. | ||
124 | */ | ||
115 | void | 125 | void |
116 | add_local_forward(Options * options, int port, const char *host, | 126 | add_local_forward(Options * options, int port, const char *host, |
117 | int host_port); | 127 | int host_port); |
118 | 128 | ||
119 | /* Adds a remote TCP/IP port forward to options. Never returns if there | 129 | /* |
120 | is an error. */ | 130 | * Adds a remote TCP/IP port forward to options. Never returns if there is |
131 | * an error. | ||
132 | */ | ||
121 | void | 133 | void |
122 | add_remote_forward(Options * options, int port, const char *host, | 134 | add_remote_forward(Options * options, int port, const char *host, |
123 | int host_port); | 135 | int host_port); |
124 | 136 | ||
125 | |||
126 | #endif /* READCONF_H */ | 137 | #endif /* READCONF_H */ |