Changeset 2215

Show
Ignore:
Timestamp:
06/07/08 11:46:12 (6 months ago)
Author:
dsugar
Message:

bunch of cleanup
fix problem with editing properties making it into the fnet file

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/framework-plugin/src/com/tresys/framework/compiler/FNetGenerator.java

    r2199 r2215  
    112112                 
    113113                mData.append ("networkresource "); 
    114                 mData.append (name).append (" {"); 
     114                mData.append (name).append (" { "); 
    115115 
    116116                if (type != null) 
     
    146146 
    147147        } 
    148          
    149         public String toString () 
    150         { 
    151                 return mSystems.append (mData).toString (); 
    152         } 
    153  
    154148} 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/Endpoint.java

    • Property svn:keywords changed from Date Revision to Date Rev
    r2192 r2215  
    55|*| Author: Dave Sugar <dsugar@tresys.com> 
    66|*|  
    7 |*| $Date:2008-05-12 13:08:06 -0400 (Mon, 12 May 2008)
    8 |*| $Rev:2113
     7|*| $Date
     8|*| $Rev
    99\*/ 
    1010 
     
    6565                return m_netInfo; 
    6666        } 
    67                  
    6867         
    6968        public NetSystem getSystem () 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/FNETParser.jj

    • Property svn:keywords set to Date Rev
    r2164 r2215  
    1616|*| License: refer to COPYING file for license information. 
    1717|*| Authors: Dave Sugar <dsugar@tresys.com> 
    18 |*| $Rev
    19 |*| $Date
     18|*| $Rev:
     19|*| $Date:
    2020\*/ 
    2121 
     
    295295        Token connection; 
    296296        Token esp; 
    297         Token ip; 
    298         Token mask = null; 
     297        Token ip = null; 
    299298        Token port = null; 
    300299        Integer nESP = null; 
     
    303302        <CONNECTION> system = <ID> <SEPERATOR> domain = <ID> 
    304303        <LBRACE> 
    305                 ip = <IP> (<SLASH> (mask = <IP>) )? (port = <NUMBER>)? 
     304                (ip = <IP> (port = <NUMBER>)?)? 
    306305        <RBRACE> 
    307306        { 
     
    319318                        } 
    320319                                 
    321                         String sMask = null; 
    322                         if (mask != null) 
    323                                 sMask = mask.image; 
    324                          
    325                         NetworkInfo info = new NetworkInfo (null, ip.image, sMask, ports); 
     320                        String sIP = null; 
     321                        if (ip != null) 
     322                                sIP = ip.image; 
     323                                
     324                        NetworkInfo info = new NetworkInfo (null, sIP, null, ports); 
    326325                        source = new Endpoint (netSys, domain, info);  
    327326                } 
     
    329328                // reinit - used later 
    330329                port = null; 
    331                 mask = null; 
     330                ip = null; 
    332331        } 
    333332        system = <ID> <SEPERATOR> domain = <ID> 
    334333        <LBRACE> 
    335                 ip = <IP> (<SLASH> (mask = <IP>) )? (port = <NUMBER>)? 
     334                (ip = <IP> (port = <NUMBER>)?)? 
    336335        <RBRACE> 
    337336        { 
     
    349348                        } 
    350349                         
    351                         String sMask = null; 
    352                         if (mask != null) 
    353                                 sMask = mask.image; 
     350                        String sIP = null; 
     351                        if (ip != null) 
     352                                sIP = ip.image; 
    354353                         
    355                         NetworkInfo info = new NetworkInfo (null, ip.image, sMask, ports); 
     354                        NetworkInfo info = new NetworkInfo (null, sIP, null, ports); 
    356355                        target = new Endpoint (netSys, domain, info);  
    357356                } 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/NetConnection.java

    r2149 r2215  
    5858 
    5959        /* (non-Javadoc) 
     60         * @see java.lang.Object#equals(java.lang.Object) 
     61         */ 
     62        public boolean equals (Object obj) 
     63        { 
     64                if (super.equals (obj)) 
     65                        return true; 
     66                 
     67                if (!(obj instanceof NetConnection)) 
     68                        return false; 
     69                 
     70                NetConnection other = (NetConnection) obj; 
     71                if (!getSource ().equals (other.getSource ())) 
     72                        return false; 
     73                 
     74                if (!getTarget ().equals (other.getTarget ())) 
     75                        return false; 
     76                 
     77                if (!getResource ().equals (other.getResource ())) 
     78                        return false; 
     79                 
     80                return true; 
     81        } 
     82         
     83        /** 
     84         * Return a hashcode for the component. Currently implemented as a  
     85         * call to the String hashCode() method. 
     86         *  
     87         * @return integer hashCode of this instance assuring two objects that 
     88         *                 are == will return same hashcode. 
     89         */ 
     90        public int hashCode()  
     91        { 
     92                return this.toString().hashCode(); 
     93        } 
     94 
     95        /* (non-Javadoc) 
    6096         * @see java.lang.Object#toString() 
    6197         */ 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/NetItem.java

    • Property svn:keywords changed from Date Revision to Date Rev
    r2113 r2215  
    55|*| Author: Dave Sugar <dsugar@tresys.com> 
    66|*|  
    7 |*| $Date
    8 |*| $Rev
     7|*| $Date:2008-05-12 13:08:06 -0400 (Mon, 12 May 2008)
     8|*| $Rev:2113
    99\*/ 
    1010 
     
    5151                        return false; 
    5252                 
    53               if (!m_token.equals (other.m_token)) 
    54                       return false; 
     53//            if (!m_token.equals (other.m_token)) 
     54//                    return false; 
    5555                 
    5656                return true; 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/NetworkConfig.java

    • Property svn:keywords changed from Date Revision to Date Rev
    r2199 r2215  
    6767                { 
    6868                        m_netresources.put (sName, i_item); 
    69                         m_endpoints.put (sName, new HashSet ()); 
    70                         m_connections.put (sName, new HashSet ()); 
     69                        if (!m_endpoints.containsKey (sName)) 
     70                                m_endpoints.put (sName, new HashSet ()); 
     71                        if (!m_connections.containsKey (sName)) 
     72                                m_connections.put (sName, new HashSet ()); 
    7173                } 
    7274        } 
     
    241243//              m_accesses.add (i_access); 
    242244         
    243               System.out.println ("Add network access " + i_access); 
     245///           System.out.println ("Add network access " + i_access); 
    244246                 
    245247                NetworkResource netResource = (NetworkResource) i_access.getResource (); 
     
    276278                { 
    277279                        Collection oldConnections = getConnections (netRes); 
    278                         Collection newConnection = new Vector (); 
     280                        Collection newConnection = new HashSet (); 
    279281 
    280282                        for (Iterator itr = endpoints.iterator (); itr.hasNext (); ) 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/policy/SystemResourceValidator.java

    r2144 r2215  
    193193                                                m_errHandler.Error ("The Rdef \"" + dobject.GetName() 
    194194                                                                + "\" associated with component \"" + i_component.getName() 
    195                                                                 + "\" requires a network resource.", i_component.GetDictionaryObjectLocation(dobject), 
     195                                                                + "\" requires a network information.", i_component.GetDictionaryObjectLocation(dobject), 
    196196                                                                ErrorHandler.ERROR_MISSING_NETWORK, i_component.getName ()); 
    197197                                        } 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/systemResources/NetworkInfo.java

    r2180 r2215  
    9393 
    9494                NetworkInfo other = (NetworkInfo) obj; 
    95                 if (m_sDevice != other.m_sDevice  
    96                         && m_sDevice != null  
    97                         && !m_sDevice.equals (other.m_sDevice)) 
     95                if ((m_sDevice != other.m_sDevice && m_sDevice == null)  
     96                        || (m_sDevice != null && !m_sDevice.equals (other.m_sDevice))) 
    9897                { 
    9998                        return false; 
    10099                } 
    101100                 
    102                 if (m_sIPAddr != other.m_sIPAddr  
    103                         && m_sIPAddr != null  
    104                         && !m_sIPAddr.equals (other.m_sIPAddr)) 
     101                if ((m_sIPAddr != other.m_sIPAddr && m_sIPAddr == null) 
     102                        || (m_sIPAddr != null && !m_sIPAddr.equals (other.m_sIPAddr))) 
     103                { 
     104                        return false; 
     105                } 
     106         
     107                if ((m_sMask != other.m_sMask && m_sMask == null) 
     108                        || (m_sMask != null && !m_sMask.equals (other.m_sMask))) 
    105109                { 
    106110                        return false; 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/systemResources/SystemResourcesParser.jj

    r2208 r2215  
    389389                                return; 
    390390                         
     391                        if (ipAddr == null) 
     392                                return; 
     393                                 
    391394                        localInfo = new NetworkInfo (null, ipAddr, null, aports);  
    392395                        NetworkResource network = new LabeledNetworkResource (localInfo, dobj); 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/builder/ENetworkConfig.java

    r2199 r2215  
    1515import java.beans.PropertyChangeListener; 
    1616import java.util.Collection; 
     17import java.util.HashSet; 
    1718import java.util.Iterator; 
    1819 
     
    2021import com.tresys.framework.compiler.dictionary.SysResourceState; 
    2122import com.tresys.framework.compiler.linkage.net.Endpoint; 
     23import com.tresys.framework.compiler.linkage.net.NetConnection; 
    2224import com.tresys.framework.compiler.linkage.net.NetResource; 
    2325import com.tresys.framework.compiler.linkage.net.NetSystem; 
     
    2729import com.tresys.framework.compiler.policy.AccessNetwork; 
    2830import com.tresys.framework.compiler.policy.NetworkResource; 
     31import com.tresys.framework.compiler.systemResources.NetworkInfo; 
    2932import com.tresys.framework.compiler.systemResources.SystemResourceTypes; 
    3033import com.tresys.framework.plugin.editor.policy.graphic.model.AccessConnection; 
     
    153156                         
    154157                } 
     158                else if (NetworkResourceShape.NETWORK_INFO_LOCAL.equals (sProperty)) 
     159                { 
     160                        NetworkInfo oldInfo = (NetworkInfo) e.getOldValue (); 
     161                        NetworkInfo newInfo = (NetworkInfo) e.getNewValue (); 
     162                         
     163                        NetworkResourceShape source = (NetworkResourceShape) e.getSource (); 
     164 
     165                        Collection endPoints = (Collection) m_endpoints.get (source.getName ()); 
     166                        { 
     167                                HashSet newPoints = new HashSet (); 
     168                                for (Iterator itr1 = endPoints.iterator (); itr1.hasNext (); ) 
     169                                { 
     170                                        Endpoint pt = (Endpoint) itr1.next (); 
     171                                        if (!pt.getSystem ().getName ().equals (source.getSystem ().getName ())) 
     172                                                continue; 
     173                                         
     174                                        if (pt.getNetworkInfo ().equals (oldInfo)) 
     175                                        { 
     176                                                NetworkInfo netInfo = new NetworkInfo (newInfo); 
     177                                                Endpoint newPoint = new Endpoint (pt.getSystem (), pt.getToken (), netInfo); 
     178                                                newPoints.add (newPoint); 
     179                                                itr1.remove (); 
     180                                        } 
     181                                } 
     182                                endPoints.addAll (newPoints); 
     183                        } 
     184                         
     185 
     186                        Collection cons = (Collection) m_connections.get (source.getName ()); 
     187                        { 
     188                                HashSet newConnections = new HashSet (); 
     189                                for (Iterator itr1 = cons.iterator (); itr1.hasNext (); ) 
     190                                { 
     191                                        NetConnection con = (NetConnection) itr1.next (); 
     192                                        if (!con.getResource ().equals (source.getNetResource ())) 
     193                                                continue; 
     194                                         
     195                                        NetConnection newConnection = null; 
     196                                        if (con.getSource ().getNetworkInfo ().equals (oldInfo)) 
     197                                        { 
     198                                                Endpoint oldSource = con.getSource (); 
     199                                                Endpoint srcPoint = new Endpoint (oldSource.getSystem (), oldSource.getToken (), newInfo); 
     200                                                newConnection = new NetConnection (srcPoint, con.getTarget (), source.getNetResource (), con.getESPNumber ()); 
     201                                        } 
     202                                        else if (con.getTarget ().getNetworkInfo ().equals (oldInfo)) 
     203                                        { 
     204                                                Endpoint oldTarget = con.getTarget (); 
     205                                                Endpoint targetPoint = new Endpoint (oldTarget.getSystem (), oldTarget.getToken (), newInfo); 
     206                                                newConnection = new NetConnection (con.getSource(), targetPoint, source.getNetResource (), con.getESPNumber ()); 
     207                                        } 
     208                                        if (newConnection != null) 
     209                                        { 
     210                                                itr1.remove (); 
     211                                                newConnections.add (newConnection); 
     212                                        } 
     213                                } 
     214                                cons.addAll (newConnections); 
     215                        } 
     216                } 
     217                else if (NetworkResourceShape.NETWORK_INFO_REMOTE.equals (sProperty)) 
     218                { 
     219                        // we really don't care - only local info is used in the fnet file                       
     220                } 
    155221        } 
    156222} 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/builder/SELinuxSystem.java

    r2192 r2215  
    9696        /** The saved reference to the Policy */ 
    9797        private Policy m_policy; 
     98        private long m_policyModStamp = IResource.NULL_STAMP; 
    9899 
    99100        private static boolean libSELinuxLoaded = false; 
     
    187188        public Policy getPolicy()  
    188189        { 
    189                 if (m_policy == null) 
    190                 { 
    191                         try 
    192                         { 
    193                                 IProject proj = getProject(); 
    194                                 FrameworkNature nat = FrameworkNature.getNature(proj); 
    195          
    196                                 if (nat.getDictionary () == null) 
     190 
     191                try 
     192                { 
     193                        IProject proj = getProject(); 
     194                        FrameworkNature nat = FrameworkNature.getNature(proj); 
     195 
     196                        IFile fpol = getFPolFile(); 
     197                        long modStamp = fpol.getModificationStamp (); 
     198                         
     199                        if (modStamp != m_policyModStamp) 
     200                                m_policy = null; 
     201                         
     202                        Dictionary dictionary = nat.getDictionary (); 
     203                        Linkage linkage = getLinkage (); 
     204 
     205                        if (dictionary == null) 
     206                        { 
     207                                Utility.ProjectError ("No Policies can be built until a valid dictionary is made"); 
     208                                return null; 
     209                        } 
     210 
     211                        if (m_policy != null) 
     212                        { 
     213                                boolean bReloadPolicy = false; 
     214                                if (m_policy.getDictionary () != dictionary) 
     215                                        bReloadPolicy = true; 
     216                                 
     217                                if (m_policy.getLinkage () != linkage) 
     218                                        bReloadPolicy = true; 
     219                                 
     220                                if (bReloadPolicy) 
     221                                        m_policy = null; 
     222                        } 
     223 
     224                        if (m_policy != null) 
     225                                return m_policy; 
     226 
     227                         
     228 
     229                        if (DEBUG) 
     230                                System.out.println("SELinuxSystem.java.getPolicy returns null  /builder/.."); 
     231                         
     232                         
     233//                              if (m_policy == null) 
     234                                m_policy = new Policy (getName (), dictionary, linkage); 
     235                         
     236                         
     237                        m_policy.setValidInterfaces (getValidInterfaces ()); 
     238                        m_policy.setBasePolicyBooleans (getAllBooleans ()); 
     239                        FrameworkNature.deleteMarkers (fpol); 
     240 
     241                        ErrorHandler policyHandler = getFPOLErrorHandler(); 
     242                        m_policy.AddPolicyReader (new InputStreamReader (fpol.getContents (true)), getNetworkConfig (), policyHandler); 
     243                        m_policyModStamp = modStamp; 
     244                         
     245                        rebuildSystemResources (); 
     246                         
     247                        Display disp = Display.getDefault(); 
     248                        final SELinuxSystem system = this; 
     249                        disp.syncExec (new Runnable ()  
     250                        { 
     251                                public void run()  
    197252                                { 
    198                                         Utility.ProjectError ("No Policies can be built until a valid dictionary is made"); 
    199                                         return null; 
     253                                        try  
     254                                        { 
     255                                                parseCustomization (false); 
     256                                                 
     257                                                NetworkAdder adder = new NetworkAdder (getPolicy (), getFPOLErrorHandler ());                                                    
     258                                                getNetworkConfig ().Accept (adder); 
     259 
     260                                                GraphicPolicyRefresh refresh = new GraphicPolicyRefresh (system); 
     261                                                getPolicy().Accept(refresh); 
     262                                        } 
     263                                        catch(Exception e)  
     264                                        { 
     265                                                e.printStackTrace(); 
     266                                        } 
    200267                                } 
    201          
    202                                 if (DEBUG) 
    203                                         System.out.println("SELinuxSystem.java.getPolicy returns null  /builder/.."); 
    204                                 m_policy = new Policy (getName (), nat.getDictionary (), getLinkage ()); 
    205                                 m_policy.setValidInterfaces (getValidInterfaces ()); 
    206                                 m_policy.setBasePolicyBooleans (getAllBooleans ()); 
    207                                 FrameworkNature.deleteMarkers (getFPolFile()); 
    208  
    209                                 ErrorHandler policyHandler = getFPOLErrorHandler(); 
    210                                 m_policy.AddPolicyReader (new InputStreamReader (getFPolFile().getContents (true)), getNetworkConfig (), policyHandler); 
    211  
    212                                  
    213                                 rebuildSystemResources (); 
    214                                  
    215                                 Display disp = Display.getDefault(); 
    216                                 final SELinuxSystem system = this; 
    217                                 disp.syncExec (new Runnable ()  
    218                                 { 
    219                                         public void run()  
    220                                         { 
    221                                                 try  
    222                                                 { 
    223                                                         parseCustomization (false); 
    224                                                          
    225                                                         NetworkAdder adder = new NetworkAdder (getPolicy (), getFPOLErrorHandler ());                                                    
    226                                                         getNetworkConfig ().Accept (adder); 
    227  
    228                                                         GraphicPolicyRefresh refresh = new GraphicPolicyRefresh (system); 
    229                                                         getPolicy().Accept(refresh); 
    230                                                 } 
    231                                                 catch(Exception e)  
    232                                                 { 
    233                                                         e.printStackTrace(); 
    234                                                 } 
    235                                         } 
    236                                 }); 
    237                         } 
    238                         catch (CoreException ce) 
    239                         { 
    240                                 Utility.ProjectError ("Error adding " + getFPolFile().getName () + " to the policy"); 
    241                                 ce.printStackTrace (); 
    242                         } 
     268                        }); 
     269                } 
     270                catch (CoreException ce) 
     271                { 
     272                        Utility.ProjectError ("Error adding " + getFPolFile().getName () + " to the policy"); 
     273                        ce.printStackTrace (); 
    243274                } 
    244275 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/NetworkResourceShape.java

    r2213 r2215  
    33|*| License: refer to COPYING file for license information. 
    44|*| Author:     Norman Patrick <npatrick@tresys.com> 
     5|*|                             Dave Sugar <dsugar@tresys.com> 
    56|*|   
    67|*| $Rev$ 
     
    9899        public static final String NetworkResource_ip_ports_pattern = "([0-9]+( [0-9]+)*)?"; 
    99100 
     101        public static final String NETWORK_INFO_LOCAL = "NetworkResourceInfo.local"; 
     102        public static final String NETWORK_INFO_REMOTE = "NetworkResourceInfo.remote"; 
     103         
    100104        private IPropertyDescriptor[] m_descriptors = null; 
    101105        private Vector m_rdefs = null; 
     
    386390        } 
    387391 
    388          
     392        private NetworkInfo getNetworkInfo (String i_sInfoType) 
     393        { 
     394                Rdef rdef = GetRdef (); 
     395                NetworkResource resource = (NetworkResource) getComponent (); 
     396                SystemResource sysResource = null; 
     397                if (rdef != null) 
     398                        sysResource = resource.GetSystemResource (rdef); 
     399//              resource.GetSystemResources (m_rdef).get (0); 
     400 
     401                NetworkInfo localInfo = null; 
     402                NetworkInfo remoteInfo = null; 
     403 
     404                 
     405                if (sysResource == null) 
     406                { 
     407                        if (rdef.GetSysResourceState (SystemResourceTypes.ipsec) != SysResourceState.No) 
     408                        { 
     409                                localInfo = new NetworkInfo (null, null, null, null); 
     410                                sysResource = new LabeledNetworkResource (localInfo, rdef); 
     411                        } 
     412                        else if (rdef.GetSysResourceState (SystemResourceTypes.secmark) != SysResourceState.No) 
     413                        { 
     414                                localInfo = new NetworkInfo (null, null, null, null); 
     415                                remoteInfo = new NetworkInfo (null, null, null, null); 
     416                                sysResource = new IPTablesNetworkResource (localInfo, remoteInfo, EMPTY_STRING, rdef); 
     417                        } 
     418 
     419                        resource.AddSystemResource (rdef, sysResource); 
     420                } 
     421                 
     422                if (sysResource instanceof LabeledNetworkResource) 
     423                { 
     424                        localInfo = ((LabeledNetworkResource) sysResource).getNetworkInfo (); 
     425                } 
     426 
     427                else if (sysResource instanceof IPTablesNetworkResource) 
     428                { 
     429                        localInfo = ((IPTablesNetworkResource) sysResource).getLocalInfo (); 
     430                        remoteInfo = ((IPTablesNetworkResource) sysResource).getRemoteInfo (); 
     431                } 
     432 
     433                if (NETWORK_INFO_LOCAL.equals (i_sInfoType)) 
     434                        return localInfo; 
     435                if (NETWORK_INFO_REMOTE.equals (i_sInfoType)) 
     436                        return remoteInfo; 
     437                return null; 
     438        } 
     439         
     440        public void setLocalDevice (String i_sDevice) 
     441        { 
     442                NetworkInfo localInfo = getNetworkInfo (NETWORK_INFO_LOCAL); 
     443                if (localInfo == null) 
     444                        return; 
     445                 
     446                NetworkInfo oldInfo = new NetworkInfo (localInfo); 
     447                localInfo.setDevice (i_sDevice); 
     448                 
     449                firePropertyChange (NETWORK_INFO_LOCAL, oldInfo, localInfo); 
     450        } 
     451         
     452        public void setLocalIP (String i_sIPAddr) 
     453        { 
     454                NetworkInfo localInfo = getNetworkInfo (NETWORK_INFO_LOCAL); 
     455                if (localInfo == null) 
     456                        return; 
     457                 
     458                NetworkInfo oldInfo = new NetworkInfo (localInfo); 
     459                localInfo.setIPAddr (i_sIPAddr); 
     460                 
     461                firePropertyChange (NETWORK_INFO_LOCAL, oldInfo, localInfo); 
     462        } 
     463         
     464        public void setLocalMask (String i_sMask) 
     465        { 
     466                NetworkInfo localInfo = getNetworkInfo (NETWORK_INFO_LOCAL); 
     467                if (localInfo == null) 
     468                        return; 
     469                 
     470                NetworkInfo oldInfo = new NetworkInfo (localInfo); 
     471                localInfo.setMask (i_sMask); 
     472                 
     473                firePropertyChange (NETWORK_INFO_LOCAL, oldInfo, localInfo); 
     474        } 
     475         
     476        public void setLocalPorts (int [] i_aPorts) 
     477        { 
     478                NetworkInfo localInfo = getNetworkInfo (NETWORK_INFO_LOCAL); 
     479                if (localInfo == null) 
     480                        return; 
     481                 
     482                NetworkInfo oldInfo = new NetworkInfo (localInfo); 
     483                localInfo.setPorts (i_aPorts); 
     484                 
     485                firePropertyChange (NETWORK_INFO_LOCAL, oldInfo, localInfo); 
     486        } 
     487 
     488        public void setRemoteDevice (String i_sDevice) 
     489        { 
     490                NetworkInfo remoteInfo = getNetworkInfo (NETWORK_INFO_REMOTE); 
     491                if (remoteInfo == null) 
     492                        return; 
     493                 
     494                NetworkInfo oldInfo = new NetworkInfo (remoteInfo); 
     495                remoteInfo.setDevice (i_sDevice); 
     496                 
     497                firePropertyChange (NETWORK_INFO_REMOTE, oldInfo, remoteInfo); 
     498        } 
     499         
     500        public void setRemoteIP (String i_sIPAddr) 
     501        { 
     502                NetworkInfo remoteInfo = getNetworkInfo (NETWORK_INFO_REMOTE); 
     503                if (remoteInfo == null) 
     504                        return; 
     505                 
     506                NetworkInfo oldInfo = new NetworkInfo (remoteInfo); 
     507                remoteInfo.setIPAddr (i_sIPAddr); 
     508                 
     509                firePropertyChange (NETWORK_INFO_REMOTE, oldInfo, remoteInfo); 
     510        } 
     511         
     512        public void setRemoteMask (String i_sMask) 
     513        { 
     514                NetworkInfo remoteInfo = getNetworkInfo (NETWORK_INFO_REMOTE); 
     515                if (remoteInfo == null) 
     516                        return; 
     517                 
     518                NetworkInfo oldInfo = new NetworkInfo (remoteInfo); 
     519                remoteInfo.setMask (i_sMask); 
     520                 
     521                firePropertyChange (NETWORK_INFO_REMOTE, oldInfo, remoteInfo); 
     522        } 
     523         
     524        public void setRemotePorts (int [] i_aPorts) 
     525        { 
     526                NetworkInfo remoteInfo = getNetworkInfo (NETWORK_INFO_REMOTE); 
     527                if (remoteInfo == null) 
     528                        return; 
     529                 
     530                NetworkInfo oldInfo = new NetworkInfo (remoteInfo); 
     531                remoteInfo.setPorts (i_aPorts); 
     532                 
     533                firePropertyChange (NETWORK_INFO_REMOTE, oldInfo, remoteInfo); 
     534        } 
     535 
    389536        public void setNetworkRdef (Rdef i_rdef) 
    390537        { 
     
    598745                 */ 
    599746 
    600                 Rdef rdef = GetRdef (); 
     747                NetworkResource resource = (NetworkResource) getComponent (); 
    601748 
    602749                if (NETWORK_TYPE_PROP.equals (propertyId)) 
     
    614761                else if (NETWORK_PROTOCOL_INDEX.equals (propertyId)) 
    615762                        this.SetNetworkProtocolIndex (value); 
    616                 else if (rdef != null
    617                 { 
    618                        NetworkResource resource = (NetworkResource) getComponent (); 
    619                         SystemResource sysResource = null
    620                        if (rdef != null
    621                                sysResource = resource.GetSystemResource (rdef); 
    622 //                      resource.GetSystemResources (m_rdef).get (0); 
    623  
    624                        NetworkInfo localInfo = null; 
    625                        NetworkInfo remoteInfo = null; 
    626  
    627                          
    628                         if (sysResource == null) 
     763                else if (NETWORK_LOCAL_DEVICE.equals (propertyId)
     764                       setLocalDevice ((String) value); 
     765                else if (NETWORK_LOCAL_IP_ADDRESS.equals (propertyId)) 
     766                        setLocalIP ((String) value)
     767                else if (NETWORK_LOCAL_MASK.equals (propertyId)
     768                        setLocalMask ((String) value); 
     769                else if (NETWORK_LOCAL_IP_PORTS.equals (propertyId)) 
     770                        setLocalPorts (ParsePortsString((String) value)); 
     771                else if (NETWORK_LOCAL_ENCRYPTION_TYPE_INDEX.equals (propertyId)) 
     772                { 
     773                        NetworkConfig nconfig = getSystem().getNetworkConfig (); 
     774                         
     775                        if (nconfig != null) 
    629776                        { 
    630                                 if (rdef.GetSysResourceState (SystemResourceTypes.ipsec) != SysResourceState.No) 
    631