--     
--  Sigurd Meldal <meldal@anna.stanford.edu>     
--     
--  This is a flat network architecture, consisting of 2 LANs, each with 
--  2 workstations and a firewall. The firewalls are connected to a WAN,
--  and there is one user for each workstation.
--

architecture netskeleton() return root is
    
    internet : WAN is newWAN(WAN_net_no);
    LANs     : array(integer, LAN) is (
				      1 is newLAN(1),
				      2 is newLAN(1)
                                     );
    FWs      : array(integer, firewall) is (
				      1 is newFirewall(mkAddress(1, 0)),
				      2 is newFirewall(mkAddress(2, 0))
                                     );

    WSs      : array(integer, COTSWorkstation) is (
	        1 is newCOTSWorkstation(mkAddress(1, 1)), 
	        2 is newCOTSWorkstation(mkAddress(1, 2)),
	        3 is newCOTSWorkstation(mkAddress(2, 1)),
	        4 is newCOTSWorkstation(mkAddress(2, 2)) 
               );

    users    : array(integer, User) is (
				     1 is newUser(),
				     2 is newUser(),
				     3 is newUser(),
				     4 is newUser()
                                     );
  
connect
--  connect Firewalls to the WAN     
    for i : integer in 1..num_enclaves
    generate
        FWs[i].wan_conn
	to
	internet.ws_conn;
	FWs[i].net_conn
	to 
	LANs[i].ws_conn;
    end;

-- connect workstations to their respective LANs
    for i : integer in 1..num_ws
    generate
	WSs[i].net_conn
	to 
	LANs[WSs[i].network_address.net_no].ws_conn;
    end;

-- connect workstations to their respective users
    for i : integer in 1..num_ws
    generate
	WSs[i].user_conn
	to 
	users[i].ws_conn;
    end;

end;
