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


PHP get_carp_status函数代码示例

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


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

示例1: interface_proxyarp_configure

                        case "proxyarp":
                            interface_proxyarp_configure($a_vip[$vid]['interface']);
                            break;
                        case "carp":
                            $check_carp = true;
                            interface_carp_configure($a_vip[$vid]);
                            break;
                        default:
                            break;
                    }
                }
            }
            @unlink("{$g['tmp_path']}/.firewall_virtual_ip.apply");
        }
        /* Before changing check #4633 */
        if ($check_carp === true && !get_carp_status()) {
            set_single_sysctl("net.inet.carp.allow", "1");
        }
        $retval = 0;
        $retval |= filter_configure();
        $savemsg = get_std_save_message($retval);
        clear_subsystem_dirty('vip');
    }
}
if ($_GET['act'] == "del") {
    if ($a_vip[$_GET['id']]) {
        /* make sure no inbound NAT mappings reference this entry */
        if (is_array($config['nat']['rule'])) {
            foreach ($config['nat']['rule'] as $rule) {
                if ($rule['destination']['address'] != "") {
                    if ($rule['destination']['address'] == $a_vip[$_GET['id']]['subnet']) {
开发者ID:geijt,项目名称:pfsense,代码行数:31,代码来源:firewall_virtual_ip.php

示例2: get_carp_status

 *	NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 *	LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 *	HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 *	STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 *	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 *	OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 *	====================================================================
 *
 */
$nocsrf = true;
require_once "guiconfig.inc";
require_once "pfsense-utils.inc";
require_once "functions.inc";
require_once "/usr/local/www/widgets/include/carp_status.inc";
$carp_enabled = get_carp_status();
?>
<div class="content">
<table class="table table-striped table-hover">
	<thead>
		<tr>
			<th>CARP Interface</th>
			<th>IP Address</th>
			<th>Status</th>
		</tr>
	</thead>
	<tbody>
<?php 
if (is_array($config['virtualip']['vip'])) {
    $carpint = 0;
    foreach ($config['virtualip']['vip'] as $carp) {
开发者ID:LFCavalcanti,项目名称:pfsense,代码行数:31,代码来源:carp_status.widget.php

示例3: interface_carpdev_configure

                        interface_carpdev_configure($vip);
                        sleep(1);
                        break;
                    case "ipalias":
                        if (strstr($vip['interface'], "_vip")) {
                            interface_ipalias_configure($vip);
                        }
                        break;
                }
            }
        }
        interfaces_carp_setup();
        mwexec("/sbin/sysctl net.inet.carp.allow=1");
    }
}
$status = get_carp_status();
$pgtitle = array(gettext("Status"), gettext("CARP"));
include "head.inc";
?>

<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php 
include "fbegin.inc";
?>
<form action="carp_status.php" method="post">
<?php 
if ($savemsg) {
    print_info_box($savemsg);
}
?>
开发者ID:rdmenezes,项目名称:pfsense,代码行数:30,代码来源:carp_status.php


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