I am creating and deleting rows in my kernek structure (and it works, I
che3ckeD). 
The issue was with the local structure.
So, what changes, other than remove the SNMP_FREE call?

Naama

-----Original Message-----
From: dave.shi...@gmail.com [mailto:dave.shi...@gmail.com] On Behalf Of
Dave Shield
Sent: Tuesday, July 31, 2012 12:10 PM
To: Naama Bar Menachem
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: How to delete/add line from raw table?

On 31 July 2012 09:46, Naama Bar Menachem
<naama.barmenac...@novelsat.com> wrote:
> I see what you mean.
> What do you suggest? To insert the entry to local data structure in 
> "create_entry" or to remove the "SNMP_FREE" call?

No - you need to change *BOTH* of these routines to work with your
kernel-based APIs.   The 'createEntry' routine needs to set up a new
entry in the kernel table, and the 'deleteEntry' needs to remove it.


> I lean towards the second, if it is possible and will not cause memory

> issues, since I still don't see how the already exists rows are 
> inserted into local data structure as well.

If you are not using a local data structure, then you don't need to
create
new rows in it.   But you *DO* need to create new rows in the data
structure that you *are* using - i.e. the kernel table.

Dave

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to