.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "SNMP::Info::FDP 3pm" .TH SNMP::Info::FDP 3pm "2023-09-30" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" SNMP::Info::FDP \- SNMP Interface to Foundry Discovery Protocol (FDP) using SNMP .SH "AUTHOR" .IX Header "AUTHOR" Bruce Rodger, Max Baker .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 7 \& my $fdp = new SNMP::Info ( \& AutoSpecify => 1, \& Debug => 1, \& DestHost => \*(Aqrouter\*(Aq, \& Community => \*(Aqpublic\*(Aq, \& Version => 2 \& ); \& \& my $class = $fdp\->class(); \& print " Using device sub class : $class\en"; \& \& $hasfdp = $fdp\->hasFDP() ? \*(Aqyes\*(Aq : \*(Aqno\*(Aq; \& \& # Print out a map of device ports with FDP neighbors: \& my $interfaces = $fdp\->interfaces(); \& my $fdp_if = $fdp\->fdp_if(); \& my $fdp_ip = $fdp\->fdp_ip(); \& my $fdp_port = $fdp\->fdp_port(); \& \& foreach my $fdp_key (keys %$fdp_ip){ \& my $iid = $fdp_if\->{$fdp_key}; \& my $port = $interfaces\->{$iid}; \& my $neighbor = $fdp_ip\->{$fdp_key}; \& my $neighbor_port = $fdp_port\->{$fdp_key}; \& print "Port : $port connected to $neighbor / $neighbor_port\en"; \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" SNMP::Info::FDP is a subclass of SNMP::Info that provides an object oriented interface to \s-1FDP\s0 information through \s-1SNMP.\s0 .PP \&\s-1FDP\s0 is a Layer 2 protocol that supplies topology information of devices that also speak \s-1FDP,\s0 mostly switches and routers. It has similar functionality to Cisco's \s-1CDP,\s0 and the \s-1SNMP\s0 interface is virtually identical. \s-1FDP\s0 is implemented in Brocade (Foundry) devices. .PP Create or use a device subclass that inherits this class. Do not use directly. .PP Each device implements a subset of the global and cache entries. Check the return value to see if that data is held by the device. .SS "Inherited Classes" .IX Subsection "Inherited Classes" None. .SS "Required MIBs" .IX Subsection "Required MIBs" .IP "\fIFOUNDRY-SN-SWITCH-GROUP-MIB\fR" 4 .IX Item "FOUNDRY-SN-SWITCH-GROUP-MIB" Needs a reasonably recent \s-1MIB.\s0 Works \s-1OK\s0 with B2R07604A.mib, but doesn't work with B2R07600C. .SH "GLOBALS" .IX Header "GLOBALS" These are methods that return scalar values from \s-1SNMP\s0 .ie n .IP "$fdp\->\fBhasFDP()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBhasFDP()\fR" 4 .IX Item "$fdp->hasFDP()" Is \s-1FDP\s0 is active in this device? .Sp Accounts for \s-1SNMP\s0 version 1 devices which may have \s-1FDP\s0 but not \fBfdp_run()\fR .ie n .IP "$fdp\->\fBfdp_run()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_run()\fR" 4 .IX Item "$fdp->fdp_run()" Is \s-1FDP\s0 enabled on this device? .Sp (\f(CW\*(C`fdpGlobalRun\*(C'\fR) .ie n .IP "$fdp\->\fBfdp_interval()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_interval()\fR" 4 .IX Item "$fdp->fdp_interval()" Interval in seconds at which \s-1FDP\s0 messages are generated. .Sp (\f(CW\*(C`fdpGlobalMessageInterval\*(C'\fR) .ie n .IP "$fdp\->\fBfdp_holdtime()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_holdtime()\fR" 4 .IX Item "$fdp->fdp_holdtime()" Time in seconds that \s-1FDP\s0 messages are kept. .Sp (\f(CW\*(C`fdpGlobalHoldTime\*(C'\fR) .SS "Overrides" .IX Subsection "Overrides" \&\s-1CDP\s0 compatibility .ie n .IP "$fdp\->\fBfdp_interval()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_interval()\fR" 4 .IX Item "$fdp->fdp_interval()" Interval in seconds at which \s-1FDP\s0 messages are generated. .Sp (\f(CW\*(C`fdpGlobalMessageInterval\*(C'\fR) .ie n .IP "$fdp\->\fBfdp_holdtime()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_holdtime()\fR" 4 .IX Item "$fdp->fdp_holdtime()" Time in seconds that \s-1FDP\s0 messages are kept. .Sp (\f(CW\*(C`fdpGlobalHoldTime\*(C'\fR) .ie n .IP "$fdp\->\fBfdp_id()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_id()\fR" 4 .IX Item "$fdp->fdp_id()" Returns \s-1FDP\s0 device \s-1ID.\s0 .Sp This is the device id broadcast via \s-1FDP\s0 to other devices, and is what is retrieved from remote devices with \f(CW$fdp\fR\->\fBid()\fR. .Sp (\f(CW\*(C`fdpGlobalDeviceId\*(C'\fR) .ie n .IP "$fdp\->\fBfdp_run()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_run()\fR" 4 .IX Item "$fdp->fdp_run()" Is \s-1FDP\s0 enabled on this device? .SH "TABLE METHODS" .IX Header "TABLE METHODS" These are methods that return tables of information in the form of a reference to a hash. .SS "Overrides" .IX Subsection "Overrides" \&\s-1CDP\s0 compatibility .ie n .IP "$fdp\->\fBfdp_capabilities()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_capabilities()\fR" 4 .IX Item "$fdp->fdp_capabilities()" Returns Device Functional Capabilities. Results are munged into an ascii binary string, \s-1MSB.\s0 Each digit represents a bit from the table below. .Sp From : .Sp (Bit) \- Description .RS 4 .IP "(0x40) \- Provides level 1 functionality." 4 .IX Item "(0x40) - Provides level 1 functionality." .PD 0 .IP "(0x20) \- The bridge or switch does not forward \s-1IGMP\s0 Report packets on non router ports." 4 .IX Item "(0x20) - The bridge or switch does not forward IGMP Report packets on non router ports." .IP "(0x10) \- Sends and receives packets for at least one network layer protocol. If the device is routing the protocol, this bit should not be set." 4 .IX Item "(0x10) - Sends and receives packets for at least one network layer protocol. If the device is routing the protocol, this bit should not be set." .IP "(0x08) \- Performs level 2 switching. The difference between this bit and bit 0x02 is that a switch does not run the Spanning-Tree Protocol. This device is assumed to be deployed in a physical loop-free topology." 4 .IX Item "(0x08) - Performs level 2 switching. The difference between this bit and bit 0x02 is that a switch does not run the Spanning-Tree Protocol. This device is assumed to be deployed in a physical loop-free topology." .IP "(0x04) \- Performs level 2 source-route bridging. A source-route bridge would set both this bit and bit 0x02." 4 .IX Item "(0x04) - Performs level 2 source-route bridging. A source-route bridge would set both this bit and bit 0x02." .IP "(0x02) \- Performs level 2 transparent bridging." 4 .IX Item "(0x02) - Performs level 2 transparent bridging." .IP "(0x01) \- Performs level 3 routing for at least one network layer protocol." 4 .IX Item "(0x01) - Performs level 3 routing for at least one network layer protocol." .RE .RS 4 .PD .Sp Thanks to Martin Lorensen for a pointer to this information. .Sp (\f(CW\*(C`fdpCacheCapabilities\*(C'\fR) .RE .ie n .IP "$fdp\->\fBfdp_id()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_id()\fR" 4 .IX Item "$fdp->fdp_id()" Returns remote device id string .Sp (\f(CW\*(C`fdpCacheDeviceId\*(C'\fR) .ie n .IP "$fdp\->\fBfdp_if()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_if()\fR" 4 .IX Item "$fdp->fdp_if()" Returns the mapping to the \s-1SNMP\s0 Interface Table. .Sp In order to map the fdp table entry back to the \fBinterfaces()\fR entry, we truncate the last number off of it : .Sp .Vb 1 \& my $fdp_ip = $device\->fdp_ip(); \& \& my %fdp_if \& foreach my $key (keys %$fdp_ip){ \& $iid = $key; \& ## Truncate off .1 from fdp response \& $iid =~ s/\e.\ed+$//; \& $fdp_if{$key} = $iid; \& } \& \& return \e%fdp_if; .Ve .ie n .IP "$fdp\->\fBfdp_ip()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_ip()\fR" 4 .IX Item "$fdp->fdp_ip()" Returns remote \s-1IP\s0 address .Sp (\f(CW\*(C`fdpCacheAddress\*(C'\fR) .ie n .IP "$fdp\->\fBfdp_platform()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_platform()\fR" 4 .IX Item "$fdp->fdp_platform()" Returns remote platform id .Sp (\f(CW\*(C`fdpCachePlatform\*(C'\fR) .ie n .IP "$fdp\->\fBfdp_port()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_port()\fR" 4 .IX Item "$fdp->fdp_port()" Returns remote port \s-1ID\s0 .Sp (\f(CW\*(C`fdpDevicePort\*(C'\fR) .ie n .IP "$fdp\->\fBfdp_proto()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_proto()\fR" 4 .IX Item "$fdp->fdp_proto()" Returns remote address type received. Usually \s-1IP.\s0 .Sp (\f(CW\*(C`fdpCacheAddressType\*(C'\fR) .ie n .IP "$fdp\->\fBfdp_ver()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_ver()\fR" 4 .IX Item "$fdp->fdp_ver()" Returns remote hardware version .Sp (\f(CW\*(C`fdpCacheVersion\*(C'\fR) .ie n .IP "$fdp\->\fBfdp_cache_type()\fR" 4 .el .IP "\f(CW$fdp\fR\->\fBfdp_cache_type()\fR" 4 .IX Item "$fdp->fdp_cache_type()" Returns type of entry received, either \s-1FDP\s0 or \s-1CDP.\s0 .Sp (\f(CW\*(C`snFdpCacheVendorId\*(C'\fR)