Lines Matching refs:result
309 int result; in count_netmask_bits() local
319 result = 32; in count_netmask_bits()
322 result--; in count_netmask_bits()
324 return result; in count_netmask_bits()
333 char *result = NULL; in parse() local
338 addstr(&result, command, 1); in parse()
344 addstr(&result, command, 1); in parse()
349 old_pos[opt_depth] = result ? strlen(result) : 0; in parse()
354 addstr(&result, command, 1); in parse()
362 result[old_pos[opt_depth]] = '\0'; in parse()
366 addstr(&result, command, 1); in parse()
379 free(result); in parse()
394 addstr(&result, varvalue, strlen(varvalue)); in parse()
406 addstr(&result, argument, strlen(argument)); in parse()
424 free(result); in parse()
430 free(result); in parse()
434 return result; in parse()
466 int result; in loopback_up6() local
467 result = execute("ip addr add ::1 dev %iface%", ifd, exec); in loopback_up6()
468 result += execute("ip link set %iface% up", ifd, exec); in loopback_up6()
469 return ((result == 2) ? 2 : 0); in loopback_up6()
491 int result; in static_up6() local
493 result = execute("ip addr add %address%/%netmask% dev %iface%[[ label %label%]]", ifd, exec); in static_up6()
494 result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] %iface% up", ifd, exec); in static_up6()
496 …result += execute("[[ip route add ::/0 via %gateway% dev %iface%]][[ metric %metric%]]", ifd, exec… in static_up6()
498 …result = execute("ifconfig %iface%[[ media %media%]][[ hw %hwaddress%]][[ mtu %mtu%]] up", ifd, ex… in static_up6()
499 result += execute("ifconfig %iface% add %address%/%netmask%", ifd, exec); in static_up6()
500 result += execute("[[route -A inet6 add ::/0 gw %gateway%[[ metric %metric%]]]]", ifd, exec); in static_up6()
502 return ((result == 3) ? 3 : 0); in static_up6()
519 int result; in v4tunnel_up() local
520 result = execute("ip tunnel add %iface% mode sit remote " in v4tunnel_up()
522 result += execute("ip link set %iface% up", ifd, exec); in v4tunnel_up()
523 result += execute("ip addr add %address%/%netmask% dev %iface%", ifd, exec); in v4tunnel_up()
525 result += execute("[[ip route add ::/0 via %gateway% dev %iface%]]", ifd, exec); in v4tunnel_up()
526 return ((result == 4) ? 4 : 0); in v4tunnel_up()
558 int result; in loopback_up() local
559 result = execute("ip addr add 127.0.0.1/8 dev %iface%", ifd, exec); in loopback_up()
560 result += execute("ip link set %iface% up", ifd, exec); in loopback_up()
561 return ((result == 2) ? 2 : 0); in loopback_up()
570 int result; in loopback_down() local
571 result = execute("ip addr flush dev %iface%", ifd, exec); in loopback_down()
572 result += execute("ip link set %iface% down", ifd, exec); in loopback_down()
573 return ((result == 2) ? 2 : 0); in loopback_down()
581 int result; in static_up() local
583 result = execute("ip addr add %address%/%bnmask%[[ broadcast %broadcast%]] " in static_up()
585 result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] %iface% up", ifd, exec); in static_up()
586 …result += execute("[[ip route add default via %gateway% dev %iface%[[ metric %metric%]]]]", ifd, e… in static_up()
587 return ((result == 3) ? 3 : 0); in static_up()
591 result = execute("ifconfig %iface%[[ hw %hwaddress%]][[ media %media%]][[ mtu %mtu%]] up", in static_up()
593 result += execute("ifconfig %iface% %address% netmask %netmask%" in static_up()
596 result += execute("[[route add default gw %gateway%[[ metric %metric%]] %iface%]]", ifd, exec); in static_up()
597 return ((result == 3) ? 3 : 0); in static_up()
603 int result; in static_down() local
611 result = execute("ip addr flush dev %iface%[[ label %label%]]", ifd, exec); in static_down()
612 result += execute("ip link set %iface% down", ifd, exec); in static_down()
617 result = 1; in static_down()
618 result += execute("ifconfig %iface% down", ifd, exec); in static_down()
620 return ((result == 2) ? 2 : 0); in static_down()
698 int result = 0; in dhcp_down() local
703 result = execute(ext_dhcp_clients[i].stopcmd, ifd, exec); in dhcp_down()
704 if (result) in dhcp_down()
709 if (!result) in dhcp_down()
715 result += static_down(ifd, exec); in dhcp_down()
716 return ((result == 3) ? 3 : 0); in dhcp_down()
721 int result; in dhcp_down() local
722 result = execute( in dhcp_down()
732 result += static_down(ifd, exec); in dhcp_down()
733 return ((result == 3) ? 3 : 0); in dhcp_down()
1101 char *result; in setlocalenv() local
1106 result = xasprintf(format, name, value); in setlocalenv()
1108 for (dst = src = result; (c = *src) != '=' && c; src++) { in setlocalenv()
1118 return result; in setlocalenv()