File: ns-nix.tcl

package info (click to toggle)
ns2 2.35%2Bdfsg-3.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 78,808 kB
  • sloc: cpp: 172,923; tcl: 107,130; perl: 6,391; sh: 6,143; ansic: 5,846; makefile: 816; awk: 525; csh: 355
file content (45 lines) | stat: -rw-r--r-- 1,224 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Support for the NixVector routing ns
# George F. Riley, Georgia Tech, Spring 2000

Simulator instproc set-nix-routing { } {
    Simulator set nix-routing 1
    #Simulator set node_factory_ Node/NixNode
    Node enable-module "Nix"
}

Simulator instproc get-link-head { n1 n2 } {
    $self instvar link_
    return [$link_($n1:$n2) head]
}

Link instproc set-ipaddr { ipaddr netmask } {
# Fix this later...GFR
#    $self instvar ipaddr_ netmask_
#    set ipaddr_  [[Simulator instance] convert-ipaddr $ipaddr]
#    set netmask_ [[Simulator instance] convert-ipaddr $netmask]
#    # puts "Set ipaddr to [[Simulator instance] format-ipaddr $ipaddr_]"
#    # And set in the nodes ip address list
#    set sn [$self src]
#    $sn set-ipaddr $ipaddr_ $netmask_ $self
}

# NixNode instproc's
#Class Node/NixNode -superclass Node


#Class RtModule/Nix -superclass RtModule

#Nix-vector routing
RtModule/Nix instproc register { node } {
	$self next $node
	# Create classifier
	$self instvar classifier_
	set classifier_ [new Classifier/Nix]
	$classifier_ set-node-id [$node set id_]
	#puts "RtModule/Nix set node id to [$node set id_]"
	$node install-entry $self $classifier_
}

RtModule/Nix instproc route-notify { module } { }