[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Many files:



ChangeSet 1.1727, 2005/06/20 23:33:35+01:00, smh22@xxxxxxxxxxxxxxxxxxxx

        Many files:
          new file



 SecurityLabel.java     |   34 +
 SecurityPolicySpec.xsd |  115 +++
 SsidsEntry.java        |   29 
 XmlToBin.java          | 1588 +++++++++++++++++++++++++++++++++++++++++++++++++
 XmlToBinInterface.java |  135 ++++
 myHandler.java         |   47 +
 readme.install         |   33 +
 readme.xen             |   65 ++
 xen_sample_def.xml     |   46 +
 xen_sample_policy.xml  |   58 +
 10 files changed, 2150 insertions(+)


diff -Nru a/tools/misc/policyprocessor/SecurityLabel.java 
b/tools/misc/policyprocessor/SecurityLabel.java
--- /dev/null   Wed Dec 31 16:00:00 196900
+++ b/tools/misc/policyprocessor/SecurityLabel.java     2005-06-20 19:02:03 
-04:00
@@ -0,0 +1,34 @@
+/**
+ * (C) Copyright IBM Corp. 2005
+ *
+ * $Id: SecurityLabel.java,v 1.2 2005/06/17 20:00:04 rvaldez Exp $
+ *
+ * Author: Ray Valdez
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, version 2 of the
+ * License.
+ *
+ * SecurityLabel Class.  
+ *
+ * <p>
+ *
+ * Keeps track of types.
+ *
+ * <p>
+ *
+ *
+ */
+import java.util.*;
+public class SecurityLabel
+{
+ Vector ids;
+ Vector vlans;
+ Vector slots;
+ Vector steTypes;
+ int steSsidPosition;
+ Vector chwIDs;
+ Vector chwTypes;
+ int chwSsidPosition;
+}
diff -Nru a/tools/misc/policyprocessor/SecurityPolicySpec.xsd 
b/tools/misc/policyprocessor/SecurityPolicySpec.xsd
--- /dev/null   Wed Dec 31 16:00:00 196900
+++ b/tools/misc/policyprocessor/SecurityPolicySpec.xsd 2005-06-20 19:02:03 
-04:00
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Author: Ray Valdez, rvaldez@xxxxxxxxxx -->
+<!-- xml schema definition for xen xml policies -->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+targetNamespace="http://www.ibm.com";
+xmlns="http://www.ibm.com"; 
+elementFormDefault="qualified">
+
+<xsd:element name="TE" type="xsd:string" />
+<xsd:element name="ChWall" type="xsd:string" />
+
+<xsd:element name="Definition">
+  <xsd:complexType>
+       <xsd:sequence>
+
+         <!-- simple type enforcement -->
+         <xsd:element name="Types" minOccurs ="0" maxOccurs="1">
+               <xsd:complexType>
+                 <xsd:sequence>
+                       <xsd:element ref="TE" minOccurs ="1" maxOccurs 
="unbounded"/>
+                 </xsd:sequence>
+               </xsd:complexType>
+         </xsd:element>
+
+         <!-- chinese wall -->
+         <!--   type definition -->
+         <xsd:element name="ChWallTypes" minOccurs ="0" maxOccurs="1">
+               <xsd:complexType>
+                 <xsd:sequence>
+                       <xsd:element ref="ChWall"  minOccurs ="1" maxOccurs 
="unbounded"/>
+
+               </xsd:sequence>
+          </xsd:complexType>
+       </xsd:element>
+
+       <!--   conflict set -->
+         <xsd:element name="ConflictSet" minOccurs ="0" maxOccurs="unbounded">
+               <xsd:complexType>
+                 <xsd:sequence>
+                       <xsd:element ref="ChWall"  minOccurs ="2" maxOccurs 
="unbounded"/>
+                 </xsd:sequence>
+               </xsd:complexType>
+       </xsd:element>
+
+       </xsd:sequence>
+  </xsd:complexType>
+</xsd:element>
+
+<xsd:element name="Policy">
+    <xsd:complexType>
+      <xsd:sequence>
+
+       <xsd:element name="PolicyHeader">
+       <xsd:complexType>
+          <xsd:all>
+               <xsd:element name = "Name" type="xsd:string"/>
+               <xsd:element name = "DateTime" type="xsd:dateTime"/>
+               <xsd:element name = "Tag" minOccurs ="1" maxOccurs ="1" 
type="xsd:string"/>
+               <xsd:element name = "TypeDefinition">
+               <xsd:complexType>
+                 <xsd:all>
+                       <xsd:element name = "url" type="xsd:string"/>
+                       <xsd:element name = "hash" minOccurs ="0" maxOccurs 
="1" type="xsd:string"/>
+                 </xsd:all>
+               </xsd:complexType>
+               </xsd:element>
+
+          </xsd:all>
+       </xsd:complexType>
+       </xsd:element>
+
+       <xsd:element name="VM" minOccurs ="1" maxOccurs="unbounded">
+         <xsd:complexType>
+          <xsd:sequence>
+               <xsd:element name="id" type="xsd:integer"/>
+               <xsd:element ref="TE" minOccurs="0" maxOccurs="unbounded" />
+               <xsd:element ref="ChWall" minOccurs ="0" maxOccurs="unbounded"/>
+          </xsd:sequence>
+         </xsd:complexType>
+       </xsd:element>
+
+       <xsd:element name="Vlan" minOccurs ="0" maxOccurs="unbounded">
+         <xsd:complexType>
+          <xsd:sequence>
+               <xsd:element name="vid" type="xsd:integer"/>
+               <xsd:element ref="TE" minOccurs="1" maxOccurs="unbounded" />
+          </xsd:sequence>
+         </xsd:complexType>
+       </xsd:element>
+
+       <xsd:element name="Slot" minOccurs ="0" maxOccurs="unbounded">
+         <xsd:complexType>
+          <xsd:sequence>
+               <xsd:element name="bus" type="xsd:integer"/>
+               <xsd:element name="slot" type="xsd:integer"/>
+               <xsd:element ref="TE" minOccurs="1" maxOccurs="unbounded" />
+          </xsd:sequence>
+         </xsd:complexType>
+       </xsd:element>
+
+
+      </xsd:sequence>
+    </xsd:complexType>
+</xsd:element>
+
+<!-- root element -->
+<xsd:element name="SecurityPolicySpec">
+    <xsd:complexType>
+      <xsd:choice>
+               <xsd:element ref="Definition" minOccurs ="1" 
maxOccurs="unbounded"/>
+               <xsd:element ref="Policy" minOccurs ="1" maxOccurs="unbounded"/>
+      </xsd:choice>
+    </xsd:complexType>
+</xsd:element>
+</xsd:schema>
diff -Nru a/tools/misc/policyprocessor/SsidsEntry.java 
b/tools/misc/policyprocessor/SsidsEntry.java
--- /dev/null   Wed Dec 31 16:00:00 196900
+++ b/tools/misc/policyprocessor/SsidsEntry.java        2005-06-20 19:02:03 
-04:00
@@ -0,0 +1,29 @@
+/**
+ * (C) Copyright IBM Corp. 2005
+ *
+ * $Id: SsidsEntry.java,v 1.2 2005/06/17 20:02:40 rvaldez Exp $
+ *
+ * Author: Ray Valdez
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, version 2 of the
+ * License.
+ *
+ * SsidsEntry Class.  
+ * <p>
+ *
+ * Holds ssid information.
+ *
+ * <p>
+ *
+ *
+ */
+public class SsidsEntry 
+ {
+  int id;      /* used for partition and vlan */
+  int bus;     /* used for slots */
+  int slot;
+  int ste = 0xffffffff;
+  int chw = 0xffffffff;
+ }
diff -Nru a/tools/misc/policyprocessor/XmlToBin.java 
b/tools/misc/policyprocessor/XmlToBin.java
--- /dev/null   Wed Dec 31 16:00:00 196900
+++ b/tools/misc/policyprocessor/XmlToBin.java  2005-06-20 19:02:03 -04:00
@@ -0,0 +1,1588 @@
+/**
+ * (C) Copyright IBM Corp. 2005
+ *
+ * $Id: XmlToBin.java,v 1.2 2005/06/17 20:00:04 rvaldez Exp $
+ *
+ * Author: Ray Valdez
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, version 2 of the
+ * License.
+ *
+ * XmlToBin  Class.  
+ * <p>
+ *
+ * Translates a xml representation of a SHYPE policy into a binary  
+ * format.  The class processes an xml policy file based on elment tags 
+ * defined in a schema definition files: SecurityPolicySpec.xsd.
+ *
+ * XmlToBin Command line Options: 
+ *
+ *      -i              inputFile:      name of policyfile (.xml)
+ *      -o              outputFile:     name of binary policy file (Big Endian)
+ *      -xssid          SsidFile:       xen ssids to types text file
+ *      -xssidconf      SsidConf:      xen conflict ssids to types text file
+ *      -debug                          turn on debug messages
+ *      -help                           help. This printout
+ *
+ * <p>
+ *
+ *
+ */
+import java.util.*;
+import java.io.*;
+import java.io.IOException;
+import java.io.FileNotFoundException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.Attr;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.NamedNodeMap;
+import org.xml.sax.*;
+import javax.xml.parsers.*;
+import org.xml.sax.helpers.*;
+
+public class XmlToBin 
+ implements XmlToBinInterface
+{
+  class SlotInfo {
+       String bus;
+       String slot;
+  }
+
+ boolean LittleEndian = false;
+ boolean debug = false;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.