diff options
Diffstat (limited to 'networking/udhcp/files.c')
-rw-r--r-- | networking/udhcp/files.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c index cf55a6b5c..ff63111c9 100644 --- a/networking/udhcp/files.c +++ b/networking/udhcp/files.c | |||
@@ -1,11 +1,11 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | 2 | /* |
3 | * files.c -- DHCP server file manipulation * | 3 | * DHCP server config and lease file manipulation |
4 | * | ||
4 | * Rewrite by Russ Dill <Russ.Dill@asu.edu> July 2001 | 5 | * Rewrite by Russ Dill <Russ.Dill@asu.edu> July 2001 |
5 | * | 6 | * |
6 | * Licensed under GPLv2, see file LICENSE in this tarball for details. | 7 | * Licensed under GPLv2, see file LICENSE in this tarball for details. |
7 | */ | 8 | */ |
8 | |||
9 | #include <netinet/ether.h> | 9 | #include <netinet/ether.h> |
10 | 10 | ||
11 | #include "common.h" | 11 | #include "common.h" |
@@ -72,28 +72,28 @@ struct config_keyword { | |||
72 | }; | 72 | }; |
73 | 73 | ||
74 | static const struct config_keyword keywords[] = { | 74 | static const struct config_keyword keywords[] = { |
75 | /* keyword handler variable address default */ | 75 | /* keyword handler variable address default */ |
76 | {"start", udhcp_str2nip, &(server_config.start_ip), "192.168.0.20"}, | 76 | {"start" , udhcp_str2nip , &server_config.start_ip , "192.168.0.20"}, |
77 | {"end", udhcp_str2nip, &(server_config.end_ip), "192.168.0.254"}, | 77 | {"end" , udhcp_str2nip , &server_config.end_ip , "192.168.0.254"}, |
78 | {"interface", read_str, &(server_config.interface), "eth0"}, | 78 | {"interface" , read_str , &server_config.interface , "eth0"}, |
79 | /* Avoid "max_leases value not sane" warning by setting default | 79 | /* Avoid "max_leases value not sane" warning by setting default |
80 | * to default_end_ip - default_start_ip + 1: */ | 80 | * to default_end_ip - default_start_ip + 1: */ |
81 | {"max_leases", read_u32, &(server_config.max_leases), "235"}, | 81 | {"max_leases" , read_u32 , &server_config.max_leases , "235"}, |
82 | {"auto_time", read_u32, &(server_config.auto_time), "7200"}, | 82 | {"auto_time" , read_u32 , &server_config.auto_time , "7200"}, |
83 | {"decline_time", read_u32, &(server_config.decline_time), "3600"}, | 83 | {"decline_time" , read_u32 , &server_config.decline_time , "3600"}, |
84 | {"conflict_time",read_u32, &(server_config.conflict_time),"3600"}, | 84 | {"conflict_time", read_u32 , &server_config.conflict_time, "3600"}, |
85 | {"offer_time", read_u32, &(server_config.offer_time), "60"}, | 85 | {"offer_time" , read_u32 , &server_config.offer_time , "60"}, |
86 | {"min_lease", read_u32, &(server_config.min_lease_sec),"60"}, | 86 | {"min_lease" , read_u32 , &server_config.min_lease_sec, "60"}, |
87 | {"lease_file", read_str, &(server_config.lease_file), LEASES_FILE}, | 87 | {"lease_file" , read_str , &server_config.lease_file , LEASES_FILE}, |
88 | {"pidfile", read_str, &(server_config.pidfile), "/var/run/udhcpd.pid"}, | 88 | {"pidfile" , read_str , &server_config.pidfile , "/var/run/udhcpd.pid"}, |
89 | {"siaddr", udhcp_str2nip, &(server_config.siaddr_nip), "0.0.0.0"}, | 89 | {"siaddr" , udhcp_str2nip , &server_config.siaddr_nip , "0.0.0.0"}, |
90 | /* keywords with no defaults must be last! */ | 90 | /* keywords with no defaults must be last! */ |
91 | {"option", udhcp_str2optset, &(server_config.options), ""}, | 91 | {"option" , udhcp_str2optset, &server_config.options , ""}, |
92 | {"opt", udhcp_str2optset, &(server_config.options), ""}, | 92 | {"opt" , udhcp_str2optset, &server_config.options , ""}, |
93 | {"notify_file", read_str, &(server_config.notify_file), ""}, | 93 | {"notify_file" , read_str , &server_config.notify_file , ""}, |
94 | {"sname", read_str, &(server_config.sname), ""}, | 94 | {"sname" , read_str , &server_config.sname , ""}, |
95 | {"boot_file", read_str, &(server_config.boot_file), ""}, | 95 | {"boot_file" , read_str , &server_config.boot_file , ""}, |
96 | {"static_lease", read_staticlease, &(server_config.static_leases), ""}, | 96 | {"static_lease" , read_staticlease, &server_config.static_leases, ""}, |
97 | }; | 97 | }; |
98 | enum { KWS_WITH_DEFAULTS = ARRAY_SIZE(keywords) - 6 }; | 98 | enum { KWS_WITH_DEFAULTS = ARRAY_SIZE(keywords) - 6 }; |
99 | 99 | ||