# ifcByPeer { local_node_id peer_node_id }
# Returns the name of the interface connected to the specified peer.
#
+# hasIPv4Addr { node_id }
+# hasIPv6Addr { node_id }
+# Retruns true if at least one interface has an IPv{4|6} address
+# configured, otherwise returns false.
+#
# All of the above functions are independent to any Tk objects. This means
# they can be used for implementing tasks external to GUI, so inside the
# GUI any updating of related Tk objects (such as text labels etc.) will
}
+proc hasIPv4Addr { node } {
+ foreach ifc [ifcList $node] {
+ if { [getIfcIPv4addr $node $ifc] != "" } {
+ return true
+ }
+ }
+ return false
+}
+
+
+proc hasIPv6Addr { node } {
+ foreach ifc [ifcList $node] {
+ if { [getIfcIPv6addr $node $ifc] != "" } {
+ return true
+ }
+ }
+ return false
+}
+
+
#
# The following should really go into a separate "editing" library
#