summaryrefslogtreecommitdiff
path: root/4.pl
diff options
context:
space:
mode:
Diffstat (limited to '4.pl')
-rw-r--r--4.pl18
1 files changed, 5 insertions, 13 deletions
diff --git a/4.pl b/4.pl
index 4d43142..eb355b6 100644
--- a/4.pl
+++ b/4.pl
@@ -42,19 +42,11 @@ bgp_connection(H, R) :-
router_link(H, _, R),
router_link(R, _, H).
-% warnings(Msg) :-
-% host(H), host(R),
-% router_link(H, R, _),
-% not router_link(R, H, _),
-% Msg = "missing router link!".
-
-% bgp_connection(H, Remote)?
-
-% wg_if(H, R, PK) :- bgp_connection(H, R), public_key(R, PK).
-% % wg_if(H, R, PK)?
-% wg_if_allowed_ips(H, Ip, 128) :- bgp_connection(H, R), router_link(H, R, Ip).
-% wg_if_allowed_ips(H, Ip, Range) :- bgp_connection(H, R), attached_network(R, Ip, Range).
-% % wg_if_allowed_ips(H, Ip, Range)?
+warning(Msg) :-
+ host(H), host(R),
+ router_link(H, _, R),
+ \+ router_link(R, _, H),
+ format(string(Msg), "Missing router_link from ~w to ~w", [R, H]).
bgp_connections(H, Cs) :- findall(Name, bgp_connection(H, Name), Cs).