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


PHP get_vip_descr函数代码示例

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


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

示例1: build_interface_list

function build_interface_list()
{
    global $pconfig;
    $iflist = array('options' => array(), 'selected' => array());
    $interfaces = get_configured_interface_with_descr();
    $carplist = get_configured_carp_interface_list();
    foreach ($carplist as $cif => $carpip) {
        $interfaces[$cif] = $carpip . " (" . get_vip_descr($carpip) . ")";
    }
    $aliaslist = get_configured_ip_aliases_list();
    foreach ($aliaslist as $aliasip => $aliasif) {
        $interfaces[$aliasip] = $aliasip . " (" . get_vip_descr($aliasip) . ")";
    }
    $size = count($interfaces) < 10 ? count($interfaces) : 10;
    foreach ($interfaces as $iface => $ifacename) {
        if (!is_ipaddr(get_interface_ip($iface)) && !is_ipaddr($iface)) {
            continue;
        }
        $iflist['options'][$iface] = $ifacename;
        if (in_array($iface, $pconfig['interface'])) {
            array_push($iflist['selected'], $iface);
        }
    }
    return $iflist;
}
开发者ID:jefersonJim,项目名称:pfsense,代码行数:25,代码来源:services_ntpd.php

示例2: gettext

				<tr>
                  <td width="22%" valign="top" class="vncellreq"><?php 
echo gettext("Parent interface");
?>
</td>
                  <td width="78%" class="vtable">
                    <select name="if" class="formselect">
                      <?php 
$portlist = get_configured_interface_with_descr();
$carplist = get_configured_carp_interface_list();
foreach ($carplist as $cif => $carpip) {
    $portlist[$cif] = $carpip . " (" . get_vip_descr($carpip) . ")";
}
$aliaslist = get_configured_ip_aliases_list();
foreach ($aliaslist as $aliasip => $aliasif) {
    $portlist[$aliasif . '|' . $aliasip] = $aliasip . " (" . get_vip_descr($aliasip) . ")";
}
foreach ($portlist as $ifn => $ifinfo) {
    echo "<option value=\"{$ifn}\"";
    if ($ifn == $pconfig['if']) {
        echo " selected=\"selected\"";
    }
    echo ">" . htmlspecialchars($ifinfo) . "</option>\n";
}
?>
                    </select>
			<br />
			<span class="vexpl"><?php 
echo gettext("The interface here serves as the local address to be used for the gif tunnel.");
?>
</span></td>
开发者ID:OptimWIFI,项目名称:pfsense,代码行数:31,代码来源:interfaces_gif_edit.php

示例3: build_interface_list

function build_interface_list()
{
    $interfaces = get_configured_interface_with_descr();
    $viplist = get_configured_vip_list();
    foreach ($viplist as $vip => $address) {
        $interfaces[$vip] = $address;
        if (get_vip_descr($address)) {
            $interfaces[$vip] .= " (" . get_vip_descr($address) . ")";
        }
    }
    $grouplist = return_gateway_groups_array();
    foreach ($grouplist as $name => $group) {
        if ($group[0]['vip'] != "") {
            $vipif = $group[0]['vip'];
        } else {
            $vipif = $group[0]['int'];
        }
        $interfaces[$name] = sprintf(gettext("GW Group %s"), $name);
    }
    return $interfaces;
}
开发者ID:KyleJohnstonNet,项目名称:pfsense,代码行数:21,代码来源:vpn_ipsec_phase1.php

示例4: build_if_list

function build_if_list()
{
    $list = array();
    $interfaces = get_configured_interface_with_descr();
    $carplist = get_configured_carp_interface_list();
    foreach ($carplist as $cif => $carpip) {
        $interfaces[$cif . '|' . $carpip] = $carpip . " (" . get_vip_descr($carpip) . ")";
    }
    $aliaslist = get_configured_ip_aliases_list();
    foreach ($aliaslist as $aliasip => $aliasif) {
        $interfaces[$aliasif . '|' . $aliasip] = $aliasip . " (" . get_vip_descr($aliasip) . ")";
    }
    $grouplist = return_gateway_groups_array();
    foreach ($grouplist as $name => $group) {
        if ($group['ipprotocol'] != inet) {
            continue;
        }
        if ($group[0]['vip'] != "") {
            $vipif = $group[0]['vip'];
        } else {
            $vipif = $group[0]['int'];
        }
        $interfaces[$name] = "GW Group {$name}";
    }
    $interfaces['lo0'] = "Localhost";
    $interfaces['any'] = "any";
    foreach ($interfaces as $iface => $ifacename) {
        $list[$iface] = $ifacename;
    }
    return $list;
}
开发者ID:vasiqmz,项目名称:pfsense,代码行数:31,代码来源:vpn_openvpn_client.php

示例5: gettext

echo gettext("Other");
?>
				  </td>
				</tr>
				<tr>
				  <td width="22%" valign="top" class="vncellreq"><?php 
echo gettext("Interface");
?>
</td>
				  <td width="78%" class="vtable">
					<select name="interface" class="formselect">
					<?php 
$interfaces = get_configured_interface_with_descr(false, true);
$carplist = get_configured_carp_interface_list();
foreach ($carplist as $cif => $carpip) {
    $interfaces[$cif] = $carpip . ' (' . get_vip_descr($carpip) . ')';
}
$interfaces['lo0'] = 'Localhost';
foreach ($interfaces as $iface => $ifacename) {
    ?>
						<option value="<?php 
    echo $iface;
    ?>
" <?php 
    if ($iface == $pconfig['interface']) {
        echo "selected=\"selected\"";
    }
    ?>
>
						<?php 
    echo htmlspecialchars($ifacename);
开发者ID:mtisza,项目名称:pfsense,代码行数:31,代码来源:firewall_virtual_ip_edit.php

示例6: build_vip_list

function build_vip_list($family = 'all')
{
    $list = array('address' => gettext('Interface Address'));
    $viplist = get_configured_vip_list($family);
    foreach ($viplist as $vip => $address) {
        $list[$vip] = "{$address}";
        if (get_vip_descr($address)) {
            $list[$vip] .= " (" . get_vip_descr($address) . ")";
        }
    }
    return $list;
}
开发者ID:ajiwo,项目名称:pfsense,代码行数:12,代码来源:system_gateway_groups_edit.php

示例7: build_bridge_list

function build_bridge_list()
{
    $list = array();
    $serverbridge_interface['none'] = "none";
    $serverbridge_interface = array_merge($serverbridge_interface, get_configured_interface_with_descr());
    $carplist = get_configured_carp_interface_list();
    foreach ($carplist as $cif => $carpip) {
        $serverbridge_interface[$cif . '|' . $carpip] = $carpip . " (" . get_vip_descr($carpip) . ")";
    }
    $aliaslist = get_configured_ip_aliases_list();
    foreach ($aliaslist as $aliasip => $aliasif) {
        $serverbridge_interface[$aliasif . '|' . $aliasip] = $aliasip . " (" . get_vip_descr($aliasip) . ")";
    }
    foreach ($serverbridge_interface as $iface => $ifacename) {
        $list[$iface] = htmlspecialchars($ifacename);
    }
    return $list;
}
开发者ID:jdillard,项目名称:pfsense,代码行数:18,代码来源:vpn_openvpn_server.php

示例8: Form_Select

$section->addInput(new Form_Select('ramode', 'Router mode', $pconfig['ramode'], $advertise_modes))->setHelp('Select the Operating Mode for the Router Advertisement (RA) Daemon. Use:' . '<br />' . '&nbsp;<strong>Router Only</strong> to only advertise this router' . '<br />' . '&nbsp;<strong>Unmanaged</strong> for Router Advertising with Stateless Autoconfig' . '<br />' . '&nbsp;<strong>Managed</strong> for assignment through a DHCPv6 Server' . '<br />' . '&nbsp;<strong>Assisted</strong> for DHCPv6 Server assignment combined with Stateless Autoconfig. ' . 'It is not required to activate this DHCPv6 server when set to "Managed", this can be another host on the network');
$section->addInput(new Form_Select('rapriority', 'Router priority', $pconfig['rapriority'], $priority_modes))->setHelp('Select the Priority for the Router Advertisement (RA) Daemon.');
$carplist = get_configured_vip_list("inet6", VIP_CARP);
$carplistif = array();
if (count($carplist) > 0) {
    foreach ($carplist as $ifname => $vip) {
        if (get_configured_vip_interface($ifname) == $if) {
            $carplistif[$ifname] = $vip;
        }
    }
}
if (count($carplistif) > 0) {
    $iflist = array();
    $iflist['interface'] = strtoupper($if);
    foreach ($carplistif as $ifname => $vip) {
        $iflist[$ifname] = get_vip_descr($vip) . " - " . $vip;
    }
    $section->addInput(new Form_Select('rainterface', 'RA Interface', $pconfig['rainterface'], $iflist))->setHelp('Select the Interface for the Router Advertisement (RA) Daemon.');
}
$section->addInput(new Form_Input('ravalidlifetime', 'Default valid lifetime', 'number', $pconfig['ravalidlifetime'], ['min' => 1, 'max' => 655350]))->setHelp('The length of time in seconds (relative to the time the packet is sent) that the prefix is valid for the purpose of on-link determination.' . ' <br />' . 'The default is 86400 seconds.');
$section->addInput(new Form_Input('rapreferredlifetime', 'Default preferred lifetime', 'text', $pconfig['rapreferredlifetime']))->setHelp('Seconds. The length of time in seconds (relative to the time the packet is sent) that addresses generated from the prefix via stateless address autoconfiguration remain preferred.' . ' <br />' . 'The default is 14400 seconds.');
$section->addInput(new Form_Input('raminrtradvinterval', 'Minimum RA interval', 'number', $pconfig['raminrtradvinterval'], ['min' => 3, 'max' => 1350]))->setHelp('The minimum time allowed between sending unsolicited multicast router advertisements in seconds.');
$section->addInput(new Form_Input('ramaxrtradvinterval', 'Maximum RA interval', 'number', $pconfig['ramaxrtradvinterval'], ['min' => 4, 'max' => 1800]))->setHelp('The maximum time allowed between sending unsolicited multicast router advertisements in seconds.');
$section->addInput(new Form_Input('raadvdefaultlifetime', 'Router lifetime', 'number', $pconfig['raadvdefaultlifetime'], ['min' => 1, 'max' => 9000]))->setHelp('The lifetime associated with the default router in seconds.');
$section->addInput(new Form_StaticText('RA Subnets', $subnets_help));
if (empty($pconfig['subnets'])) {
    $pconfig['subnets'] = array('0' => '/128');
}
$counter = 0;
$numrows = count($pconfig['subnets']) - 1;
foreach ($pconfig['subnets'] as $subnet) {
开发者ID:KyleJohnstonNet,项目名称:pfsense,代码行数:31,代码来源:services_router_advertisements.php

示例9: gettext

echo gettext("GRE configuration");
?>
</td>
				</tr>
				<tr>
                  <td width="22%" valign="top" class="vncellreq"><?php 
echo gettext("Parent interface");
?>
</td>
                  <td width="78%" class="vtable">
                    <select name="if" class="formselect">
                      <?php 
$portlist = get_configured_interface_with_descr();
$carplist = get_configured_carp_interface_list();
foreach ($carplist as $cif => $carpip) {
    $portlist[$cif] = $carpip . " (" . get_vip_descr($carpip) . ")";
}
foreach ($portlist as $ifn => $ifinfo) {
    echo "<option value=\"{$ifn}\"";
    if ($ifn == $pconfig['if']) {
        echo "selected";
    }
    echo ">{$ifinfo}</option>";
}
?>
                    </select>
			<br/>
			<span class="vexpl"><?php 
echo gettext("The interface here serves as the local address to be used for the GRE tunnel.");
?>
</span></td>
开发者ID:rdmenezes,项目名称:pfsense,代码行数:31,代码来源:interfaces_gre_edit.php

示例10: build_interface_list

function build_interface_list()
{
    $interfaces = get_configured_interface_with_descr();
    $carplist = get_configured_carp_interface_list();
    foreach ($carplist as $cif => $carpip) {
        $interfaces[$cif] = $carpip . " (" . get_vip_descr($carpip) . ")";
    }
    $aliaslist = get_configured_ip_aliases_list();
    foreach ($aliaslist as $aliasip => $aliasif) {
        $interfaces[$aliasip] = $aliasip . " (" . get_vip_descr($aliasip) . ")";
    }
    $grouplist = return_gateway_groups_array();
    foreach ($grouplist as $name => $group) {
        if ($group[0]['vip'] != "") {
            $vipif = $group[0]['vip'];
        } else {
            $vipif = $group[0]['int'];
        }
        $interfaces[$name] = "GW Group {$name}";
    }
    return $interfaces;
}
开发者ID:WoolenWang,项目名称:pfsense,代码行数:22,代码来源:vpn_ipsec_phase1.php

示例11: gettext

</th>
					<th><?php 
echo gettext("Actions");
?>
</th>
				</tr>
			</thead>
			<tbody>
<?php 
$interfaces = get_configured_interface_with_descr(false, true);
$viplist = get_configured_vip_list();
foreach ($viplist as $vipname => $address) {
    $interfaces[$vipname] = $address;
    $interfaces[$vipname] .= " (";
    if (get_vip_descr($address)) {
        $interfaces[$vipname] .= get_vip_descr($address);
    } else {
        $vip = get_configured_vip($vipname);
        $interfaces[$vipname] .= "vhid: {$vip['vhid']}";
    }
    $interfaces[$vipname] .= ")";
}
$interfaces['lo0'] = "Localhost";
$i = 0;
foreach ($a_vip as $vipent) {
    if ($vipent['subnet'] != "" or $vipent['range'] != "" or $vipent['subnet_bits'] != "" or isset($vipent['range']['from']) && $vipent['range']['from'] != "") {
        ?>
				<tr>
					<td>
<?php 
        if ($vipent['type'] == "single" || $vipent['type'] == "network") {
开发者ID:nwholloway,项目名称:pfsense,代码行数:31,代码来源:firewall_virtual_ip.php

示例12: build_if_list

function build_if_list()
{
    $list = array();
    $interfaces = get_configured_interface_with_descr(false, true);
    $carplist = get_configured_vip_list();
    foreach ($carplist as $vipname => $address) {
        $vip = get_configured_vip($vipname);
        if ($vip['mode'] != 'carp') {
            continue;
        }
        $interfaces[$vipname] = $address;
        $interfaces[$vipname] .= " (";
        if (get_vip_descr($address)) {
            $interfaces[$vipname] .= get_vip_descr($address);
        } else {
            $interfaces[$vipname] .= "vhid: {$vip['vhid']}";
        }
        $interfaces[$vipname] .= ")";
    }
    $interfaces['lo0'] = 'Localhost';
    return $interfaces;
}
开发者ID:nwholloway,项目名称:pfsense,代码行数:22,代码来源:firewall_virtual_ip_edit.php

示例13: elseif

    } elseif ($ph1ent['iketype'] == "ikev2") {
        echo "V2";
    } elseif ($ph1ent['iketype'] == "auto") {
        echo "Auto";
    }
    ?>
						</td>
						<td>
<?php 
    if ($ph1ent['interface']) {
        $iflabels = get_configured_interface_with_descr();
        $viplist = get_configured_vip_list();
        foreach ($viplist as $vip => $address) {
            $iflabels[$vip] = $address;
            if (get_vip_descr($address)) {
                $iflabels[$vip] .= " (" . get_vip_descr($address) . ")";
            }
        }
        $grouplist = return_gateway_groups_array();
        foreach ($grouplist as $name => $group) {
            if ($group[0]['vip'] != "") {
                $vipif = $group[0]['vip'];
            } else {
                $vipif = $group[0]['int'];
            }
            $iflabels[$name] = "GW Group {$name}";
        }
        $if = htmlspecialchars($iflabels[$ph1ent['interface']]);
    } else {
        $if = "WAN";
    }
开发者ID:nwholloway,项目名称:pfsense,代码行数:31,代码来源:vpn_ipsec.php

示例14: gettext

					<tr>
						<td><i class="fa fa-info-circle text-muted"></i> <?php 
    echo gettext("Interface");
    ?>
</td>
						<td>
							<select name="interface" class="form-control">
<?php 
    $interfaces = get_configured_interface_with_descr();
    $carplist = get_configured_carp_interface_list();
    foreach ($carplist as $cif => $carpip) {
        $interfaces[$cif . '|' . $carpip] = $carpip . " (" . get_vip_descr($carpip) . ")";
    }
    $aliaslist = get_configured_ip_aliases_list();
    foreach ($aliaslist as $aliasip => $aliasif) {
        $interfaces[$aliasif . '|' . $aliasip] = $aliasip . " (" . get_vip_descr($aliasip) . ")";
    }
    $grouplist = return_gateway_groups_array();
    foreach ($grouplist as $name => $group) {
        if ($group['ipprotocol'] != inet) {
            continue;
        }
        if ($group[0]['vip'] != "") {
            $vipif = $group[0]['vip'];
        } else {
            $vipif = $group[0]['int'];
        }
        $interfaces[$name] = "GW Group {$name}";
    }
    $interfaces['lo0'] = "Localhost";
    $interfaces['any'] = "any";
开发者ID:Anasxrt,项目名称:core,代码行数:31,代码来源:vpn_openvpn_client.php

示例15: gettext

echo gettext("Type");
?>
</th>
					<th><?php 
echo gettext("Description");
?>
</th>
					<th><!--Buttons--></th>
				</tr>
			</thead>
			<tbody>
<?php 
$interfaces = get_configured_interface_with_descr(false, true);
$carplist = get_configured_carp_interface_list();
foreach ($carplist as $cif => $carpip) {
    $interfaces[$cif] = $carpip . " (" . get_vip_descr($carpip) . ")";
}
$interfaces['lo0'] = "Localhost";
$i = 0;
foreach ($a_vip as $vipent) {
    if ($vipent['subnet'] != "" or $vipent['range'] != "" or $vipent['subnet_bits'] != "" or isset($vipent['range']['from']) && $vipent['range']['from'] != "") {
        ?>
				<tr>
					<td>
<?php 
        if ($vipent['type'] == "single" || $vipent['type'] == "network") {
            if ($vipent['subnet_bits']) {
                print "{$vipent['subnet']}/{$vipent['subnet_bits']}";
            }
        }
        if ($vipent['type'] == "range") {
开发者ID:geijt,项目名称:pfsense,代码行数:31,代码来源:firewall_virtual_ip.php


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