original_docstring: 
          Handle generic type of a path request.
          new_request informs whether a pkt is a new request (True), or is a
          pending request (False).
          Return True when resolution succeeded, False otherwise.
          
docstring: Handle generic type of a path request.
  new_request informs whether a pkt is a new request (True), or is a
  pending request (False).
  Return True when resolution succeeded, False otherwise.
docstring_tokens: Handle generic type of a path request . new_request informs whether a pkt is a new request ( True ) or is a pending request ( False ) . Return True when resolution succeeded False otherwise .
code: def path_resolution(self, req, meta, new_request=True):
          """
          Handle generic type of a path request.
          new_request informs whether a pkt is a new request (True), or is a
          pending request (False).
          Return True when resolution succeeded, False otherwise.
          """
          dst_ia = req.dst_ia()
          if new_request:
              logging.info("PATH_REQ received: %s", req.short_desc())
          if dst_ia == self.addr.isd_as:
              logging.warning("Dropping request: requested DST is local AS")
              return False
          # dst as==0 means any core AS in the specified ISD
          dst_is_core = self.is_core_as(dst_ia) or dst_ia[1] == 0
          if dst_is_core:
              core_segs = self._resolve_core(req, meta, dst_ia, new_request,
                                             req.flags())
              down_segs = set()
          else:
              core_segs, down_segs = self._resolve_not_core(
                  req, meta, dst_ia, new_request, req.flags())
  
          if not (core_segs | down_segs):
              if new_request:
                  logging.debug("Segs to %s not found." % dst_ia)
              else:
                  # That could happen when a needed segment has expired.
                  logging.warning("Handling pending request and needed segment "
                                  "is missing. Shouldn't be here (too often).")
              return False
  
          down_segs = self._add_peer_revs(down_segs)
          self._send_path_segments(req, meta, core=core_segs, down=down_segs)
          return True
code_tokens: def path_resolution ( self , req , meta , new_request = True ) : dst_ia = req . dst_ia ( ) if new_request : logging . info ( "PATH_REQ received: %s" , req . short_desc ( ) ) if dst_ia == self . addr . isd_as : logging . warning ( "Dropping request: requested DST is local AS" ) return False dst_is_core = self . is_core_as ( dst_ia ) or dst_ia [ 1 ] == 0 if dst_is_core : core_segs = self . _resolve_core ( req , meta , dst_ia , new_request , req . flags ( ) ) down_segs = set ( ) else : core_segs , down_segs = self . _resolve_not_core ( req , meta , dst_ia , new_request , req . flags ( ) ) if not ( core_segs | down_segs ) : if new_request : logging . debug ( "Segs to %s not found." % dst_ia ) else : logging . warning ( "Handling pending request and needed segment " "is missing. Shouldn't be here (too often)." ) return False down_segs = self . _add_peer_revs ( down_segs ) self . _send_path_segments ( req , meta , core = core_segs , down = down_segs ) return True
short_docstring: Handle generic type of a path request.
short_docstring_tokens: Handle generic type of a path request .
comment: """
          Handle generic type of a path request.
          new_request informs whether a pkt is a new request (True), or is a
          pending request (False).
          Return True when resolution succeeded, False otherwise.
          """$SEP$# dst as==0 means any core AS in the specified ISD$SEP$# That could happen when a needed segment has expired.