当前位置: 首页>>代码示例>>PHP>>正文


PHP is_pppoe_server_enabled函数代码示例

本文整理汇总了PHP中is_pppoe_server_enabled函数的典型用法代码示例。如果您正苦于以下问题:PHP is_pppoe_server_enabled函数的具体用法?PHP is_pppoe_server_enabled怎么用?PHP is_pppoe_server_enabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了is_pppoe_server_enabled函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: formInterfaces

/**
 * build array with interface options for this form
 */
function formInterfaces()
{
    global $config;
    $interfaces = array();
    foreach (get_configured_interface_with_descr(false, true) as $if => $ifdesc) {
        $interfaces[$if] = $ifdesc;
    }
    if (isset($config['l2tp']['mode']) && $config['l2tp']['mode'] == "server") {
        $interfaces['l2tp'] = "L2TP VPN";
    }
    if (isset($config['pptpd']['mode']) && $config['pptpd']['mode'] == "server") {
        $interfaces['pptp'] = "PPTP VPN";
    }
    if (is_pppoe_server_enabled()) {
        $interfaces['pppoe'] = "PPPoE VPN";
    }
    /* add ipsec interfaces */
    if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
        $interfaces["enc0"] = "IPsec";
    }
    /* add openvpn/tun interfaces */
    if (isset($config['openvpn']['openvpn-server']) || isset($config['openvpn']['openvpn-client'])) {
        $interfaces['openvpn'] = 'OpenVPN';
    }
    return $interfaces;
}
开发者ID:nasaa0528,项目名称:core,代码行数:29,代码来源:firewall_nat_1to1_edit.php

示例2: foreach

foreach ($ifdescs as $ifent => $ifdesc) {
    if (have_ruleint_access($ifent)) {
        $interfaces[$ifent] = $ifdesc;
    }
}
if ($config['l2tp']['mode'] == "server") {
    if (have_ruleint_access("l2tp")) {
        $interfaces['l2tp'] = "L2TP VPN";
    }
}
if ($config['pptpd']['mode'] == "server") {
    if (have_ruleint_access("pptp")) {
        $interfaces['pptp'] = "PPTP VPN";
    }
}
if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) {
    $interfaces['pppoe'] = "PPPoE Server";
}
/* add ipsec interfaces */
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
    if (have_ruleint_access("enc0")) {
        $interfaces["enc0"] = "IPsec";
    }
}
/* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
    $interfaces["openvpn"] = "OpenVPN";
}
if (is_array($pconfig['interface'])) {
    $pconfig['interface'] = implode(",", $pconfig['interface']);
}
开发者ID:rohankapoorcom,项目名称:pfsense,代码行数:31,代码来源:firewall_rules_edit.php

示例3: build_if_list

function build_if_list()
{
    global $config;
    $iflist = array();
    // add group interfaces
    if (is_array($config['ifgroups']['ifgroupentry'])) {
        foreach ($config['ifgroups']['ifgroupentry'] as $ifgen) {
            if (have_ruleint_access($ifgen['ifname'])) {
                $iflist[$ifgen['ifname']] = $ifgen['ifname'];
            }
        }
    }
    foreach (get_configured_interface_with_descr() as $ifent => $ifdesc) {
        if (have_ruleint_access($ifent)) {
            $iflist[$ifent] = $ifdesc;
        }
    }
    if ($config['l2tp']['mode'] == "server" && have_ruleint_access("l2tp")) {
        $iflist['l2tp'] = gettext('L2TP VPN');
    }
    if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) {
        $iflist['pppoe'] = gettext("PPPoE Server");
    }
    // add ipsec interfaces
    if (ipsec_enabled() && have_ruleint_access("enc0")) {
        $iflist["enc0"] = gettext("IPsec");
    }
    // add openvpn/tun interfaces
    if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
        $iflist["openvpn"] = gettext("OpenVPN");
    }
    return $iflist;
}
开发者ID:NewEraCracker,项目名称:pfsense,代码行数:33,代码来源:firewall_rules_edit.php

示例4: build_if_list

function build_if_list()
{
    $iflist = get_configured_interface_with_descr(false, true);
    //$iflist = get_interface_list();
    // Allow extending of the firewall edit interfaces
    pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_interfaces_edit");
    foreach ($iflist as $if => $ifdesc) {
        $interfaces[$if] = $ifdesc;
    }
    if ($config['l2tp']['mode'] == "server") {
        $interfaces['l2tp'] = "L2TP VPN";
    }
    if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) {
        $interfaces['pppoe'] = "PPPoE Server";
    }
    /* add ipsec interfaces */
    if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
        $interfaces["enc0"] = "IPsec";
    }
    /* add openvpn/tun interfaces */
    if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
        $interfaces["openvpn"] = "OpenVPN";
    }
    return $interfaces;
}
开发者ID:heper,项目名称:pfsense,代码行数:25,代码来源:diag_logs_filter.php

示例5: switch

 if (isset($ifdescs[$interface])) {
     $selected_descs[] = $ifdescs[$interface];
 } else {
     switch ($interface) {
         case 'l2tp':
             if ($config['l2tp']['mode'] == 'server') {
                 $selected_descs[] = 'L2TP VPN';
             }
             break;
         case 'pptp':
             if ($config['pptpd']['mode'] == 'server') {
                 $selected_descs[] = 'PPTP VPN';
             }
             break;
         case 'pppoe':
             if (is_pppoe_server_enabled()) {
                 $selected_descs[] = 'PPPoE Server';
             }
             break;
         case 'enc0':
             if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
                 $selected_descs[] = 'IPsec';
             }
             break;
         case 'openvpn':
             if ($config['openvpn']['openvpn-server'] || $config['openvpn']['openvpn-client']) {
                 $selected_descs[] = 'OpenVPN';
             }
             break;
         default:
             $selected_descs[] = $interface;
开发者ID:nmccurdy,项目名称:pfsense,代码行数:31,代码来源:firewall_rules.php


注:本文中的is_pppoe_server_enabled函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。