]> git.entuzijast.net Git - imunes.git/commitdiff
source documentation for ipv6.tcl
authorzrinka <zrinka>
Fri, 2 Dec 2005 09:23:19 +0000 (09:23 +0000)
committerzrinka <zrinka>
Fri, 2 Dec 2005 09:23:19 +0000 (09:23 +0000)
Bug found by:
Submitted by:
Requested by:
Reviewed by:
Approved by:
Obtained from:

ipv6.tcl

index 5d53f1924aed8c225844b90212b4cb75d9740c66..12ecfba7ea132c3368af90faee2701a8f99f2812 100755 (executable)
--- a/ipv6.tcl
+++ b/ipv6.tcl
 # and Technology through the research contract #IP-2003-143.
 #
 
+#****h* imunes/ipv6.tcl
+# NAME
+#   ipv6.tcl -- file for handeling IPv6
+#****
 
+#****f* ipv6.tcl/findFreeIPv6Net
+# NAME
+#   findFreeIPv6Net -- find free IPv6 network
+# SYNOPSIS
+#   set ipnet [findFreeIPv4Net $mask]
+# FUNCTION
+#   Finds a free IPv6 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 IPv6 network address in the form "a $i". 
+#****
 proc findFreeIPv6Net { mask } {
     global node_list
 
@@ -54,6 +72,20 @@ proc findFreeIPv6Net { mask } {
     }
 }
 
+#****f* ipv6.tcl/autoIPv6addr 
+# NAME
+#   autoIPv6addr -- automaticaly assign an IPv6 address
+# SYNOPSIS
+#   autoIPv6addr $node_id $iface 
+# FUNCTION
+#   automaticaly assignes an IPv6 address to the interface $iface of 
+#   of the node $node.
+# INPUTS
+#   * node_id -- the node containing the interface to witch a new 
+#     IPv6 address should be assigned
+#   * iface -- the interface to witch a new, automatilacy generated, IPv6  
+#     address will be assigned
+#****
 
 proc autoIPv6addr { node iface } {
     set peer_ip6addrs {}
@@ -102,6 +134,18 @@ proc autoIPv6addr { node iface } {
     return
 }
 
+#****f* ipv6.tcl/autoIPv6defaultroute 
+# NAME
+#   autoIPv6defaultroute -- automaticaly assign a default route 
+# SYNOPSIS
+#   autoIPv6defaultroute $node_id $iface 
+# FUNCTION
+#   searches the interface of the node for a router, if a router is found
+#   then it is a new default gateway. 
+# INPUTS
+#   * node_id -- default gateway is provided for this node 
+#   * iface -- the interface on witch we search for a new default gateway
+#****
 
 proc autoIPv6defaultroute { node iface } {
     if { [[typemodel $node].layer] != "NETWORK" } {
@@ -144,6 +188,19 @@ proc autoIPv6defaultroute { node iface } {
     }
 }
 
+#****f* ipv6.tcl/checkIPv6Addr 
+# NAME
+#   checkIPv6Addr -- check the IPv6 address 
+# SYNOPSIS
+#   set valid [checkIPv6Addr $str]
+# FUNCTION
+#   Checks if the provided string is a valid IPv6 address. 
+# INPUTS
+#   * str -- string to be evaluated.
+# RESULT
+#   * valid -- function returns 0 if the input string is not in the form
+#     of a valid IP address, 1 otherwise
+#****
 
 proc checkIPv6Addr { str } {
     set doublec false
@@ -180,6 +237,19 @@ proc checkIPv6Addr { str } {
     return 1
 }
 
+#****f* ipv6.tcl/checkIPv6Net 
+# NAME
+#   checkIPv6Net -- check the IPv6 network 
+# SYNOPSIS
+#   set valid [checkIPv6Net $str]
+# FUNCTION
+#   Checks if the provided string is a valid IPv6 network. 
+# INPUTS
+#   * str -- string to be evaluated. Valid string is in form ipv6addr/m 
+# RESULT
+#   * valid -- function returns 0 if the input string is not in the form
+#     of a valid IP address, 1 otherwise.
+#****
 
 proc checkIPv6Net { str } {
     if { $str == "" } {
@@ -194,5 +264,3 @@ proc checkIPv6Net { str } {
     }
     return [checkIntRange $net 0 128]
 }
-
-