diff options
author | Michael McTernan <Michael.McTernan.2001@cs.bris.ac.uk> | 2011-12-16 17:05:52 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-12-16 17:05:52 +0100 |
commit | 7b57ff4436f3e672076e6f5440954a958ba04ab3 (patch) | |
tree | 4365b7e4f18c1dfc4b12e9533da51549e84d37c1 | |
parent | be2a557918af86cc55b3426f97664503fe7e265f (diff) | |
download | busybox-w32-7b57ff4436f3e672076e6f5440954a958ba04ab3.tar.gz busybox-w32-7b57ff4436f3e672076e6f5440954a958ba04ab3.tar.bz2 busybox-w32-7b57ff4436f3e672076e6f5440954a958ba04ab3.zip |
udhcp: finish support of classless static routes
function old new delta
udhcp_str2optset 415 532 +117
Signed-off-by: Michael McTernan <Michael.McTernan.2001@cs.bris.ac.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | examples/udhcp/udhcpd.conf | 6 | ||||
-rw-r--r-- | include/xatonum.h | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/examples/udhcp/udhcpd.conf b/examples/udhcp/udhcpd.conf index cd2957ccc..eca44c0ab 100644 --- a/examples/udhcp/udhcpd.conf +++ b/examples/udhcp/udhcpd.conf | |||
@@ -68,6 +68,8 @@ opt wins 192.168.10.10 | |||
68 | option dns 129.219.13.81 # appended to above DNS servers for a total of 3 | 68 | option dns 129.219.13.81 # appended to above DNS servers for a total of 3 |
69 | option domain local | 69 | option domain local |
70 | option lease 864000 # default: 10 days | 70 | option lease 864000 # default: 10 days |
71 | option msstaticroutes 10.0.0.0/8 10.127.0.1 # single static route | ||
72 | option staticroutes 10.0.0.0/8 10.127.0.1, 10.11.12.0/24 10.11.12.1 | ||
71 | # Arbitrary option in hex form: | 73 | # Arbitrary option in hex form: |
72 | option 0x08 01020304 # option 8: "cookie server IP addr: 1.2.3.4" | 74 | option 0x08 01020304 # option 8: "cookie server IP addr: 1.2.3.4" |
73 | 75 | ||
@@ -101,6 +103,8 @@ option 0x08 01020304 # option 8: "cookie server IP addr: 1.2.3.4" | |||
101 | #opt swapsrv IP | 103 | #opt swapsrv IP |
102 | # Options specifying routes | 104 | # Options specifying routes |
103 | #opt routes IP_PAIR_LIST | 105 | #opt routes IP_PAIR_LIST |
106 | #opt staticroutes STATIC_ROUTES # RFC 3442 classless static route option | ||
107 | #opt msstaticroutes STATIC_ROUTES # same, using MS option number | ||
104 | # Obsolete options, no longer supported | 108 | # Obsolete options, no longer supported |
105 | #opt logsrv IP_LIST # 704/UDP log server (not syslog!) | 109 | #opt logsrv IP_LIST # 704/UDP log server (not syslog!) |
106 | #opt namesrv IP_LIST # IEN 116 name server, obsolete (August 1979!!!) | 110 | #opt namesrv IP_LIST # IEN 116 name server, obsolete (August 1979!!!) |
@@ -109,5 +113,3 @@ option 0x08 01020304 # option 8: "cookie server IP addr: 1.2.3.4" | |||
109 | # TODO: in development | 113 | # TODO: in development |
110 | #opt userclass STRING # RFC 3004. set of LASCII strings. "I am a printer" etc | 114 | #opt userclass STRING # RFC 3004. set of LASCII strings. "I am a printer" etc |
111 | #opt sipserv STRING LIST # RFC 3361. flag byte, then: 0: domain names, 1: IP addrs | 115 | #opt sipserv STRING LIST # RFC 3361. flag byte, then: 0: domain names, 1: IP addrs |
112 | #opt staticroutes STATIC_ROUTES | ||
113 | #opt msstaticroutes STATIC_ROUTES | ||
diff --git a/include/xatonum.h b/include/xatonum.h index 6f76a3c96..45ebbfc00 100644 --- a/include/xatonum.h +++ b/include/xatonum.h | |||
@@ -168,6 +168,15 @@ uint32_t bb_strtou32(const char *arg, char **endp, int base) | |||
168 | return bb_strtoul(arg, endp, base); | 168 | return bb_strtoul(arg, endp, base); |
169 | return BUG_bb_strtou32_unimplemented(); | 169 | return BUG_bb_strtou32_unimplemented(); |
170 | } | 170 | } |
171 | static ALWAYS_INLINE | ||
172 | int32_t bb_strtoi32(const char *arg, char **endp, int base) | ||
173 | { | ||
174 | if (sizeof(int32_t) == sizeof(int)) | ||
175 | return bb_strtoi(arg, endp, base); | ||
176 | if (sizeof(int32_t) == sizeof(long)) | ||
177 | return bb_strtol(arg, endp, base); | ||
178 | return BUG_bb_strtou32_unimplemented(); | ||
179 | } | ||
171 | 180 | ||
172 | /* Floating point */ | 181 | /* Floating point */ |
173 | 182 | ||