• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP system_routing_configure函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP system_syslogd_start函数代码示例发布时间:2022-05-23
下一篇:
PHP system_resolvconf_generate函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap