This will find all the BGP routers and internal nets for AS(x) and connected neighbors for searchnode if applicable:
for all nodes in AS(x)
add fake networks as local
for all networks for that node
for all neighbors on that network
check if neighbor is part of our AS as well
yes: mark net as local
no: mark node as BGP (if searchnode, add to list)