Page 1 of 1

Using utils.h within executables written in the C language

Posted: Mon Mar 15, 2010 1:08 pm
by MCM
Hey all,

I am a novice at both Nagios and the C language. Whilst perusing the Nagios help pages, I came across a page discussing the "guidelines" for writing plugins. One of the points mentioned is that the use of utils.h (for C-written plugins) was encouraged (perhaps even expected). I was unable to locate this file anywhere (neither on the Nagios server instance I am running nor on the Nagios help pages,/documentation etc). So firstly, I was hoping that I could be directed to where I could get a copy of it.

Secondly, I would like to know how a C application is supposed to link to it. Are we expected to use a static linking technique (i.e. copy and paste the utils.h/c source into our own C plugin and then compile)? Or a dynamic linking technique? And if dynamic linking, is there some documentation/help that will guide me as to how to proceed with this approach?

I hope I explained that clearly enough.
Thanks in advance.