Hi,
Apologies for cross posting:
I'm writing a c shared object which will connect to a proprietary server via
telnet and read back performance and status counters.
I don't want to hardcode the connection details such as IP address, port
number and password for the proprietary server into my shar
Tim
Why can't your application read a config file of its own?
Or look at its command line arguments?
Best Regards
Tim
Am 17.02.2015 um 13:20 schrieb Tim Culhane:
> Hi,
>
> Apologies for cross posting:
>
> I'm writing a c shared object which will connect to a proprietary server via
> telne
Hi Tim,
It is compiled as a shared object which is dynamically loaded in to the
snmpd agent using the dlmod snmpd conf directive.
So, it can't read in arguments of its own.
Tim
-Original Message-
From: Tim Cox [mailto:timmiles...@gmx.ch]
Sent: 17 February 2015 14:04
To: Tim Culhane
C
Hi Tim
That's a restriction of your own making
Your application can certainly read a three-line text file for its parameters,
and that need not be the same file as snmpd.conf at all
feasghar math
Tim
Am 17.02.2015 um 15:24 schrieb Tim Culhane:
> Hi Tim,
>
> It is compiled as a shared ob
Hi Tim,
Fair enough. I just thought that the shared object might have been able to
piggyback on some of the config reading functions in the net-snmp library,
that might help save duplicating work.
Tim
-Original Message-
From: Tim Cox [mailto:timmiles...@gmx.ch]
Sent: 17 February 2015
Tim,
Since the configuration file is read and processed line-by-line, you should
be able to use, e.g., netsnmp_ds_register_config(),
register_config_handler(), or other config file primitives in your
module_init() function, and they will take affect for lines after the dlmod
configuration line.
On Tue, Feb 17, 2015 at 9:55 AM, Tim Culhane
wrote:
> Thanks Bill, will investigate this.
>
>
>
> Do you know of any example shared objects which use this approach?
>
Sorry, no. I don't know of any shared objects in general other than the
one we use internally, and it doesn't use this approach
Thanks Bill, will investigate this.
Do you know of any example shared objects which use this approach?
I’m very new to the net-snmp API, so I’m sort of still finding my feet.
Regards,
Tim
From: Bill Fenner [mailto:fen...@gmail.com]
Sent: 17 February 2015 14:50
To: Tim Culhan
On Tue, Feb 17, 2015 at 09:50:24AM -0500, Bill Fenner wrote:
> Tim,
>
> Since the configuration file is read and processed line-by-line, you should
> be able to use, e.g., netsnmp_ds_register_config(),
> register_config_handler(), or other config file primitives in your
> module_init() function, a