diff options
Diffstat (limited to '4.pl')
-rw-r--r-- | 4.pl | 18 |
1 files changed, 5 insertions, 13 deletions
@@ -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). |