Patch title: Release 96 bulk changes
Abstract:
File: /pliant/util/pml/resolve.pli
Key:
    Removed line
    Added line
   
module "/pliant/language/unsafe.pli"
module "/pliant/language/context.pli"
module "/pliant/protocol/dns/name.pli"
module "/pliant/fullpliant/user.pli"
module "/pliant/protocol/http/site.pli"
module "/pliant/language/type/text/str8.pli"
module "/pliant/language/type/misc/blob.pli"
module "/pliant/util/crypto/cipher.pli"


module "/pliant/language/unsafe.pli"
module "/pliant/language/context.pli"
module "/pliant/protocol/dns/name.pli"
module "/pliant/fullpliant/user.pli"
module "/pliant/protocol/http/site.pli"
module "/pliant/language/type/text/str8.pli"
module "/pliant/language/type/misc/blob.pli"
module "/pliant/util/crypto/cipher.pli"


function resolve_ip class name from_ip smart ip port forward
  arg Str class name from_ip ; arg_w Str ip ; arg CBool smar
function resolve_ip class name from_ip path_index forward ip port path_count
  arg Str class name from_ip ; arg Int path_index ; arg_w CBool forward ; arg_w Str ip ; arg_w Int port ; arg_w Int path_count
  plugin resolve_ip
  plugin resolve_ip
  ip := "" ; port := undefined ; forward := false ; count :=
  if false
    var Data:NameHost host :> name_database:data:host:comput
    if host:building<>""
      var Data:NameBuilding building :> name_database:data:b
      part route_out
        each proxy building:proxy
          if proxy=computer_fullname
            leave route_out
  forward := false ; ip := "" ; port := undefined ; path_count := 1
  if class="host"
  if class="host"
    var Data:NameHost host :> name_database:data:host:name
    if false
      if host:building<>"" and host:building<>name_database:
    var Data:NameHost me :> name_database:data:host computer_fullname
    var Data:NameHost host :> name_database:data:host name
    var Data:NameHost next_hop
    part find_next_hop
      if name=computer_fullname
        next_hop :> host
        leave find_next_hop
      if me:building=host:building
        if me:building<>""
          var Data:NameBuilding building :> name_database:data:building me:building
          each p building:proxy
            if p=computer_fullname
              forward := true
        next_hop :> host
        leave find_next_hop
      if me:building<>"" # out proxy required
        var Data:NameBuilding building :> name_database:data:building me:building
        part select_out_proxy
          var Int i := 0
          each p building:proxy
            if p=computer_fullname # no, I'm one of the proxies
              forward := true
              leave select_out_proxy
            if i=path_index
              next_hop :> name_database:data:host p
            i += 1
          path_count := building:proxy size
          if path_index>=path_count
            return
          leave find_next_hop
      if host:building<>"" # in proxy required
        var Data:NameBuilding building :> name_database:data
        var Data:NameBuilding building :> name_database:data
    if host:ip<>""
      ip := host ip
    eif host:physical<>""
      ip := name_database:data:host:(host physical) ip
        part select_in_proxy
          var Int i := 0
          each p building:proxy
            if p=computer_fullname # no, I'm one of the in proxies
              forward := true
              leave select_in_proxy
            if i=path_index
              next_hop :> name_database:data:host p
            i += 1
          path_count := building:proxy size
          if path_index>=path_count
            return
          leave find_next_hop
      next_hop :> host      
    if next_hop:ip<>""
      ip := next_hop ip
    eif next_hop:physical<>""
      ip := (name_database:data:host next_hop:physical) ip
    port := host port
  eif class="site"
    var Data:Site site :> site_database:data:site:name
    if site:computer<>""
    port := host port
  eif class="site"
    var Data:Site site :> site_database:data:site:name
    if site:computer<>""
      resolve_ip "host" site:computer from_ip smart ip port 
      resolve_ip "host" site:computer from_ip path_index forward ip port path_count
      return
    ip := site ip
    port := site port    



export resolve_ip
export resolve_public_key resolve_private_key
export resolve_get_shared_key resolve_set_shared_key
      return
    ip := site ip
    port := site port    



export resolve_ip
export resolve_public_key resolve_private_key
export resolve_get_shared_key resolve_set_shared_key