Index: nodes/a-ils.csv
===================================================================
--- nodes/a-ils.csv	(revision 8161)
+++ nodes/a-ils.csv	(revision 8161)
@@ -0,0 +1,71 @@
+Node 1 name, Node 1 ip, Node 2 ip,  2 name
+CNodeUniGor,172.16.3.73,172.16.3.74,CNodeDirkLos2
+CNodeRoomburgh1,172.16.2.61,172.16.2.62,CNodeRosmolen
+CNodeVosko2,172.16.3.113,172.16.3.114,CNodeRobijn
+CNodeVosko2,172.16.0.13,172.16.0.14,CNodeHuub
+CNodeLivingLab,172.16.2.241,172.16.2.242,CNodeAJSoft2
+CNodeLivingLab,172.16.2.245,172.16.2.246,CNodeHaagwijk
+CNodeStadhuis,172.16.3.213,172.16.3.214,CNodeCope
+CNodeStadhuis,172.16.3.45,172.16.3.46,CNodeDirkLos2
+CNodeStadhuis,172.16.1.221,172.16.1.222,CNodeLvLn2
+CNodeStadhuis,172.16.3.229,172.16.3.230,CNodeDeClercq
+CNodeStadhuis,172.16.3.105,172.16.3.106,CNodePlantsoen2
+CNodeRoomburgh2,172.16.1.9,172.16.1.10,CNodeLorentzhof
+CNodeJVC,172.16.0.241,172.16.0.242,CNodeGraficall
+CNodeJVC,172.16.1.161,172.16.1.162,CNodeZwet
+CNodeRabo2,172.16.1.153,172.16.1.154,CNodeCope
+CNodeUniGorN,172.16.4.41,172.16.4.42,CNodeHofwijck
+CNodeUniGorN,172.16.1.89,172.16.1.90,CNodeRustenborch
+CNodeAJSoft1,172.16.3.81,172.16.3.82,CNodeAJSoft2
+CNodeAJSoft1,172.16.1.33,172.16.1.34,CNodeRobijn
+CNodeRosmolen,172.16.2.57,172.16.2.58,CNodeRudi
+CNodeRosmolen,172.16.0.209,172.16.0.210,CNodeBroekplein
+CNodeRosmolen,172.16.2.65,172.16.2.66,CNodeRegenboog
+CNodeRV,172.16.0.141,172.16.0.142,CNodeAJSoft1
+CNodeSOM2,172.16.4.69,172.16.4.70,CNodeRabo1
+CNodeAJSoft2,172.16.3.117,172.16.3.118,CNodeMuiderkring
+CNodeAJSoft2,172.16.3.53,172.16.3.54,CNodeHofland
+CNodeAJSoft2,172.16.4.65,172.16.4.66,CNodeRV
+CNodeHaagwijk,172.16.3.85,172.16.3.86,CNodeRick
+CNodeHaagwijk,172.16.1.173,172.16.1.174,CNodeLCPL
+CNodeHaagwijk,172.16.3.89,172.16.3.90,CNodeROCl
+CNodeHaagwijk,172.16.1.157,172.16.1.158,CNodeAJSoft1
+CNodeVosko3,172.16.3.165,172.16.3.166,CNodeStadhuis
+CNodeVosko3,172.16.3.169,172.16.3.170,CNodePlantsoen2
+CNodeVosko3,172.16.3.173,172.16.3.174,CNodeDirkLos1
+CNodeIMI,172.16.0.81,172.16.0.82,CNodeThomas
+CNodeIMI,172.16.0.37,172.16.0.38,CNodeLvLz
+CNodeIMI,172.16.3.93,172.16.3.94,CNodeRV
+CNodeIMI,172.16.5.1,172.16.5.2,CNodeCeTIM2
+CNodeIMI,172.16.0.249,172.16.0.250,CNodeGrip
+CNodeLMstruykverwo1,172.16.1.181,172.16.1.182,CNodeLMstruykverwo2
+CNodeRabo1,172.16.1.17,172.16.1.18,CNodeLebkov
+CNodeRabo1,172.16.3.125,172.16.3.126,CNodeRudi
+CNodeRabo1,172.19.137.65,172.19.137.66,CNodeRabo2
+CNodeRabo1,172.16.3.21,172.16.3.22,CNodeHuub
+CNodeHMKerk1,172.16.1.141,172.16.1.142,CNodeHMKerk2
+CNodeLijtweg1,172.16.3.65,172.16.3.66,CNodeLangeVoort
+CNodeLijtweg1,172.16.253.1,172.16.253.2,CNodeLijtweg2
+CNodeLijtweg1,172.16.1.81,172.16.1.82,CNodeHofwijck
+CNodeLijtweg1,172.16.2.221,172.16.2.222,CNodeAster
+CNodeCeTIM1,172.16.0.193,172.16.0.194,CNodeRoomburgh1
+CNodeCeTIM1,172.16.0.41,172.16.0.42,CNodeHoutmarkt
+CNodeCeTIM1,172.16.8.29,172.16.8.30,CNodeSpoortje
+CNodeLMkempers1,172.16.1.201,172.16.1.202,CNodeLMkempers2
+CNodeDirkLos2,172.16.3.57,172.16.3.58,CNodeDirkLos1
+CNodeDirkLos2,172.16.3.37,172.16.3.38,CNodeRabo2
+CNodeSOM1,172.16.3.137,172.16.3.138,CNodeSOM2
+CNodeSOM1,172.16.1.49,172.16.1.50,CNodeBroekplein
+CNodeSOM1,172.16.0.173,172.16.0.174,CNodeStadhuis
+CNodeLeythenrode,172.16.3.77,172.16.3.78,CNodeGraficall
+CNodeLeythenrode,172.16.3.101,172.16.3.102,CNodeDeClercq
+CNodeLeythenrode,172.16.3.121,172.16.3.122,CNodeRoomburgh2
+CNodeDeClercq,172.16.3.129,172.16.3.130,CNodeRoomburgh3
+CNodeGraficall,172.16.0.85,172.16.0.86,CNodeHMKerk2
+CNodeGraficall,172.16.1.69,172.16.1.70,CNodeSOM2
+CNodeLijtweg2,172.16.1.85,172.16.1.86,CNodeRustenborch
+CNodeLijtweg2,172.16.1.177,172.16.1.178,CNodeBrug
+CNodeLijtweg2,172.16.1.57,172.16.1.58,CNodeBroekplein
+CNodeHofwijck,172.16.3.133,172.16.3.134,CNodeLangeVoort
+CNodeCeTIM2,172.16.0.73,172.16.0.74,CNodeLvLn
+CNodeCeTIM2,172.16.0.77,172.16.0.78,CNodeLvLz
Index: nodes/get-a-ils.pl
===================================================================
--- nodes/get-a-ils.pl	(revision 8161)
+++ nodes/get-a-ils.pl	(revision 8161)
@@ -0,0 +1,200 @@
+#!/usr/bin/env perl
+
+# Print the header
+print "Node 1 name, Node 1 ip, Node 2 ip, $node 2 name\n";
+
+use File::Basename;
+
+sub parse_config {
+  # Set some vars;
+  my $workingfile = $_[0];
+  my $id = $_[1];
+
+  # Undifine config, to avoid polution
+  undef %config;
+
+  # Load config file
+  do($workingfile);
+
+  # Run through all the interfaces
+  foreach my $if (keys %config) {
+
+    # Config file has interface with semicolumn in it, not possible to use these a vars.
+    $ifwithsemicolumn=$if;
+    $if=~s/://g;
+
+    # Get interface info
+    my $cfg=$config{$ifwithsemicolumn};
+
+    # Run through all the parameters of the interface
+    while ($cfg) {
+
+      # Remove newlines
+      $cfg=~s/^([^\n\r]+)[\r\n]*//m;
+
+      # Get first word from the sentence
+      my $line=$1;
+
+      # Remove unwanted characters
+      $line=~s/\s*#.*//;
+
+      # Split key and values
+      if (((my $name, my $value)=split(/=/,$line)) eq 2) {
+
+        # Create a variable of the splited info
+        my $doit = "\$$if\_$id\{\"$name\"\}=\"$value\";";
+        eval($doit);
+      };
+
+      # Remove newlines
+      $cfg=~s/[\r\n]*$//m;
+    };
+  };
+};
+
+
+sub getneighboril {
+  ## I got an IP, just want to know to which node it belongs
+
+  # Get ip from parent
+  $search=$_[0];
+
+  # Open the config file dir
+  opendir ($il_hdir, $dir);
+
+  # Run through all the Nodes in the specified directory.
+  while (my $il_node = readdir($il_hdir)) {
+
+    # Only Allow Directories which represent Nodes
+    if ($il_node =~ /^CNode/) {
+
+      # Read config file
+      $file="$il_node/$configfile";
+      parse_config("$file", "il");
+ 
+      # Run through all the interfaces  in the config file
+      foreach my $il_if (sort keys %config) {
+
+        # Told you before, can't have semicolumns in variable names
+        $il_if=~s/://g;
+
+        # Get the ipinfo of the interface
+        $il_ip = getvar($il_if, "IP", "il");
+
+        # Split the ip and the subnetmask
+        (my $il_ip, my $il_mask) = split(/\//, $il_ip);
+
+        # Match the current ip of node/if with the ip specified in the search
+        if ($il_ip eq $search) {
+          return $il_node;
+        }
+      }
+    }
+  }
+}
+
+
+
+
+sub getvar {
+  ## Make an var from different variabls
+
+  # Get var from parent
+  $if=$_[0];
+  $var=$_[1];
+  $id=$_[2];
+
+  # Make the var, just forgor why this works :-) (yes I made it myself). Didn't specify the value of the var
+  $retval = eval("\$$if\_$id\{\"$var\"\}");
+  return $retval;
+}
+
+sub getneighborip {
+
+  ## The the ip of the neighboring interface
+
+  # Get var (ip) from parent
+  $ip=$_[0];
+
+  # Split ip into oclets
+  (my $oclet1, my $oclet2, my $oclet3, my $oclet4) = split(/\./, $ip);
+
+  # Mod the 4th oclet
+  $neighbor = $oclet4 % 4;
+
+  # 0 = network address, 1 is what we want, 2 makes double values, 3 is broadcast address
+  if ($neighbor eq 1) {
+
+    # Upper the 4th oclet by one (which makes the 2 if the previous comment 
+    $oclet4++;
+  }
+
+  # Make the neightboring ip address
+  $neighbor="$oclet1.$oclet2.$oclet3.$oclet4";
+
+  # If the neighbor and this ip match, we return zero the block further actions
+  if($neighbor eq $ip) {
+    return NULL;
+  }  
+
+  # Return neighboring ip
+  return $neighbor;
+}
+
+# Get relative path of the genesis config dir
+$dir=dirname(".");
+
+# wleiden.con fconfig file
+$configfile="wleiden.conf";
+
+# Open genesis config directory
+opendir ($main_hdir, $dir);
+
+# Run through all items in this directory
+while (my $main_node = readdir($main_hdir)) {
+
+  # Only open config file which have CNode in the name
+  if ($main_node =~ /^CNode/) {
+    $main_file="$main_node/$configfile";
+    parse_config("$main_file", "main");
+
+    # Run through all the interface in the config file
+    foreach my $main_if (sort keys %config) {
+
+      # Told you before, can't have semicolumns in variable names
+      $main_if=~s/://g;
+
+      # Get the ipinfo of the interface
+      $main_ip = getvar($main_if, "IP", "main");
+
+      # Get the interface type
+      $main_extra_type = getvar($main_if, "EXTRA_TYPE", "main");
+
+      # Seperate ip and subnet mask
+      (my $main_ip, my $main_mask) = split(/\//, $main_ip);
+
+      # We only want /30 netmasks and eth2wifibridges 
+      if(($main_mask eq 30) && ($main_extra_type =~ /eth2wifibridge/i)) {
+
+        # Get the neighboring ip
+        $main_neighbor = getneighborip($main_ip);
+
+        # Disregard if empty.
+        if($main_neighbor) {
+
+          # Search the name of the neighboring Node
+          $main_nodename = getneighboril($main_neighbor);
+
+          # Can be empty for valid reasons, but needs the disregarded
+          if ($main_nodename) {
+             
+             # Print the information we have collected
+             print "$main_node,$main_ip,$main_neighbor,$main_nodename\n";
+          }
+        }
+      }
+    }
+  }
+}
+
+exit 0
Index: nodes/test
===================================================================
--- nodes/test	(revision 8161)
+++ nodes/test	(revision 8161)
@@ -0,0 +1,102 @@
+172.25.136.1
+172.20.136.1
+172.25.99.1
+172.25.98.1
+172.25.90.1
+172.25.94.1
+172.23.26.1
+172.19.144.1
+172.25.41.1
+172.21.144.1
+172.19.160.1
+172.17.184.1
+172.19.174.1
+172.17.136.1
+172.17.137.1
+172.17.8.1
+172.18.128.1
+172.19.131.1
+172.19.132.1
+172.24.16.1
+172.21.8.1
+172.20.144.1
+172.25.144.1
+172.25.60.1
+172.25.64.1
+172.20.148.1
+172.23.16.1
+172.19.8.1
+172.17.16.1
+172.17.24.1
+172.18.32.1
+172.27.8.1
+172.27.0.1
+172.28.137.1
+172.23.25.1
+172.21.16.1
+172.19.152.1
+172.17.1.1
+172.23.12.1
+172.23.13.1
+172.20.140.1
+172.25.40.1
+172.25.80.65
+172.25.84.1
+172.25.70.1
+172.25.74.1
+172.18.64.1
+172.17.195.1
+172.17.144.1
+172.17.40.1
+172.17.4.129
+172.17.153.1
+172.24.0.1
+172.17.169.1
+172.28.138.1
+172.19.136.1
+172.21.152.1
+172.20.8.1
+172.21.0.1
+172.18.48.1
+172.18.49.1
+172.18.50.1
+172.21.168.1
+172.23.0.1
+172.17.160.1
+172.23.24.1
+172.20.128.1
+172.25.30.1
+172.25.34.1
+172.28.136.1
+172.21.160.1
+172.18.52.1
+172.17.141.1
+172.17.48.1
+172.19.135.1
+172.19.128.1
+172.25.0.1
+172.17.174.1
+172.17.175.1
+172.17.176.1
+172.25.52.1
+172.25.56.1
+172.19.182.1
+172.19.168.1
+172.16.177.1
+172.19.0.1
+172.22.0.1
+172.27.129.1
+172.22.0.66
+172.23.25.66
+172.25.90.66
+172.17.8.68
+172.17.143.4
+172.20.128.98
+172.16.2.254
+172.19.168.66
+172.17.16.66
+172.16.3.146
+172.17.0.1
+172.16.4.57
+172.17.169.66
+172.16.4.54
