int max_data_rate; /* max bytes/sec through charshunt */
int req_unit = -1; /* requested interface unit */
bool multilink = 0; /* Enable multilink operation */
int max_data_rate; /* max bytes/sec through charshunt */
int req_unit = -1; /* requested interface unit */
bool multilink = 0; /* Enable multilink operation */
"Enable multilink operation", 1 },
{ "nomp", o_bool, &multilink,
"Disable multilink operation", 0 },
"Enable multilink operation", 1 },
{ "nomp", o_bool, &multilink,
"Disable multilink operation", 0 },
#endif /* HAVE_MULTILINK */
#ifdef PLUGIN
{ "plugin", o_special, loadplugin,
#endif /* HAVE_MULTILINK */
#ifdef PLUGIN
{ "plugin", o_special, loadplugin,
/*
* Unfortunately, if we use inet_addr, we can't tell whether
* a result of all 1s is an error or a valid 255.255.255.255.
*/
p = *argv;
/*
* Unfortunately, if we use inet_addr, we can't tell whether
* a result of all 1s is an error or a valid 255.255.255.255.
*/
p = *argv;
- ok = 0;
- mask = 0;
- for (n = 3;; --n) {
- b = strtoul(p, &endp, 0);
- if (endp == p)
- break;
- if (b > 255) {
- if (n == 3) {
- /* accept e.g. 0xffffff00 */
- p = endp;
- mask = b;
- }
- break;
- }
- mask |= b << (n * 8);
- p = endp;
- if (*p != '.' || n == 0)
- break;
- ++p;
- }
+ n = parse_dotted_ip(p, &mask);