Re: trap daemon
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
[ First - *please* don't mail me privately, without copying
any responses to the mailing list. I don't have the time
or inclination to offer private, unpaid, SNMP consultancy.
Keep discussions to the list, where others can both learn
and offer advice. Thanks. ]
On 1 February 2011 08:26, th exterit <[email protected]> wrote:
> Yes, apps/snmptrapd_sql.c. It looks like it'll be a bit of a mission to
> replace all the mysql stuff with psql.
Surely that's less work that re-writing a trap handling daemon from scratch?
At a quick look, you should just need to tweak the routines
netsnmp_sql_disconnected()
netsnmp_sql_error()
netsnmp_sql_stmt_error()
netsnmp_sql_cleanup()
netsnmp_sql_bind()
netsnmp_sql_connect()
netsnmp_sql_init() // constants only
plus a couple of mysql_xxx statements within
_sql_save
_sql_process_queue
Basically, look for calls to mysql_xxx() routines,
and replace these with equivalent postgres functions.
A quick grep indicates that there are about 25 such lines.
The bulk of the code should be unchanged.
OK - you'd have to look at the use of MYSQL constants
as well, and there may be some further tweaks to accomodate
the different requirements of the PostGres APIs.
But it shouldn't be a major undertaking - certainly much
less than developing something from scratch!
But it's up to you.
Dave
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
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