diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2023-11-14 14:19:55 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2023-11-14 14:19:55 +0100 |
commit | 4d471f0b706733624a845143cafb6dd8add90eed (patch) | |
tree | 417efc58964f8b43007dcbecf77e6b05a0bd6fa3 /6/bgp.pl | |
parent | 6dca28918be80a3ef0c2959a99067337f59f5972 (diff) | |
download | prolog-firewall-4d471f0b706733624a845143cafb6dd8add90eed.tar.gz prolog-firewall-4d471f0b706733624a845143cafb6dd8add90eed.tar.bz2 prolog-firewall-4d471f0b706733624a845143cafb6dd8add90eed.tar.xz prolog-firewall-4d471f0b706733624a845143cafb6dd8add90eed.zip |
wip
Diffstat (limited to '6/bgp.pl')
-rw-r--r-- | 6/bgp.pl | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -72,9 +72,9 @@ router_path(X, Y, V) :- \+ member(X, V), router_link(X, _, Z), router_path(Z, Y, to_dict(router(R), Dict) :- neighbors(R, Neighbors), maplist(to_dict(), Neighbors, NeighborDicts), - Dict = _{ - host: R, - neighbors: NeighborDicts}. + Dict = R-_{ + neighbors: NeighborDicts + }. to_dict(neighbor(_, Remote), Dict) :- host_config(Remote, RC), Dict = neighbor{ @@ -84,6 +84,7 @@ to_dict(neighbor(_, Remote), Dict) :- host_config(Remote, RC), } }. -bird_config(RouterDicts) :- +bird_config(BirdConfig) :- routers(Routers), - maplist(to_dict(), Routers, RouterDicts). + maplist(to_dict(), Routers, RouterDicts), + dict_pairs(BirdConfig, bird_config, RouterDicts). |