interface between snmpd and the extended agent

2005-04-21 Thread Paul Chen (QD/LJC)
Hi all

As we know the snmpd can be extended by token pass-persist.

And the interface between snmpd and the extended agent for GET  is defined as:

For example, if the value for .1.3.6.1.4.100 was requested, the 
following 2 lines would be passed in to stdin:
get
.1.3.6.1.4.100 
To return the value, say, 42, the script would write to stdout:
.1.3.6.1.4.100
integer
42 

But what is the interface for SET operation.

Thanks!

BR,
Paul





---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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: array_user.conf row creation

2005-04-21 Thread Robert Story
On Thu, 21 Apr 2005 13:20:30 -0700 George, wrote:
GG> Does the current array_user code handles this ?(version 5.0.9) row
GG> creation during startup ? If so can anyone tell some example?


Yes. simply add them in the init function. Examples here:

http://www.freesnmp.com/net-snmp/faqs/array-user.html#create

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
  unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support:    
Archive: 

You are lost in a twisty maze of little standards, all different. 


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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: Processing unsupported objects

2005-04-21 Thread Robert Story
On Thu, 21 Apr 2005 21:48:37 +0530 Sridhar wrote:
SS> In our setup we don't have the support for the ifHC* objects of
SS> ifXTable. When ifXTable is queried from the manager values are not
SS> returned for ifHC* objects. As I observed after receiving the value for
SS> ifOutBroadcastPkts; there is some delay in receiving the value for
SS> ifLinkUpDownTrapEnable object at the manager end. [...]
SS> 
SS> I started looking at SNMP agent side. On tracing, I came to know that
SS> when manager queries for ifHC* object it passes through following
SS> functions.
SS> 
SS> 1. ifXTable_get_first_data_point ()
SS> 2. ifXTable_get_next_data_point ()
SS> 3. ifXTable_handler ()
SS> 4. get_ifHC* () function (Ex: get_ifHCInOctets ())
SS> 
SS> There by returning error to the manager.
SS> 
SS> I tried netsnmp_column_info structure to indicate the *valid* columns. I
SS> listed all the columns excluding ifHC* as valid columns. As I noted, in
SS> this case too, request is reaching till ifXTable_handler () function but
SS> it is not calling the get_ifHC* () function. 
SS> 
SS> Am I missing something here ??

Nope. What you've done with valid columns would work just fine, *if* the
iterator helper used that data. Unfortunately, it does not.

You get some benefit from the table helper, which does use it. A get-next
request for an invalid column will automatically be incremented to the next
valid column. but once it passes control to the iterator helper, the
valid_columns data isn't used.

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
  unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support:    
Archive: 

You are lost in a twisty maze of little standards, all different. 


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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: SNMP PROXY HELP!

2005-04-21 Thread Robert Story
On Thu, 21 Apr 2005 19:58:10 +0530 Rustagi, wrote:
RS> view all_view included .1 80
RS> com2sec -Cn vrf1 device1_sec default public
RS> group mrtg_grp v1 device1_sec
RS> access mrtg_grp vrf1 any noauth exact all_view none none
RS> proxy  -v 1 -c public 192.168.80.5:8005 .1.3.6.1.2.1.1.15
RS> 
RS> Now, I started the Master Agent. And running two different subagents which
RS> are implementing the same BGP mibs.

Proxy is different from sub-agent. Proxy is for talking to another snmp agent.

If you want to use contexts with sub-agents, the sub-agent need to register for
the specific context.

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
  unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support:    
Archive: 

You are lost in a twisty maze of little standards, all different. 


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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: Net-SNMP 5.1.2 Memory leaks on RH9

2005-04-21 Thread Robert Story
On Wed, 20 Apr 2005 14:46:22 -0500 Gary wrote:
GC> At the moment I cycle through all the rows in the container and call
GC> CONTAINER_REMOVE. Is there a function I can use
GC> to clear the contents of the container? I may be misusing this
GC> CONTAINER_REMOVE although the entry does appear to get removed just not
GC> freed from memory?

Yes, it only removes the row. The memory for the row and its contents are the
responsibility of the user.

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
  unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support:    
Archive: 

You are lost in a twisty maze of little standards, all different. 


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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


snmpget fails - undefined symbol: des_key_sched

2005-04-21 Thread Karthik.C.L
Hi,

When I try to query for any OID using DES privacy
protocol, my SNMP query fails with 
" libnetsnmp.so.5: undefined symbol: des_key_sched"

---
My details
NET-SNMP -> version 5.0.2
Open SSL -> 0.9.6

CONF Settings
createUser Writeuser1 MD5 Writepass1 DES Writepass2
rwuser Writeuser1
--

I did 
1.  nm /usr/lib/libcrypto.so | grep des_key_sched (I
can see the symbol defined)

2. nm /net-snmp-5.0.2/snmplib/.libs/libnetsnmp.so |
grep des_key_sched

Could not find the symbols here.


Any help on this is appreciated.

Thanks,
Karthik



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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: Question about locations for mib loading

2005-04-21 Thread Robert Story
On Thu, 21 Apr 2005 16:22:17 +0100 Dave wrote:
DS> > It was empty anyway
DS> 
DS> But the default list isn't found in MIBDIRS.
DS> It's hardcoded into the SNMP library.

There is a difference between empty and not set. If MIBDIRS is set to empty,
then that's saying "don't look anywhere for mibs."

If it is set and empty, then unset it to get the apps to use the internal
defaults.

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
  unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support:    
Archive: 

You are lost in a twisty maze of little standards, all different. 


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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: snmpset and reboot

2005-04-21 Thread Robert Story
On Wed, 20 Apr 2005 10:12:47 +0100 Dave wrote:
DS> On Wed, 2005-04-20 at 09:25, Vincent AARON wrote:
DS> > I wonder if it's possible to reboot those Linuxbox using
DS> > snmpset command.
DS> 
DS> There isn't an OID to reboot the system in any configuration
DS> that we supply, no.   You could try asking your O/S vendor
DS> if they've extended the agent to do this, but I've be very
DS> surprised if they had.
DS>And if it *is* possible, you'd better make damn sure
DS> you've secured your access control properly!
DS> 
DS> Short Answer:  No.

It'd be very easy to do using exec to call shutdown in snmpd.conf.

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
  unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support:    
Archive: 

You are lost in a twisty maze of little standards, all different. 


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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: Problem on 64 bit machine: Timeout: No response from localhost

2005-04-21 Thread Robert Story
Eek, made a cut-n-paste error in my last msg..

On Thu, 21 Apr 2005 13:32:23 -0400 Robert wrote:
RS> The real problem is that the old api uses snmp_set_var_value, not
RS> snmp_set_var_value (which is where Radek's patch is), and
^^
should be snmp_varlist_add_variable.


It looks like I'll be moving the extra checking in snmp_varlist_add_variable
into snmp_set_var_value, and calling snmp_set_var_value from
snmp_varlist_add_variable.


-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
  unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support:    
Archive: 

You are lost in a twisty maze of little standards, all different. 


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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: Net-SNMP 5.1.2 Memory leaks

2005-04-21 Thread Gary Clark
Ahh! I have just put the donkey outfit on and am now sitting in a corner
pretending I dont exist. Basically in my history with net-snmp project I
assumed better. Now much wiser, but still as stupid as a donkeys ass and
shining with pride I realized that I modified code in the table_array.c
which of course would not call the delete existing row. Now I have come to
my senses
and realize that I should chew on a carrot and lean towards sanity on this
issue. There is no leak.

Thank you.

- Original Message -
From: "Gary Clark" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, April 21, 2005 2:18 PM
Subject: Re: Net-SNMP 5.1.2 Memory leaks


> Robert thanks for the response. I'm using the RH9 "top" command and I
should
> see a drop in memory allocation when I call CONTAINER_REMOVE.
> I dont, I definetly see it when a container row is created but not when I
> call CONTAINER_REMOVE hence my concern.
> When I perform a get operation it does look like its getting removed from
> the container, but I dont see any memory size change which I should. The
> reason I know that the row is still present is that I can still use the
> pointer to the row object after CONTAINER_REMOVE. Hence the object still
> exists.
> Thats why I think its "marked" and not deallocated.
>
> When I add new rows to the container the snmpd grows in size despite it
> assuming previous deletion.
>
> I'm trying to get purify to run on this beast but its crashing. Yet to
> debug.
>
> Cheers,
> Garyc
>
> - Original Message -
> From: "Robert Story" <[EMAIL PROTECTED]>
> To: "Gary Clark" <[EMAIL PROTECTED]>
> Cc: 
> Sent: Thursday, April 21, 2005 10:45 AM
> Subject: Re: Net-SNMP 5.1.2 Memory leaks
>
>
> > On Tue, 19 Apr 2005 18:03:13 -0500 Gary wrote:
> > GC> Has anybody seen the memory leaks with Red Hat 9 Net-SNMP 5.1.2?
> > GC> I'm using the function CONTAINER_REMOVE to remove the context but
its
> looks
> > GC> like it does not free memory?
> >
> > Correct. It simply removes the item from the container. The container is
> dumb,
> > and doesn't know how the thing it is holding was allocated (or if it was
> > allocated at all).
> >
> > CC> Eek? Has anybodyelse seen this? The context does
> > GC> appear to be free from the list but no memory deallocation?
> >
> > Which conf file/helper are you using?
> >
> > --
> > NOTE: messages sent directly to me, instead of the lists, will be
deleted
> >   unless they are requests for paid consulting services.
> >
> > Robert Story; NET-SNMP Junkie
> > Support:  
> > Archive:
> 
> >
> > You are lost in a twisty maze of little standards, all different.
>



---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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


Resend a received Trap with a different peername

2005-04-21 Thread Susanne Goldammer
Hello,
i am developing an application which should receive traps.
Then i like to resend the received trap to another destination,
different to the peer from where i got the trap.
My problem:
I can receive a trap e.g. on port 162. snmp_read() calls my callback 
function.
When i now open a second session, clone the received trap-pdu, change 
the peername
of the session and e.g. the remote_port and send the trap again, the 
trap is sent, but not
with the right ip address and port.
Instead, the source and destination ip addresses  and source and 
destination ports are changed.

e.g.
i receive a trap from 192.168.1.2:
192.168.1.2 port  --> 192.168.1.3 port 162 (thats me)
then i call snmp_send() with the cloned pdu but with a peername 192.168.1.4
192.168.1.3 port  (thats me) --> 192.168.1.4 port 162
But what happens is the following:
192.168.1.2 port  --> 192.168.1.3 port 162 (thats me)OK
192.168.1.3 port  (thats me) --> 192.168.1.2 port   NOT OK

When i instead call snmp_create_pdu(TRAP) and then snmp_send()
the outgoing packet contains the correct peername (destination ip).
What is wrong ?
Thanks a lot for any hint.
Susanne Goldammer
Below i have listed my little program.
#include 
#include 
#include 

void
usage(void)
{
   fprintf(stderr, "USAGE: snmptest ");
   snmp_parse_args_usage(stderr);
   fprintf(stderr, "\n\n");
   snmp_parse_args_descriptions(stderr);
}
/* is called when i receive a trap on port 162 */
int my_asynch_response(int operation, struct snmp_session *sp, int reqid,
   struct snmp_pdu *pdu, void *magic)
{
   netsnmp_session session, *ss;   
   netsnmp_pdu *response;
   int status = 0;
  
   printf("\nGot the message!! Trying to sent it out again\n");
   fflush(stdout);
  
   snmp_sess_init(&session);
  
   //change the peername (destination ip)
   session.peername = "192.168.1.4";
   session.version = SNMP_VERSION_1;
   session.remote_port = 162;
  
   //open a new session
   ss = snmp_open(&session);
   if (ss == NULL)
   {   
   /*
* diagnose snmp_open errors with the input netsnmp_session 
pointer
*/
   snmp_sess_perror("snmp_open", &session);
   SOCK_CLEANUP;
   exit(1);
   }
  
   //clone the pdu and send it
   status = snmp_send(ss, snmp_clone_pdu(pdu));
   if (!status)
   {
   snmp_free_pdu(response);
   snmp_sess_perror("send_packet", ss);
   }
   printf("snmp_send status: %d\n", status);
  
  
   return 0;
}

/* main works fine */
int main(int argc, char *argv[])
{
   netsnmp_session session, *ss = &session, *rc = NULL;
   netsnmp_pdu*pdu = NULL, *response;
   netsnmp_transport *transport = NULL;
   int status;
   int command;
  
   /*
* get the common command line arguments
*/
   switch (snmp_parse_args(argc, argv, &session, NULL, NULL))
   {
   case -2:   exit(0);
   case -1:  usage();
   exit(1);
   default:break;
   }   
  
   SOCK_STARTUP;

   transport = netsnmp_tdomain_transport("udp:162", 1, "udp");
   if (transport == NULL) {
   snmp_log(LOG_ERR, "couldn't open %s -- errno %d (\"%s\")\n",
"udp:162", errno, strerror(errno));
   }
   
   snmp_sess_init(ss);
   ss->peername = SNMP_DEFAULT_PEERNAME; //SNMP_DEFAULT_PEERNAME;  /* 
Original code had NULL here */
   ss->local_port = 162;
   ss->version = SNMP_VERSION_1;//SNMP_DEFAULT_VERSION;
   ss->community_len = SNMP_DEFAULT_COMMUNITY_LEN;
   ss->retries = SNMP_DEFAULT_RETRIES;
   ss->timeout = SNMP_DEFAULT_TIMEOUT;
   ss->callback = my_asynch_response;
   ss->callback_magic = (void *) transport;

  
   ss = snmp_add(ss, transport, NULL,  NULL);
  
   if (ss == NULL)
   {
   snmp_sess_perror("snmptrapd", ss);
   }

   printf("\nPort: %d\n", ss->local_port);
   fflush(stdout);
  
  
  
   int fds = 0, block = 1;
   fd_set fdset;
  struct timeval timeout;
  
  
   FD_ZERO(&fdset);
   snmp_select_info(&fds, &fdset, &timeout, &block);
  
  
   fds = select(fds, &fdset, 0, 0, block ? NULL : &timeout);
   if (fds < 0)
   {
   perror("select failed");
   exit(1);
   }
  
   if (fds)
   {
   snmp_read(&fdset);
   }else
   {
   printf("\nTimeout\n");
   snmp_timeout();
   }

}




---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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


array_user.conf row creation

2005-04-21 Thread George, Geo








Hi,

I am using mib2c.array_user.conf  (Net Snmp version 5.0.9) for implementing
a private MIB. When my agent starts up, I need to read information from
external data source (driver IOCTL, API etc) and populate the information to
table rows.( It could be around 50 – 100 rows once it is initialized)

 

Does the current array_user code handles this ?(version 5.0.9) row
creation during startup ? If so can anyone tell some example?

 

Thanks in advance,

Geo

 

 








Re: Net-SNMP 5.1.2 Memory leaks

2005-04-21 Thread Gary Clark
Robert thanks for the response. I'm using the RH9 "top" command and I should
see a drop in memory allocation when I call CONTAINER_REMOVE.
I dont, I definetly see it when a container row is created but not when I
call CONTAINER_REMOVE hence my concern.
When I perform a get operation it does look like its getting removed from
the container, but I dont see any memory size change which I should. The
reason I know that the row is still present is that I can still use the
pointer to the row object after CONTAINER_REMOVE. Hence the object still
exists.
Thats why I think its "marked" and not deallocated.

When I add new rows to the container the snmpd grows in size despite it
assuming previous deletion.

I'm trying to get purify to run on this beast but its crashing. Yet to
debug.

Cheers,
Garyc

- Original Message -
From: "Robert Story" <[EMAIL PROTECTED]>
To: "Gary Clark" <[EMAIL PROTECTED]>
Cc: 
Sent: Thursday, April 21, 2005 10:45 AM
Subject: Re: Net-SNMP 5.1.2 Memory leaks


> On Tue, 19 Apr 2005 18:03:13 -0500 Gary wrote:
> GC> Has anybody seen the memory leaks with Red Hat 9 Net-SNMP 5.1.2?
> GC> I'm using the function CONTAINER_REMOVE to remove the context but its
looks
> GC> like it does not free memory?
>
> Correct. It simply removes the item from the container. The container is
dumb,
> and doesn't know how the thing it is holding was allocated (or if it was
> allocated at all).
>
> CC> Eek? Has anybodyelse seen this? The context does
> GC> appear to be free from the list but no memory deallocation?
>
> Which conf file/helper are you using?
>
> --
> NOTE: messages sent directly to me, instead of the lists, will be deleted
>   unless they are requests for paid consulting services.
>
> Robert Story; NET-SNMP Junkie
> Support:  
> Archive:

>
> You are lost in a twisty maze of little standards, all different.



---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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: Are there any examples of SNMP::TrapSession - I'll be darnedIf I can get it to work!

2005-04-21 Thread Gary Clark
Has anybody ran purify on this ?

Cheers,
Garyc
- Original Message -
From: "Wes Hardaker" <[EMAIL PROTECTED]>
To: "Andy Ford" <[EMAIL PROTECTED]>
Cc: "Wes Hardaker" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; "Net-Snmp (E-mail)"

Sent: Wednesday, April 20, 2005 1:43 PM
Subject: Re: Are there any examples of SNMP::TrapSession - I'll be darnedIf
I can get it to work!


> > On Wed, 20 Apr 2005 10:03:10 +0100, "Andy Ford"
<[EMAIL PROTECTED]> said:
>
> Andy> I have taken a look at the embedded Perl approach and written a
script
> Andy> to do exactly what I want. Unfortunately, there is a huge memory
leak in
> Andy> the Perl side. I have already spoken to Robert Story ref this
problem
> Andy> and we have agreed it is the embedded Perl implementation rather
than
> Andy> snmptrapd itself.
>
> I actually have been planning on working on that issue, so maybe we
> can solve the problem in the first place.
>
> Andy> I don't believe it's a memory leak per-say rather the embedded
> Andy> perl is holding on to every processed trap.
>
> The c-code binding between perl and snmptrapd is probably not properly
> counting and releasing references.
>
> --
> Wes Hardaker
> Sparta, Inc.
>
>
> ---
> This SF.Net email is sponsored by: New Crystal Reports XI.
> Version 11 adds new functionality designed to reduce time involved in
> creating, integrating, and deploying reporting solutions. Free runtime
info,
> new features, or free trial, at: http://www.businessobjects.com/devxi/728
> ___
> 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



---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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: Problem on 64 bit machine: Timeout: No response from localhost

2005-04-21 Thread Robert Story
On Thu, 21 Apr 2005 12:59:42 +0200 Radek wrote:
RV> On Wed, 2005-04-20 at 10:26 +0800, LIAO, GUANGDENG wrote:
RV> > Hi all,
RV> > When I run the command line : snmptable -v1 -c test localhost
RV> > ip.ipAddrTableon 64bit machine, the result is :Timeout: No response from
RV> > localhost. The snmpd is running and configuration file is ok.
RV> > 
RV> > When I try to dig out it, I find the problem is caused in asn_build_int
RV> > which build the 32 bit integer into 64 bit long on 64 bit machine.
RV> > The error information in /var/log/snmp.log is : send response: Error
RV> > building ASN.1 representation (build int size 4: s/b 8).
RV>
RV> Latest version of Fedora net-snmp has the following patch which fixes
RV> this issue ... 

I don't see how this patch would address this issue. Both before and after this
patch, the size of the var will be sizeof(long). As near as I can tell, what
this patch actually does is make sure that, if a value has the size of an int
and that value is supposed to be unsigned, the value is interpreted as
unsigned.

The real problem is that the old api uses snmp_set_var_value, not
snmp_set_var_value (which is where Radek's patch is), and snmp_set_var_value
doesn't do any validation on sizes. I'm looking into that and should have a
patch today or tomorrow...

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
  unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support:    
Archive: 

You are lost in a twisty maze of little standards, all different. 


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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: Problem on 64 bit machine: Timeout: No response from localhost

2005-04-21 Thread Robert Story
On Wed, 20 Apr 2005 10:28:00 +0800 LIAO, wrote:
LG> Sorry to forget the environment:(
LG> 
LG> NET-SNMP version 5.1.2.

What OS?

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
  unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support:    
Archive: 

You are lost in a twisty maze of little standards, all different. 


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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


Processing unsupported objects

2005-04-21 Thread Sridhar S
Hi,

I need your suggestion on processing the unsupported objects in the SNMP
agent. 

In our setup we don't have the support for the ifHC* objects of
ifXTable. When ifXTable is queried from the manager values are not
returned for ifHC* objects. As I observed after receiving the value for
ifOutBroadcastPkts; there is some delay in receiving the value for
ifLinkUpDownTrapEnable object at the manager end. This is fine for now,
but my guess is if number of interfaces grows manager requests may get
timed out before getting ifLinkUpDownTrapEnable object.

I started looking at SNMP agent side. On tracing, I came to know that
when manager queries for ifHC* object it passes through following
functions.

1. ifXTable_get_first_data_point ()
2. ifXTable_get_next_data_point ()
3. ifXTable_handler ()
4. get_ifHC* () function (Ex: get_ifHCInOctets ())

There by returning error to the manager.

I tried netsnmp_column_info structure to indicate the *valid* columns. I
listed all the columns excluding ifHC* as valid columns. As I noted, in
this case too, request is reaching till ifXTable_handler () function but
it is not calling the get_ifHC* () function. 

This how I am initializing the netsnmp_column_info structures and using
it at initialize_table_ifTable () function.

   static netsnmp_column_info valid_columns1, valid_columns2;

   :
   :

   valid_columns1.isRange = (char) 1;
   valid_columns1.list_count = 0
   valid_columns1.details.range[0] = COLUMN_IFNAME;
   valid_columns1.details.range[1] = COLUMN_IFOUTBROADCASTPKTS;
   valid_columns1.next = &valid_columns2;
   
   valid_columns2.isRange = (char) 1;
   valid_columns2.list_count = 0
   valid_columns2.details.range[0] = COLUMN_IFLINKUPDOWNTRAPENABLE;
   valid_columns2.details.range[1] = COLUMN_IFCOUNTERDISCONTINUITYTIME;
   valid_columns2.next = NULL;

   table_info->valid_columns = &valid_columns1;
   :
   :

Am I missing something here ??

I think agent's performance increases if the requests to the invalid
columns blocked before calling the ifXTable_get_first_data_point ()
function.

Please share your comments on this.

Thanks
SrIdhar


---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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: Net-SNMP 5.1.2 Memory leaks

2005-04-21 Thread Robert Story
On Tue, 19 Apr 2005 18:03:13 -0500 Gary wrote:
GC> Has anybody seen the memory leaks with Red Hat 9 Net-SNMP 5.1.2?
GC> I'm using the function CONTAINER_REMOVE to remove the context but its looks
GC> like it does not free memory?

Correct. It simply removes the item from the container. The container is dumb,
and doesn't know how the thing it is holding was allocated (or if it was
allocated at all).

CC> Eek? Has anybodyelse seen this? The context does
GC> appear to be free from the list but no memory deallocation?

Which conf file/helper are you using?

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
  unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support:    
Archive: 

You are lost in a twisty maze of little standards, all different. 


---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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: Question about locations for mib loading

2005-04-21 Thread Dave Shield
On Thu, 2005-04-21 at 16:05, Fabio Margarido wrote:
> I set it with MIBDIRS=dir, but what is the difference?

There's a hardwired default list of MIB directories
(let's say it's "/usr/local/share/snmp/mibs:$HOME/.snmp/mibs")

If you set
MIBDIRS=/tmp/mibs

then you're saying
   "forget about the default list, and *only* look here"

MIB files in /tmp/mibs will be available.
Those in /usr/local/share/snmp/mibs or ~/.snmp/mibs won't.


If you set
MIBDIRS=+/tmp/mibs

then you're saying
"look here *and* in the default locations"

MIB files in /tmp/mibs, /usr/local/share/snmp/mibs
and ~/.snmp/mibs will all be available.


> It was empty anyway

But the default list isn't found in MIBDIRS.
It's hardcoded into the SNMP library.

MIBDIRS can be used to add to (or replace) this hardcoded list.

Try it.

Dave



---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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: Question about locations for mib loading

2005-04-21 Thread Fabio Margarido
I set it with MIBDIRS=dir, but what is the difference? It was empty
anyway, so if I added to the var it would and up with the same
content... It only worked when I also added /usr/local/share/snmp/mibs
to it. For that matter, I added it with
MIBDIRS=/usr/local/share/snmp/mibs:$MIBDIRS
after I had already put the home mib dir.
Thanks

On 4/21/05, Dave Shield <[EMAIL PROTECTED]> wrote:
> On Wed, 2005-04-20 at 20:32, Fabio Margarido wrote:
> 
> > I've set MIBDIRS and it worked... only problem is that I still have to
> > put the default mib dir in the path cause if I don't net-snmp doesn't
> > find the default mibs.
> 
> How did you set MIBDIRS?
> 
> MIBDIRS=some:list:of:directories
> or
> MIBDIRS=+some:extra:directories
> ?
> 
> The second syntax will *add* to the default list, so you don't
> actually need to specify them yourself.
> 
> Dave
> 
>


---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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: SNMP PROXY HELP!

2005-04-21 Thread Rustagi, Sandeep (Sandeep)
Hi Wes,

Thanks for the response.

I tried what is mentioned but not able to do so.

I have added these lines in the snmpd.conf

view all_view included .1 80
com2sec -Cn vrf1 device1_sec default public
group mrtg_grp v1 device1_sec
access mrtg_grp vrf1 any noauth exact all_view none none
proxy  -v 1 -c public 192.168.80.5:8005 .1.3.6.1.2.1.1.15

view all_view included .1 80
com2sec -Cn vrf2 device2_sec default device2_cmty
group mrtg_grp v1 device2_sec
access mrtg_grp vrf2 any noauth exact all_view none none
proxy -Cn vrf2 -v 1 -c device2_cmty 100.100.100.2 .1.3.6.1.2.1.15

Now, I started the Master Agent. And running two different subagents which
are implementing the same BGP mibs.

But unable to get any response. I am getting timeout error.

Please let me know what I am missing.

Thanks and Rgds,
Sandeep

-Original Message-
From: Wes Hardaker [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 21, 2005 7:48 PM
To: Rustagi, Sandeep (Sandeep)
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: SNMP PROXY HELP!


> On Thu, 21 Apr 2005 14:41:35 +0530, "Rustagi, Sandeep (Sandeep)"
<[EMAIL PROTECTED]> said:

Sandeep> I wish to run 1000 processes which implements the same
Sandeep> mibs. I wish to send the request to each process based on
Sandeep> community string from Master Agent. Or how should I proxy
Sandeep> this request to subagents with the help of community string.

net-snmp 5.2.1 supports proxying by community name.  See the
documentation on the "proxy" token.

-- 
Wes Hardaker
Sparta, Inc.


---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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: Question about net-SNMP test

2005-04-21 Thread Wes Hardaker
> On Wed, 20 Apr 2005 18:58:07 -0700 (PDT), Tian WenQiang <[EMAIL 
> PROTECTED]> said:

Tian> 1. Is there any commercial support for Xerces-C++
Tian> exist? How much dose it cost?

We wouldn't know that.  We're not in charge of Xerces-C++.

Tian> 2. What the test method of net-SNMP, how many test
Tian> items dose it have? Dose all the modules have been
Tian> tested?

We have a fairly small test suite that tests the critical
functionality of the SNMP protocol for the agent and the manager.  We
ensure these tests pass before publishing releases.

-- 
Wes Hardaker
Sparta, Inc.


---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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: SNMP PROXY HELP!

2005-04-21 Thread Wes Hardaker
> On Thu, 21 Apr 2005 14:41:35 +0530, "Rustagi, Sandeep (Sandeep)" <[EMAIL 
> PROTECTED]> said:

Sandeep> I wish to run 1000 processes which implements the same
Sandeep> mibs. I wish to send the request to each process based on
Sandeep> community string from Master Agent. Or how should I proxy
Sandeep> this request to subagents with the help of community string.

net-snmp 5.2.1 supports proxying by community name.  See the
documentation on the "proxy" token.

-- 
Wes Hardaker
Sparta, Inc.


---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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: Hard Bit

2005-04-21 Thread Wes Hardaker
> On Thu, 21 Apr 2005 17:13:06 +0530, Sharma Saurabh <[EMAIL PROTECTED]> 
> said:

Sharma> What is "Hard Bit" and how can we have a support for this in
Sharma> SNMP Managers?

I have no idea what you're referring to and thus is it specific to
your hardware or something?

-- 
Wes Hardaker
Sparta, Inc.


---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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: NET:SNMP

2005-04-21 Thread Mike Pearson
Sorry Dave, I'm trying to learn all I can about SNMP and joined this 
list for that purpose, I must have the wrong list. 
Mike

Dave Shield wrote:
On Thu, 2005-04-21 at 00:15, Mike Pearson wrote:
 

And do I copy the Net-SNMP-5.0.1 directory? to the /usr/lib/perl5/ ??
   

No - you'd use the standard perl module installation mechanism
of
perl Makefile.PL
make test
make install
exactly as it says in the README.
Alternatively, run
perl -MCPAN -e "install Net::SNMP"
Again, this is documented in the README.
Please note that (despite the name) this particular perl
module is not related to the Net-SNMP project.  These
mailing lists are not an appropriate place to discuss
this module - please see the Net::SNMP documentation
or contact the author for further assistance.
Dave

---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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
 


---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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: Embedded MFD agent - shared memory problem

2005-04-21 Thread Christian Jönsson
On second thought, never mind! :)
I guess I hadn't had my caffeine yet...
Christian Jönsson wrote:
I'm developing an agent process embedded into my application using MFD 
style (container-cached) and net-snmp 5.2.1.

The data I use to service the requests are contained in a shared-memory 
segment (shmem) passed by the parent process, a pointer to which is kept 
in the user-context. Everything looks OK, but as soon as I call the 
init_master_agent() procedure, it seems my shared memory is altered in a 
very strange way. I can't see why this would happen?

Best regards,
Christian Joensson
---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime 
info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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

---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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


Embedded MFD agent - shared memory problem

2005-04-21 Thread Christian Jönsson
I'm developing an agent process embedded into my application using MFD 
style (container-cached) and net-snmp 5.2.1.

The data I use to service the requests are contained in a shared-memory 
segment (shmem) passed by the parent process, a pointer to which is kept 
in the user-context. Everything looks OK, but as soon as I call the 
init_master_agent() procedure, it seems my shared memory is altered in a 
very strange way. I can't see why this would happen?

Best regards,
Christian Joensson
---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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


Hard Bit

2005-04-21 Thread Sharma Saurabh
Title: Hard Bit





What is "Hard Bit" and how can we have a support for this in SNMP Managers?


Regards,


Saurabh Sharma





Re: dinamic creation of rows in a table (4)

2005-04-21 Thread Dave Shield
On Thu, 2005-04-21 at 11:31, Gemma Sánchez wrote:
> Dave's response has disorientated me in some way.


Yes, I'm good at doing that!
Now if you'll just sit on this swivel chair and close
your eyes, we'll proceed to the next stage.   :-)


> Until now, when I had 
> to define a subhandler to give a special behaviour to the
> column of a table, I used to define global variables that
> contain the values assigned to the MIB columns

That's fair enough.
The agent isn't a magic box (however much it may feel
like one at times), and *something* has to keep track
of the various values.  Whether this is a series of
parallel arrays (as in your code), or a list of per-row
data structures, or whatever - there has to be something
that holds the values for each row, and each column.


But remember that we've been talking about the 'dataset'
helper.   The distinguishing feature of this particular
is that it's the *agent* (or strictly, the dataset helper)
that looks after holding all the table data.  The MIB
coder doesn't need to deal with this at all.

With some of the other helpers (e.g table_data/table_container),
the user will define a suitable data structure to hold one
row of the table, and the helper looks after holding the
table as a collection of such rows.  But the user still has
to deal with the whole of a row.

The dataset helper takes this a stage further, and looks
after each row as a collection of columns.



It's like having an assistant that sorts through your mail
first thing in the morning, throwing away all the junk and
sifting out the ones that are actually relevant.
  The table_data (and table_container) helpers will give you
each such letter to answer.  The table_dataset helper will
draft the response as well - all you have to do is sign it.


Neither approach is more *right* than the other - it all
depends on how much you can delegate to your assistant (/helper).

Dave



---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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: Problem on 64 bit machine: Timeout: No response from localhost

2005-04-21 Thread Radek Vokál
Latest version of Fedora net-snmp has the following patch which fixes
this issue ... 

Radek

On Wed, 2005-04-20 at 10:26 +0800, LIAO, GUANGDENG wrote:
> Hi all,
> When I run the command line : snmptable -v1 -c test localhost
> ip.ipAddrTableon 64bit machine, the result is :Timeout: No response from
> localhost. The snmpd is running and configuration file is ok.
> 
> When I try to dig out it, I find the problem is caused in asn_build_int
> which build the 32 bit integer into 64 bit long on 64 bit machine.
> The error information in /var/log/snmp.log is : send response: Error
> building ASN.1 representation (build int size 4: s/b 8).
> 
> In addition, when I used grep to check the places calling asn_build_int,
> I can not find any wrong point. So who is the root evil calling this
> function?
> 
> Could u give me help? Any suggestion?
> 
> 
> Thanks
> Danny
> 
> 
> ---
> This SF.Net email is sponsored by: New Crystal Reports XI.
> Version 11 adds new functionality designed to reduce time involved in
> creating, integrating, and deploying reporting solutions. Free runtime info,
> new features, or free trial, at: http://www.businessobjects.com/devxi/728
> ___
> 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
-- 
Radek VokÃl <[EMAIL PROTECTED]>
--- net-snmp-5.1.2/snmplib/snmp_api.c.ASN-unsigned64	2004-06-21 12:02:15.0 +0200
+++ net-snmp-5.1.2/snmplib/snmp_api.c	2005-02-15 18:13:50.694158600 +0100
@@ -6267,6 +6267,23 @@
 vars->val_len = len;
 switch (type) {
 case ASN_INTEGER:
+if (value) {
+if (largeval) {
+snmp_log(LOG_ERR,"bad size for integer-like type (%d)\n",
+ vars->val_len);
+snmp_free_var(vars);
+return (0);
+} else if (vars->val_len == sizeof(int)) {
+val_int = (const int *) value;
+*(vars->val.integer) = (long) *val_int;
+} else {
+val_long = (const long *) value;
+*(vars->val.integer) = *val_long;
+}
+}
+vars->val_len = sizeof(long);
+break;
+
 case ASN_UNSIGNED:
 case ASN_TIMETICKS:
 case ASN_IPADDRESS:
@@ -6279,7 +6296,7 @@
 return (0);
 } else if (vars->val_len == sizeof(int)) {
 val_int = (const int *) value;
-*(vars->val.integer) = (long) *val_int;
+*(vars->val.integer) = (long) *(const unsigned int *)val_int;
 } else {
 val_long = (const long *) value;
 *(vars->val.integer) = *val_long;


signature.asc
Description: This is a digitally signed message part


dinamic creation of rows in a table (4)

2005-04-21 Thread Gemma Sánchez
Hi 
Dave's response has disorientated me in some way. If I have understood it 
correctly, perphaps I have been making my agent badly. Until now, when I had 
to define a subhandler to give a special behaviour to the column of a table, 
I used to define global variables that contain the values assigned to the 
MIB columns (as you can see in the next code). I used it to define timetags 
(a timeticks variable that registers when a MIB variable is changed, been 
updated with the real date and time). Mustn`t I do it? How could I keep the 
value of the timetags or implement the behaviour of *reenAct* (that when it 
is GOTTEN it return to 0 and when it is SET the set value is added to the 
previous value)?.

Thank again.
Gemma.
For Dave, Robert and Wes: I am very grateful to you, you are helping me very 
much with my doctoral thesis. You can be sure that you are going to fill a 
very special place in the gratitude list of my thesis. If you are 
interested, I could send you a copy of the memory once I had finished. If 
you sometime come to Sevilla (Spain), please contact me.

// Global variables.
static int reenAct [NUMLIN][NUMINT][NUMREEN];
static int reenActTT [NUMLIN][NUMINT][NUMREEN];
static int reenAlTT [NUMLIN][NUMINT][NUMREEN];
int
reenTable_handler(
   netsnmp_mib_handler   *handler,
   netsnmp_handler_registration  *reginfo,
   netsnmp_agent_request_info*reqinfo,
   netsnmp_request_info  *requests)
{
 netsnmp_table_request_info *table_info;
 int   reqlin,
   reqint,
   reqreen;
 while (requests)
 {
   netsnmp_variable_list *var = requests->requestvb;
   table_info = netsnmp_extract_table_info(requests);
   if (table_info == NULL)
   {
 requests = requests->next;
 continue;
   }
   reqlin  = *(table_info->indexes->val.integer);
   reqint  = *(table_info->indexes->next_variable->val.integer);
   reqreen = 
*(table_info->indexes->next_variable->next_variable->val.integer);

   switch (reqinfo->mode)
   {
 case MODE_GET: // Se trata 
de una lectura.

   if (table_info->colnum == COL_REENACT) // Si 
lee el numero de actuaciones
   {
snmp_set_var_typed_value( 
requests->requestvb,
ASN_INTEGER,
(u_char *) 
&reenAct[reqlin-1][reqint-1][reqreen-1],
sizeof(reenAct[reqlin-1][reqint-1][reqreen-1]));
if (reenAct[reqlin-1][reqint-1][reqreen-1] != 
0)
{
  reenAct[reqlin-1][reqint-1][reqreen-1] = 
0;
  reenActTT[reqlin-1][reqint-1][reqreen-1] 
= time(NULL);
}
   }

   if (table_info->colnum == COL_REENACTTT) // Lee la 
marca temporal de reenAct
   {
   snmp_set_var_typed_value( 
requests->requestvb,
ASN_TIMETICKS,
(u_char *) 
&reenActTT[reqlin-1][reqint-1][reqreen-1],
sizeof(reenActTT[reqlin-1][reqint-1][reqreen-1]));
   }

 break;
 case MODE_SET_ACTION:
   if (table_info->colnum == COL_REENACT) // Si 
escribe el numero de actuaciones
   {
reenAct[reqlin-1][reqint-1][reqreen-1] += 
*(requests->requestvb->val.integer);
reenActTT[reqlin-1][reqint-1][reqreen-1] = 
time(NULL);
   }

 break;
 case MODE_SET_COMMIT:// En este *case* se generan 
los TRAPs.
   if (table_info->colnum == COL_REENAL)  // Si 
escribe en la alarma
   {
reenAlTT [reqlin-1][reqint-1][reqreen-1] = time 
(NULL);

if (*(requests->requestvb->val.integer) == 
AL_ACTIVA)  // La activa
{
  send_trap ( CENTRODECONTROL,
  ALREEN, // 
Tipo de TRAP
  var->name,// OID de 
la var que lo genera.
  var->name_length,
  *(var->val.integer),// 
Valor (INTEGER)
  reenAlTT[reqlin-1][reqint-1][reqreen-1]); 
// MT
}
   }
 break;

   }
   

Re: AGENT EXT SIT ON NAILS - 9

2005-04-21 Thread Dave Shield
On Thu, 2005-04-21 at 11:00, Parthiban Naliiamudali wrote:
> when i send a "snmptrap" it gives "Missing value/type" ...
> here is the copy paste of the terminal..
> 
> $ snmptrap -v 2c -c public 172.29.5.102:1950 ""
>1.3.6.1.2.1.1.6.0 s "just here"
> s: Missing type/value for variable

What you're actually missing is the trap itself!

Remember that an SNMPv2c trap uses an OID to specify
which notification is being transmitted, followed by
(zero or more) varbinds - OID/type/value triplets.

You've got the varbind (sysLocation.0="just here")
but you haven't specified the trap OID which should
come before it.

That's confusing the snmptrap command



> when i set the access control.. i am ABLE TO WORK SNMPSET for my
> WMAN-IF-MIB variables

Good.
That's working then.

> again it gives NEW ERROR FOR "sysLocation.0" ie "FAILED OBJECT"

Don't worry about it - the only reason for trying sysLocation was
as part of checking the access control settings.
What you originally wanted to do was set the WMAN-IF-MIB variables,
which are now working.


> sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)

If you want to get this working as well, please read the FAQ.
In particular the entry "I still can't change sysLocation"

Then have a look at the file mentioned here.

In fact, you should probably read through the FAQ anyway.
A lot of what you have been asking is covered there already.

Dave



---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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


AGENT EXT SIT ON NAILS - 9

2005-04-21 Thread Parthiban Naliiamudali

Dear sir,

i am very much thankful to Mr.DAVE sir.. for your guidelines... sir.. here my project goeslike this...
sir, i tried as per your instruction...

1) IN THE TRAPS PROBLEM...

after setting the instruction, now i am NOT getting "send_Timeout" 
the "snmptrapd" gets and informs the agent start ...but
when i send a "snmptrap" it gives "Missing value/type" ...
here is the copy paste of the terminal..

[EMAIL PROTECTED] net-snmp-5.2]$ snmptrap -v 2c -c public 172.29.5.102:1
950 "" 1.3.6.1.2.1.1.6.0 s "just here"
s: Missing type/value for variable

[EMAIL PROTECTED] net-snmp-5.2]$ snmptrap -v 2c -c public 172.29.5.102:1
950 "" 1.3.6.1.2.1.10.184.1.1.5.3.1.1.1 i 777

i: Missing type/value for variable

[EMAIL PROTECTED] apps]$ ./snmptrapd -Le -f 172.29.5.102:1950
Warning: no access control information configured.
  It's unlikely this agent can serve any useful purpose in this state.
  Run "snmpconf -g basic_setup" to help you configure the snmptrapd.conf file fo
r this agent.
2005-04-21 14:45:40 NET-SNMP version 5.2 Started.

==
sir, i am not sure what to do next...???


2) IN THE SNMPSET PROBLEM... NEW DIMENSION...?

sir, as per your instruction when i set the access control.. i am ABLE TO WORK SNMPSET for my WMAN-IF-MIB variables and again it gives NEW ERROR FOR "sysLocation.0" ie "FAILED OBJECT"

here is the copy paste of the terminal..
==
[EMAIL PROTECTED] net-snmp-5.2]$ snmpget -c public -v 2c 172.29.5.102:18
80 1.3.6.1.2.1.1.6.0
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)

[EMAIL PROTECTED] net-snmp-5.2]$ snmpget -c necops -v 2c 172.29.5.102:18
80 1.3.6.1.2.1.1.6.0
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)

[EMAIL PROTECTED] net-snmp-5.2]$ snmpset -c necops -v 2c 172.29.5.102:18
80 1.3.6.1.2.1.1.6.0 s "third floor"
Error in packet.
Reason: notWritable (That object does not support modification)
Failed object: SNMPv2-MIB::sysLocation.0

[EMAIL PROTECTED] net-snmp-5.2]$
==
sir, what is this error? and what am i to do next for SNMPSET???

sir, and in my WMAN-IF-MIB, i am able to make SNMPSET to the variables, but the agent is not storing the new value...
when i restart the agent.. only the old value is retrived

WHAT TO DO FOR MAKING THE AGENT STORE THE SNMPSET VALUE?

here is the copy paste of the terminal.
==
[EMAIL PROTECTED] net-snmp-5.2]$ snmpget -c public -v 2c 172.29.5.102:18
80 1.3.6.1.2.1.10.184.1.1.5.3.1.1.1
SNMPv2-SMI::transmission.184.1.1.5.3.1.1.1 = INTEGER: 3

[EMAIL PROTECTED] net-snmp-5.2]$ snmpget -c necops -v 2c 172.29.5.102:18
80 1.3.6.1.2.1.10.184.1.1.5.3.1.1.1
SNMPv2-SMI::transmission.184.1.1.5.3.1.1.1 = INTEGER: 3

[EMAIL PROTECTED] net-snmp-5.2]$ snmpset -c necops -v 2c 172.29.5.102:18
80 1.3.6.1.2.1.10.184.1.1.5.3.1.1.1 i 993
SNMPv2-SMI::transmission.184.1.1.5.3.1.1.1 = INTEGER: 993

[EMAIL PROTECTED] net-snmp-5.2]$ snmpget -c necops -v 2c 172.29.5.102:18
80 1.3.6.1.2.1.10.184.1.1.5.3.1.1.1
SNMPv2-SMI::transmission.184.1.1.5.3.1.1.1 = INTEGER: 993

[EMAIL PROTECTED] net-snmp-5.2]$

---

[EMAIL PROTECTED] net-snmp-5.2]$ snmpget -c necops -v 2c 172.29.5.102:13
30 1.3.6.1.2.1.10.184.1.1.5.3.1.1.1
SNMPv2-SMI::transmission.184.1.1.5.3.1.1.1 = INTEGER: 3
[EMAIL PROTECTED] net-snmp-5.2]$

==

sir, please do kindly give me instruction to proceed with

sir, it is really interesting and energizising to work with the NET-SNMP package in all yours guidelines

and i am also interested to work continusouly with your instructions... but i am bit unlucky for short period...
here in MY COLLEGE NETWORK MAINTENANCE is on and i will not be able to access my login to work... for a day...
sir, i will try your reply and respond back to you for other doubts on MONDAY.i feel very sorry for this delay..

Expecting your reply,

with sincere thanks & love,
n.parthiban.







Re: Question about locations for mib loading

2005-04-21 Thread Dave Shield
On Wed, 2005-04-20 at 20:32, Fabio Margarido wrote:

> I've set MIBDIRS and it worked... only problem is that I still have to
> put the default mib dir in the path cause if I don't net-snmp doesn't
> find the default mibs.

How did you set MIBDIRS?

MIBDIRS=some:list:of:directories
or
MIBDIRS=+some:extra:directories
?

The second syntax will *add* to the default list, so you don't
actually need to specify them yourself.

Dave



---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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: NET:SNMP

2005-04-21 Thread Dave Shield
On Thu, 2005-04-21 at 00:15, Mike Pearson wrote:
> And do I copy the Net-SNMP-5.0.1 directory? to the /usr/lib/perl5/ ??

No - you'd use the standard perl module installation mechanism
of

perl Makefile.PL
make test
make install

exactly as it says in the README.
Alternatively, run

perl -MCPAN -e "install Net::SNMP"

Again, this is documented in the README.


Please note that (despite the name) this particular perl
module is not related to the Net-SNMP project.  These
mailing lists are not an appropriate place to discuss
this module - please see the Net::SNMP documentation
or contact the author for further assistance.

Dave



---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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


SNMP PROXY HELP!

2005-04-21 Thread Rustagi, Sandeep (Sandeep)
Hi,

I have a query how to do SNMP query for the same mibs implemented in
mulitple devices in a system.
My query is as follows:
I wish to run 1000 processes which implements the same mibs. I wish to send
the request to each process based on community string from Master Agent. Or
how should I proxy this request to subagents with the help of community
string.

thanks for the help in advance.

Thanks and Rgds,
Sandeep


---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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: dinamic creation of rows in a table (3)

2005-04-21 Thread Dave Shield
On Thu, 2005-04-21 at 08:42, Gemma Sánchez wrote:
> I have followed the procedure that Dave prescribed me and now I have the
> template generated by *mib2c -c mib2c.create-dataset.conf -f newsub00
> subestacion*, I know this template manages automatically row creation and
> deletion, but now I need to define a subhandler for aeEvTable,

OK - so create one.  This helper still uses the normal handler
registration process, including support for a user-provided handler.
It's just that this is optional - you don't have to specify a
handler unless you actually need one.

Instead of:

netsnmp_create_handler_registration(
  "aeEvTable", NULL,
  aeEvTable_oid, OID_LENGTH(aeEvTable_oid),
  HANDLER_CAN_RWRITE);

use

netsnmp_create_handler_registration(
  "aeEvTable", aeEvTable_handler,<
  aeEvTable_oid, OID_LENGTH(aeEvTable_oid),
  HANDLER_CAN_RWRITE);



>  since I have to update the date contained in
> aeEvEstTT when aeEvest is modified and to generate an inform when
> aeEvEst is assigned the value ACTIVO.

You can then use 'aeEvTable_handler' to tweak the behaviour
of individual objects.   It's ideal for these sort of needs.


>  This difficulty is that these tables are dinamic so I think the
> data structure associated to these rows should be dinamic too.

Yes.
But the dataset handler takes care of all that for you.
It holds an internal data structure, updates this in response
to SET requests, and uses it to respond to GET and GETNEXT
requests.   You don't need to worry your pretty little head
about any of that.
   You can sit back, looking vaguely superior, and just correct
this simple-minded handler when it gets things wrong.



What I'm not _quite_ sure of is how best to tweak the value of
another column in the same row.  Checking the source, it
looks like a toss up between "netsnmp_extract_table_data_set()"
and "netsnmp_set_row_column()".

  Wes - this was your baby originally.  What's the best way
to handle this task?


Dave



---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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


R: How decode the trap fields on a windows machine

2005-04-21 Thread AESYS S.p.A. [Enzo Arlati]
Your hint was helpfull.
Using "snmptrap -Ddump" I was able to recognize the trap received.
But you are right on one point, to decode the packet is a real mess

thanks

-Messaggio originale-
Da: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] conto di Dave
Shield
Inviato: martedì 19 aprile 2005 10.31
A: [EMAIL PROTECTED]
Cc: net-snmp-users@lists.sourceforge.net
Oggetto: Re: How decode the trap fields on a windows machine


On Mon, 2005-04-18 at 14:14, AESYS S.p.A. [Enzo Arlati] wrote:
> I receive a trap but I can able to decode the fields meaning.
> I try to find if there is a match with the layout specified inside the
snmp
> protocol but I didn't sucess.

Note that SNMP doesn't used "fixed size" data structures, so you
can't just look at a packet dump and say "that field starts here".
It used variable length encodings, so it's basically necessary
to decode the packet from the beginning.

If you run "snmptrap -Ddump", this will dump the contents of the
packet structure, as it's sent.


> The socket ( I use the IDE bolrand with Piette TWSocket component ) read
the
> the trogger and show the data read like the one show below

Note that *all* of these values should be considered as hex
(with the possible exception of the community string).
A quick-n-dirty translation is:

> 0E
> <02><01><01>  SNNMPv2c  (INTEGER 1)
> <04><06>publicCommunity "public"   (STRING length 6)
> 8 Trap2 (length 56 (=Ascii '8'))
> <02><04>f<9E> RequestID (0x66db9ed8)
> <02><01>  Error Status  (INTEGER ??)

The rest of the packet has been truncated.

> Maybe there is some library which I should use

The Net-SNMP library will encode and decode such packets for you.
Any other SNMP toolkit would do this as well.   I *strongly* suggest
that you don't try to handle this yourself.   It's not particularly
difficult, but there are a number of unexpected characteristics,
waiting to catch the unwary.

Don't re-invent the wheel - use an existing SNMP toolkit.

Dave



---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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



---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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: AGENT EXT SIT ON NAILS - 8

2005-04-21 Thread Dave Shield
On Thu, 2005-04-21 at 06:27, Parthiban Naliiamudali wrote:
> my settings:> In the /usr/local/share/snmp/snmpd.conf file
> 
> # SECTION: Trap Destinations
> 
>  trapsink  localhost necops 1950
>  trapsink  localhost necops 1900
> 
>  trap2sink  localhost necops 1950
>  trap2sink  localhost necops 1900
> 
>  informsink  localhost necops 1950
>  informsink  localhost necops 1900

So every time you ask for a notification to be generated,
the agent will actually send *SIX* copies?
I know that SNMP traps are regarded as an unreliable
mechanism, but six feels a bit excessive!!

I presume you have good reason for running two trap handlers,
listening on two different ports on the same machine.   But
there is no point in sending three copies of the same trap
to the same receive.

Decide whether you want to use SNMPv1 traps, SNMPv2c traps
or SNMPv2c informs, and delete the other two pairs from
this file.


>  trapcommunity  necops
>  trapcommunity  necops

You don't need two copies of this line.  Full Stop.
In fact, you don't even need one copy, since you're
specifying the community above.

>  authtrapenable  1
>  authtrapenable  1

Same here - you don't need two copies of this line.
Delete one.





> >>CAN YOU SUCCESSFULLY SET OTHER OBJECTS(say "sysLocation.0")
> 
> NO SIR, i am not able to set for the ("sysLocation.0") also.



> here is my ACCESS control setup in the
> /usr/local/share/snmp/snmpd.conf file
> 
> # SECTION: Access Control Setup
>  rwuser  npar
>  rwuser  npar auth
> 
>  rouser  npar
>  rouser  npar auth
> 
>  rocommunity  comname localhost
>  rocommunity  comname localhost
>  rocommunity  necops localhost
> 
>  rwcommunity  comname localhost
>  rwcommunity  necops localhost

Once again, you've got multiple copies of overlapping directives.
This is just going to cause confusion.

Please choose *ONE* of

rwuser  npar
rouser  npar

and *ONE* of

rocommunity  comname localhost
rwcommunity  comname localhost

and *ONE* of

rocommunity  necops localhost
rwcommunity  necops localhost

and delete the rest.

> 
> # Unknown directives read in from other files by snmpconf
> 
>  com2sec notConfigUser  default  public
> 
>  group  notConfigGroup v1  notConfigUser
>  group  notConfigGroup v2c  notConfigUser
> 
>  viewsystemviewincluded  .1.3.6.1.2.1.1
>  viewsystemviewincluded  .1.3.6.1.2.1.25.1.1
> 
>  access  notConfigGroup ""  any  noauthexact  
>systemview systemview none

Yes - that should allow "public" write access.
But only to the system group - not to your wmanIfMib

>  com2sec local localhost necops
>  com2sec mynet default necops

But you've already defined "necops" behaviour above
(using the "rocommunity"/"rwcommunity" tokens).

Yet again, you're duplicating the same configuration,
which will just cause confusion.

*EITHER* use the "r[ow]community" directive, *OR* use
com2sec/group/view/access.   Do *NOT* try to mix them.



> sir, in this file all the contents(SECTIONS) such as "System
> Information Setup,Access Control Setup Trap Destinations, Extending
> the Agent and Unknown directives read " are present TWICE.second set
> of these information are given after first one.

Why?!?

It sounds as if you'd do better to start again from scratch.
Move this file out of the way, and create a new version
containing the following:

rocommunity public
rwcommunity necops

trap2sink  localhost necops 1950

Then try:

snmpget -c public -v2c localhost  sysLocation.0
snmpget -c necops -v2c localhost  sysLocation.0
snmpset -c necops -v2c localhost  sysLocation.0 s "third floor"

snmpget -c necops -v2c localhost  \
WMAN-IF-MIB::wmanIfBsControllerActionsResetBs.1

snmpset -c necops -v2c localhost  \
WMAN-IF-MIB::wmanIfBsControllerActionsResetBs.1 i 333

Dave



---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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


dinamic creation of rows in a table (3)

2005-04-21 Thread Gemma Sánchez
Hi again 
I have followed the procedure that Dave prescribed me and now I have the
template generated by *mib2c -c mib2c.create-dataset.conf -f newsub00
subestacion*, I know this template manages automatically row creation and
deletion, but now I need to define a subhandler for aeEvTable, since I have
to update the date contained in
aeEvEstTT when aeEvest is modified and to generate an inform when aeEvEst is
assigned the value ACTIVO.
Every time I had to defined a subhandler I have defined variables associated
to the columns that have a special processing (do you think it is well 
done?), but now I find a new
difficulty. This difficulty is that these tables are dinamic so I think the
data structure associated to these rows should be dinamic too. I have
thought that a dinamic linked list is a good structure. If it is correct
(please confirm it to me), I have new doubt. I think my subhandler must
reserve/free
the memory used by a row in the dinamic linked list when this row is 
created/destroyed, isn´t it?. This
implies the column *aeEvStatus* (the rowstatus column) should have its own 
subhandler so that it frees memory when *aeEvStatus* is assigned the value 
*destroy* and reserves memory when a new row is created, isn't it? My 
question is: would this subhandler annul the handler that automatically deal 
with the creation and deletion of rows in the MIB?

Thanks a lot.
Gemma
Next, I show my table.
aeEvTable OBJECT-TYPE
SYNTAX  SEQUENCE OF TIPOaeEvEntry
MAX-ACCESS read-create
STATUS  current
DESCRIPTION
 "Tabla de eventos."
::= {aeIEC 2}
aeEvEntry OBJECT-TYPE
SYNTAX  TIPOaeEvEntry
MAX-ACCESS read-create
STATUS  current
DESCRIPTION
 "Fila asociada a un evento"
INDEX  {aeEvInd}
::= {aeEvTable 1}
TIPOaeEvEntry ::= SEQUENCE {
aeEvInd  INTEGER,
aeEvEst  INTEGER,
aeEvNDS  INTEGER,
aeEvTT   TimeTicks,
aeEvStatus RowStatus
}
aeEvInd OBJECT-TYPE
SYNTAX  INTEGER
MAX-ACCESS not-accessible
STATUS  current
DESCRIPTION
 "Indice en la tabla de eventos."
::= {aeEvEntry 1}
aeEvEst OBJECT-TYPE
   SYNTAX  INTEGER {
   inactivo (0),
   activo (1)
   }
   MAX-ACCESS  read-create
   STATUS  current
   DESCRIPTION
   "Genera un TRAP al activarse."
::= {aeEvEntry 2}
aeEvNDS OBJECT-TYPE
SYNTAX  INTEGER
MAX-ACCESS read-create
STATUS  current
DESCRIPTION
 "Número de Display Strings asociadas
 al evento. Dichos DS contendrán las
 ASDUs que hay que enviar junto con
 el evento."
::= {aeEvEntry 3}
aeEvEstTT OBJECT-TYPE
SYNTAX  TimeTicks
MAX-ACCESS read-only
STATUS  current
DESCRIPTION
 "Marca temporal de la variable *aeEvEst*.
 Esta columna de la tabla toma el valor de la hora actual
 en el momento en el que su variable asociada es modificada."
::={aeEvEntry 4}
aeEvStatus OBJECT-TYPE
SYNTAX  RowStatus
MAX-ACCESS read-create
STATUS  current
DESCRIPTION
 "Esta columna es necesaria para la creación y
 borrado de elementos de la tabla. Ver STAL-00 pag 348"
::= {aeEvEntry 5} 


---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
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