Changes required to attached C source code.
Braa utility generates concurrent SNMPGET or SNMPWALK to multiple hosts.
This utilility can take arguments from the file as below
# braa -f "source_file"
Source file for the program contain following lines
public@[login to view URL]:.1.3.6.1.2.1.2.2.1.10.3
public@[login to view URL]:.1.3.6.1.2.1.2.2.1.16.3
where
- "public" is SNMP RO Community string
- "192.168.1.1" destination IP Address
- ".1.3.6.1.2.1.2.2.1.10.3" and ".1.3.6.1.2.1.2.2.1.16.3" OIDs - IfInOctets and IfOutOctets
- in OID last integer is the Interface IfIndex in above case both In and Out Octets refer to Interface Ethernet 0 (ifIndex 3)
If we run
braa -f "source_file"
The result looks like below
[login to view URL]:64ms:.1.3.6.1.2.1.2.2.1.10.3:2491108168
[login to view URL]:64ms:.1.3.6.1.2.1.2.2.1.16.3:290116724
Where
- "192.168.1.1" - destination IP address
- "64ms" - Ping RTT
- ".1.3.6.1.2.1.2.2.1.10.3" relevant OID in this case IfInOctets
- "2491108168" current counter reading
In OID
".1.3.6.1.2.1.2.2.1.10.3" ending 3 is the interface IfIndex which refers to Interfac Ethernet 0
so in general form OID format for InOctets is
".1.3.6.1.2.1.2.2.1.10.IfIndex", where IfIndex again in above case is 3
The length on ifindex field is limited to 8 digits, for example
IfIndex of 13423234 is OK but
ifindex of 413423234 is over 8 digit and it defaults to some 8 digit number, similar to 16670000,
I need to make this program to be compatible with IfIndex which is over 8 digits in length, for example
4334344435
Source code is attached.
to compile this utility undex linux just run
tar xvf [login to view URL]
cd braa-0.8
make
the resulting file is called braa, which is the actual executable.
Hi,
I am very good in programming in C language and also a student in network services in KTH,sweden and have enough knowledge of SNMP protocol and MIB.
I ll deliver it in time.