How to send an SNMP broadcast?

Reinhold Kainhofer <[email protected]>
Newsgroups gmane.network.net-snmp.user
Organization FAM, Vienna University of Technology
Message-ID <[email protected]>
For the SANE (scanner driver) backend of the KONICA MINOLTA magicolor 1690mf 
device, I'm implementing SNMP device discovery. It works by sending an SNMP 
request to 255.255.255.255 for the OIDs
1.3.6.1.2.1.1.1.0 (SNMPv2-MIB::sysDescr.0)
1.3.6.1.2.1.1.2.0 (SNMPv2-MIB::sysObjectID.0)
1.3.6.1.2.1.2.2.1.6.1 (IF-MIB::ifPhysAddress.1)

Unfortunately, it seems I'm unable to send the request with snmpget. I always 
get a permission denied, even as root:

root@einstein:~# snmpget -v 2c -c public 255.255.255.255 1.3.6.1.2.1.1.1.0 \
     1.3.6.1.2.1.1.2.0 1.3.6.1.2.1.2.2.1.6.1
snmpget: Failure in sendto (Permission denied)

Inserting the (usually unknown) IP, of course things work (but that entirely 
defeats the purpose of a device discovery):

reinhold@einstein:~$ snmpget -v 2c -c public  10.0.0.5  1.3.6.1.2.1.1.1.0 \
      1.3.6.1.2.1.1.2.0 1.3.6.1.2.1.2.2.1.6.1
SNMPv2-MIB::sysDescr.0 = STRING: KONICA MINOLTA magicolor 1690MF
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-
SMI::enterprises.18334.1.1.1.1.1.23.1.1
IF-MIB::ifPhysAddress.1 = STRING: 0:20:6b:cc:6:77


Of course, I'll need to implement it in C, so the command line utils are not 
really relevant, but in the C API docs I couldn't find anything on sending an 
SMTP broadcast, either. Also, the mailing list archives didn't return any 
result on my search for broadcast.


So, how can I use net-snmp (both the command line utils and/or the C 
functions) to send a broadcast?

Thanks,
Reinhold

-- 
------------------------------------------------------------------
Reinhold Kainhofer, [email protected], http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.