Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
406095b8
Commit
406095b8
authored
Jan 21, 2003
by
Robert Ricci
Browse files
Fix a bug in convertPortFormat that was causing VLAN members to be
printed incorrectly.
parent
6c17edfe
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/snmpit_cisco.pm
View file @
406095b8
...
@@ -257,6 +257,7 @@ sub convertPortFormat($$@) {
...
@@ -257,6 +257,7 @@ sub convertPortFormat($$@) {
# It's possible the ports are already in the right format
# It's possible the ports are already in the right format
#
#
if
(
$input
==
$output
)
{
if
(
$input
==
$output
)
{
$self
->
debug
("
Not converting, input format = output format
\n
",
2
);
return
@ports
;
return
@ports
;
}
}
...
@@ -266,20 +267,26 @@ sub convertPortFormat($$@) {
...
@@ -266,20 +267,26 @@ sub convertPortFormat($$@) {
if
(
$input
==
$PORT_FORMAT_IFINDEX
)
{
if
(
$input
==
$PORT_FORMAT_IFINDEX
)
{
if
(
$output
==
$PORT_FORMAT_MODPORT
)
{
if
(
$output
==
$PORT_FORMAT_MODPORT
)
{
$self
->
debug
("
Converting ifindex to modport
\n
",
2
);
return
map
$self
->
{
IFINDEX
}{
$_
},
@ports
;
return
map
$self
->
{
IFINDEX
}{
$_
},
@ports
;
}
elsif
(
$output
==
$PORT_FORMAT_NODEPORT
)
{
}
elsif
(
$output
==
$PORT_FORMAT_NODEPORT
)
{
$self
->
debug
("
Converting ifindex to nodeport
\n
",
2
);
return
map
portnum
(
$self
->
{
NAME
}
.
"
:
"
.
$self
->
{
IFINDEX
}{
$_
}),
@ports
;
return
map
portnum
(
$self
->
{
NAME
}
.
"
:
"
.
$self
->
{
IFINDEX
}{
$_
}),
@ports
;
}
}
}
elsif
(
$input
==
$PORT_FORMAT_MODPORT
)
{
}
elsif
(
$input
==
$PORT_FORMAT_MODPORT
)
{
if
(
$output
==
$PORT_FORMAT_IFINDEX
)
{
if
(
$output
==
$PORT_FORMAT_IFINDEX
)
{
$self
->
debug
("
Converting modport to ifindex
\n
",
2
);
return
map
$self
->
{
IFINDEX
}{
$_
},
@ports
;
return
map
$self
->
{
IFINDEX
}{
$_
},
@ports
;
}
elsif
(
$output
==
$PORT_FORMAT_NODEPORT
)
{
}
elsif
(
$output
==
$PORT_FORMAT_NODEPORT
)
{
return
map
portnum
(
$self
->
{
NAME
}
.
$_
),
@ports
;
$self
->
debug
("
Converting modport to nodeport
\n
",
2
);
return
map
portnum
(
$self
->
{
NAME
}
.
"
:
$_
"),
@ports
;
}
}
}
elsif
(
$input
==
$PORT_FORMAT_NODEPORT
)
{
}
elsif
(
$input
==
$PORT_FORMAT_NODEPORT
)
{
if
(
$output
==
$PORT_FORMAT_IFINDEX
)
{
if
(
$output
==
$PORT_FORMAT_IFINDEX
)
{
$self
->
debug
("
Converting nodeport to ifindex
\n
",
2
);
return
map
$self
->
{
IFINDEX
}{(
split
/:/
,
portnum
(
$_
))[
1
]},
@ports
;
return
map
$self
->
{
IFINDEX
}{(
split
/:/
,
portnum
(
$_
))[
1
]},
@ports
;
}
elsif
(
$output
==
$PORT_FORMAT_MODPORT
)
{
}
elsif
(
$output
==
$PORT_FORMAT_MODPORT
)
{
$self
->
debug
("
Converting nodeport to modport
\n
",
2
);
return
map
{
(
split
/:/
,
portnum
(
$_
))[
1
]
}
@ports
;
return
map
{
(
split
/:/
,
portnum
(
$_
))[
1
]
}
@ports
;
}
}
}
}
...
...
Write
Preview
Supports
Markdown
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