]> git.entuzijast.net Git - imunes.git/commitdiff
source documentation for ipv4.tcl file
authorzrinka <zrinka>
Mon, 7 Nov 2005 10:45:20 +0000 (10:45 +0000)
committerzrinka <zrinka>
Mon, 7 Nov 2005 10:45:20 +0000 (10:45 +0000)
Bug found by:
Submitted by:
Requested by:
Reviewed by:
Approved by:
Obtained from:

ipv4.tcl

index ac4c05aaa2a09347bb6b41ac4d95d934e626bf17..d1df61d0b2f6086e3acc7f8261d1840d831ce948 100755 (executable)
--- a/ipv4.tcl
+++ b/ipv4.tcl
 #
 
 
+#****f* ipv4.tcl/findFreeIPv4Net
+# NAME
+#   findFreeIPv4Net -- find free IPv4 network
+# SYNOPSIS
+#   set ipnet [findFreeIPv4Net $mask]
+# FUNCTION
+#   Finds a free IPv4 network. Network is concidered to be free
+#   if there are no simulated nodes attached to it. 
+# INPUTS
+#   mask - this parameter is left unused for now
+# RESULT
+#   ipnet - returns the free IPv4 network address in the form 10.a.b 
+#****
 proc findFreeIPv4Net { mask } {
     global node_list
 
@@ -56,6 +70,20 @@ proc findFreeIPv4Net { mask } {
     }
 }
 
+#****f* ipv4.tcl/autoIPv4addr 
+# NAME
+#   autoIPv4addr -- automaticaly assign an IPv4 address
+# SYNOPSIS
+#   autoIPv4addr $node $iface 
+# FUNCTION
+#   automaticaly assignes an IPv4 address to the interface $iface of 
+#   of the node $node 
+# INPUTS
+#   node  - the node containing the interface to witch a new 
+#           IPv4 address should be assigned
+#   iface - the interface to witch a new, automatilacy generated, IPv4  
+#           address will be assigned
+#****
 
 proc autoIPv4addr { node iface } {
     set peer_ip4addrs {}
@@ -156,6 +184,21 @@ proc autoIPv4defaultroute { node iface } {
 }
 
 
+#****f* ipv4.tcl/checkIPv4Addr 
+# NAME
+#   checkIPv4Addr -- check the IPv4 address 
+# SYNOPSIS
+#   set valid [checkIPv4Addr $str]
+# FUNCTION
+#   Checks if the provided string is a valid IPv4 address. 
+# INPUTS
+#   str - string to be evaluated. Valid IPv4 address is writen in form
+#         a.b.c.d 
+# RESULT
+#   valid - function returns 0 if the input string is not in the form
+#           of a valid IP address, 1 otherwise
+#****
+
 proc checkIPv4Addr { str } {
     set n 0
     while { $n < 4 } {
@@ -184,6 +227,20 @@ proc checkIPv4Addr { str } {
 }
 
 
+#****f* ipv4.tcl/checkIPv4Net 
+# NAME
+#   checkIPv4Net -- check the IPv4 network 
+# SYNOPSIS
+#   set valid [checkIPv4Net $str]
+# FUNCTION
+#   Checks if the provided string is a valid IPv4 network. 
+# INPUTS
+#   str - string to be evaluated. Valid string is in form a.b.c.d/m 
+# RESULT
+#   valid - function returns 0 if the input string is not in the form
+#           of a valid IP address, 1 otherwise
+#****
+
 proc checkIPv4Net { str } {
     if { $str == "" } {
         return 1