# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2004 The Trustees of Princeton University
#
-# $Id$
-#
*filter
-F BLACKLIST
require_once 'plc_api.php';
global $adm;
-// backwards compatibility with the old 4.2 API
-global $__PLC_API_VERSION;
-if ( ! method_exists ($adm,"GetInterfaces"))
- $__PLC_API_VERSION = 4.2;
-else
- $__PLC_API_VERSION = 4.3;
-
-// Look up the node
-if ($__PLC_API_VERSION==4.2)
- $interfaces = $adm->GetNodeNetworks(array('ip' => $_SERVER['REMOTE_ADDR']));
-else
- $interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
+$interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
if (!empty($interfaces)) {
$nodes = $adm->GetNodes(array($interfaces[0]['node_id']));
if (!empty($nodes)) {
// Look up the node
-// backwards compatibility with the old 4.2 API
-if ( ! method_exists ($adm,"GetInterfaces"))
- $interfaces = $adm->GetNodeNetworks(array('ip' => $_SERVER['REMOTE_ADDR']));
-else
- $interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
+$interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
if (!empty($interfaces)) {
$nodes = $adm->GetNodes(array($interfaces[0]['node_id']));
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2004 The Trustees of Princeton University
#
-# $Id$
-#
<?php
// Get admin API handle
require_once 'plc_api.php';
global $adm;
-// Look up the node
-// backwards compatibility with the old 4.2 API
-global $__PLC_API_VERSION;
-if ( ! method_exists ($adm,"GetInterfaces"))
- $__PLC_API_VERSION = 4.2;
-else
- $__PLC_API_VERSION = 4.3;
-if ($__PLC_API_VERSION==4.2)
- $interfaces = $adm->GetNodeNetworks(array('ip' => $_SERVER['REMOTE_ADDR']));
-else
- $interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
+$interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
if (!empty($interfaces)) {
$nodes = $adm->GetNodes(array($interfaces[0]['node_id']));
exit();
}
-if ($__PLC_API_VERSION==4.2)
- $interfaces = $adm->GetInterfaces($node['nodenetwork_ids']);
-else
- $interfaces = $adm->GetInterfaces($node['interface_ids']);
+$interfaces = $adm->GetInterfaces($node['interface_ids']);
foreach ($interfaces as $interface) {
// XXX PL2896: need interfaces.device
<?php
-//
-// $Id$
-//
// Get admin API handle
require_once 'plc_api.php';
$ip_forward = 0;
// Look up the node
-// backwards compatibility with the old 4.2 API
-global $__PLC_API_VERSION;
-if ( ! method_exists ($adm,"GetInterfaces"))
- $__PLC_API_VERSION = 4.2;
-else
- $__PLC_API_VERSION = 4.3;
-
-if ($__PLC_API_VERSION==4.2)
- $interfaces = $adm->GetNodeNetworks(array('ip' => $_SERVER['REMOTE_ADDR']));
-else
- $interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
+$interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
if (!empty($interfaces)) {
$nodes = $adm->GetNodes(array($interfaces[0]['node_id']));
if (!empty($nodes)) {
$node = $nodes[0];
- if ($__PLC_API_VERSION==4.2)
- $interfaces = $adm->GetInterfaces($node['nodenetwork_ids']);
- else
- $interfaces = $adm->GetInterfaces($node['interface_ids']);
+ $interfaces = $adm->GetInterfaces($node['interface_ids']);
foreach ($interfaces as $interface) {
// Nodes with proxy socket interfaces need to be able to forward
?>
-# $Id$
#
# sysctl configuration file to optionally enable/disable IP forwarding
#