some stuff to do with things.
authorpaulr <me@pjr.cc>
Thu, 17 Mar 2011 16:49:05 +0000 (03:49 +1100)
committerpaulr <me@pjr.cc>
Thu, 17 Mar 2011 16:49:05 +0000 (03:49 +1100)
doc/README
lib/interComms.php [new file with mode: 0644]
lib/lib.php

index afc59e1..63b34be 100644 (file)
@@ -27,6 +27,8 @@ must:
 - fw to fw connectivity for central mgt
 - basic routing
 - ipv6 + ipv4
+- routing protocols?
+- vrf via lxc?
 
 nice:
 - HA would be nice
diff --git a/lib/interComms.php b/lib/interComms.php
new file mode 100644 (file)
index 0000000..52d874d
--- /dev/null
@@ -0,0 +1,58 @@
+<?php
+define("NETCOM_PORT", 14001);
+define("NETCOM_PORT_SSL", 14002);
+
+class netCom {
+       
+       function __construct($am_i_a_server = false, $server_addr = "127.0.0.1")
+       {
+               // i have to set it to something, right?
+               $semKey = ftok(__FILE__, "pengine");
+               $encrypt = false;
+               
+               $amserver = $am_i_a_server;
+               $server = $server_addr;
+               
+       }
+       
+       // initiates a bind if its a server, a connect if its a client
+       function go()
+       {
+               if($this->amserver) {
+                       
+               }
+       }
+       
+       function serverLoop()
+       {
+               
+       }
+       
+       function sendMessage()
+       {
+               
+       }
+       
+       function receiveMessage()
+       {
+               
+       }
+        
+       
+       
+       private $server;
+       private $encrypt;
+       private $semKey;
+       private $amserver;
+       private $socket;
+       private $socket_ssl;
+       
+}
+
+/* packets look like
+ * PEN:base64_enoded data:INE
+ * 
+ * 
+ */
+
+?>
\ No newline at end of file
index 9df80fb..63c697a 100644 (file)
@@ -16,4 +16,11 @@ if(is_dir("$basedir/plugins")) {
 } else {
        echo "No plugins dir ($basedir/plugins), continuing without\n";
 }
+
+$storeLocation = "$basedir/../store/";
+global $storeLocation;
+
+if(!isdir($storeLocation)) {
+       mkdir($storeLocation, 0770);
+}
 ?>
\ No newline at end of file