On systems with 32 bit time_t the engineID produced in setup_engineID (snmpv3.c) with ENGINEID_TYPE_NETSNMP_RND is 13 bytes long. Systems with a time_t, that is 64 bits wide, will produce an engineID with a length of 17 bytes. The additional 4 bytes are all 0 and will be for approx. the next 90 years, if I understand what the code does.
If this is the intent, please let me know and forget about the rest of the mail. I came across this because I took a look at the snmp traffic with Wireshark (1.6.7), which had the following to say about such an 17 byte long engineID: Engine ID Format: Reserved/Enterprise-specific (128): Net-SNMP Random <Data not conforming to RFC3411> So at least the protocol analyser in Wireshark doesn't think it should be that way.. As far as I know, time_t is 64 bits wide on Windows with newer runtime libs than vc98 :-) and 64 bit *ix systems, at least on 64 bit Linux. If it was not the intent to pad the engineID with 4 more bytes on such platforms, I would suggest the following change in setup_engineID: Replace tmptime = time(NULL); memcpy(bufp + 5 + sizeof(tmpint), &tmptime, sizeof(tmptime)); with tmptime = time(NULL); tmpint = (int) tmptime; /* wraps around approx. every 135 years, even on systems with sizeof(time_t)>4 */ memcpy(bufp + 5 + sizeof(tmpint), & tmpint, sizeof(tmpint)); But that is just a suggestion. I checked the source code of net_snmp 5.4.4 and 5.7.2, the above lines are in both. Have a nice day! Walter ##################################################################################### This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system. Thank You. ANDRITZ HYDRO GmbH Rechtsform/ Legal form: Gesellschaft mit beschr?nkter Haftung / Corporation Firmensitz/ Registered seat: Wien Firmenbuchgericht/ Court of registry: Handelsgericht Wien Firmenbuchnummer/ Company registration: FN 61833 g DVR: 0605077 UID-Nr.: ATU14756806 ##################################################################################### ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders