sizeof long

2005-02-15 Thread Roger Nilsson








Hi,

 

When I compile and run my application sizeof(long) returns
8.

Does net-snmp define long to 8?

If it does, why and where?

This only happens when I use the net-snmp libs in my
application, otherwise sizeof(long) returns 4.

 

net-snmp verison: 5.0.9

OS: solaris9

Compiler: CC (64bit application)

 

/Roger Nilsson

 








How to configure access control info in snmpd.conf file

2005-02-15 Thread Chenna
HI all,

   Im using Net-SNMP 5.1.2. While starting the agent using
"/usr/local/sbin/snmpd -Lf log.txt" it is writing the following error
message in the log file.

---
log.txt

Warnging : No access control information configured.
   It's unlike the agent can serve any useful purpose in this state,
   Run "snmpconfig -g basic_setup" for help u configure the snmpd.conf
file for the agent .
NET-SNMP version 5.1.2.

I have used the above command also. But im not able to runt the daemon
successfully. Ind also the agent not recognized by the loriotproV3
manager.

Please help me..

Thanks in advance 
-- 
Regards
Chenna


---
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: 802.1q vlans on freeBSD

2005-02-15 Thread Monil Patel (Sentient Internet)
Robert Story wrote:
On Fri, 11 Feb 2005 16:50:25 + Monil wrote:
MP> I have some 802.1q vlans running on two freeBSD servers. When I snmpwalk 
MP> either of the servers, these vlans are no where to be seen.

What release are you using?
MP> Can anyone 
MP> suggest a way of making these available so I can monitor 
MP> bandwidth/packets on each individual vlan?

We get the stats from the kernel. I know for linux, vlans do not track
bandwidth, and do not appear in the interfaces table. Not sure for FreeBSD...
 

Using 4.10-release. It used to work... it's just randomly stopped.
--
Kind Regards,
Monil Patel

---
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: How to configure access control info in snmpd.conf file

2005-02-15 Thread Sridhar S
Chenna,

After you run "snmpconfig -g basic_setup" command look for the file
"snmpd.conf" in the local directory. Copy it to /tmp (for example) and
restart your 'snmpd' as '/usr/local/sbin/snmpd -C -c /tmp/snmpd.conf -f'
(-f for foreground running). 

Go through the man page of snmpconf for more information.

Sridhar

On Tue, 15 Feb 2005 03:03:39 -0800, "Chenna" <[EMAIL PROTECTED]>
said:
> HI all,
> 
>Im using Net-SNMP 5.1.2. While starting the agent using
> "/usr/local/sbin/snmpd -Lf log.txt" it is writing the following error
> message in the log file.
> 
> ---
> log.txt
> 
> Warnging : No access control information configured.
>It's unlike the agent can serve any useful purpose in this state,
>Run "snmpconfig -g basic_setup" for help u configure the snmpd.conf
> file for the agent .
> NET-SNMP version 5.1.2.
> 
> I have used the above command also. But im not able to runt the daemon
> successfully. Ind also the agent not recognized by the loriotproV3
> manager.
> 
> Please help me..
> 
> Thanks in advance 
> -- 
> Regards
> Chenna
> 
> 
> ---
> 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


---
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: Non-standard interfaces in ifTable

2005-02-15 Thread cnelson
> ...
> As far as future compatibility goes, getting the kernel to 
> recognize your
> interfaces is the best option. If that's not possible, then you'll 
> have to
> maintain proprietary patches against net-snmp.

Robert, I know you're the expert here but I've got non-standard Interfaces 
working without patching code.  I disabled interfaces in the agent (-I 
-interfaces) and then have a sub-agent which implements interfaces (I ran mib2c 
on the interfaces MIB and filled in the code).  I'd _love_ to be able to have 
both and another active thread on this list (Managing multiple instances of a 
MIB) suggests I can.  But you can, at least, implement interfaces without 
patching anything.  Or maybe I misunderstand the OP's intent.



---
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: Timeout with local connection to snmpd

2005-02-15 Thread cnelson
> On Mon, 14 Feb 2005 14:58:24 -0500 [EMAIL PROTECTED] wrote:
> CRC> session.peername = "localhost";
> CRC> session.retries = 3;
> CRC> session.version = SNMP_VERSION_2c;
> CRC> session.community = "private";
> CRC> session.community_len = strlen(session.community);
> CRC> 
> CRC> ss = snmp_open(&session);
> CRC> 
> CRC> I don't see "private" in those packets.  Should I?
> 
> Yes.
> 
> CRC>  Any idea why this doesn't work?
> 
> Nope.
> 
> What does the session structure look like after you call snmp_open?

My code says:

session.peername = "localhost";
session.retries = 1;
session.version = SNMP_VERSION_2c;
session.community = "config";
session.community_len = strlen(session.community);

/* establish the session */
ss = snmp_open(&session);

snmp_log(LOG_INFO, "peername:%s\n", session.peername);
snmp_log(LOG_INFO, "community:%s\n", session.community);

and the log output is:

   peername:localhost
   community:(null)

What the heck is _that_ about?





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


problems with mib2c

2005-02-15 Thread manik chopra
Hi all,

I have problems using mib2c functionality of NET-SNMP.

I have got a directory in which
"NET-SNMP-TUTORIAL-MIB" is saved. Also it is in the
default search path for the MIBS. Now when I do 

>>mib2c mib2c.int_watch.conf nstAgentModuleObject

following error occurs:
---
you didn't give me a valid OID to start with at
/usr/local/bin/mib2c line 115


I tried to look around but could'nt figure out the
reason. Earlier when I compiled and the installed the
"perl/" package for NET-SNMP: 

"./configure & make" went fine but when I did "make
test" following error occured:

-
ok 8
ok 9
make[1]: Leaving directory
`/home/premil/net-snmp-5.0.9/perl/ASN'
make[1]: Entering directory
`/home/premil/net-snmp-5.0.9/perl/OID'
PERL_DL_NONLAZY=1 /usr/bin/perl "-I../blib/lib"
"-I../blib/arch" test.pl
1..36
# Running under perl version 5.008005 for linux
# Current time local: Tue Feb 15 19:23:32 2005
# Current time GMT:   Wed Feb 16 00:23:32 2005
# Using Test.pm version 1.25
Can't load '../blib/arch/auto/SNMP/SNMP.so' for module
SNMP: ../blib/arch/auto/SNMP/SNMP.so: undefined
symbol: PerlIO_fprintf at
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm
line 230.
 at ../blib/lib/NetSNMP/OID.pm line 19
Compilation failed in require at
../blib/lib/NetSNMP/OID.pm line 19.
BEGIN failed--compilation aborted at
../blib/lib/NetSNMP/OID.pm line 19.
Compilation failed in require at test.pl line 10.
BEGIN failed--compilation aborted at test.pl line 10.
make[1]: *** [test_dynamic] Error 255
make[1]: Leaving directory
`/home/premil/net-snmp-5.0.9/perl/OID'
make: *** [test] Error 2

--

and test failed. I still did a "make install" and it
went successfully (i.e it didn't complain).

can anyone please help me in how to get the mib2c
functionality get going ?

Thank you very much in advance !

manik 




__ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250


---
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: Timeout with local connection to snmpd

2005-02-15 Thread Robert Story
On Tue, 15 Feb 2005 08:33:40 -0500 [EMAIL PROTECTED] wrote:
CRC> session.peername = "localhost";
CRC> session.community = "config";
CRC> session.community_len = strlen(session.community);
CRC> 
CRC> /* establish the session */
CRC> ss = snmp_open(&session);
CRC> 
CRC> snmp_log(LOG_INFO, "peername:%s\n", session.peername);
CRC> snmp_log(LOG_INFO, "community:%s\n", session.community);
CRC> 
CRC> and the log output is:
CRC> 
CRC>peername:localhost
CRC>community:(null)
CRC> 
CRC> What the heck is _that_ about?

Excellent question. I don't see anything in the code that would clear the
memory in the input session. Is ss NULL? If not, what does it contain for
community?

Whenever something really weird like this happens, my first thought is
'mismatched libraries.' Check that

ls /usr/lib/*snmp* /usr/local/lib/*snmp*

doesn't return multiple versions of the libraries. I'd also recommend building
a static version (configure --disable-shared --enable-static) for easier
debugging, and stepping into snmp_open and following it down the stack,
watching to see where the community gets cleared.

-- 
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: 802.1q vlans on freeBSD

2005-02-15 Thread Robert Story
On Tue, 15 Feb 2005 11:14:11 + Monil wrote:
MP> Robert Story wrote:
MP> >We get the stats from the kernel. I know for linux, vlans do not track
MP> >bandwidth, and do not appear in the interfaces table. Not sure for
MP> >FreeBSD...
MP> >
MP> Using 4.10-release. It used to work... it's just randomly stopped.

Try running the agent in the foreground with debug:

snmpd -f -Le -DmibII/interfaces

Then walk a column (maybe ifType) and send us the debug output.

-- 
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: Timeout with local connection to snmpd

2005-02-15 Thread cnelson
> On Tue, 15 Feb 2005 08:33:40 -0500 [EMAIL PROTECTED] wrote:
> CRC> session.peername = "localhost";
> CRC> session.community = "config";
> CRC> session.community_len = strlen(session.community);
> CRC> 
> CRC> /* establish the session */
> CRC> ss = snmp_open(&session);
> CRC> 
> CRC> snmp_log(LOG_INFO, "peername:%s\n", session.peername);
> CRC> snmp_log(LOG_INFO, "community:%s\n", session.community);
> CRC> 
> CRC> and the log output is:
> CRC> 
> CRC>peername:localhost
> CRC>community:(null)
> CRC> 
> CRC> What the heck is _that_ about?
> 
> Excellent question. 

Yeah, I'm full of 'em. ;-)

> I don't see anything in the code that would 
> clear the
> memory in the input session. Is ss NULL? If not, what does it 
> contain for
> community?

I'll look.

> Whenever something really weird like this happens, my first thought is
> 'mismatched libraries.' 

Yeah, we've had that discussion before.  I was pretty careful to scrub by 
development and test systems for 5.1 libraries before I did this.  I did `make 
-n` and looked at all the directories listed for -L options.  I've done 
ldconfig.

> Check that
> 
>   ls /usr/lib/*snmp* /usr/local/lib/*snmp*
> 
> doesn't return multiple versions of the libraries. 

Nothing in /usr/local/lib, all 5.2.1 in /usr/lib.

> I'd also 
> recommend building
> a static version (configure --disable-shared --enable-static) for 
> easierdebugging, and stepping into snmp_open and following it down 
> the stack,
> watching to see where the community gets cleared.

OK.  I'll try that now.  Thanks.



---
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: problems with mib2c

2005-02-15 Thread Robert Story
On Tue, 15 Feb 2005 05:57:35 -0800 (PST) manik wrote:
MC> I have got a directory in which
MC> "NET-SNMP-TUTORIAL-MIB" is saved. Also it is in the
MC> default search path for the MIBS. Now when I do 
MC> 
MC> >>mib2c mib2c.int_watch.conf nstAgentModuleObject
MC> 
MC> following error occurs:
MC> ---
MC> you didn't give me a valid OID to start with at
MC> /usr/local/bin/mib2c line 115

Does 'snmptranslate -IR nstAgentModuleObject' work?

Also, I'd recomment trying a more recent release - 5.2.1 if possible, or 5.1.2
if you want to avoid the bleeding edge.

-- 
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: How to configure access control info in snmpd.conf file

2005-02-15 Thread Robert Story
On Tue, 15 Feb 2005 03:03:39 -0800 Chenna wrote:
C>Im using Net-SNMP 5.1.2. While starting the agent using
C> "/usr/local/sbin/snmpd -Lf log.txt" it is writing the following error
C> message in the log file.
C> 
C> Warnging : No access control information configured.
C>It's unlike the agent can serve any useful purpose in this state,
C>Run "snmpconfig -g basic_setup" for help u configure the snmpd.conf
C> file for the agent .


The simplest fix is

echo "rocommunity public" > /usr/local/share/snmp/snmpd.conf

That allows anyone to query the agent. Configuring more restrictive access
control is strongly recommended, and is covered on the web site in the FAQ and
the tutorial.

-- 
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: sizeof long

2005-02-15 Thread Robert Story
On Tue, 15 Feb 2005 10:44:33 +0100 Roger wrote:
RN> When I compile and run my application sizeof(long) returns 8.
RN> 
RN> Does net-snmp define long to 8? If it does, why and where?

No, and application cannot change the size of a base C type.

RN> This only happens when I use the net-snmp libs in my application,
RN> otherwise sizeof(long) returns 4.

I find that difficult to believe. The size of a long is determined by the
compiler.

RN> Compiler: CC (64bit application)

If you are using a 64bit compiler, you are going to get 8 byte longs. Perhaps
your other applications are using a different compiler, or different compiler
settings (like a 32bit compatibility mode).

-- 
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: Non-standard interfaces in ifTable

2005-02-15 Thread Robert Story
On Tue, 15 Feb 2005 07:47:23 -0500 [EMAIL PROTECTED] wrote:
CRC> > ...
CRC> > As far as future compatibility goes, getting the kernel to 
CRC> > recognize your interfaces is the best option. If that's not possible,
CRC> > then you'll have to maintain proprietary patches against net-snmp.
CRC> 
CRC> Robert, I know you're the expert here but I've got non-standard Interfaces
CRC> working without patching code.  I disabled interfaces in the agent (-I
CRC> -interfaces) and then have a sub-agent which implements interfaces

Well, I consider removing some code (-I -interfaces) and adding other code
(subagent) a form of patching. i.e. it isn't going to work out of the box.

CRC> I'd _love_ to be
CRC> able to have both and another active thread on this list (Managing
CRC> multiple instances of a MIB) suggests I can.

Summarizing from my FAQ here:

http://www.freesnmp.com/net-snmp/faqs/#multidev

You can have both by using contexts, but:

1) snmpwalk or snmpget can only deal with one at a time.
2) the user has to know to use the non-default context
3) allowing v1/v2c access to context requires some setup shennanigans.

Having said that, there is another way to have both, but it does have some
risks. See my next response to Jeff in this same thread.

-- 
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: Non-standard interfaces in ifTable

2005-02-15 Thread cnelson
> On Tue, 15 Feb 2005 07:47:23 -0500 [EMAIL PROTECTED] wrote:
> CRC> > ...
> CRC> > As far as future compatibility goes, getting the kernel to 
> CRC> > recognize your interfaces is the best option. If that's not 
> possible,CRC> > then you'll have to maintain proprietary patches 
> against net-snmp.
> CRC> 
> CRC> Robert, I know you're the expert here but I've got non-
> standard Interfaces
> CRC> working without patching code.  I disabled interfaces in the 
> agent (-I
> CRC> -interfaces) and then have a sub-agent which implements 
> interfaces
> Well, I consider removing some code (-I -interfaces) and adding 
> other code
> (subagent) a form of patching. i.e. it isn't going to work out of 
> the box.

I guess we have a problem of definition then.  I'm not "patching" unless I have 
to keep track of my changes and update distributed source with `patch`.  (And 
my -I is done at runtime, not build time).

> CRC> I'd _love_ to be
> CRC> able to have both and another active thread on this list 
> (ManagingCRC> multiple instances of a MIB) suggests I can.
> 
> Summarizing from my FAQ here:
> 
>   http://www.freesnmp.com/net-snmp/faqs/#multidev
> 
> You can have both by using contexts, but:
> ...
> Having said that, there is another way to have both, but it does 
> have some
> risks. See my next response to Jeff in this same thread.

OK.  Thanks.



---
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: Timeout with local connection to snmpd

2005-02-15 Thread cnelson
> ... Is ss NULL? If not, what does it 
> contain for community?
> ...

OK.  I've built with static libraries and my code now looks like:

session.peername = "localhost";
session.retries = 1;
session.version = SNMP_VERSION_2c;
session.community = "config";
session.community_len = strlen(session.community);

/* establish the session */
ss = snmp_open(&session);

snmp_log(LOG_INFO, "session.peername:%s\n", session.peername);
snmp_log(LOG_INFO, "session.community:%s\n", session.community);


if ( ! ss) {
snmp_perror("ack");
snmp_log(LOG_ERR, "Could not establish session with SNMP daemon.\n");
return NULL;
}

snmp_log(LOG_INFO, "ss:%p\n", ss);
snmp_log(LOG_INFO, "ss->peername:%s\n", ss->peername);
snmp_log(LOG_INFO, "ss->community:%s\n", ss->community);

and my log says:

  session.peername:localhost
  session.community:(null)
  ss:0x101689e0
  ss->peername:localhost
  ss->community:(null)

I can't really step into the code because the target environment is an embedded 
system where I don't have good debugging support.  I can pepper snmp_open() 
with fprintf()s. :-/  But you say that you don't see anything there that would 
trash the community...



---
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: Non-standard interfaces in ifTable

2005-02-15 Thread Robert Story
On Thu, 10 Feb 2005 10:16:54 -0500 Jeff wrote:
JO> > > I have an embedded Linux system with some interfaces that are not
JO> > > "standard", i.e. the default ifTable implementation isn't getting part 
JO> > > or all of the information. From looking at the code, it appears that I
JO> > > willneed to directly modify the source that comes with net-snmp.
JO> 
JO> This is basically the approach I was thinking. Disable the automatic build
JO> of the IF-MIB, copy the IF-MIB code and modify it for our system and build
JO> it as a dynamically loadable module. I was hoping I'd be able to write a
JO> separate module that would fix some ifType entries and add some interfaces.
JO> That way I would have less worry about my custom ifTable getting out of
JO> sync with the Net-SNMP ifTable as new versions of Net-SNMP are released.

Ok, since the two of your seem gung-ho on mixing in extra interfaces, here's
the scoop.

The problem with mixing interfaces is the ifIndex. By definition, the index to
a table for a particular row must remain constant for the lifetime of the agent
process. [Note that this is not true for the existing mibII/interfaces.c
implementation for some platforms. Bringing interfaces up and down can re-order
the table, which is bad new for someone trying to monitor a particular
interface.]

So the trend is to try and use the ifIndex from the kernel, wherever possible.
The new IF-MIB implementation (in if-mib/*) does this. So, if you want to mix
in proprietary interfaces that the kernel doesn't know about, how do we ensure
that the ifIndex values don't clash? The easiest way is probably to define an
offset for ifIndexes for the proprietary interface types. For an embedded
system, this is probably pretty easy, as the interfaces will likely remain
constant. But it isn't too hard to imagine a scenario where a conflict could
occur. So, if you've evaluated the risk and found it acceptable, select an
offset you are comfortable with.

Now, how to integrate with the existing code? I recommend using the new IF-MIB
implementation, because I think that is the direction that the code base is
moving. The old implementation will probably be phased out (off by default)
over the next few releases. If you platform is Linux, then the bulk of the work
is already done. [If it is some other platform, then the old style code needs
to be ported to the new style.] You will have to patch the agent, but it should
be a one line patch to call your code to add the additional interfaces.

There are two places where you could put the call. The key function is
netsnmp_arch_interface_container_load(). This function is called from
netsnmp_access_interface_container_load() in
if-mib/data_access/interface_common.c. It's purpose is to populate a container
with interface entries. The Linux implementation is in
if-mib/data_access/interface_linux.c, which should serve as your example of how
to create and add entries. You can add a call to your function before, after or
inside the *_arch_* call.

You will need to configure with --enable-mfd-rewrites (recommended) or
explicitly exclude the mibII/interfaces module and include the if-mib modules.

-- 
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: Timeout with local connection to snmpd

2005-02-15 Thread Robert Story
On Tue, 15 Feb 2005 11:11:11 -0500 [EMAIL PROTECTED] wrote:
CRC> > ... Is ss NULL? If not, what does it contain for community?
CRC> 
CRC> and my log says:
CRC> 
CRC>   session.peername:localhost
CRC>   session.community:(null)
CRC>   ss:0x101689e0
CRC>   ss->peername:localhost
CRC>   ss->community:(null)
CRC> 
CRC> I can't really step into the code because the target environment is an
CRC> embedded system where I don't have good debugging support.  I can pepper
CRC> snmp_open() with fprintf()s. :-/  But you say that you don't see anything
CRC> there that would trash the community...

Ok, if it isn't mis-matched libraries, then my next guess will be mis-matched
headers. See if this finds multiple copies:

find /usr/include /usr/local/include -name snmp_api.h -print

A dup in ucd-snmp/snmp_api.h is ok, but if it finds more then that's likely the
problem, since the session structure size changed between releases.

-- 
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: question on logfile monitoring

2005-02-15 Thread Denis Grannell
Hi,

> 
> Monitoring for what?
To have the snmpd daemon send a trap as soon as
messages containing a certain string are written
to logfiles.
Strings like "error" or "warning" and so on.

> See the snmpd.conf man page for how to
> monitor a file for growth beyond a specified size.

I'll look at that.

thanks,
Denis



---
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: Timeout with local connection to snmpd

2005-02-15 Thread cnelson
> ...
> Ok, if it isn't mis-matched libraries, then my next guess will be 
> mis-matched
> headers. See if this finds multiple copies:
> 
>   find /usr/include /usr/local/include -name snmp_api.h -print
> 
> A dup in ucd-snmp/snmp_api.h is ok, but if it finds more then 
> that's likely the
> problem, since the session structure size changed between releases.

You may have hit on it!  I've got a cross-build environment where the headers 
used to build my clients are in a kind of weird place and I can easily imagine 
that those copies didn't get updated when I tried to use 5.2.1.

Is there any version information in the header?  I guess I can diff the files 
on my include path against those in the NetSNMP 5.2.1 distribution... off to 
check.



---
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: Timeout with local connection to snmpd

2005-02-15 Thread cnelson
Eureka!  Mis-matched headers it was!  Sorry for the trouble.  Back to trying to 
validate the SourceForge bug...



---
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 on logfile monitoring

2005-02-15 Thread Denis Grannell
Hi,
> 
> 
> Monitoring for what? 
To have the snmpd daemon send a trap as soon as
messages containing a certain string are written
to logfiles.
Strings like "error" or "warning" and so on.


> See the snmpd.conf man page for how to 
> monitor a file for growth beyond a specified size.

I'll look at that.

thanks,
Denis



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


AgentXSocket address

2005-02-15 Thread Emi . Yanagi

Hi,

I enabled master agentx in smnpd.conf, and added AgentXSocket address to my tmplocal:
  master  agentx
  AgentXSocket tmplocal/var/agentx/master

My snmpd is running okay with the above setup, but the example-demon I compiled from the tutorial got the following error:

Error: Failed to connect to the agentx master agent: Unknown host (No such file or directory)

My question is, if I set AgentXSocket address to non-default, how do I pass the information to example-demon?

Thanks for your helps.
--
Emi



---
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: Non-standard interfaces in ifTable

2005-02-15 Thread Jeff Olhoeft
Thank you, this is exactly what I was looking for. I agree
that getting the kernel to report the interfaces correctly
is the ideal approach. That will be my prefered approach,
but not being familiar with that part of the system, I like
having alternative approaches. Another issue is that some
ifTypes are not being identified correctly. I have identifed
the part of the code (the MFD version) where that is an issue
and hope to put together a patch in the next week or so.

Thanks,

Jeff

On Tuesday, February 15, 2005 12:16 PM, Robert Story wrote:
> Ok, since the two of your seem gung-ho on mixing in extra 
> interfaces, here's the scoop.
> 
> The problem with mixing interfaces is the ifIndex. By 
> definition, the index to a table for a particular row must 
> remain constant for the lifetime of the agent process. [Note 
> that this is not true for the existing mibII/interfaces.c 
> implementation for some platforms. Bringing interfaces up and 
> down can re-order the table, which is bad new for someone 
> trying to monitor a particular interface.]
> 
> So the trend is to try and use the ifIndex from the kernel, 
> wherever possible. The new IF-MIB implementation (in 
> if-mib/*) does this. So, if you want to mix in proprietary 
> interfaces that the kernel doesn't know about, how do we 
> ensure that the ifIndex values don't clash? The easiest way 
> is probably to define an offset for ifIndexes for the 
> proprietary interface types. For an embedded system, this is 
> probably pretty easy, as the interfaces will likely remain 
> constant. But it isn't too hard to imagine a scenario where a 
> conflict could occur. So, if you've evaluated the risk and 
> found it acceptable, select an offset you are comfortable with.
> 
> Now, how to integrate with the existing code? I recommend 
> using the new IF-MIB implementation, because I think that is 
> the direction that the code base is moving. The old 
> implementation will probably be phased out (off by default) 
> over the next few releases. If you platform is Linux, then 
> the bulk of the work is already done. [If it is some other 
> platform, then the old style code needs to be ported to the 
> new style.] You will have to patch the agent, but it should 
> be a one line patch to call your code to add the additional 
> interfaces.
> 
> There are two places where you could put the call. The key 
> function is netsnmp_arch_interface_container_load(). This 
> function is called from
> netsnmp_access_interface_container_load() in 
> if-mib/data_access/interface_common.c. It's purpose is to 
> populate a container with interface entries. The Linux 
> implementation is in if-mib/data_access/interface_linux.c, 
> which should serve as your example of how to create and add 
> entries. You can add a call to your function before, after or 
> inside the *_arch_* call.
> 
> You will need to configure with --enable-mfd-rewrites 
> (recommended) or explicitly exclude the mibII/interfaces 
> module and include the if-mib modules.
> 
> -- 
> 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
> 



---
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: How to configure access control info in snmpd.conf file

2005-02-15 Thread Sridhar S
Chenna,

Following is an example for configuring access control for SNMPv2c
requests.

com2sec rwsecnamedefault public
group   rwgroupname  v2c rwsecname
viewrwviewname   included.1
viewnoneexcluded.1
access  rwgroupname  ""  v2c noauth  exact   rwviewname   rwviewname  
none

The man pages are found under /man.

Sridhar

On Tue, 15 Feb 2005 20:22:39 -0800, "Chenna" <[EMAIL PROTECTED]>
said:
> Hi Sridhar, Robert,
> 
> Thanks you very much... Actually what I did is, I have copied the
> snmpd.conf file into $HOME/.snmp/ folder. It is working now, but I
> dont know what are all the configuration parameters to be configured.
> 
> And where can I find the tutorial on this snmpd.conf file.
> 
> 
> Thanks in advance
> 
> 
> 
> Regards
> Chenna
> 
> 
> On Tue, 15 Feb 2005 16:47:02 +0530, Sridhar S <[EMAIL PROTECTED]> wrote:
> > Chenna,
> > 
> > After you run "snmpconfig -g basic_setup" command look for the file
> > "snmpd.conf" in the local directory. Copy it to /tmp (for example) and
> > restart your 'snmpd' as '/usr/local/sbin/snmpd -C -c /tmp/snmpd.conf -f'
> > (-f for foreground running).
> > 
> > Go through the man page of snmpconf for more information.
> > 
> > Sridhar
> > 
> > On Tue, 15 Feb 2005 03:03:39 -0800, "Chenna" <[EMAIL PROTECTED]>
> > said:
> > > HI all,
> > >
> > >Im using Net-SNMP 5.1.2. While starting the agent using
> > > "/usr/local/sbin/snmpd -Lf log.txt" it is writing the following error
> > > message in the log file.
> > >
> > > ---
> > > log.txt
> > >
> > > Warnging : No access control information configured.
> > >It's unlike the agent can serve any useful purpose in this state,
> > >Run "snmpconfig -g basic_setup" for help u configure the snmpd.conf
> > > file for the agent .
> > > NET-SNMP version 5.1.2.
> > > 
> > > I have used the above command also. But im not able to runt the daemon
> > > successfully. Ind also the agent not recognized by the loriotproV3
> > > manager.
> > >
> > > Please help me..
> > >
> > > Thanks in advance
> > > --
> > > Regards
> > > Chenna
> > >
> > >
> > > ---
> > > 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
> > 
> 
> 
> -- 
> Thanks and Regards
> Chenna


---
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: problems with mib2c

2005-02-15 Thread manik chopra
Hello Robert,

Yes 'snmptranslate -IR nstAgentModuleObject' does
work.
But still i get the same error with mib2c. 

Also, initially I was using net-snmp-5.2.1. But
whenever I ran mib2c following error occured:

--
ERROR: You don't have the SNMP perl module installed. 
Please obtain
this by getting the latest source release of the
net-snmp toolkit from
http://www.net-snmp.org/download/ .  Once you download
the source and
unpack it, the perl module is contained in the
perl/SNMP directory.
See the README file there for instructions


I installed the perl module but still i get the above
error when I run mib2c.

-manik




--- Robert Story <[EMAIL PROTECTED]> wrote:

> On Tue, 15 Feb 2005 05:57:35 -0800 (PST) manik
> wrote:
> MC> I have got a directory in which
> MC> "NET-SNMP-TUTORIAL-MIB" is saved. Also it is in
> the
> MC> default search path for the MIBS. Now when I do 
> MC> 
> MC> >>mib2c mib2c.int_watch.conf
> nstAgentModuleObject
> MC> 
> MC> following error occurs:
> MC> ---
> MC> you didn't give me a valid OID to start with at
> MC> /usr/local/bin/mib2c line 115
> 
> Does 'snmptranslate -IR nstAgentModuleObject' work?
> 
> Also, I'd recomment trying a more recent release -
> 5.2.1 if possible, or 5.1.2
> if you want to avoid the bleeding edge.
> 
> -- 
> 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
> 


__
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: problems with mib2c

2005-02-15 Thread manik chopra
I am using Fedora 3.

thank you
-manik


--- Robert Story <[EMAIL PROTECTED]> wrote:

> On Tue, 15 Feb 2005 05:57:35 -0800 (PST) manik
> wrote:
> MC> I have got a directory in which
> MC> "NET-SNMP-TUTORIAL-MIB" is saved. Also it is in
> the
> MC> default search path for the MIBS. Now when I do 
> MC> 
> MC> >>mib2c mib2c.int_watch.conf
> nstAgentModuleObject
> MC> 
> MC> following error occurs:
> MC> ---
> MC> you didn't give me a valid OID to start with at
> MC> /usr/local/bin/mib2c line 115
> 
> Does 'snmptranslate -IR nstAgentModuleObject' work?
> 
> Also, I'd recomment trying a more recent release -
> 5.2.1 if possible, or 5.1.2
> if you want to avoid the bleeding edge.
> 
> -- 
> 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
> 




__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250


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