ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/conf.C
(Generate patch)

Comparing gvpe/src/conf.C (file contents):
Revision 1.18 by pcg, Thu Oct 16 02:41:21 2003 UTC vs.
Revision 1.20 by pcg, Thu Oct 16 21:57:54 2003 UTC

97 97
98void configuration::init () 98void configuration::init ()
99{ 99{
100 memset (this, 0, sizeof (*this)); 100 memset (this, 0, sizeof (*this));
101 101
102 mtu = DEFAULT_MTU;
102 rekey = DEFAULT_REKEY; 103 rekey = DEFAULT_REKEY;
103 keepalive = DEFAULT_KEEPALIVE; 104 keepalive = DEFAULT_KEEPALIVE;
104 llevel = L_INFO; 105 llevel = L_INFO;
105 ip_proto = IPPROTO_GRE; 106 ip_proto = IPPROTO_GRE;
106#if ENABLE_ICMP 107#if ENABLE_ICMP
224 else 225 else
225 slog (L_WARN, "'%s': %s, at '%s' line %d", val, UNKNOWN_LOGLEVEL, fname, line); 226 slog (L_WARN, "'%s': %s, at '%s' line %d", val, UNKNOWN_LOGLEVEL, fname, line);
226 } 227 }
227 else if (!strcmp (var, "ip-proto")) 228 else if (!strcmp (var, "ip-proto"))
228 ip_proto = atoi (val); 229 ip_proto = atoi (val);
230 else if (!strcmp (var, "icmp-type"))
231 {
229#if ENABLE_ICMP 232#if ENABLE_ICMP
230 //TODO: error message
231 else if (!strcmp (var, "icmp-type"))
232 icmp_type = atoi (val); 233 icmp_type = atoi (val);
233#endif 234#endif
235 }
234 236
235 // per config 237 // per config
236 else if (!strcmp (var, "node")) 238 else if (!strcmp (var, "node"))
237 { 239 {
238 default_node.id++; 240 default_node.id++;
297 script_if_up = strdup (val); 299 script_if_up = strdup (val);
298 else if (!strcmp (var, "node-up")) 300 else if (!strcmp (var, "node-up"))
299 script_node_up = strdup (val); 301 script_node_up = strdup (val);
300 else if (!strcmp (var, "node-down")) 302 else if (!strcmp (var, "node-down"))
301 script_node_down = strdup (val); 303 script_node_down = strdup (val);
304 else if (!strcmp (var, "http-proxy-host"))
305 {
302#if ENABLE_HTTP_PROXY 306#if ENABLE_HTTP_PROXY
303 else if (!strcmp (var, "http-proxy-host"))
304 proxy_host = strdup (val); 307 proxy_host = strdup (val);
308#endif
309 }
305 else if (!strcmp (var, "http-proxy-port")) 310 else if (!strcmp (var, "http-proxy-port"))
311 {
312#if ENABLE_HTTP_PROXY
306 proxy_port = atoi (val); 313 proxy_port = atoi (val);
314#endif
315 }
307 else if (!strcmp (var, "http-proxy-auth")) 316 else if (!strcmp (var, "http-proxy-auth"))
317 {
318#if ENABLE_HTTP_PROXY
308 proxy_auth = (char *)base64_encode ((const u8 *)val, strlen (val)); 319 proxy_auth = (char *)base64_encode ((const u8 *)val, strlen (val));
309#endif 320#endif
321 }
310 322
311 /* node-specific, non-defaultable */ 323 /* node-specific, non-defaultable */
312 else if (node != &default_node && !strcmp (var, "hostname")) 324 else if (node != &default_node && !strcmp (var, "hostname"))
313 { 325 {
314 free (node->hostname); 326 free (node->hostname);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines