#
-#
-# The IMUNES configuration file contains declarations of IMUNES objects.
-# Each object declaration contains exactly the following three fields:
+#****h* imunes/nodecfg.tcl
+# NAME
+# nodecfg.tcl -- file used for manipultaion with nodes in IMUNES
+# FUNCTION
+# This module is used to define all the actions used for configuring
+# nodes in IMUNES. The definition of nodes is presented in NOTES
+# section.
+#
+# NOTES
+# The IMUNES configuration file contains declarations of IMUNES objects.
+# Each object declaration contains exactly the following three fields:
#
# object_class object_id class_specific_config_string
#
-# Currently only two object classes are supported: node and link. In the
-# future we plan to implement a canvas object, which should allow placing
-# other objects into multiple visual maps.
-#
-# "node" objects are further divided by their type, which can be one of
-# the following:
+# Currently only two object classes are supported: node and link. In the
+# future we plan to implement a canvas object, which should allow placing
+# other objects into multiple visual maps.
#
-# router
-# host
-# pc
-# lanswitch
-# hub
-# rj45
+# "node" objects are further divided by their type, which can be one of
+# the following:
+# * router
+# * host
+# * pc
+# * lanswitch
+# * hub
+# * rj45
#
-# The following node types are to be implemented in the future:
+# The following node types are to be implemented in the future:
+# * frswitch
+# * text
+# * image
#
-# frswitch
-# text
-# image
-#
-
-
#
# Routines for manipulation of per-node network configuration files
-#
# IMUNES keeps per-node network configuration in an IOS / Zebra / Quagga
# style format.
#
# getCustomEnabled { node_id }
#
# setCustomEnabled { node_id state }
-#
-
+#****
+
+#****f* nodecfg.tcl/typemodel
+# NAME
+# typemodel -- find node's type and routing model
+# SYNOPSIS
+# set typemod [typemodel $node]
+# FUNCTION
+# For input node this procedure returns the node's
+# type and routing model (if exists)
+# INPUTS
+# * node -- the node whose type and routing model we search
+# RESULT
+# * typemod -- returns the free IPv4 network address in the form 10.a.b
+#****
proc typemodel { node } {
set type [nodeType $node]