From e7a55058fc77f04d1e1bb63cd09894278c312376 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 5 Nov 2023 19:20:36 +0100 Subject: wip --- 4.pl | 18 +++++------------- 1 file 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). -- cgit v1.2.3