當前位置: 首頁>>代碼示例>>PHP>>正文


PHP system_routing_configure函數代碼示例

本文整理匯總了PHP中system_routing_configure函數的典型用法代碼示例。如果您正苦於以下問題:PHP system_routing_configure函數的具體用法?PHP system_routing_configure怎麽用?PHP system_routing_configure使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了system_routing_configure函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: interface_bring_down

                } else {
                    interface_bring_down($ifapply, true, $ifcfgo);
                    if (isset($config['dhcpd'][$ifapply]['enable']) || isset($config['dhcpdv6'][$ifapply]['enable'])) {
                        services_dhcpd_configure();
                    }
                }
            }
        }
        /* restart snmp so that it binds to correct address */
        services_snmpd_configure();
        /* sync filter configuration */
        setup_gateways_monitor();
        clear_subsystem_dirty('interfaces');
        filter_configure();
        enable_rrd_graphing();
        if (is_subsystem_dirty('staticroutes') && system_routing_configure() == 0) {
            clear_subsystem_dirty('staticroutes');
        }
    }
    @unlink("{$g['tmp_path']}/.interfaces.apply");
    header("Location: interfaces.php?if={$if}");
    exit;
} else {
    if ($_POST && $_POST['enable'] != "yes") {
        unset($wancfg['enable']);
        if (isset($wancfg['wireless'])) {
            interface_sync_wireless_clones($wancfg, false);
        }
        write_config("Interface {$_POST['descr']}({$if}) is now disabled.");
        mark_subsystem_dirty('interfaces');
        if (file_exists("{$g['tmp_path']}/.interfaces.apply")) {
開發者ID:simudream,項目名稱:pfsense,代碼行數:31,代碼來源:interfaces.php

示例2: return_gateways_array

$a_routes =& $config['staticroutes']['route'];
$a_gateways = return_gateways_array(true, true, true);
$changedesc_prefix = gettext("Static Routes") . ": ";
unset($input_errors);
if ($_POST) {
    $pconfig = $_POST;
    if ($_POST['apply']) {
        $retval = 0;
        if (file_exists("{$g['tmp_path']}/.system_routes.apply")) {
            $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.system_routes.apply"));
            foreach ($toapplylist as $toapply) {
                mwexec("{$toapply}");
            }
            @unlink("{$g['tmp_path']}/.system_routes.apply");
        }
        $retval = system_routing_configure();
        $retval |= filter_configure();
        /* reconfigure our gateway monitor */
        setup_gateways_monitor();
        $savemsg = get_std_save_message($retval);
        if ($retval == 0) {
            clear_subsystem_dirty('staticroutes');
        }
    }
}
function delete_static_route($id)
{
    global $config, $a_routes, $changedesc_prefix;
    if (!isset($a_routes[$id])) {
        return;
    }
開發者ID:rohankapoorcom,項目名稱:pfsense,代碼行數:31,代碼來源:system_routes.php

示例3: type_change

                  </td>
                </tr>
              </table>
</form>
<script language="JavaScript">
<!--
type_change();
//-->
</script>
<?php 
include "fend.inc";
?>
</body>
</html>


<?php 
if ($_POST) {
    if (!$input_errors) {
        unlink_if_exists("{$g['tmp_path']}/config.cache");
        ob_flush();
        flush();
        sleep(1);
        interfaces_wan_configure();
        reset_carp();
        /* sync filter configuration */
        filter_configure();
        /* set up static routes */
        system_routing_configure();
    }
}
開發者ID:rootsghost,項目名稱:5651-pfsense,代碼行數:31,代碼來源:interfaces.php

示例4: filter_configure_xmlrpc

function filter_configure_xmlrpc($raw_params)
{
    global $xmlrpc_g, $config;
    $params = xmlrpc_params_to_php($raw_params);
    if (!xmlrpc_auth($params)) {
        xmlrpc_authfail();
        return $xmlrpc_g['return']['authfail'];
    }
    filter_configure();
    system_routing_configure();
    setup_gateways_monitor();
    relayd_configure();
    require_once "openvpn.inc";
    openvpn_resync_all();
    if (isset($config['dnsmasq']['enable'])) {
        services_dnsmasq_configure();
    } elseif (isset($config['unbound']['enable'])) {
        services_unbound_configure();
    } else {
        # Both calls above run services_dhcpd_configure(), then we just
        # need to call it when they are not called to avoid restarting dhcpd
        # twice, as described on ticket #3797
        services_dhcpd_configure();
    }
    local_sync_accounts();
    return $xmlrpc_g['return']['true'];
}
開發者ID:michaeleino,項目名稱:pfsense,代碼行數:27,代碼來源:xmlrpc.php

示例5: filter_configure

 /**
  * Wrapper for filter_configure()
  *
  * @param string $username
  * @param string $password
  *
  * @return bool
  */
 public function filter_configure($username, $password)
 {
     $this->auth($username, $password);
     global $g, $config;
     filter_configure();
     system_routing_configure();
     setup_gateways_monitor();
     relayd_configure();
     require_once "openvpn.inc";
     openvpn_resync_all();
     /*
      * The DNS Resolver and the DNS Forwarder may both be active so
      * long as * they are running on different ports.
      * See ticket #5882
      */
     if (isset($config['dnsmasq']['enable'])) {
         /* Configure dnsmasq but tell it NOT to restart DHCP */
         services_dnsmasq_configure(false);
     } else {
         /* kill any running dnsmasq instance */
         if (isvalidpid("{$g['varrun_path']}/dnsmasq.pid")) {
             sigkillbypid("{$g['varrun_path']}/dnsmasq.pid", "TERM");
         }
     }
     if (isset($config['unbound']['enable'])) {
         /* Configure unbound but tell it NOT to restart DHCP */
         services_unbound_configure(false);
     } else {
         /* kill any running Unbound instance */
         if (isvalidpid("{$g['varrun_path']}/unbound.pid")) {
             sigkillbypid("{$g['varrun_path']}/unbound.pid", "TERM");
         }
     }
     /*
      * Call this separately since the above are manually set to
      * skip the DHCP restart they normally perform.
      * This avoids restarting dhcpd twice as described on
      * ticket #3797
      */
     services_dhcpd_configure();
     local_sync_accounts();
     return true;
 }
開發者ID:KyleJohnstonNet,項目名稱:pfsense,代碼行數:51,代碼來源:xmlrpc.php

示例6: filter_configure_xmlrpc

function filter_configure_xmlrpc($raw_params)
{
    global $xmlrpc_g;
    $params = xmlrpc_params_to_php($raw_params);
    if (!xmlrpc_auth($params)) {
        return $xmlrpc_g['return']['authfail'];
    }
    require_once "vslb.inc";
    slbd_configure();
    filter_configure();
    system_routing_configure();
    return $xmlrpc_g['return']['true'];
}
開發者ID:rootsghost,項目名稱:5651-pfsense,代碼行數:13,代碼來源:xmlrpc.php

示例7: filter_configure_xmlrpc

function filter_configure_xmlrpc($raw_params)
{
    global $xmlrpc_g, $g, $config;
    $params = xmlrpc_params_to_php($raw_params);
    if (!xmlrpc_auth($params)) {
        xmlrpc_authfail();
        return $xmlrpc_g['return']['authfail'];
    }
    filter_configure();
    system_routing_configure();
    setup_gateways_monitor();
    relayd_configure();
    require_once "openvpn.inc";
    openvpn_resync_all();
    /* The DNS Resolver and the DNS Forwarder may both be active so long as
     * they are running on different ports. See ticket #5882
     */
    $need_dhcp_start = true;
    if (isset($config['dnsmasq']['enable'])) {
        /* Configure dnsmasq but tell it NOT to restart DHCP */
        services_dnsmasq_configure(false);
    } else {
        /* kill any running dnsmasq since it is not enabled. */
        if (file_exists("{$g['varrun_path']}/dnsmasq.pid")) {
            sigkillbypid("{$g['varrun_path']}/dnsmasq.pid", "TERM");
        }
    }
    if (isset($config['unbound']['enable'])) {
        /* Configure unbound but tell it NOT to restart DHCP */
        services_unbound_configure(false);
    } else {
        /* kill any running Unbound instance since it is not enabled. */
        if (file_exists("{$g['varrun_path']}/unbound.pid")) {
            sigkillbypid("{$g['varrun_path']}/unbound.pid", "TERM");
        }
    }
    /* Call this separately since the above are manually set to skip the DHCP restart they normally perform.
     * This avoids restarting dhcpd twice as described on ticket #3797
     */
    services_dhcpd_configure();
    local_sync_accounts();
    return $xmlrpc_g['return']['true'];
}
開發者ID:curtiszimmerman,項目名稱:pfsense,代碼行數:43,代碼來源:xmlrpc.php

示例8: filter_configure_xmlrpc

function filter_configure_xmlrpc($raw_params)
{
    global $xmlrpc_g;
    $params = xmlrpc_params_to_php($raw_params);
    if (!xmlrpc_auth($params)) {
        xmlrpc_authfail();
        return $xmlrpc_g['return']['authfail'];
    }
    filter_configure();
    system_routing_configure();
    setup_gateways_monitor();
    relayd_configure();
    require_once "openvpn.inc";
    openvpn_resync_all();
    services_dhcpd_configure();
    services_dnsmasq_configure();
    local_sync_accounts();
    return $xmlrpc_g['return']['true'];
}
開發者ID:rdmenezes,項目名稱:pfsense,代碼行數:19,代碼來源:xmlrpc.php


注:本文中的system_routing_configure函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。