Menu

#505 multiple ip address or ip address range support to snmpget

open
nobody
None
5
2012-11-08
2004-10-03
Anonymous
No

netsnmp version : 5.1.2
operating system tested on: windows xp sp1

The patch is about supporting multiple ip or ip address
range to snmpget to query multiple ip address for the
same snmp object id. It also include support of
additional option -Ci filename to read ip address list from
the filename.

The patch include changes to snmpget.c, snmpget.dsp
and added two additional files range.c, range.h to net-
snmp5.1.2/apps directory.

I have made the following changes to snmpget.c

1. modified to accept multiple range of ipaddress for eg:
192.168.1.10-20 or 192.168.1.0/16. added range.[ch]
to provide this support to snmpget.dsp

2. provided one more option -Ci to accept inputfile that
contains the list of ipaddresses. With -Ci option, the
command line still needs a dummy target ip address to
work with snmp_parse_args( ). eg: snmpget -c public -
v1 -Ci ipfile 0.0.0.0 1.3.6.1.2.1.1.1.0 (where ipfile is the
file containing list of ipaddresses)

3. replaced fprintf with snmp_log to log the output or
error with -Lf filename option

-Ganga

Discussion

  • Nobody/Anonymous

    include snmpget.c.patch,snmpget.dsp.patch,range.c range.h

     
  • Thomas Anders

    Thomas Anders - 2004-10-07

    Logged In: YES
    user_id=848638

    Please also see the corresponding thread on the -coders list:
    http://sourceforge.net/mailarchive/message.php?msg_id=9673402

    I'd love to see this functionality in 5.2.

     
  • Thomas Anders

    Thomas Anders - 2005-08-18

    Logged In: YES
    user_id=848638

    The discussion on this feature ended without reaching a
    result/consensus. I'd still like to see this functionality
    in 5.3. Any further comments/objections? Shall we go for it?

     
  • David Peer

    David Peer - 2006-01-12

    Logged In: YES
    user_id=1310219

    Hi Thomas,

    Your patch is fine, but i wanted to reduce the packects i send
    to some vlan or group of computers by broadcasting only one
    packet ( one request ).
    Yours solution is same as "forking" many single snmpget
    requests, and this was already done in some othre ways already.

    Is there any why to broadcast one snmpget request, and any
    host listening will reply...

    David

     
  • Thomas Anders

    Thomas Anders - 2006-01-12

    Logged In: YES
    user_id=848638

    David, this is not *my* patch. As for (limited) UDP
    broadcast support, have a look at patch 700681 instead:
    http://sf.net/support/tracker.php?aid=700681

     
  • David Peer

    David Peer - 2006-01-12

    Logged In: YES
    user_id=1310219

    Thanks!
    I will check it.

    David

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.