summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd
AgeCommit message (Collapse)Author
2010-06-14Fixes unlinking the first element inside a set or a sequence, andMartin Hedenfal
fix reading empty sequences/sets. This minimizes the changes against ldapd. "looks good" pyr@, ok reyk@
2010-06-11Implement IP-FORWARD-MIB, ipv4 only for now.Jonathan Gray
ok reyk@ claudio@
2010-06-08ber_calc_len() is not an internal function, so adjust the comment.Martin Hedenfal
from Dawe
2010-05-26Move imsg into libutil and add a man page.Nicholas Marriott
Minor bump for libutil. Previous versions of this diff and man page looked at by various people. "you should just commit" deraadt
2010-05-26Rename some imsg bits to make namespace collisions less likely buf toNicholas Marriott
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE. ok henning gilles claudio jacekm deraadt
2010-05-24now that we can handle >9 args, put "-D name=value" on one line: it's a bitJason McIntyre
more readable, and fixes a spacing bug we had in smtpd.8;
2010-05-14Use calloc() instead of malloc() to allocate the connection structure. ThisClaudio Jeker
way the memory is zeroed. This is equivalent to the relayd commit by reyk. OK reyk, jsg
2010-04-27imsg.h does not need sys/tree.h.Nicholas Marriott
ok eric
2010-04-27Correct sensor logic so we don't get stuck in a loop.Jonathan Gray
ok deraadt@
2010-04-27Dumb mistake done twice. First in ospfd then synced to snmpd. rtm_errnoClaudio Jeker
is only valid for messages with an rt_msghdr. So move the check back where it was before. Problem found by jsg@
2010-04-20Get rid of MAXSENSORDEVICES. Gaps in sensordev lists are now handledTheo de Raadt
by returning ENXIO instead of ENOENT, to essentially indicate hotplug sensor that has gone away. Accessing beyond the end of the sensordev list still returns ENOENT, so that you can see there are no further devices. ok kettenis oga
2010-04-20Add "frequency" type for sensors. (and teach userland how to print thatOwain Ainsworth
type). Measured in Hz. ok deraadt@
2010-04-15add SENSOR_HUMIDITY to sensor framework to handle humidity valuesYojiro Uo
ok kettenis@ xsa@ sobrado@ krw@ deraadt@
2010-04-07Remove XXX comment and just close received fd if calloc() fails.Nicholas Marriott
If this happens the imsg may no longer be usable as there may be queued messages, but this is a) already the case with the code now, and b) would be the case if recvmsg() fails anyway, so we can document that -1 from imsg_read() invalidates the struct imsgbuf. discussed with and ok eric
2010-04-01Track blackhole and reject flags since the MIB knows about them.Claudio Jeker
Remove an unneeded stack storage as well. OK jsg@
2010-04-01After syncing kroute with bgpd sync now against ospfd's so that this codeClaudio Jeker
uses only one rtm parser instead of three different ones. Fixes problems with priorities that were not handled everywhere correctly. Found by and OK jsg@
2010-03-31Track interface addresses in a AF independent way. This is needed to supportClaudio Jeker
the AF independent MIBs like RFC4292 in the future. Additionally count number of routes (also needed by some MIBs) and do not track the state of routes since the MIB do not require it and it is expensive. OK jsg@
2010-03-29Sync kroute.c code with bgpd so that snmpd is able to track INET6 addrs asClaudio Jeker
well. First big sync, the interface address tree still needs to be made AF independent but that will be done in a second step. OK jsg@
2010-02-25a little cleanup;Jason McIntyre
2010-02-24manual pages should not have blank lines outside literal context,Ingo Schwarze
and .Pp is not needed before or after .Sh; found by mandoc -Tlint; "please fix" jmc@
2010-02-24match code and doc; ok claudioJason McIntyre
2010-02-23Fix .Oo .Xo .Oc .Xc mis-nesting by just dropping the .Xo and .Xc which,Ingo Schwarze
in these cases, is useless anyway. Found by and fixing the build with mandoc; still fine with both old and new groff. ok jmc@
2010-01-11Do not use after free kif->if_index; discovered with claudioTheo de Raadt
ok dlg
2010-01-11use calloc() instead of multiplying for malloc(); ok reykTheo de Raadt
2009-12-16knf and unused variablesTheo de Raadt
2009-12-02log_warn() consistency.Michael Knudsen
`OK' claudio
2009-11-26sync snmp_imsg_hdr with imsg_hdr and unbreak the snmp trap interfaceReyk Floeter
2009-11-12accessses 1 entry too far, found by parfait, ok jsg claudioTheo de Raadt
2009-09-15Enclose repeated buffer draining code in a new msgbuf_drain()Jacek Masiulaniec
function, which is additionally exported for use by others. It will be needed by smtpd's SSL module when the SMTP client code is changed to replace libevent's evbuffers with our msgbuf_* API. ok gilles@ henning@ guenther@ eric@
2009-08-14SENSOR_WATTS; ok reyk deraadtConstantine A. Murenin
2009-08-08Make imsg_clear close and free any fds in the received fd queue as well asNicholas Marriott
freeing the msgbuf. While here also remove an unnecessary while loop. ok eric pyr
2009-07-23make buf_write() behave like msgbuf_write(): send out only theEric Faurot
bytes that were filled, not the whole buffer. ok pyr@ gilles@
2009-06-25Another kroute.c needing RTM_VERSION checks. Looked over by sthen@ and henning@Claudio Jeker
2009-06-08revert this change by eric@:David Gwynne
Make the imsg protocol network-safe. it might be network safe, but half the imsg based daemons on my firewalls dont run anymore.
2009-06-07Change the way fds passed over a socket are retreived on the receiving side.Eric Faurot
Currently the receiver fetches an imsg via imsg_get() and if he expects an fd, he then calls imsg_get_fd() to fetch the next fd queued on the imsgbuf from which the imsg came. This changes hides the fd queueing mechanism to the API user. When closing an imsg with an fd, the message is flagged so that the receiving end knows it must dequeue the fd in imsg_get() and return it with the imsg structure. This way there is no (less) possible screw up from imsg_get_fd() not being called directly after imsg_get() by the user. The retreived imsg is self-contained. ok pyr@, "I like that" henning@
2009-06-07Make the imsg protocol network-safe.Eric Faurot
ok pyr@
2009-06-06change the imsg header fields a bit to prepare for upcoming changes.Eric Faurot
add a flag field, use u_int32_t for pid_t and extend type to 32 bits for padding. ok pyr@
2009-06-06this one missed the last batch.Pierre-Yves Ritschard
2009-06-06sync snmpd with the common imsg code, making it lib ready as well.Pierre-Yves Ritschard
ok eric@
2009-06-05rtm->rtm_hdrlen conversionChris Cappuccio
ok claudio@, henning@
2009-06-04Make the types of ber_read() decl match the prototype.Jonathan Gray
'looks good' pyr@
2009-04-16fix a few more typos found by spell(1); rectify a double "with" pointed outIgor Sobrado
by jmc@ while looking at this diff. ok jmc@, reyk@ (for the hostapd part)
2009-03-31Fixed memory leaks which would occur if the second of two memoryTobias Stoeckmann
allocations fails. looks right deraadt, krw ok henning
2009-02-25Fix an invalid pointer dereference in control_close(). If control_connbyfd()Claudio Jeker
fails -- which should never happen -- the function does not return and is accession the NULL set control pointer later on. Found by Matthew Haub. OK deraadt@
2009-01-03Sync with ypldap. Add ber_{add,get}_enumerated.aschrijver
OK reyk@
2008-12-23Link the directory containing the MIB definitions for snmpd(8).Reyk Floeter
2008-12-23export the livelock counter in a private mib openBSD.5.Reyk Floeter
discussed with dlg@
2008-12-19fix IF-MIB element and implementation ifInUnknownErrors -> ifInUnknownProtosReyk Floeter
2008-12-08report memory and swap in hrStorage, and implement hrProcessor to reportReyk Floeter
hrProcessorLoad (where load means the percentage of time the system was not idle during the last minute). based on HOST-RESOURCES-MIB. ok dlg@
2008-12-05add a few HOST-RESOURCES-MIB types (just names, no functionality yet)Reyk Floeter