diff options
Diffstat (limited to 'servconf.h')
-rw-r--r-- | servconf.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/servconf.h b/servconf.h index 66ba387dd..2ffaecdcd 100644 --- a/servconf.h +++ b/servconf.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: servconf.h,v 1.100 2012/04/12 02:42:32 djm Exp $ */ | 1 | /* $OpenBSD: servconf.h,v 1.101 2012/05/13 01:42:32 dtucker Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -170,6 +170,16 @@ typedef struct { | |||
170 | char *version_addendum; /* Appended to SSH banner */ | 170 | char *version_addendum; /* Appended to SSH banner */ |
171 | } ServerOptions; | 171 | } ServerOptions; |
172 | 172 | ||
173 | /* Information about the incoming connection as used by Match */ | ||
174 | struct connection_info { | ||
175 | const char *user; | ||
176 | const char *host; /* possibly resolved hostname */ | ||
177 | const char *address; /* remote address */ | ||
178 | const char *laddress; /* local address */ | ||
179 | int lport; /* local port */ | ||
180 | }; | ||
181 | |||
182 | |||
173 | /* | 183 | /* |
174 | * These are string config options that must be copied between the | 184 | * These are string config options that must be copied between the |
175 | * Match sub-config and the main config, and must be sent from the | 185 | * Match sub-config and the main config, and must be sent from the |
@@ -184,15 +194,17 @@ typedef struct { | |||
184 | M_CP_STRARRAYOPT(authorized_keys_files, num_authkeys_files); \ | 194 | M_CP_STRARRAYOPT(authorized_keys_files, num_authkeys_files); \ |
185 | } while (0) | 195 | } while (0) |
186 | 196 | ||
197 | struct connection_info *get_connection_info(int, int); | ||
187 | void initialize_server_options(ServerOptions *); | 198 | void initialize_server_options(ServerOptions *); |
188 | void fill_default_server_options(ServerOptions *); | 199 | void fill_default_server_options(ServerOptions *); |
189 | int process_server_config_line(ServerOptions *, char *, const char *, int, | 200 | int process_server_config_line(ServerOptions *, char *, const char *, int, |
190 | int *, const char *, const char *, const char *); | 201 | int *, struct connection_info *); |
191 | void load_server_config(const char *, Buffer *); | 202 | void load_server_config(const char *, Buffer *); |
192 | void parse_server_config(ServerOptions *, const char *, Buffer *, | 203 | void parse_server_config(ServerOptions *, const char *, Buffer *, |
193 | const char *, const char *, const char *); | 204 | struct connection_info *); |
194 | void parse_server_match_config(ServerOptions *, const char *, const char *, | 205 | void parse_server_match_config(ServerOptions *, struct connection_info *); |
195 | const char *); | 206 | int parse_server_match_testspec(struct connection_info *, char *); |
207 | int server_match_spec_complete(struct connection_info *); | ||
196 | void copy_set_server_options(ServerOptions *, ServerOptions *, int); | 208 | void copy_set_server_options(ServerOptions *, ServerOptions *, int); |
197 | void dump_config(ServerOptions *); | 209 | void dump_config(ServerOptions *); |
198 | char *derelativise_path(const char *); | 210 | char *derelativise_path(const char *); |