RE: How to delete/add line from raw table?

2012-07-31 Thread Naama Bar Menachem
My question was regarding only the local structure, that is the
standard.
I very much appreciate your help. It's too bad you chose to end our
corresponding with a bad note.

Have a great day and thank you again,
Naama

-Original Message-
From: dave.shi...@gmail.com [mailto:dave.shi...@gmail.com] On Behalf Of
Dave Shield
Sent: Tuesday, July 31, 2012 12:43 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 10:11, Naama Bar Menachem
 wrote:
> 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?

I don't know - this is your code.

If you're not using a local cache, then you don't need to create
anything in 'createEntry' or delete it in 'removeEntry'
  Take out the bits that you think you don't need, and see what happens

But you really do need to sort this out for yourself.
There's a limit to the amount of help we can give you when you move away
from the standard approaches.  And you are long past that limit!

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


Re: How to delete/add line from raw table?

2012-07-31 Thread Dave Shield
On 31 July 2012 10:11, Naama Bar Menachem
 wrote:
> 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?

I don't know - this is your code.

If you're not using a local cache, then you don't need to create
anything in 'createEntry' or delete it in 'removeEntry'
  Take out the bits that you think you don't need, and see what happens

But you really do need to sort this out for yourself.
There's a limit to the amount of help we can give you when
you move away from the standard approaches.  And you are
long past that limit!

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


RE: How to delete/add line from raw table?

2012-07-31 Thread Naama Bar Menachem
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
 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


Re: How to delete/add line from raw table?

2012-07-31 Thread Dave Shield
On 31 July 2012 09:46, Naama Bar Menachem
 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


RE: How to delete/add line from raw table?

2012-07-31 Thread Naama Bar Menachem
Hi 

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?
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. Was I suppose to insert them in
"init"?

Naama


-Original Message-
From: dave.shi...@gmail.com [mailto:dave.shi...@gmail.com] On Behalf Of
Dave Shield
Sent: Tuesday, July 31, 2012 10:56 AM
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 08:30, Naama Bar Menachem
 wrote:
> There is no double-free problem. The free is only called once and 
> crashes on the first time.

Well *something* is wrong with it!

The usual causes of problems with releasing memory are:

   -  freeing a NULL pointer
   -  freeing a pointer twice
   -  freeing a pointer that wasn't allocated dynamically

You could try compiling with one of the memory debugging tools (dmalloc,
or libefence) to try and analyse where things are going wrong.


> However, there is something I don't understand. As I said the data is 
> not stored locally on the agent, but on kernel. When the device is 
> loaded, there is always 5 rows in the table. Where those 5 rows are 
> allocated and stored in the local agent table?

The agent typically keeps a local cached version of the underlying
table being monitored.This could be a complete copy of all of the
data from that table - or else a "skeleton" table, containing a dummy
entry for each row of the table (with the actual data being looked up
from the kernel in the handler).
However this is done, it's usually set up in the 'createEntry'
routine.

Looking at your code,  the entry that is set up in this routine is never
actually used.   You allocate a memory structure, but the block of
code
'XXX - insert entry into local data structure'
  is empty.
So the per-row data structure that you create here is simply dropped.

The entry you work with elsewhere is set up within the
   nsCommonConfigDataForwardPolicyRouteTable_get_entry()
routine, and seems to refer to a global buffer (which doesn't
need freeing)

Hence the cause of the crash is case 3 above.




> In addition, I added a new row, and immediately destroyed it. I 
> printed the address the entry is pointing to, and it seems that in 
> "create_entry" the allocated entry is pointing to "0x1201f6160", while

> on "remove_entry" it is pointing to "0x555aa6dc98".

See above.


If you are using your own mechanism for retrieving data from the
underlying kernel - then you need to extend this to apply to updating
values and creating/deleting rows as well.   You probably need to
replace the *whole* of the createEntry & deleteEntry routines with
versions that work with your kernel table.

Similarly for the SET processing of the column values.
You apply the new values within the Action pass, but don't seem to be
reversing this in the Undo pass, if some part of the SET fails.

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


RE: How to delete/add line from raw table?

2012-07-31 Thread Naama Bar Menachem
Hi

'XXX - insert entry into local data structure' is empty.  --> where?

Naama



-Original Message-
From: dave.shi...@gmail.com [mailto:dave.shi...@gmail.com] On Behalf Of
Dave Shield
Sent: Tuesday, July 31, 2012 10:56 AM
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 08:30, Naama Bar Menachem
 wrote:
> There is no double-free problem. The free is only called once and 
> crashes on the first time.

Well *something* is wrong with it!

The usual causes of problems with releasing memory are:

   -  freeing a NULL pointer
   -  freeing a pointer twice
   -  freeing a pointer that wasn't allocated dynamically

You could try compiling with one of the memory debugging tools (dmalloc,
or libefence) to try and analyse where things are going wrong.


> However, there is something I don't understand. As I said the data is 
> not stored locally on the agent, but on kernel. When the device is 
> loaded, there is always 5 rows in the table. Where those 5 rows are 
> allocated and stored in the local agent table?

The agent typically keeps a local cached version of the underlying
table being monitored.This could be a complete copy of all of the
data from that table - or else a "skeleton" table, containing a dummy
entry for each row of the table (with the actual data being looked up
from the kernel in the handler).
However this is done, it's usually set up in the 'createEntry'
routine.

Looking at your code,  the entry that is set up in this routine is never
actually used.   You allocate a memory structure, but the block of
code
'XXX - insert entry into local data structure'
  is empty.
So the per-row data structure that you create here is simply dropped.

The entry you work with elsewhere is set up within the
   nsCommonConfigDataForwardPolicyRouteTable_get_entry()
routine, and seems to refer to a global buffer (which doesn't
need freeing)

Hence the cause of the crash is case 3 above.




> In addition, I added a new row, and immediately destroyed it. I 
> printed the address the entry is pointing to, and it seems that in 
> "create_entry" the allocated entry is pointing to "0x1201f6160", while

> on "remove_entry" it is pointing to "0x555aa6dc98".

See above.


If you are using your own mechanism for retrieving data from the
underlying kernel - then you need to extend this to apply to updating
values and creating/deleting rows as well.   You probably need to
replace the *whole* of the createEntry & deleteEntry routines with
versions that work with your kernel table.

Similarly for the SET processing of the column values.
You apply the new values within the Action pass, but don't seem to be
reversing this in the Undo pass, if some part of the SET fails.

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


Re: How to delete/add line from raw table?

2012-07-31 Thread Dave Shield
On 31 July 2012 08:30, Naama Bar Menachem
 wrote:
> There is no double-free problem. The free is only called once and
> crashes on the first time.

Well *something* is wrong with it!

The usual causes of problems with releasing memory are:

   -  freeing a NULL pointer
   -  freeing a pointer twice
   -  freeing a pointer that wasn't allocated dynamically

You could try compiling with one of the memory debugging tools
(dmalloc, or libefence) to try and analyse where things are
going wrong.


> However, there is something I don't understand. As I said the data is
> not stored locally on the agent, but on kernel. When the device is
> loaded, there is always 5 rows in the table. Where those 5 rows are
> allocated and stored in the local agent table?

The agent typically keeps a local cached version of the underlying
table being monitored.This could be a complete copy of all of the
data from that table - or else a "skeleton" table, containing a dummy
entry for each row of the table (with the actual data being looked up
from the kernel in the handler).
However this is done, it's usually set up in the 'createEntry' routine.

Looking at your code,  the entry that is set up in this routine is never
actually used.   You allocate a memory structure, but the block of
code
'XXX - insert entry into local data structure'
  is empty.
So the per-row data structure that you create here is simply dropped.

The entry you work with elsewhere is set up within the
   nsCommonConfigDataForwardPolicyRouteTable_get_entry()
routine, and seems to refer to a global buffer
(which doesn't need freeing)

Hence the cause of the crash is case 3 above.




> In addition, I added a new row, and immediately destroyed it. I printed
> the address the entry is pointing to, and it seems that in
> "create_entry" the allocated entry is pointing to "0x1201f6160", while
> on "remove_entry" it is pointing to "0x555aa6dc98".

See above.


If you are using your own mechanism for retrieving data from the
underlying kernel - then you need to extend this to apply to updating
values and creating/deleting rows as well.   You probably need to
replace the *whole* of the createEntry & deleteEntry routines with
versions that work with your kernel table.

Similarly for the SET processing of the column values.
You apply the new values within the Action pass, but don't
seem to be reversing this in the Undo pass, if some part
of the SET fails.

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


RE: How to delete/add line from raw table?

2012-07-31 Thread Naama Bar Menachem
Hi Dave

There is no double-free problem. The free is only called once and
crashes on the first time.
However, there is something I don't understand. As I said the data is
not stored locally on the agent, but on kernel. When the device is
loaded, there is always 5 rows in the table. Where those 5 rows are
allocated and stored in the local agent table?

In addition, I added a new row, and immediately destroyed it. I printed
the address the entry is pointing to, and it seems that in
"create_entry" the allocated entry is pointing to "0x1201f6160", while
on "remove_entry" it is pointing to "0x555aa6dc98". 

I am attaching the C file again.

Thank you,
Naama



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

On 30 July 2012 17:18, Naama Bar Menachem
 wrote:
> I track "entry"'s address and it seems fine (entry=0x555826b818). Not 
> NULL at no stage.
> On the other hand- when I remove the call for SNMP_FREE it does not 
> crash.

That sounds more like a double-free problem.

Dave


nsCommonConfigDataForwardPolicyRoute.c
Description: nsCommonConfigDataForwardPolicyRoute.c
--
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


Re: How to delete/add line from raw table?

2012-07-30 Thread Dave Shield
On 30 July 2012 17:18, Naama Bar Menachem
 wrote:
> I track "entry"'s address and it seems fine (entry=0x555826b818). Not
> NULL at no stage.
> On the other hand- when I remove the call for SNMP_FREE it does not
> crash.

That sounds more like a double-free problem.

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


RE: How to delete/add line from raw table?

2012-07-30 Thread Naama Bar Menachem
I track "entry"'s address and it seems fine (entry=0x555826b818). Not
NULL at no stage.
On the other hand- when I remove the call for SNMP_FREE it does not
crash.

Naama

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

On 30 July 2012 15:37, Naama Bar Menachem
 wrote:
> When set value to 6 (destroy) using snmpB browser, timeout error
received.

If the agent crashes before sending back a response, it's not really
very surprising that the browser request times out!


> The command "SNMP_FREE(entry);" fails and cause snmpd to crash.

The most likely cause would be if 'entry' is null when it's passed to
the free call.
   (although SNMP_FREE is meant to handle that)

Alternatively, this might happen if the 'entry' is not a valid pointer,
or has already been freed.

Try checking what value 'entry' has at this point, and what happened to
it previously.


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


Re: How to delete/add line from raw table?

2012-07-30 Thread Dave Shield
On 30 July 2012 15:37, Naama Bar Menachem
 wrote:
> When set value to 6 (destroy) using snmpB browser, timeout error received.

If the agent crashes before sending back a response,
it's not really very surprising that the browser request times out!


> The command "SNMP_FREE(entry);" fails and cause snmpd to crash.

The most likely cause would be if 'entry' is null when it's passed to
the free call.
   (although SNMP_FREE is meant to handle that)

Alternatively, this might happen if the 'entry' is not a valid pointer,
or has already been freed.

Try checking what value 'entry' has at this point,
and what happened to it previously.


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


RE: How to delete/add line from raw table?

2012-07-30 Thread Naama Bar Menachem
Thank you so much for your great help!

One more (hopefully last) issue- now with DELETE:
When set value to 6 (destroy) using snmpB browser, timeout error
received. 
The command "SNMP_FREE(entry);" fails and cause snmpd to crash.

Naama


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

On 30 July 2012 15:02, Naama Bar Menachem
 wrote:
> Is it possible to add new row without getting inputs?
> Not index and not other values?
> As if the user pressed a "ADD" button and my behind the screen 
> mechanism will put initial values to all, including index.

It depends on what level you are talking about.

If you mean
"is it possible to send an SNMP SET request that will create
 a new row without specifying the index value"
   then the answer is probably No.

All SET requests operate on an *instance* of a MIB object, and hence
will need to include the instance sub-identifier.

If you mean
   "is it possible to have a management tool that
allows the user to press an ADD button,
and have this create a new row - using an
appropriate index"
then the answer is Yes.

But the "behind-the-screen" mechanism would be located in the
client-side application, rather than the SNMP agent.
   One obvious approach would be to walk the table to retrieve the
current index values, and choose the next
one.   Then issue a suitable SET request using that index.
   All this could be hidden from the user by a suitable dedicated client
application.

But not if you're working with the low-level SET requests (or
command-line tools such as "snmpset", etc), where the user would need to
decide what index to create.

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


Re: How to delete/add line from raw table?

2012-07-30 Thread Dave Shield
On 30 July 2012 15:02, Naama Bar Menachem
 wrote:
> Is it possible to add new row without getting inputs?
> Not index and not other values?
> As if the user pressed a "ADD" button and my behind the screen mechanism
> will put initial values to all, including index.

It depends on what level you are talking about.

If you mean
"is it possible to send an SNMP SET request that will create
 a new row without specifying the index value"
   then the answer is probably No.

All SET requests operate on an *instance* of a MIB object,
and hence will need to include the instance sub-identifier.

If you mean
   "is it possible to have a management tool that
allows the user to press an ADD button,
and have this create a new row - using an
appropriate index"
then the answer is Yes.

But the "behind-the-screen" mechanism would be
located in the client-side application, rather than the
SNMP agent.
   One obvious approach would be to walk the table to
retrieve the current index values, and choose the next
one.   Then issue a suitable SET request using that index.
   All this could be hidden from the user by a suitable
dedicated client application.

But not if you're working with the low-level SET requests
(or command-line tools such as "snmpset", etc), where
the user would need to decide what index to create.

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


RE: How to delete/add line from raw table?

2012-07-30 Thread Naama Bar Menachem
Hi Dave

1. the set problem was a result of a return value that is not NULL in
get_entry. 
   It was my mistake in editing the file.
2. The timeout problem when walking the tree (or on GET) was a result of
a wrong error value in MODE_GETNEXT case, 
   that returned "SNMP_NOSUCHINSTANCE" instead of "SNMP_ENDOFMIBVIEW".
Caused by mib2c.
THANKS!!!

New question:
Is it possible to add new row without getting inputs? Not index and not
other values?
As if the user pressed a "ADD" button and my behind the screen mechanism
will put initial values to all, including index.

Naama


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

On 30 July 2012 13:00, Naama Bar Menachem
 wrote:
> True. But even after I fixed it - I get the same error as we started 
> with, since it first try to SET the RowStatus (I can see from inner 
> log
> prints)

Can you please check  the value that is being returned from
   nsCommonConfigDataForwardPolicyRouteTable_get_entry()
   when querying a row that doesn't currently exist?

It ought to be returning 'NULL' .
Is this the case?

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


Re: How to delete/add line from raw table?

2012-07-30 Thread Dave Shield
On 30 July 2012 13:00, Naama Bar Menachem
 wrote:
> True. But even after I fixed it - I get the same error as we started
> with, since it first try to SET the RowStatus (I can see from inner log
> prints)

Can you please check  the value that is being returned from
   nsCommonConfigDataForwardPolicyRouteTable_get_entry()
   when querying a row that doesn't currently exist?

It ought to be returning 'NULL' .
Is this the case?

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


RE: How to delete/add line from raw table?

2012-07-30 Thread Naama Bar Menachem
True. But even after I fixed it - I get the same error as we started
with, since it first try to SET the RowStatus (I can see from inner log
prints)
~ # ./data/net/naamab/snmpset -m ALL -M /data/sw/snmp/snmp_mib_lnk/ -v
2c -c private 127.0.0.1
nsCommonConfigDataForwardPolicyRouteNotifyRowStatus.10 i 4
nsCommonConfigDataForwardPolicyRouteInputInterfaceId.10 u 20
nsCommonConfigDataForwardPolicyRouteRoutingTableId.10 u 22
Error in packet.
Reason: inconsistentValue (The set value is illegal or unsupported in
some way)
Failed object:
NOVELSAT-COMMON-MIB::nsCommonConfigDataForwardPolicyRouteNotifyRowStatus
.10



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

On 30 July 2012 12:43, Naama Bar Menachem
 wrote:
> The multiple set command fails - cause snmp to crash:
> * COMMAND:
> ./data/net/naamab/snmpset -m ALL -M /data/sw/snmp/snmp_mib_lnk/
> -v 2c -c private 127.0.0.1
> nsCommonConfigDataForwardPolicyRouteNotifyRowStatus.10 i 4
> nsCommonConfigDataForwardPolicyRouteInputInterfaceId.10 u 20
> nsCommonConfigDataForwardPolicyRouteRoutingTableIdu 22

Please have a closer look at that command.
Can you see any differences between the three varbind assignments?


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


Re: How to delete/add line from raw table?

2012-07-30 Thread Dave Shield
On 30 July 2012 12:43, Naama Bar Menachem
 wrote:
> The multiple set command fails - cause snmp to crash:
> * COMMAND:
> ./data/net/naamab/snmpset -m ALL -M /data/sw/snmp/snmp_mib_lnk/
> -v 2c -c private 127.0.0.1
> nsCommonConfigDataForwardPolicyRouteNotifyRowStatus.10 i 4
> nsCommonConfigDataForwardPolicyRouteInputInterfaceId.10 u 20
> nsCommonConfigDataForwardPolicyRouteRoutingTableIdu 22

Please have a closer look at that command.
Can you see any differences between the three varbind assignments?


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


RE: How to delete/add line from raw table?

2012-07-30 Thread Naama Bar Menachem
The multiple set command fails - cause snmp to crash:
* COMMAND:
./data/net/naamab/snmpset -m ALL -M /data/sw/snmp/snmp_mib_lnk/ -v 2c -c
private 127.0.0.1 nsCommonConfigDataForwardPolicyRouteNotifyRowStatus.10
i 4 nsCommonConfigDataForwardPolicyRouteInputInterfaceId.10 u 20
nsCommonConfigDataForwardPolicyRouteRoutingTableId u 22
* FAILED ACTION:
table_info = netsnmp_extract_table_info(request);
  switch (table_info->colnum) {..}  ==> cause snmpd to crash!!


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

On 30 July 2012 10:17, Naama Bar Menachem
 wrote:
> I said it does NOT exists... :)

Yes.
And I said good - this rules out one possible cause

> How do I set all three values at the same time?

List them all on the same command line

   snmpset  oid1 = val1  oid2 = val2  oid3 = val3


> Regarding the "read-write" and "read-create": I changes them all to 
> read-create and recompiled using mib2c. no change in output 'c' file.

No - it won't change the code generated, or the behaviour of the
Net-SNMP agent.
   Our MIB parsing code isn't particularly strict, and doesn't worry
about
this sort of detail.   But strictly speaking, this is not a valid MIB
definition.
I suggested you fix this (and ran the MIB through smilint) to improve
the overall quality of your MIB file - not because it would help in this
particular
problem -  but because better is better :-).   That's why it was a PS,
rather
than part of the main response.

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


Re: How to delete/add line from raw table?

2012-07-30 Thread Dave Shield
On 30 July 2012 10:17, Naama Bar Menachem
 wrote:
> I said it does NOT exists... :)

Yes.
And I said good - this rules out one possible cause

> How do I set all three values at the same time?

List them all on the same command line

   snmpset  oid1 = val1  oid2 = val2  oid3 = val3


> Regarding the "read-write" and "read-create": I changes them all to
> read-create and recompiled using mib2c. no change in output 'c' file.

No - it won't change the code generated, or the behaviour of the Net-SNMP
agent.
   Our MIB parsing code isn't particularly strict, and doesn't worry about
this sort of detail.   But strictly speaking, this is not a valid MIB
definition.
I suggested you fix this (and ran the MIB through smilint) to improve the
overall quality of your MIB file - not because it would help in this particular
problem -  but because better is better :-).   That's why it was a PS, rather
than part of the main response.

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


RE: How to delete/add line from raw table?

2012-07-30 Thread Naama Bar Menachem
I said it does NOT exists... :)
How do I set all three values at the same time?

Regarding the "read-write" and "read-create": I changes them all to
read-create and recompiled using mib2c. no change in output 'c' file. I
also used the new mib file when performing SET action, and the results
are still the same.



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

On 30 July 2012 08:38, Naama Bar Menachem
 wrote:
> Row 10 does not exists (there are rows with indices: 6,27,42,82,85).

OK - so creating an already-existing row is not the cause.
The other typical cause of inconsistentValue with RowStatus SETs is not
providing values for the other column objects

Are you using the same NOVELSET-COMMON MIB that you posted before?
If so,   the nsCommonConfigDataForwardPolicyRouteTable
seems to have three (accessible) columns:
- nsCommonConfigDataForwardPolicyRouteInputInterfaceId
- nsCommonConfigDataForwardPolicyRouteRoutingTableId
- nsCommonConfigDataForwardPolicyRouteNotifyRowStatus

What should the Interface ID and Routing ID values be for this entry?

What happens if you assign all three values in the same SET request?


Dave

PS:   I note that you are mixing "read-write" and "read-create" columns
in this table.   That is not allowed.I  strongly suggest that
you run
the MIB file through a proper MIB validation checker - such as
'smilint' .

--
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


Re: How to delete/add line from raw table?

2012-07-30 Thread Dave Shield
On 30 July 2012 08:38, Naama Bar Menachem
 wrote:
> Row 10 does not exists (there are rows with indices: 6,27,42,82,85).

OK - so creating an already-existing row is not the cause.
The other typical cause of inconsistentValue with RowStatus SETs
is not providing values for the other column objects

Are you using the same NOVELSET-COMMON MIB that you posted before?
If so,   the nsCommonConfigDataForwardPolicyRouteTable
seems to have three (accessible) columns:
- nsCommonConfigDataForwardPolicyRouteInputInterfaceId
- nsCommonConfigDataForwardPolicyRouteRoutingTableId
- nsCommonConfigDataForwardPolicyRouteNotifyRowStatus

What should the Interface ID and Routing ID values be for this entry?

What happens if you assign all three values in the same SET request?


Dave

PS:   I note that you are mixing "read-write" and "read-create" columns
in this table.   That is not allowed.I  strongly suggest that you run
the MIB file through a proper MIB validation checker - such as 'smilint' .

--
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


RE: How to delete/add line from raw table?

2012-07-30 Thread Naama Bar Menachem
COMMAND:
./data/net/naamab/snmpset -m ALL -M /data/sw/snmp/snmp_mib_lnk/ -v 2c -c
private 127.0.0.1 nsCommonConfigDataForwardPolicyRouteNotifyRowStatus.10
i 4
Row 10 does not exists (there are rows with indices: 6,27,42,82,85).

And here is the return message:
~ # ./data/net/naamab/snmpset -m ALL -M /data/sw/snmp/snmp_mib_lnk/ -v
2c -c private 127.0.0.1
nsCommonConfigDataForwardPolicyRouteNotifyRowStatus.10 i 4
Error in packet.
Reason: inconsistentValue (The set value is illegal or unsupported in
some way)
Failed object:
NOVELSAT-COMMON-MIB::nsCommonConfigDataForwardPolicyRouteNotifyRowStatus
.10





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

On 30 July 2012 08:27, Naama Bar Menachem
 wrote:
> MODE_SET_RESERVE1 stage fails with error number '12'.

Error 12 is 'inconsistentValue', which is the expected error if you try
to delete a non-existant row,  or create an existing one.
(among other situations)



> Regard the browser - I am now using the shell command:
> ./data/net/naamab/snmpset -m ALL -M /data/sw/snmp/snmp_mib_lnk/ -v 2c 
> -c private 127.0.0.1 
> nsCommonConfigDataForwardPolicyRouteNotifyRowStatus.10 i 4

Thank you - that was the information that you omitted before.

First question
What does
 snmpget 
nsCommonConfigDataForwardPolicyRouteNotifyRowStatus.10
  return?
(i.e. does this row already exist?)

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


Re: How to delete/add line from raw table?

2012-07-30 Thread Dave Shield
On 30 July 2012 08:27, Naama Bar Menachem
 wrote:
> MODE_SET_RESERVE1 stage fails with error number '12'.

Error 12 is 'inconsistentValue', which is the expected error if
you try to delete a non-existant row,  or create an existing one.
(among other situations)



> Regard the browser - I am now using the shell command:
> ./data/net/naamab/snmpset -m ALL -M /data/sw/snmp/snmp_mib_lnk/ -v 2c -c
> private 127.0.0.1 nsCommonConfigDataForwardPolicyRouteNotifyRowStatus.10 i 4

Thank you - that was the information that you omitted before.

First question
What does
 snmpget    nsCommonConfigDataForwardPolicyRouteNotifyRowStatus.10
  return?
(i.e. does this row already exist?)

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


RE: How to delete/add line from raw table?

2012-07-30 Thread Naama Bar Menachem
Hi Dave

As I wrote in another mail, I found the source for the issue:
MODE_SET_RESERVE1 stage fails with error number '12'.
The code was automatically created by mib2c:

   case COLUMN_NSCOMMONCONFIGDATAFORWARDPOLICYROUTENOTIFYROWSTATUS:
ret = netsnmp_check_vb_rowstatus(request->requestvb,
(table_entry ? RS_ACTIVE : RS_NONEXISTENT));
if (ret != SNMP_ERR_NOERROR) {
// -> ret=12
netsnmp_set_request_error(reqinfo, request, ret);
return SNMP_ERR_NOERROR;
}
break;


In addition, I can get/set ALL other parameters from the agent, the
problem is only on RowStatus. I can also get other columns from this
specific table. 
Regard the browser - I am now using the shell command:
./data/net/naamab/snmpset -m ALL -M /data/sw/snmp/snmp_mib_lnk/ -v 2c -c
private 127.0.0.1 nsCommonConfigDataForwardPolicyRouteNotifyRowStatus.10
i 4


Thank you,
Naama


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

On 29 July 2012 07:40, Naama Bar Menachem
 wrote:
> - I am using snmpB browser, and I tried both "walk" command on the 
> tree as well as "get> select instance" and "set> select instance" 
> commands in which I select an instance from a list (that was presented

> properly) All these commands are resulted in timeout error.

Is this command issued on the same system as the agent is running on, or
a remote system?

Can you see anything else from that agent?   (e.g. walking the 'system'
tree)


>  conf file is attached.

The most obvious problem with this config file is that you are mixing
two different styles of access control.

Please use EITHER   r[ow]community OR  com2sec/group/access
But do not try to mix the two.

I'd suggest that you delete the whole section starting

   "map an SNMPv1 or SNMPv2c community string..."
up to
  "group  privateGroup..."

plus the two lines
  "access publicGroup"
  "access privateGroup"


[I'd also strongly suggest that you use a different write community
string  other than "private" - if you support community-based SET
requests at all!]

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


Re: How to delete/add line from raw table?

2012-07-30 Thread Dave Shield
On 29 July 2012 07:40, Naama Bar Menachem
 wrote:
> - I am using snmpB browser, and I tried both "walk" command on the tree
> as well as "get> select instance" and "set> select instance" commands in
> which I select an instance from a list (that was presented properly)
> All these commands are resulted in timeout error.

Is this command issued on the same system as the agent is running on,
or a remote system?

Can you see anything else from that agent?   (e.g. walking the 'system' tree)


>  conf file is attached.

The most obvious problem with this config file is that you are mixing
two different styles of access control.

Please use EITHER   r[ow]community OR  com2sec/group/access
But do not try to mix the two.

I'd suggest that you delete the whole section starting

   "map an SNMPv1 or SNMPv2c community string..."
up to
  "group  privateGroup..."

plus the two lines
  "access publicGroup"
  "access privateGroup"


[I'd also strongly suggest that you use a different write community string
 other than "private" - if you support community-based SET requests at all!]

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


RE: How to delete/add line from raw table?

2012-07-29 Thread Naama Bar Menachem
Hi Dave and all

I have managed to solved some of the problems, and now I have the
following:
MODE_SET_RESERVE1 stage fails with error number '12'.
The code was automatically created by mib2c:

   case COLUMN_NSCOMMONCONFIGDATAFORWARDPOLICYROUTENOTIFYROWSTATUS:
ret = netsnmp_check_vb_rowstatus(request->requestvb,
(table_entry ? RS_ACTIVE : RS_NONEXISTENT));
if (ret != SNMP_ERR_NOERROR) {
// -> ret=12
netsnmp_set_request_error(reqinfo, request, ret);
return SNMP_ERR_NOERROR;
}
break;

Thank you,
Naama


-Original Message-
From: Naama Bar Menachem 
Sent: Sunday, July 29, 2012 9:41 AM
To: 'Dave Shield'
Cc: net-snmp-users@lists.sourceforge.net
Subject: RE: How to delete/add line from raw table?

- I am using snmpB browser, and I tried both "walk" command on the tree
as well as "get> select instance" and "set> select instance" commands in
which I select an instance from a list (that was presented properly) All
these commands are resulted in timeout error.
- conf file is attached.


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

On 26 July 2012 11:23, Naama Bar Menachem
 wrote:
> I've added the import statement, and recompiled.
> And still, on RowStatus set - I get a timeout error.

Obvious questions first:

   -  what is the exact SET request that you are using?
   -  what are the access control settings in the snmpd.conf file?

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


RE: How to delete/add line from raw table?

2012-07-28 Thread Naama Bar Menachem
- I am using snmpB browser, and I tried both "walk" command on the tree
as well as "get> select instance" and "set> select instance" commands in
which I select an instance from a list (that was presented properly)
All these commands are resulted in timeout error.
- conf file is attached.


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

On 26 July 2012 11:23, Naama Bar Menachem
 wrote:
> I've added the import statement, and recompiled.
> And still, on RowStatus set - I get a timeout error.

Obvious questions first:

   -  what is the exact SET request that you are using?
   -  what are the access control settings in the snmpd.conf file?

Dave


snmpd.conf
Description: snmpd.conf
--
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


Re: How to delete/add line from raw table?

2012-07-26 Thread Dave Shield
On 26 July 2012 11:23, Naama Bar Menachem
 wrote:
> I've added the import statement, and recompiled.
> And still, on RowStatus set - I get a timeout error.

Obvious questions first:

   -  what is the exact SET request that you are using?
   -  what are the access control settings in the snmpd.conf file?

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


RE: How to delete/add line from raw table?

2012-07-26 Thread Naama Bar Menachem
I've added the import statement, and recompiled. 
And still, on RowStatus set - I get a timeout error. Same for when I
"walk" the table (stuck when need to get RowStatus data)

It would be very helpful to see an example "C" file, if such exists.

Thank you,
Naama

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

On 26 July 2012 09:28, Naama Bar Menachem
 wrote:
> I am sorry! I accidently sent you one of my experiments...
> Here is the correct command and files:

It's OK - the problem is the same in both cases.
You are using the type 'RowStatus' in your MIB file, but you aren't
importing it.
So the SNMP tools don't know what this means, and hence how to define
the corresponding variables.

It's always worth running your MIB through a validation tool such as
'smilint'
before starting to use it.   That would throw up this sort of problem.

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


Re: How to delete/add line from raw table?

2012-07-26 Thread Dave Shield
On 26 July 2012 09:28, Naama Bar Menachem
 wrote:
> I am sorry! I accidently sent you one of my experiments...
> Here is the correct command and files:

It's OK - the problem is the same in both cases.
You are using the type 'RowStatus' in your MIB file, but you aren't
importing it.
So the SNMP tools don't know what this means, and hence how to define
the corresponding variables.

It's always worth running your MIB through a validation tool such as 'smilint'
before starting to use it.   That would throw up this sort of problem.

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


Re: How to delete/add line from raw table?

2012-07-26 Thread Dave Shield
On 26 July 2012 09:05, Naama Bar Menachem
 wrote:
> mib2c -c mib2c.iterate.conf nsCommonConfigDataForwardPolicyRoute

You said that you were working with "raw tables",  but this command uses
the iteration helper.   Please explain?

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


RE: How to delete/add line from raw table?

2012-07-26 Thread Naama Bar Menachem
Mailed all the details in another mail, but it is held until the list
moderator can review it for approval (because it is big).
Please notify me if you won't receive it soon.

Naama

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

On 26 July 2012 07:07, Naama Bar Menachem
 wrote:
> My tables are actually kept in kernel, and not in agent itself

Do you have an API call that will remove an entry from this table?


> After adding RowStatus column, mib2c created a c file with variables 
> with the names "xNotifyRowStatus" and "old_xNotifyRowStatus" 
> but without any type.

Sounds odd
Can you please post (as attachments!):
-  The MIB file that you are working from
-  The .c (and .h) files produced by mib2c
  (*without* any of your subsequent changes)

Also - which version of the Net-SNMP software are you using, and what
was the *exact* mib2c command that you gave?

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


Re: How to delete/add line from raw table?

2012-07-26 Thread Dave Shield
On 26 July 2012 07:07, Naama Bar Menachem
 wrote:
> My tables are actually kept in kernel, and not in agent itself

Do you have an API call that will remove an entry from this table?


> After adding RowStatus column, mib2c created a c file with variables
> with the names "xNotifyRowStatus" and "old_xNotifyRowStatus" but
> without any type.

Sounds odd
Can you please post (as attachments!):
-  The MIB file that you are working from
-  The .c (and .h) files produced by mib2c
  (*without* any of your subsequent changes)

Also - which version of the Net-SNMP software are you using,
and what was the *exact* mib2c command that you gave?

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


RE: How to delete/add line from raw table?

2012-07-25 Thread Naama Bar Menachem
Hi Dave

I have read many RowStatus documentations and still not sure how to use
it.

My tables are actually kept in kernel, and not in agent itself and I use
"mib2c.raw-table.conf" to create their structure in mib2c.

After adding RowStatus column, mib2c created a c file with variables
with the names "xNotifyRowStatus" and "old_xNotifyRowStatus" but
without any type. I tried to define it as long - but still had issues. 
The value of the status is all rows is "0", which is not defined if I am
not mistaken. Setting it to other value cause TimeOut error.

Is there an example C file for such case? 

Thank you.
Naama


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

On 22 July 2012 06:54, Naama Bar Menachem
 wrote:
> Is there an example code?

Many of the tables under 'agent/mibgroup' include support for a
RowStatus column.   As does the template code generated by 'mib2c'.


> I did not understand how a "RowStatus" would help me provide the user 
> with the option to delete/add rows to a table.

That is the whole purpose of the RowStatus textual convention!
  Have you read the MIB definition of this type?
There is a long, long description clause, that explains exactly how a
user can use it to add/remove rows from the table.


> And what do you mean by " depends on how the MIB table is defined"?

You haven't said anything about what MIB table(s) you are implementing.
Whether these are tables that you have defined yourself, or whether you
are working with something that someone else has provided.

If the table is defined to include a RowStatus column, then this can be
used to add/delete rows.
   If it's defined without such a column, then the description of the
table needs to state how (and whether!) rows can be added or removed.

  For example, the TCP-MIB::tcpConnectionTable does not have a RowStatus
column, but the definition of the tcpConnectionState object describes
how it can be used to terminate a connection (and hence remove a row
from the table).
  You can't create a new row in this table via SNMP - since that would
imply creating a new connection between two arbitrary network ports.
That doesn't really make sense - so isn't supported in the table.

  Always remember - the SNMP information is designed to mimic the
underlying state of the computer your are trying to manage.   If one
side of this changes, that needs to trigger an equivalent change in the
other
   System->SNMP is no problem - just refresh the data being reported.
But SNMP->System implies a lot more work, and is not always possible.

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


Re: How to delete/add line from raw table?

2012-07-23 Thread Dave Shield
On 22 July 2012 06:54, Naama Bar Menachem
 wrote:
> Is there an example code?

Many of the tables under 'agent/mibgroup' include support for a
RowStatus column.   As does the template code generated by 'mib2c'.


> I did not understand how a "RowStatus" would help me provide the user
> with the option to delete/add rows to a table.

That is the whole purpose of the RowStatus textual convention!
  Have you read the MIB definition of this type?
There is a long, long description clause, that explains
exactly how a user can use it to add/remove rows from the table.


> And what do you mean by " depends on how the MIB table is defined"?

You haven't said anything about what MIB table(s) you are implementing.
Whether these are tables that you have defined yourself, or whether
you are working with something that someone else has provided.

If the table is defined to include a RowStatus column, then this can
be used to add/delete rows.
   If it's defined without such a column, then the description of the table
needs to state how (and whether!) rows can be added or removed.

  For example, the TCP-MIB::tcpConnectionTable does not have
a RowStatus column, but the definition of the tcpConnectionState
object describes how it can be used to terminate a connection
(and hence remove a row from the table).
  You can't create a new row in this table via SNMP - since that would
imply creating a new connection between two arbitrary network ports.
That doesn't really make sense - so isn't supported in the table.

  Always remember - the SNMP information is designed to mimic the
underlying state of the computer your are trying to manage.   If one
side of this changes, that needs to trigger an equivalent change in
the other
   System->SNMP is no problem - just refresh the data being reported.
But SNMP->System implies a lot more work, and is not always possible.

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


RE: How to delete/add line from raw table?

2012-07-21 Thread Naama Bar Menachem
Hi Dave

Is there an example code?
I did not understand how a "RowStatus" would help me provide the user
with the option to delete/add rows to a table.
And what do you mean by " depends on how the MIB table is defined"?

Thank you!
Naama


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

On 12 July 2012 14:30, Naama Bar Menachem
 wrote:
> I am using a raw tables.
>
> How can I provide the user with the option to add and remove rows?

It depends on how the MIB table is defined.
The standard approach would be to have a column object of type
'RowStatus'.
The normal implementation code for this object would provide the desired
functionality.

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


Re: How to delete/add line from raw table?

2012-07-20 Thread Dave Shield
On 12 July 2012 14:30, Naama Bar Menachem
 wrote:
> I am using a raw tables.
>
> How can I provide the user with the option to add and remove rows?

It depends on how the MIB table is defined.
The standard approach would be to have a column object of type 'RowStatus'.
The normal implementation code for this object would provide the
desired functionality.

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