Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
RiscOS
S
Sources
SystemRes
InetRes
Commits
ebf6f6f5
Commit
ebf6f6f5
authored
Jul 19, 1999
by
Kevin Bracey
Browse files
Changed to output graphs in Graphlet format, rather than GraphEd.
GraphEd is obsolete - Graphlet is its replacement.
parent
c5293750
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
1 deletion
+40
-1
Sources/map-mbone/Makefile
Sources/map-mbone/Makefile
+1
-1
Sources/map-mbone/c/Map-MBone
Sources/map-mbone/c/Map-MBone
+39
-0
No files found.
Sources/map-mbone/Makefile
View file @
ebf6f6f5
...
@@ -22,7 +22,7 @@ RM= remove
...
@@ -22,7 +22,7 @@ RM= remove
WFLAGS
=
fr~c~v
WFLAGS
=
fr~c~v
WIPE
=
-wipe
WIPE
=
-wipe
CFLAGS
=
-Wp
-I
$(INCLUDES)
-c
${THROWBACK}
-depend
!
Depend
CFLAGS
=
-Wp
-I
$(INCLUDES)
-DGRAPHLET
-c
${THROWBACK}
-depend
!
Depend
OBJS
=
o.
${TARGET}
o.igmp o.inet o.kern
OBJS
=
o.
${TARGET}
o.igmp o.inet o.kern
...
...
Sources/map-mbone/c/Map-MBone
View file @
ebf6f6f5
...
@@ -721,6 +721,8 @@ void print_map(node)
...
@@ -721,6 +721,8 @@ void print_map(node)
printf
(
"/disabled"
);
printf
(
"/disabled"
);
if
(
flags
&
DVMRP_NF_DOWN
)
if
(
flags
&
DVMRP_NF_DOWN
)
printf
(
"/down"
);
printf
(
"/down"
);
if
(
flags
&
DVMRP_NF_LEAF
)
printf
(
"/leaf"
);
}
}
printf
(
"]
\n
"
);
printf
(
"]
\n
"
);
count
++
;
count
++
;
...
@@ -767,7 +769,18 @@ void graph_edges(node)
...
@@ -767,7 +769,18 @@ void graph_edges(node)
if
(
node
)
{
if
(
node
)
{
graph_edges
(
node
->
left
);
graph_edges
(
node
->
left
);
if
(
node
->
tries
>=
0
)
{
if
(
node
->
tries
>=
0
)
{
#ifdef GRAPHLET
printf
(
" node [
\n
"
" id %d
\n
"
" graphics [
\n
"
" x %d0.0
\n
"
" y %d0.0
\n
"
" ]
\n
"
" label
\"
%s%s
\"\n
"
" ]
\n
"
,
#else
printf
(
" %d {$ NP %d0 %d0 $}
\"
%s%s
\"
\n
"
,
printf
(
" %d {$ NP %d0 %d0 $}
\"
%s%s
\"
\n
"
,
#endif
(
int
)
node
->
addr
,
(
int
)
node
->
addr
,
node
->
addr
&
0xFF
,
(
node
->
addr
>>
8
)
&
0xFF
,
node
->
addr
&
0xFF
,
(
node
->
addr
>>
8
)
&
0xFF
,
graph_name
(
node
->
addr
,
name
,
sizeof
(
name
)),
graph_name
(
node
->
addr
,
name
,
sizeof
(
name
)),
...
@@ -783,8 +796,17 @@ void graph_edges(node)
...
@@ -783,8 +796,17 @@ void graph_edges(node)
if
(
node
!=
nb_node
&&
if
(
node
!=
nb_node
&&
(
!
(
nb2
=
find_neighbor
(
node
->
addr
,
nb_node
))
(
!
(
nb2
=
find_neighbor
(
node
->
addr
,
nb_node
))
||
node
->
addr
<
nb_node
->
addr
))
{
||
node
->
addr
<
nb_node
->
addr
))
{
#ifdef GRAPHLET
printf
(
" edge [
\n
"
" source %d
\n
"
" target %d
\n
"
" label
\"
%d/%d"
,
node
->
addr
,
nb_node
->
addr
,
nb
->
metric
,
nb
->
threshold
);
#else
printf
(
" %d
\"
%d/%d"
,
printf
(
" %d
\"
%d/%d"
,
nb_node
->
addr
,
nb
->
metric
,
nb
->
threshold
);
nb_node
->
addr
,
nb
->
metric
,
nb
->
threshold
);
#endif
if
(
nb2
&&
(
nb2
->
metric
!=
nb
->
metric
if
(
nb2
&&
(
nb2
->
metric
!=
nb
->
metric
||
nb2
->
threshold
!=
nb
->
threshold
))
||
nb2
->
threshold
!=
nb
->
threshold
))
printf
(
",%d/%d"
,
nb2
->
metric
,
nb2
->
threshold
);
printf
(
",%d/%d"
,
nb2
->
metric
,
nb2
->
threshold
);
...
@@ -793,10 +815,17 @@ void graph_edges(node)
...
@@ -793,10 +815,17 @@ void graph_edges(node)
nb
->
flags
&
DVMRP_NF_SRCRT
?
""
:
nb
->
flags
&
DVMRP_NF_SRCRT
?
""
:
nb
->
flags
&
DVMRP_NF_TUNNEL
?
"E"
:
"P"
,
nb
->
flags
&
DVMRP_NF_TUNNEL
?
"E"
:
"P"
,
nb
->
flags
&
DVMRP_NF_DOWN
?
"D"
:
""
);
nb
->
flags
&
DVMRP_NF_DOWN
?
"D"
:
""
);
#ifdef GRAPHLET
printf
(
"
\"\n
"
" ]
\n
"
);
#else
printf
(
"
\"\n
"
);
printf
(
"
\"\n
"
);
#endif
}
}
}
}
#ifndef GRAPHLET
printf
(
" ;
\n
"
);
printf
(
" ;
\n
"
);
#endif
}
}
graph_edges
(
node
->
right
);
graph_edges
(
node
->
right
);
}
}
...
@@ -832,10 +861,20 @@ void graph_map()
...
@@ -832,10 +861,20 @@ void graph_map()
nowstr
[
24
]
=
'\0'
;
/* Kill the newline at the end */
nowstr
[
24
]
=
'\0'
;
/* Kill the newline at the end */
elide_aliases
(
routers
);
elide_aliases
(
routers
);
#ifdef GRAPHLET
printf
(
"graph [
\n
"
" label
\"
Multicast Router Connectivity: %s
\"\n
"
,
nowstr
);
#else
printf
(
"GRAPH
\"
Multicast Router Connectivity: %s
\"
= UNDIRECTED
\n
"
,
printf
(
"GRAPH
\"
Multicast Router Connectivity: %s
\"
= UNDIRECTED
\n
"
,
nowstr
);
nowstr
);
#endif
graph_edges
(
routers
);
graph_edges
(
routers
);
#ifdef GRAPHLET
printf
(
"]
\n
"
);
#else
printf
(
"END
\n
"
);
printf
(
"END
\n
"
);
#endif
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment