當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。