Re: Correct way of stopping snmpd

2024-05-21 Thread Niels Baggesen

Den 21-05-2024 kl. 13:34 skrev Niels Baggesen:


SIGTERM is not kill -9, it is kill -16. kill -9 is SIGKILL


Whoops, minor typo, SIGTERM is 15, not 16. Thanks to jhawk!

/Niels

--
Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net
The purpose of computing is insight, not numbers  --  R W Hamming

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Correct way of stopping snmpd

2024-05-21 Thread Niels Baggesen

Den 21-05-2024 kl. 10:30 skrev Pushpa Thimmaiah:

Hi All,

Kindly confirm  that 'kill -9' is valid way to stop snmpd.

I am writing service script for systemctl  to stop snmpd and would like 
to understand correct way of stopping the daemon.
According to Source code agent/snmpd.c ,  SIGTERM (kill -9) , SIGINT 
(ctl+c) are for snmpd shutdown.


SIGTERM is not kill -9, it is kill -16. kill -9 is SIGKILL

/Niels

--
Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net
The purpose of computing is insight, not numbers  --  R W Hamming

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Updating the LM-SENSORS MIB (Issue #752)

2024-03-26 Thread Niels Baggesen

Den 26-03-2024 kl. 10:10 skrev Craig Small via Net-snmp-coders:
> Hi,
>   This email is about working out how the LM-SENSORS MIB should be 
updated. If it was just a matter of updating the SNMP agent, I'd just 
create a pull request but the MIB is (might be?) different.


Great!

> How do I get this MIB updated? I'm willing to write it up and the 
change for the agent, would a PR for the MIB be enough or does it need 
to go through some sort of other approval process?


There is nothing special about updating the MIB, so just include the 
update in your PR.


Personally I would prefer that that new object had

UNITS "Cel"
DISPLAY-HINT "d-3"

instead of displaying a milli-value, but that is personal taste.

Remember to add a REVISION section to the MIB when you update it.

/Niels

--
Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net
The purpose of computing is insight, not numbers  --  R W Hamming



___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Fwd: SNMPv3 DES issue

2024-01-29 Thread Niels Baggesen
: 67315

msgUserName: vincent

msgAuthenticationParameters: 

msgPrivacyParameters: 

msgData: plaintext (0)

plaintext

contextEngineID: 80001f88801cfa42209b6fa665

1...  = Engine ID Conformance: RFC3411 (SNMPv3)

Engine Enterprise ID: net-snmp (8072)

Engine ID Format: Reserved/Enterprise-specific (128): Net-SNMP Random

Engine ID Data: 1cfa4220

Engine ID Data: Creation Time: Jan 16, 2024 12:59:23 Paris, Madrid

contextName:

data: report (8)

report

request-id: 0

error-status: noError (0)

error-index: 0

variable-bindings: 1 item

1.3.6.1.6.3.15.1.1.1.0: 10

Object Name: 1.3.6.1.6.3.15.1.1.1.0 (iso.3.6.1.6.3.15.1.1.1.0)

Value (Counter32): 10



___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


--
Niels Baggesen -- @home -- Århus -- Denmark --ni...@baggesen.net
The purpose of computing is insight, not numbers  --  R W Hamming

--
Niels Baggesen -- @home -- Århus -- Denmark --ni...@baggesen.net
The purpose of computing is insight, not numbers  --  R W Hamming
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Delayed notification when using IP-MIB::ipAddressTable instead of IP-MIB::ipAddressTable

2024-01-15 Thread Niels Baggesen

Den 11-01-2024 kl. 14:25 skrev Christophe Leroy via Net-snmp-coders:

When using IP-MIB::ipAddrTable the manager is notified immediately but
when using IP-MIB::ipAddressTable the notification is delayed several
seconds and after investigation it looks like it is because the content
of IP-MIB::ipAddressTable is cached for 30 seconds.

What should be done in order to restore the same behaviour as with
IP-MIB::ipAddrTable and get an immediate notification ?


You can check the cache timeout by checking:

snmpget host nsCacheTimeout.1.3.6.1.2.1.4.34

and, if you have write access to the agent, change it by snmpset:

snmpset host nsCacheTimeout.1.3.6.1.2.1.4.34 = 1

(dont set it to 0, then it will default to 5)

/Niels

--
Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net
The purpose of computing is insight, not numbers  --  R W Hamming



___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: snmptrap v3 authentication

2023-04-25 Thread Niels Baggesen


Den 25-04-2023 kl. 17:46 skrev Simon Chamlian:

Something else.

I tried with SimpleMib browser as well as MGSOFT Mib browser.


In that case you should direct your question towards them, why they 
accept a trap with unknown credentials.


Note, that you have asked to send the trap in the clear, so there is no 
problem interpreting it.


/Niels

--
Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net
The purpose of computing is insight, not numbers  --  R W Hamming



___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: snmptrap v3 authentication

2023-04-25 Thread Niels Baggesen via Net-snmp-coders

Which trap receiver are you using? snmptrapd, or something else?

/Niels

Den 25-04-2023 kl. 15:10 skrev Simon Chamlian:

I tried the command:

snmptrap -v 3 -u  Simon  -a MD5 -A  SimonPass -l authNoPriv 
172.27.37.227 "" coldStart.0


(with security name  : Simon and  authentication password  : SimonPass ).

These parameters are not set in any config files anywhere.

On another PC with IP 172.27.37.227, I have a MIB browser and trap 
receiver. The trap receiver is receiving the trap even when it is not 
configured with the security name  : Simon and  authentication 
password  : SimonPass .


I was not expecting to receive the trap until I configured the trap 
receiver with the same security name and authentication password!?!


Simon




On Tue, Apr 25, 2023 at 3:17 AM Craig Small via Net-snmp-coders 
 wrote:


On Sat, 15 Apr 2023 at 11:12, Simon Chamlian
 wrote:


snmptrap -v 3 -u  Simon  -a MD5 -A  SimonPass -l authNoPriv
172.27.37.227 "" coldStart.0

I do receive the trap on my Trap Receiver even if I didn't
specify a Username and Authentication password in the MIB
browser (on 172.27.37.227 ) !

Do you mean the security name instead of the username?
The -u sets the security name, -A sets the authentication
password. They're set in the example you gave.

Or are you saying that you tried that command without the username
and authentication password?
If so, are you sure that you don't have those parameters set in an
snmp configuration file?

Trying the command with -Dread_config:line may help here.

I tried snmptrap 5.9.3 with no -u and -A flags and with/without a
configuration file and it only worked with the configuration file.

 - Craig

___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders



___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


--
Niels Baggesen -- @home -- Århus -- Denmark --n...@users.sourceforge.net
   The purpose of computing is insight, not numbers  --  R W Hamming
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Get interface IPV6 addresses

2020-02-27 Thread Niels Baggesen

Den 27-02-2020 kl. 18:40 skrev Michael Wu:

Dear Net-Snmp coders:

I am using net-snmp v5.8 with ipv6 enabled. Trying to get interface's 
ipv6 addresses. I tried a couple of oids but could not figure out how to 
map the ifindex to the ipv6 address assigned to the interfaces. All 
interfaces have both ipv4 and ipv6 addresses assigned.


What OS is this? Is this your own compilation from the release tar ball 
or the versions provided by your distribution?


1. The ipv6AddrPrefixTable documented in 
http://www.net-snmp.org/docs/mibs/ipv6MIB.html 
 was not available:


snmpwalk -v 2c -c public x.x.x.x .1.3.6.1.2.1.55.1.7
IPV6-MIB::ipv6AddrPrefixTable = No Such Object available on this agent 
at this OID


No, the IPV6-MIB has been deprecated in favor of the augmented IP-MIB 
(as used below)



2. ipAddressTable (1.3.6.1.2.1.4.34) has entries of ipv6 prefix:

snmpwalk -v 2c -c public x.x.x.x .1.3.6.1.2.1.4.34
IP-MIB::ipAddressIfIndex.ipv4."243.0.3.129" = INTEGER: 230
IP-MIB::ipAddressIfIndex.ipv6."fe:80:00:00:00:00:00:00:02:e0:ec:ff:fe:e1:5e:44" 
= INTEGER: 230

IP-MIB::ipAddressType.ipv4."243.0.3.129" = INTEGER: unicast(1)
IP-MIB::ipAddressType.ipv6."fe:80:00:00:00:00:00:00:02:e0:ec:ff:fe:e1:5e:44" 
= INTEGER: unicast(1)

...
But I don't see ipAddressPrefix ( .1.3.6.1.2.1.4.34.5) from the output.


I do, with the CentOS 7 provided version (5.7.2), and with a somewhat 
recent installation of the 5-8-patches branch.


IP-MIB::ipAddressPrefix.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01" 
= OID: 
IP-MIB::ipAddressPrefixOrigin.1.ipv6."00:00:00:00:00:00:00:00:00:00:00:00: 
 00:00:00:01".128
IP-MIB::ipAddressPrefix.ipv6."20:01:04:70:df:9a:00:00:00:00:00:00:00:00:00:01" 
=   OID: 
IP-MIB::ipAddressPrefixOrigin.2.ipv6."20:01:04:70:df:9a:00:00:00:00:00:00: 
 00:00:00:00".64
IP-MIB::ipAddressPrefix.ipv6."fe:80:00:00:00:00:00:00:de:98:3e:20:92:51:bd:11" 
=   OID: 
IP-MIB::ipAddressPrefixOrigin.2.ipv6."fe:80:00:00:00:00:00:00:00:00:00:00: 
 00:00:00:00".64




3. Also tried ipAdEntIfIndex ( 1.3.6.1.2.1.4.20.1.2)

snmpwalk -v 2c -c public x.x.x.x 1.3.6.1.2.1.4.20.1.2
...
IP-MIB::ipAdEntIfIndex.243.0.3.129 = INTEGER: 230
...
But it only has ipv4 addresses.


Yes, this is a IPv4 only table.


What is the right approach to get the ipv6 address from the interface?


I would look at
IP-MIB::ipAddressIfIndex.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01" 
= INTEGER: 1
IP-MIB::ipAddressIfIndex.ipv6."20:01:04:70:df:9a:00:00:00:00:00:00:00:00:00:01" 
= INTEGER: 2


/Niels

PS: Sorry about the line wrap of these extreme OIDs :-(

--




___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: HEX- String instead of Octet - String - incase of inetAddress

2019-12-04 Thread Niels Baggesen via Net-snmp-coders
On Tue, Dec 03, 2019 at 04:45:30PM +, Bek, Anshul wrote:
> 
> For 9.9.156.1.1.2.1.7.1 and 9.9.156.1.1.2.1.7.2, its basically an InetAddress.
> 
> I have 2 queries:
> 
> 
>   1.  Is there any way to get only these 2 InetAddress as Hex-string. I can 
> see that  in sprint_realloc_octet_string() in snmplib/mib.c involves in 
> sprinting OCTET STRINGS for snmpgets and walks. Is there any value to check ? 
> Also  hints, enums and units passed in NULL.
>   2.  Why is the IP display in this manner ie. each octet in ascii . Is it by 
> default ?
> 
> Note:- I don't want to use -Ox option as this will display all the strings 
> value in Hex.

They are display that way because Cisco intended this to be a host name
and then it makes sense that it is a string.

They are defined like this

$ snmptranslate -Td -m ALL SNMPv2-SMI::enterprises.9.9.156.1.1.2.1.2.1
CISCO-CCM-MIB::ccmName.1
ccmName OBJECT-TYPE
  -- FROM   CISCO-CCM-MIB
  -- TEXTUAL CONVENTION SnmpAdminString
  SYNTAXOCTET STRING (0..128) 
  DISPLAY-HINT  "255t"
  MAX-ACCESSread-only
  STATUScurrent
  DESCRIPTION   "The host name of the CallManager."
::= { iso(1) org(3) dod(6) internet(1) private(4)
  enterprises(1) cisco(9) ciscoMgmt(9) ciscoCcmMIB(156)
  ciscoCcmMIBObjects(1) ccmGeneralInfo(1) ccmTable(2)
  ccmEntry(1) ccmName(2) 1 }
  
/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming


___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: MAC Address As Index

2019-09-11 Thread Niels Baggesen via Net-snmp-coders
On Wed, Sep 11, 2019 at 12:40:38PM +0530, Krishna Chaitanya wrote:
> > BTW, somehow the response from Neils is missed but found it in the archive.
> >
> > https://www.mail-archive.com/net-snmp-coders@lists.sourceforge.net/msg21705.html
> >
> > MacAddress TC from SNMPv2-TC is a fixed size string, so, the length
> > should not be prefixed.
> >
> 
> Any ideas on how to get proper MAC address display without any side
> effects? Any help is appreciated.

The MacAddress TC mentioned above has a DISPLAY-HINT "1x:", does that
not display the way you want? Otherwise show us what you see, and what
is wrong with it.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming


___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: MAC Address As Index

2019-08-22 Thread Niels Baggesen via Net-snmp-coders
On Tue, Aug 20, 2019 at 06:14:34PM +0530, Krishna Chaitanya wrote:
> Hi,
> 
> When using MAC Address as an index ( I am using MacAddress type from
> SNMPv2-TC.) the output is incorrect because the length of the string
> is prefixed as mac address is defined as OCTET STR there is an extra
> byte and the last byte of mac address is interpreted as next OID.
> 
> snmpwalk:
>HistValue."wlp8s0f0".'B.'.hist_2.2.19
> snmpwalk -OX
>   HistValue["wlp8s0f0"][STRING: 06:00:90:e6:42:99][hist_2][2].19
> 
> In the above examples last but one OID 2 is hist_2. Is there a way to
> disable prefixing of length?

See RFC 2578, clause 7.7. You define your MAC address as an OCTET STRING
(SIZE(6)), then there is no need to prefix the length.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming


___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Set OID value in code

2019-07-30 Thread Niels Baggesen via Net-snmp-coders
On Mon, Jul 29, 2019 at 03:19:56PM -0400, Ryan Frost wrote:
> Good afternoon,
> 
> I am familiar with the CLI commands and can also get OID values in code but
> I need to set them in code. How do I go about doing this? I’m using
> read_objid to print them similar to the example but I need to be able to
> set the values in code.

man read_objid?

Have you looked at the source of the CLI commands for inspiration?

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming


___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Update UCD-SNMP-MIB variable type

2019-05-13 Thread Niels Baggesen via Net-snmp-coders
On Mon, May 13, 2019 at 10:08:58AM +0200, Ilya Etingof wrote:
> 
> > The currelt 5.8 release (and unreleased 5.7 update) should already
> > contain objects like memTotalRealX which are defined as
> > CounterBasedGauge64
> > 
> > Unfortunately I don't have hardware to test it :-)
> 
> Just in case on-line agent emulation [1] could be helpful:
> 
> $ snmpget -v2c -c mib2dev/ucd-snmp-mib demo.snmplabs.com 
> UCD-SNMP-MIB::memTotalRealX.0
> UCD-SNMP-MIB::memTotalRealX.0 = Counter64: 18345168853242336474 kB
> 
> You can have it off-line as well [2].
> 
> 1. http://demo.snmplabs.com
> 2. http://snmplabs.com/snmpsim

Well, what is interesting is if the real agent get the real value. It
is about debugging the agent running on the physical hardware.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming


___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Update UCD-SNMP-MIB variable type

2019-05-13 Thread Niels Baggesen via Net-snmp-coders
On Mon, May 13, 2019 at 02:56:46AM -0400, Josef Ridky wrote:
> Hi folks,
> 
> I would like to know your opinion on following issue.
> 
> UCD-SNMP-MIB [1] uses INTEGER32 instead of COUNTER64 for memory OIDs which 
> limits the reporting to 2 TiB (using KiB as the base).
> Large modern servers often contain more than 2 TiB of memory leading to the 
> OIDs rolling over and reporting negative values.
> 
> How can it be solved? 
> Can we just change the variable type? (I don't think so) 
> Or can we add new variables, that will be COUNTER64 type? 
> Or can the base be set to e.g. MiB instead of KiB in configuration?

The currelt 5.8 release (and unreleased 5.7 update) should already
contain objects like memTotalRealX which are defined as
CounterBasedGauge64

Unfortunately I don't have hardware to test it :-)

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming


___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Parsing the values returned from snmp_synch_response

2019-05-03 Thread Niels Baggesen via Net-snmp-coders
On Thu, May 02, 2019 at 05:51:03PM +, Even Oscar Andersen wrote:
> (Repost of message sent to net-snmp-users, maybe this forum is more 
> appropriate)
> 
> Hello,
> 
> I am calling snmp_synch_response, and try to use the resulting variables,
> 
> It seems part of the result return variable type 0x81, not sure what this 
> variable is,
> It is not one of the ASN_ defines, but if I mask out 0x80 (not sure if this 
> is correct),
> It seems to be ASN_BOOLEAN.

This is a SNMPv2 exception type. You can find it in 
include/net-snmp/library/snmp.h,
but here are the exceptions:


/*
 * Exception values for SNMPv2p, SNMPv2c, SNMPv2u, SNMPv2*, and
 * SNMPv3 
  */
#define SNMP_NOSUCHOBJECT(ASN_CONTEXT | ASN_PRIMITIVE | 0x0) /* 80=128 */
#define SNMP_NOSUCHINSTANCE  (ASN_CONTEXT | ASN_PRIMITIVE | 0x1) /* 81=129 */
#define SNMP_ENDOFMIBVIEW(ASN_CONTEXT | ASN_PRIMITIVE | 0x2) /* 82=130 */

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming


___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: SNMP Command

2019-05-01 Thread Niels Baggesen via Net-snmp-coders

Den 26-04-2019 kl. 17:22 skrev HOUASLI, Samir via Net-snmp-coders:
I use this command: snmpd -m 
/home/snet/execution/staticCFG/MibCoSNET.txt -v1 -c public localhost .1.3.6.1.4.1.4747.14.5.16.2.0

which allows me to have as an output:

LOG-MIB::sysOperEvalNodeCmdOrder.0 = INTEGER: oper(1)

I want to have as an output the red line which is the description of the 
OID. *Can you tell me which command allows me to have that in the output 
of the terminal?*


You probably meant snmpget not snmpd?

The closest thing we have is snmptranslate with the -Td argument.

But you can of course modify snmpget to your hearts desire :-)

/Niels

--
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming


___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Junk in snmpwalk output

2018-10-05 Thread Niels Baggesen via Net-snmp-coders
On Fri, Oct 05, 2018 at 09:52:07AM +0200, Gisle Vanem via Net-snmp-coders wrote:
> >You should see similar data from IP-MIB in a more readable form.
> 
> Perfect! But I have no idea what a "DISPLAY-HINT" should do.

It will tell how the octets should be presented. Look at IP-MIB, you
will get something like

IP-MIB::ipNetToPhysicalType.4.ipv6."20:01:04:70:df:9a:00:00:00:00:00:00:00:00:00:01"
= INTEGER: dynamic(3)

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming


___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Junk in snmpwalk output

2018-10-04 Thread Niels Baggesen via Net-snmp-coders

Den 05-10-2018 kl. 00:56 skrev Gisle Vanem via Net-snmp-coders:

With this command:
   snmpwalk.exe -M mibs -m ALL -v1 -c public 10.0.0.21

I've getting lines with junk in the output:
   IPV6-MIB::ipv6NetToMediaValid.1.''.12 = INTEGER: true(1)


It is trying to show an OCTET STRING as a string, which in most cases is 
useful but fails miserably for IPv6 addresses which in the IPV6-MIB does 
not have a DISPLAY-HINT.


Try doing snmpwalk with the -Ob option, then you will see something like 
this:


ipv6NetToMediaValid.1.16.255.2.0.0.0.0.0.0.0.0.0.0.0.0.0.12 = INTEGER: 
true(1)


You should see similar data from IP-MIB in a more readable form.

/Niels

--
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming


___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: [PATCH / request for votes] SNMP-TARGET-MIB: Fix snmpTargetAddrTAddress

2018-06-18 Thread Niels Baggesen via Net-snmp-coders

Den 18-06-2018 kl. 19:31 skrev Anders Wallin:

+1

but I'm not sure my vote counts, since I was the one reporting the bug


+1, and my vote should count :-)

/Niels

--
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: [PATCH, RFC] Add Travis and Appveyor CI support

2018-05-17 Thread Niels Baggesen via Net-snmp-coders

Den 17-05-2018 kl. 15:54 skrev Robert Story:

On Wed, 16 May 2018 07:23:32 -0700 Bart wrote:
BVA> This patch makes it possible to enable Travis and Appveyor
BVA> continuous integration support. On Travis Net-SNMP is built
BVA> with all MIBs, with --disable-set-support, with
BVA> --enable-mini-agent, with --enable-minimalist and with
BVA> --enable-read-only. All these configurations are built on
BVA> Linux and on OS/X. On Appveyor Net-SNMP is built with MSVC and
BVA> dynamic libraries, with MSVC and statically linked libraryes,
BVA> with MinGW64, with Cygwin32 and with Cygwin64. As one can see
BVA> in the scripts in the "ci" directory the to-do items are as
BVA> follows:

Given that this doesn't affect code and CI support is a good thing:
+1


Another +1

/Niels

--
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: CFV: complete fix for setting engineBoots/Time via cli

2018-05-17 Thread Niels Baggesen via Net-snmp-coders

Den 17-05-2018 kl. 13:48 skrev Robert Story:

A fix in pre2 or pre3 fixed use of -Z command line argument for
setting engineBoots/engineTime. The snmptrap app needs to be fixed
as well.

[PATCH] also fix snmptrap for setting engineBoots and engineTime (e.g. -Z cli 
arg)

An addendum for earlier fix for agent side (commit 988562514b05a2bc01be4)


+1

/Niels

--
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


PATCH at_solaris.c

2018-05-15 Thread Niels Baggesen via Net-snmp-coders
The new at_solaris access module does not compile. May I solicit votes for
this patch for the missing include file?

diff --git a/agent/mibgroup/mibII/data_access/at_solaris.c
b/agent/mibgroup/mibII/data_access/at_solaris.c
index 0a92ec0..b14a999 100644
--- a/agent/mibgroup/mibII/data_access/at_solaris.c
+++ b/agent/mibgroup/mibII/data_access/at_solaris.c
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include "kernel_sunos5.h"
+#include "../at.h"
 
 typedef struct if_ip {
 int ifIdx;

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: RFC: fix clientaddr for 5.8

2018-05-14 Thread Niels Baggesen via Net-snmp-coders

Den 14-05-2018 kl. 20:05 skrev Robert Story:

+1 on both counts (commit it, but use cherry-pick).


+1 (and I wouldn't mind the OpenBSD part getting merged too)

/Niels

--
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Suggested patch to support NetBSD 8

2018-05-14 Thread Niels Baggesen via Net-snmp-coders
The patch that went into 5.7-patches is not sufficient for NetBSD 8 on
5.8

The following patch to 5.8.RC1 is required.

May I solicit some votes?

diff --git a/agent/mibgroup/mibII/at.h b/agent/mibgroup/mibII/at.h
index 1676cb6..e89b966 100644
--- a/agent/mibgroup/mibII/at.h
+++ b/agent/mibgroup/mibII/at.h
@@ -53,7 +53,7 @@ config_require(mibII/data_access/at_solaris)
 #elif defined(linux)
 config_require(mibII/data_access/at_linux)
 config_require(mibII/data_access/at_unix)
-#elif defined(HAVE_SYS_SYSCTL_H) && defined(RTF_LLINFO)
+#elif defined(HAVE_SYS_SYSCTL_H) && (defined(RTF_LLINFO) || 
defined(RTF_LLDATA))
 config_require(mibII/data_access/at_sysctl)
 config_require(mibII/data_access/at_unix)
 #elif defined(HAVE_NLIST_H)
diff --git a/agent/mibgroup/mibII/data_access/at_sysctl.c 
b/agent/mibgroup/mibII/data_access/at_sysctl.c
index d80228e..dfc207c 100644
--- a/agent/mibgroup/mibII/data_access/at_sysctl.c
+++ b/agent/mibgroup/mibII/data_access/at_sysctl.c
@@ -54,6 +54,8 @@ ARP_Scan_Init(void)
 mib[4] = NET_RT_FLAGS;
 #if defined RTF_LLINFO
 mib[5] = RTF_LLINFO;
+#elif defined(RTF_LLDATA)
+mib[5] = RTF_LLDATA;
 #else
 mib[5] = 0;
 #endif

--
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: [PATCH for master / request for votes] configure.ac: Fix recently introduced autoreconf warnings

2018-05-07 Thread Niels Baggesen via Net-snmp-coders

Den 07-05-2018 kl. 06:13 skrev Bart Van Assche:

A recent patch introduced an invocation of AC_CHECK_HEADER before AC_AIX.
However, AC_AIX must be invoked before AC_CHECK_HEADER. Hence move AC_AIX
from configure.d/config_os_progs into configure.ac. Additionally, since
AC_AIX is obsolete, use AC_USE_SYSTEM_EXTENSIONS instead. This patch fixes
all instances of the following autoreconf warnings:


+1

/Niels

--
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: NET-SNMP version: 5.7.3 and IPv6

2018-01-24 Thread Niels Baggesen via Net-snmp-coders
On Wed, Jan 17, 2018 at 10:58:40AM -0500, Simon Chamlian wrote:
> but these tokens are not recognized:
> ./snmpd.conf: line 12: Warning: Unknown token: rocommunity6.
> ./snmpd.conf: line 13: Warning: Unknown token: rwcommunity6.

This means that snmpd did not understand you config, and accordingly it
does not support community access for IPv6.

Are you sure you are running the version compiled with --enable-ipv6?

What other config options did you use?

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: NET-SNMP version: 5.7.3 and IPv6

2018-01-24 Thread Niels Baggesen via Net-snmp-coders
n Wed, Jan 17, 2018 at 10:58:40AM -0500, Simon Chamlian wrote:
> but these tokens are not recognized:
> ./snmpd.conf: line 12: Warning: Unknown token: rocommunity6.
> ./snmpd.conf: line 13: Warning: Unknown token: rwcommunity6.

This means that snmpd did not understand you config, and accordingly it
does not support community access for IPv6.

Are you sure you are running the version compiled with --enable-ipv6?

What other config options did you use?

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: [SCM] Net-SNMP branch master updated. v5.7.3-2342-gbe94477

2018-01-11 Thread Niels Baggesen via Net-snmp-coders
On Fri, Dec 15, 2017 at 09:28:37PM +, Robert Story via Net-snmp-cvs wrote:
> commit 9e49de2e03b18ceb1b7cba2e715ad6180f394815
> Author: Robert Story <rst...@freesnmp.com>
> Date:   Thu Dec 14 11:53:13 2017 -0500
> 
> NEWS: snmplib: AES-192/AES-256 compatibility with SNMP Research / CISCO
> 
> - they use key localization algorithm from 
> draft-reeder-snmpv3-usm-3desede-00
>   instead of the Blumenthal draft
> 
> Also:
> - configure option to enable larger AES key length code
> - localized key extension via blumenthal and reeder method

Was it intentional that this silently changed our autoconf requirement
from 2.68 to 2.69?

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers  --  R W Hamming

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: use of various SET macros in mib2c generated files

2017-05-22 Thread Niels Baggesen
On Mon, May 22, 2017 at 05:01:52PM +0530, deepak.sachan deepak.sachan wrote:
> There are various SET macros like MODE_SET_RESERVE1, MODE_SET_RESERVE2,
> MODE_SET_UNDO in my generated file .
> I have implemented only MODE_SET_COMMIT for setinng values . What 
> is use of others??. Are they helpful to set values permanently.??

These are intended for data validation.
See http://www.net-snmp.org/wiki/index.php/Agent_Modes#SET_RESERVE1

To set values permanently (that is, in the net-snmp.conf file for reload
after restartint the agent) you must create a callback function to be
called then the agent shuts down.

A relatively simple example of saving and loading can be found for
pauthtrapenable in

agent/mibgroup/mibII/snmp_mib.c
agent/agent_read_config.c
agent/agent_trap.c

/Niels

-- 
Niels Baggesen -- @home -- Århus -- Denmark -- n...@users.sourceforge.net
The purpose of computing is insight, not numbers  --  R W Hamming

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: net-snmp-version5.4.1:::Logging option in snmpd.conf

2016-09-12 Thread Niels Baggesen
Den 01-09-2016 kl. 09:15 skrev Manjula B.R.:
> In snmpd.conf following lines have been added for logging into a file
> /mnt/jffs2/conf/snmpd.log
> #Logging specifications 
> logging /mnt/jffs2/conf/snmpd.log enabled
> logging level=2 size=10

This does not look like any logging options that Net-SNMP understands.
Have you read "man snmpcmd"?

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Cross-Post: Snmptranslate doesn't show full MIB-Tree on equal Systems | Machines

2016-09-12 Thread Niels Baggesen
Den 12-09-2016 kl. 09:41 skrev venerabl...@googlemail.com:
> Hi,
> 
> Sorry for late response, I'm on vacation.
> 
> At the attatched you can find the files. (I do not want to post it, because 
> there really long)

>From the debug I can see differences in the mib files detected:

--- mib-80.txt  2016-09-12 21:22:25.391857064 +0200
+++ mib-81.txt  2016-09-12 21:22:15.131982801 +0200
@@ -1507,7 +1507,6 @@
 /usr/share/mibs/EGENERA-MIB
 /usr/share/mibs/EM4513-MIB
 /usr/share/mibs/ENERGY-OBJECT-MIB
-/usr/share/mibs/ENTITY-MIB
 /usr/share/mibs/ENTITY-SENSOR-MIB
 /usr/share/mibs/ENTITY-STATE-MIB
 /usr/share/mibs/ENTITY-STATE-TC-MIB
@@ -1737,11 +1736,14 @@
 /usr/share/mibs/LINK-INCIDENT-MIB
 /usr/share/mibs/LISP-MIB
 /usr/share/mibs/LLDP-EXT-DCBX-MIB
+/usr/share/mibs/LLDP-EXT-DOT1-EVB-EXTENSIONS-MIB
 /usr/share/mibs/LLDP-EXT-DOT1-MIB
+/usr/share/mibs/LLDP-EXT-DOT1-V2-MIB
 /usr/share/mibs/LLDP-EXT-DOT3-MIB
 /usr/share/mibs/LLDP-EXT-MED-MIB
 /usr/share/mibs/LLDP-MIB
-/usr/share/mibs/LLDP-V2-MIB
 /usr/share/mibs/LLDP-V2-TC-MIB
 /usr/share/mibs/LMP-MIB


What version of Net-SNMP are you using?

The parser tries to optimize which files to scan by creating an index of
which mibs are in which files.

There are a couple pre-requisites for this to work, because it requires
the time-stamp of the index file to be comparable with the modification
date of the mib directory.

Older versions keep the index in the file .index kept in the directory,
current version keeps the directory in the persistent directory of the
program. If the index seems newer than the directory it will be trusted,
so this may be the problem you see.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Cross-Post: Snmptranslate doesn't show full MIB-Tree on equal Systems | Machines

2016-09-04 Thread Niels Baggesen
Den 04-09-2016 kl. 18:29 skrev venerabl...@googlemail.com:
> Yes, I have, and some MIB files were not 
> loaded.server1/usr/share/mibs/ENTITY-MIB/usr/share/mibs/LLDP-EXT-DOT1-EVB-EXTENSIONS-MIB/usr/share/mibs/ENTITY-MIB.../usr/share/mibs/LLDP-EXT-DOT1-EVB-EXTENSIONS-MIB...server2/usr/share/mibs/DOCS-IF-M-CMTS-MIB/usr/share/mibs/IF-MIB/usr/share/mibs/DOCS-IF-M-CMTS-MIB.../usr/share/mibs/IF-MIB...Only,
>  why?
> 
> The config files are equal.

Woukd you mind posting your snmp.conf and the output from snmptranslate
-Dparse-mibs

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Cross-Post: Snmptranslate doesn't show full MIB-Tree on equal Systems | Machines

2016-08-31 Thread Niels Baggesen
Den 02-08-2016 kl. 15:52 skrev venerabl...@googlemail.com:
> Hello,
>  
> Maybe someone has an idea why snmptanslate doesn't show the full MIB tree on 
> equal configured machnies, and
> how it could be solved.
>  
> https://sourceforge.net/p/net-snmp/mailman/message/35255038/

I dont follow the -users list, and it has been vacation time, sorry ...

Have you tried to add -Dparse-mibs to snmptranslate, to learn what files
it finds and tries to parse?

You don't have any conflicting snmp.conf files?

I have never seen such a problem.

/Niels

-- 
Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net
The purpose of computing is insight, not numbers  --  R W Hamming

--
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Facing SNMPV3 Build issues

2016-08-31 Thread Niels Baggesen
Den 31-08-2016 kl. 16:00 skrev renjini ravi:
> Hi Team,
> 
> I am trying to build NetSNMP 5.7.2 for SNMPV3 with external openSSL. My
> Configure looks like  this
> 
> ./configure --prefix=/opt/mysnmp\
> --enable-shared --enable-reentrant\
> --with-mib-modules="agentx host/hr_system agentx/master" \
> --with-openssl=/usr/local/ssl  
>  \
> --enable-ucd-snmp-compatibility   \
> --with-default-snmp-version=2 \
> --enable-ipv6 --with-transports="UDP UDPIPv6 TCP TCPIPv6" \
> --disable-embedded-perl  --without-perl-modules   \
> ; 
> Configuration logs looks like below & configure is failing.
> 
> 
> checking for nlist... no
> checking for nlist64... no
> checking for knlist... no
> checking for potential embedded Perl support... disabled
> checking if we can install the Perl modules... no
> checking if we should install the python bindings... no
> checking for authentication support... configure: error: Asked to use
> OpenSSL but I couldn't find it.

Have you looked into config.log for a possible explanation?
Are the headers in /usr/local/openssl/include/ and the library in
/usr/local/openssl/lib/

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Octet Strings returned from pass persist scripts?

2016-08-30 Thread Niels Baggesen
On Mon, Aug 22, 2016 at 06:09:03PM -0400, Sam Tannous wrote:
> Thanks, Bill.   It does work as expected.
> 
> I submitted a patch to fix the man page snmpd.conf
> in V5-7-patches (#1334).
> 
> https://sourceforge.net/p/net-snmp/patches/1334/

Thanks. I have applied the patch for 5-4-patches and up.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: SNMP Trap Receiver

2016-07-25 Thread Niels Baggesen
Den 25-07-2016 kl. 14:57 skrev Krishnaraj:
> Dear Coders,
>
> I am working on a SNMP manager application in linux. I could understand
> the mechanism of GET, SET requests from the sample apps. However the
> mechanism of TRAP receiver is quite complex. I unable to understand it
> and could not find much references on its working. My idea is to use
> some API to build my own trap receiver rather than using snmptrapd. Is
> that really possible ? Will you guys be able to help me on this. If API
> is not available, whether somebody could brief me the necessary steps so
> that I could start digging myself towards the implementation.

Of course it is possible, otherwise there would not be an snmptrapd app :-)

But what do you mean when you talk about an API?

What you do need to do is to open a session, and add snmp_input as a
callback to it, and then you can trim the rest of snmptrapd away, and do
what ever you want to do inside snmp_input.

/Niels


-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Regarding ASN1 parser/Compiler

2016-07-18 Thread Niels Baggesen
Den 18-07-2016 kl. 12:36 skrev Pavan Tatavarthi:
> Dear members,
> 
> I have a query regarding the ASN1 related module.
> Does Net-SNMP use ASN1 compiled code from the Objective Systems ASN1 compiler 
> ?

No, the parsers are handwritten

/Niels

-- 
Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net
Kristtornvej 19, 8200 Aarhus N, Denmark -- 8610 1890 -- 2425 9384
The purpose of computing is insight, not numbers  --  R W Hamming

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: SNMP v3 and v2

2016-06-29 Thread Niels Baggesen
Den 27-06-2016 kl. 12:27 skrev Pranesh Kulkarni:
> Hi All,
> 
> I have the existence  code for SNMP v3 agent generated with mib2c . Can
> the same code used for V3.

Yes, the same agent code is used for all SNMP protocol versions. The
only difference is that SNMP v1 cannot return a Counter64 object.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Building Net-Snmp 5.7.3 on QNX650 (x86_64)

2016-04-25 Thread Niels Baggesen
Den 22-04-2016 kl. 17:30 skrev Ian C:
> 
> I'm attempting to build the 5.7.3 source on QNX 650 and getting the
> following error which I hope someone could shed some light on:
> 
> libtool: compile:  gcc -I../../include -I. -I../../agent
> -I../../agent/mibgroup -I../../snmplib -fno-strict-aliasing -g -O2 -Unto
> -Dnto=nto -U__STRICT_ANSI__ -fno-strict-aliasing -pipe
> -I/usr/pkg/lib/perl5/5.14.0/x86pc-nto/CORE -c mibII/ipAddr.c  -fPIC -s
> hared -DPIC -o mibII/.libs/ipAddr.o
> mibII/ipAddr.c: In function 'var_ipAddrEntry':
> 
> mibII/ipAddr.c:224: error: invalid operands to binary == (have 'struct
> ' and 'int')

What kind of OS does this box have? FreeBSD?

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Config failing with --with-perl-modules

2016-03-21 Thread Niels Baggesen
On Thu, Mar 17, 2016 at 04:41:33PM -0400, Tom Tatakis wrote:
> Now, this is how I got here.  I am running on a Linux FC-23 VM.
> As I said I am trying to implement the SIP mibs- I am a newbie in this
> arena. I wanted to run mib2c on the MIB file so I installed net-snmp-perl
> package using 'dnf install net-snmp-perl'
> I noticed that not everything was where I expected it in /usr/local so I
> downloaded the net-snmp package to get everything.

The Fedora packages do not put anythin into /use/local, that is for your
local products. You will find the mibs in /usr/share/snmp/mibs.

When you say you downloaded then net-snmp package, what du you then
mean? The Fedora source package? A Net-SNMP tar ball?

> I ran ./configure with
> no parameters and then make, followed by make install.  Everything went
> fine.  I copied the necessary mib files to /usr/local/share/snmp/mibs and I
> was successful in getting snmptranslate to run using an OID in SIP-UA-MIB.
> I then went to mib2c but that told me the same OID I specified in the
> snmptranslate command was not found.  In particular it's
> the sipUACfgServerTable OID.  I tried mib2c with mib2s.mfd.conf and
> mib2c.iterate.conf but get the same results.

What command(s) exactly did you use for snmptranslate and mib2c?

> I then tried
> env MIBS="+SIP-UA-MIB" mib2c -c mib2c.mfd.conf sipUACfgServerTable and got
> the same results but it showed me the search path it was using and
> /usr/local/share/snmp/mibs was not included.  I even tried the -I option to
> mib2c but that didn't help either.

The -I option to mib2c is about finding the mib2c.*.conf files. The set
the mib search patch you must use the MIBDIRS envitronment variable, or
the mibdirs parameter in an snmp.conf file.

Are you sure that when you started installing your locally compiled
version, that you had removed any traces of your distributions net-snmp
packages?

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351=/4140
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Unresolved hostname

2016-03-18 Thread Niels Baggesen
On Thu, Mar 17, 2016 at 01:03:07PM +0200, Ruth Glushkin wrote:
> but when I run agent(s), I got the following error:
> 
> cannot resolve source hostname
> 
> 
> If I remove the port from config file and run agent, it works.
> 
> How could I set different ports for agents?

You use the agentaddress parameter to set the IP address and port
number.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Net SNMP Trap

2016-02-23 Thread Niels Baggesen
Den 23-02-2016 kl. 13:37 skrev Anivesh Pandeya:
> 
>   How to generate a automated trap for linkup and linkdown for
>   snmpv2c?? <mailto:pandeyaaniv...@gmail.com>
> 
> OS : RHEL4 Thin Client
> SNMP : NET-SNMP- 5.1.2

Any good reason for being stuck with such an outsated system?

> SNMPv3 is not implemented.

Implemented or compiled in?

You need SNMPv3 support in the agent to do that. Then read up on
linkUpDownNotifications in snmpd.conf

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: error running make on mac osx 10.11.3 - hardware/memory/memory_freebsd.c:12:10: fatal error: 'kvm.h' file not found

2016-02-23 Thread Niels Baggesen
Den 15-02-2016 kl. 20:55 skrev Dave Karokkae:
> 
> Hi,
> I was hoping an expert here can help me in the right direction, either a
> configure flag to avoid kvh, or a fix in the code ?
> 
> BACKGROUND:
> 
> I was able to configure using these flags:
> # ./configure --with-persistent-directory=/var/db/net-snmp \
> --with-defaults \
> --without-rpm \
> --with-mib-modules="host ucd-snmp/diskio" \
> --with-out-mib-modules="mibII/icmp host/hr_swrun" \
> --without-kmem-usage

Any reason you are not using 5.7.3? There were a number of fixes for
Darwin in that release. It might even allow you to drop those
--with-out-mib-modules options :-)

/Niels


-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: API to know MTU size

2015-11-23 Thread Niels Baggesen
Den 04-11-2015 kl. 05:51 skrev AR, Giridhar:
> Do we have an API to know the MTU size of an interface of both client
> and server?

No, and I fail to see what it can be used for. PMTU might make sense,
but it is hard to find, and might be varying from patcket to packet,

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551=/4140
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Patch for CVE-2015-5621 in 5.7.1 code base

2015-09-01 Thread Niels Baggesen
On Mon, Aug 31, 2015 at 11:22:35AM -0700, Sampathkumar Santhanakrishnan wrote:
> Hi Alex,
>  Thanks for sharing this info. I tried to get the diff and it
> complains about "V5-7-patches".

This works:

git diff 345b9633ea4df23b863cba5defe5187d81fc505d^ 
345b9633ea4df23b863cba5defe5187d81fc505d >patch

Here is the patch

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming
diff --git a/snmplib/snmp_api.c b/snmplib/snmp_api.c
index d0a4021..7f746bb 100644
--- a/snmplib/snmp_api.c
+++ b/snmplib/snmp_api.c
@@ -4352,10 +4352,9 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * 
length)
 u_char  type;
 u_char  msg_type;
 u_char *var_val;
-int badtype = 0;
 size_t  len;
 size_t  four;
-netsnmp_variable_list *vp = NULL;
+netsnmp_variable_list *vp = NULL, *vplast = NULL;
 oid objid[MAX_OID_LEN];
 u_char *p;
 
@@ -4495,38 +4494,24 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t 
* length)
   (ASN_SEQUENCE | ASN_CONSTRUCTOR),
   "varbinds");
 if (data == NULL)
-return -1;
+goto fail;
 
 /*
  * get each varBind sequence 
  */
 while ((int) *length > 0) {
-netsnmp_variable_list *vptemp;
-vptemp = (netsnmp_variable_list *) malloc(sizeof(*vptemp));
-if (NULL == vptemp) {
-return -1;
-}
-if (NULL == vp) {
-pdu->variables = vptemp;
-} else {
-vp->next_variable = vptemp;
-}
-vp = vptemp;
+vp = SNMP_MALLOC_TYPEDEF(netsnmp_variable_list);
+if (NULL == vp)
+goto fail;
 
-vp->next_variable = NULL;
-vp->val.string = NULL;
 vp->name_length = MAX_OID_LEN;
-vp->name = NULL;
-vp->index = 0;
-vp->data = NULL;
-vp->dataFreeHook = NULL;
 DEBUGDUMPSECTION("recv", "VarBind");
 data = snmp_parse_var_op(data, objid, >name_length, >type,
  >val_len, _val, length);
 if (data == NULL)
-return -1;
+goto fail;
 if (snmp_set_var_objid(vp, objid, vp->name_length))
-return -1;
+goto fail;
 
 len = MAX_PACKET_LENGTH;
 DEBUGDUMPHEADER("recv", "Value");
@@ -4606,7 +4591,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * 
length)
 vp->val.string = (u_char *) malloc(vp->val_len);
 }
 if (vp->val.string == NULL) {
-return -1;
+goto fail;
 }
 p = asn_parse_string(var_val, , >type, vp->val.string,
  >val_len);
@@ -4621,7 +4606,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * 
length)
 vp->val_len *= sizeof(oid);
 vp->val.objid = (oid *) malloc(vp->val_len);
 if (vp->val.objid == NULL) {
-return -1;
+goto fail;
 }
 memmove(vp->val.objid, objid, vp->val_len);
 break;
@@ -4633,7 +4618,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * 
length)
 case ASN_BIT_STR:
 vp->val.bitstring = (u_char *) malloc(vp->val_len);
 if (vp->val.bitstring == NULL) {
-return -1;
+goto fail;
 }
 p = asn_parse_bitstring(var_val, , >type,
 vp->val.bitstring, >val_len);
@@ -4642,12 +4627,28 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t 
* length)
 break;
 default:
 snmp_log(LOG_ERR, "bad type returned (%x)\n", vp->type);
-badtype = -1;
+goto fail;
 break;
 }
 DEBUGINDENTADD(-4);
+
+if (NULL == vplast) {
+pdu->variables = vp;
+} else {
+vplast->next_variable = vp;
+}
+vplast = vp;
+vp = NULL;
 }
-return badtype;
+return 0;
+
+  fail:
+DEBUGMSGTL(("recv", "error while parsing VarBindList\n"));
+/** if we were parsing a var, remove it from the pdu and free it */
+if (vp)
+snmp_free_var(vp);
+
+return -1;
 }
 
 /*
--
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Integer64 for UCD-SNMP-MIB::Memory

2015-07-13 Thread Niels Baggesen
Den 16-05-2015 kl. 12:29 skrev Philipp Helo Rehs:
 Hello,
 i am running NetSNMP (version 5.5 Redhat 6.6) on a big shared memory
 system by SGI (UV2000 with 8 TB ram) but the memory counters of
 UCD-SNMP-MIB are just 32bit so it is not possible to get correct results.

Thanks for raising this. I have created a patch for this, and as I do
not have the HW to test this, I hope you will test it for me :-)

Please see https://sourceforge.net/p/net-snmp/patches/1305/

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: SNMPd reports high memory usage by adding buffers+cache

2015-06-15 Thread Niels Baggesen
On Sat, Jun 13, 2015 at 04:02:01PM -, Himanshu  Pandey wrote:
 Hi Friends,
 Our SNMPd service reports memory usage including buffers+cache, and
 the result is always high because kernel uses all available memory to
 speed up disk reads. Buffers+cache can be freed by kernel whenever
 applications needs it.Is this the behaviour of our SNMPd memory usage
 reporting.Please explain and clarify.

We return exactly the same basic numbers as the standard Linus free
command, and that is the best we can do.
It is then up to you to interpret these numbers, possibly by adding
buffers and cached to free, but we give you the needed numbers.

From my own server:

[nba@server nba]$ snmpwalk localhost memory
UCD-SNMP-MIB::memIndex.0 = INTEGER: 0
UCD-SNMP-MIB::memErrorName.0 = STRING: swap
UCD-SNMP-MIB::memTotalSwap.0 = INTEGER: 6078460 kB
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 5819652 kB
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 3835236 kB
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 720412 kB
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 6540064 kB
UCD-SNMP-MIB::memMinimumSwap.0 = INTEGER: 16000 kB
UCD-SNMP-MIB::memShared.0 = INTEGER: 44504 kB
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 409828 kB
UCD-SNMP-MIB::memCached.0 = INTEGER: 575148 kB
UCD-SNMP-MIB::memSwapError.0 = INTEGER: noError(0)
UCD-SNMP-MIB::memSwapErrorMsg.0 = STRING: 
[nba@server nba]$ free
 total   used   free sharedbuffers cached
Mem:   38352363112304 722932  44512 409836 576300
-/+ buffers/cache:21261681709068
Swap:  6078460 2587845819676

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: potential socket leak in ipaddress_linux

2015-05-11 Thread Niels Baggesen
Den 04-05-2015 kl. 04:44 skrev Pete Flugstad:
 In the function netsnmp_access_other_info_get, a netlink socket is
 created to communicate with the kernel.  However, all the error cases in
 the function neglect to close the socket, so if any of those errors are
 ever hit, the socket will leak.

Thanks for the note! This has now been fixed for the 5.6branch and newer.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: bug report in route_linux.c

2015-05-11 Thread Niels Baggesen
Den 04-05-2015 kl. 04:42 skrev Pete Flugstad:
 In Net-SNMP 5.7.3, the file
 agent/mibgroup/ip-forward-mib/data_access/route_linux.c, the function
 _load_ipv6 opens /proc/net/ipv6_route and processes it's contents.

 Immediately after opening the code does:

  fgets(line,sizeof(line),in); /* skip header */

 However, in my version of linux (3.16.0), there is no header line on
 this file, so this line discards the first entry in that file.

Thanks for the note! This has been for fixed for the 5.5 branch and newer.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: bug report in systemstats_linux.c

2015-05-11 Thread Niels Baggesen
Den 04-05-2015 kl. 04:41 skrev Pete Flugstad:
 In systemstats_linux.c, in systemstats_v6_load_file, while parsing
 /proc/net/snmp6, two lines are confused:

 Ip6InNoECTPkts  14583
 Ip6InNoRoutes 0

 However, when Ip6InNoECTPkts is encountered in , it is interpreted as
 IpInNoRoutes, which shows up when the agent is walked:

Thanks for the note! This has been fixed for the 5.5 branch and newer.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Adding ZFS support in host resources mib under Linux

2015-03-20 Thread Niels Baggesen
On Fri, Mar 20, 2015 at 09:43:18AM +1100, Ceralena Davies wrote:
 At my workplace we use net-snmp heavily.

Good :-)

 We have number of Linux systems running ZFS using zfsonlinux [1].
 Unfortunately we don't get storage monitoring on its mounts out of the box
 at the moment.
 
 I also noticed that EXT4 and BTRFS don't seem to be supported - at least
 not based on this code from agent/mibgroup/host/hr_filesys.c:

You didn't tell us which version, but for 5.5 and newer it would be
agent/mibgroup/hardware/fsys/fsys_mntent.c that needs mending, and the
current 5.7.3 release altready has this in place.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: network interface/address API on FreeBSD

2015-03-04 Thread Niels Baggesen
Den 04-03-2015 kl. 10:17 skrev Gleb Smirnoff:
 I see, you use { CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, 0 };

 I'd suggest to use getifaddrs(3), it uses more modern sysctl
 NET_RT_IFLISTL, note the L at end. And the library function
 takes the burden of parsing the stuff.

That looks interesting. I will give it try:-)

 Is it possible to disable compilation of deprecated IPV6-MIB implementation
 at compile time? It could be that would be just the right solution for
 future FreeBSD versions, instead of putting yet another ifdef into this
 awful pile of ifdefs, that I see in ipv6.c :)

./configure --with-out-mib-modules=mibII/ipv6

should do the trick

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: network interface/address API on FreeBSD

2015-03-02 Thread Niels Baggesen
Den 27-02-2015 kl. 22:22 skrev Gleb Smirnoff:
 Now time for net-snmp, which isn't piece of cake. And I'd like
 to get it done properly, and not to store a patch in FreeBSD port
 for ages, but to integrate the patch right in the main net-snmp repo.
 So, I'm asking for your help here. Waiting for a net-snmp developer
 to respond to this email, so that we can work on the problem together.

 P.S. This is doable, since native FreeBSD SNMP daemon implements
   mibII without utilizing kvm(3). :)

A lot of this changed between 5.7.2 and 5.7.3 to use sysctl interfaces.

With the current 5.7.3 release, and configured with 
--enable-mfd-rewrites, I think the only parts that uses kvm interfaces 
are the old and deprecated IPV6-MIB implementations inmibII/ipv6.c, now 
superseeded by the INET-XXX-MIB versions, and the hrSWRunTable that uses 
kvm_getargv and kvm_getprocs.

/Niels

-- 
Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net
The purpose of computing is insight, not numbers  --  R W Hamming

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: SNMPd crashing at leat once daily

2015-01-05 Thread Niels Baggesen
On Fri, Dec 12, 2014 at 02:28:38AM -0500, Nanev, Ivan (Contractor) wrote:
 Hi Coders,
 We are having issues with SNMPd crashing at least once every 24 hours.

Can you get a traceback from the crash?

 snmpd: Cannot open /proc/net/arp
 cannot open /proc/net/dev ...
 /proc/stat: Too many open files

Sounds like you are out of file descriptors. I cannot remeber to have
seen such a problem before. Can you run lsof against the running snmpd?
That might give us a hint to where the leak is.

By the way, what OS is this? Is this a version that you have compiled
yourself, and if so what arguments did you pass to configure?

I see that you run 5.7.1. Could you try with the current 5.7.3 release?

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: string as index of a table

2014-10-16 Thread Niels Baggesen
On Thu, Oct 16, 2014 at 11:04:54PM +0800, sarath azad wrote:
 I have tested it, it is feasible, but while giving the OID in snmpget,
 we needed to give the item name string index by dot separated ascii
 values of each character in the name. 
 eg. OID of the table .1.column
 no..5.65.66.67.68.69  where the item name is ABCDE. 

I wonder where this is documented :-(

If you make sure that the shell passes the quotes to the command, you
can actually do it:

snmpwalk $host  OID of table.1.column.\ABCDE\

If the index is an IMPLIED string (one without a length prefix) you must
use single quotes in stead of double quotes.

See the -OE option to snmpcmd(1)

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Error in MIB

2014-10-14 Thread Niels Baggesen
On Sat, Oct 11, 2014 at 06:00:28PM +0800, chengkeke wrote:
 I have met one issue some format in MIB can't works well for net-snmp. Could 
 you please give me any suggestion?
 
 net-snmp version is 5.5.
 
 IF-Name_VLAN-ID_ESSID_AP-Model_AP-Name_AP-MAC(1) does not works for 
 net-snmp.
 
 Here is the error when do snmpget or snmpwork:
 snmpwalk -v 2c -c private -t 20 -r 3 192.168.0.118 XXX-MIB::XXXWLANName
 Expected ( (_): At line 363 in 
 /home/dave/qaauto/mibs/ap_mib/mibs/XXX-WLAN-MIB.txt

The character '_' is not allowed in labels (identifiers) in mibs,

See the -Pu option in snmpcmd(1)

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Duplicate registration of module

2014-09-08 Thread Niels Baggesen
On Mon, Sep 08, 2014 at 04:16:11PM +0530, Nikesh Kumar Mahalka wrote:
 I am running snmp agent like:
 sudo /home/vedams/netsnmp_build/sbin/snmpd -c
 /home/vedams/netsnmp_build/share/snmp/snmpd.conf -DserialNumber
 
 Below is log of /var/log/snmpd.log:
 serialNumber: Initializing
 serialNumber: Initializing
 duplicate registration: MIB modules serialNumber and serialNumber (oid
 .1.3.6.1.3.98.1.2.0).
 NET-SNMP version 5.7.2.1
 
 
 Why this duplicate registration is coming?
 I have attached all files what i am using.

It it probably reading your config twice, both as a default, and because
you specified it explicitly.

Try adding -C to your snmpd invocation (or leave out the -c
/snmpd.conf)

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: A problem about develop new oid

2014-08-19 Thread Niels Baggesen
Den 20-08-2014 kl. 02:57 skrev L'oiseau de mer:
  case MODE_SET_ACTION:
  strncpy(A, requests-requestvb-val.string,
  sizeof(A));
  A[sizeof(A)-1]='\0';

A SNMP string is not a 0-terminated C string. You must respect (and 
save) the length of the string passed in the request (requestvb-val_len).

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: building 5.7.2.1 or 5.6.2.1 on net-bsd gives undefined reference errors for libnetsnmp.so

2014-08-18 Thread Niels Baggesen
Den 16-08-2014 kl. 16:20 skrev clearc...@lycos.com:
 Hello,

 I am trying to build net-snmp on netbsd-6.1_RC4 and have tried both
 net-snmp-5.7.2.1 and net-snmp-5.6.2.1 and am getting the same error from
 make in both: undefined references to netbsd_read_ip_stat,
 netbsd_read_icmp_stat, netbsd_read_tcp_stat, and netbsd_read_udp_stat in
 libnetsnmp.so. I have just been doing the normal ./configure and make. I
 also did a nm -u on libnetsnmp.so and got a long list of undefined
 references.

Do you really mean 6.1.RC4? It is more than a year old. 6.1.4 is the 
current release and has been out for 4 months!

I just downloaded the 5.7.2.1 tarball to my 6.1.4 test system, and after 
./configure --with-defaults it compiled without problems.

And yes, the .so has a large number of undefined references, but that is 
to be expected. Those are references to libc, openssl, et c.

/Niels


-- 
Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net
The purpose of computing is insight, not numbers  --  R W Hamming

--
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: net-snmp-5.4.1 Compilation Errors on --disable-mini-agent

2014-07-03 Thread Niels Baggesen
Den 01-07-2014 kl. 13:49 skrev Laxmi Hatti -X (lhatti - HCL TECHNOLOGIES 
LIMITED at Cisco):
 Hi Leads,

 I am using net-snmp-5.4.1 library for my platform software.

The first question is of course why you are using 5.4.1 when 5.4.4 is 
out (and has been for 3 years)

 In order to use ‘ifXTable’, using –enable-mfd-rewrites. I have noticed
 that with the macro –enable-mini-agent,
 IF-MIB is not loaded. So I have disabled it by macro  –disable-mini-agent.

Are you here referring to the MIB file, or the if-mib implementation?

 Now I am facing some other compilation errors for the file:
 agent/mibgroup/mibII/at.c.

The line showing the first errors (685) is in a section protected by an 
#ifdef linux conditional, so this should never have been seen by the 
compiler, given that you have -Dlinux on the compiler invocation.

Are you sure your local patches are not doing anything bad to the source?

/Niels

-- 
Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net
The purpose of computing is insight, not numbers  --  R W Hamming

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Need help loading and traversing MIBs

2014-05-21 Thread Niels Baggesen
Den 14-05-2014 12:05, Odiee47 . skrev:

 When trying to print_mib to file the program then fails.

 Any ideas what I did wrong here?

Please elaborate fails. How does it fail? How much did it write to 
test.txt? Did it even create the file (you should check the return value 
from fopen)

When I tried it I got almost 120.000 lines of output.

/Niels

-- 
Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net
The purpose of computing is insight, not numbers  --  R W Hamming

--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Linking with openssl 1.0.1g

2014-05-19 Thread Niels Baggesen
Den 15-05-2014 21:27, Richard Phillips skrev:
 I am trying to build libnetsnmp, libnetsnmpagent and libnetsnmpmibs on a
 RHEL 5.10 platform using OpenSSL version 1.0.1g libraries previously
 compiled on the same platform.

What is the actual location of the OpenSSL libraries and include files 
(full path)?

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: all connections are refused except SNMP queries

2014-05-06 Thread Niels Baggesen
Den 06-05-2014 16:02, linda zhu skrev:
 Only one thread, and make dont_fork to 1.

Please reply to the list to keep everyone in the loop - there are more 
wizards than me out there :-)

If yo9ur response here means that you have taken the complete main 
program and made that into a thread, then you should look at the first 
20 or so lines of the main function and notice that it will close any 
file descriptor available, which will include any socket that you may 
have already opened.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
#149; 3 signs your SCM is hindering your productivity
#149; Requirements for releasing software faster
#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: all connections are refused except SNMP queries

2014-05-05 Thread Niels Baggesen
Den 30-04-2014 17:57, linda zhu skrev:
 This is a work around solution. I still don't know why snmp agent
 shutdown all the other open sockets. If you find the reason, please let
 me know.

How much of snmpd.c did you clone into your thread code? The main part 
will start by closing all open file descriptors except std-in/out/err.

/Niels
-- 
Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net
The purpose of computing is insight, not numbers  --  R W Hamming

--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
#149; 3 signs your SCM is hindering your productivity
#149; Requirements for releasing software faster
#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Why snmpd does not response to its requests

2014-05-05 Thread Niels Baggesen
Den 18-04-2014 13:04, Yasir hussan skrev:
 I am relatively new in snmp development, i am successfully able to
 compile and install NET-SNMP version 5.3.1 in my firmware,

 i able to receive requests from snmp-client, but i don't know why my
 server send back response, here is my log...

Why are you using such an old version?

Did you configure access control in snmpd.conf?

/Niels

-- 
Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net
The purpose of computing is insight, not numbers  --  R W Hamming

--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
#149; 3 signs your SCM is hindering your productivity
#149; Requirements for releasing software faster
#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: sprint_realloc_hexstring with no line breaks

2014-04-28 Thread Niels Baggesen
Den 28-04-2014 18:29, Eugenio Pérez skrev:
 I wanted to avoid innecesaries copies of buffer or calls to malloc
 system. I've noticed that, if I set NETSNMP_DS_LIB_HEX_OUTPUT_LENGTH to
 0 at the beginning of the program, it works the way I want.

Of course! I should have thought about 0 meaning unlimited.

 By the way, I am writing a plugin to send trap output to Apache Kafka.
 Where I should send the pull request? Do I need to have a sourceforge
 account or I could send it to a mail?

I think that there is some fork/pull functionality built into 
sourceforge, but it seems that sourceforge is having problems at the 
moment :-(

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: sprint_realloc_hexstring with no line breaks

2014-04-26 Thread Niels Baggesen
Den 25-04-2014 10:15, Eugenio Pérez skrev:
 At the moment, I'm using:
 netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_HEX_OUTPUT_LENGTH, 
 2048);
 At the first of my program. However, this forces me to alloc a huge
 memory foreach line,

Yes and no. Nothing keeps you from realloc'ing it down to its actual 
size after the formatting.

 Is there another function or something I can use to achieve that?

Currently no. We could create yet another option to keep it from adding 
the newline, or you could squeeze them out after call to format_trap / 
format_hexstring

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Strategy recommendation

2014-04-22 Thread Niels Baggesen
Den 19-03-2014 17:12, Highend-Digital Post skrev:
 My general idea is to use asynchroneous SNMP_MSG_GETBULK requests which
 were restarted from within the handler after all previous data is
 processed.

I would question whether GETBULK is the right approach, but that depends 
very much on the locality of the OIDs that you are going to query? A 
straight GET might be a better approach.

 -  Is the general idea correct or might the system run into performance
 problems with this amount of data?

That should mostly depend on the agents that you are querying, but in 
general I would not expect any problems.

 Currently I work with the 'standard' version (-5.4.3) of net-snmp under
 Debian Wheezy.

 - Is there a need to upgrade to a newer version (to gain new
 functionality or better performance) ?

No.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Error in packet. Reason: Unknown Error with snmpwalk

2014-04-22 Thread Niels Baggesen
Den 15-04-2014 19:35, Gefei Jiang skrev:
 PS:   Below is my captures for both version:

 5.7.2.1 version:

 [gjiang@Gefei-PC ~]$ snmpwalk -v 2c -c myCode 10.219.101.161
 NETOPTICS-MIB-DIRECTOR::ntpTable
 NETOPTICS-MIB-DIRECTOR::ntpIndex.0.0 = INTEGER: 0
 NETOPTICS-MIB-DIRECTOR::ntpAction.0.0 = INTEGER: default(0)
 NETOPTICS-MIB-DIRECTOR::ntpAdmin.0.0 = INTEGER: enabled(1)
 NETOPTICS-MIB-DIRECTOR::ntpSrvrIp.0.0 = IpAddress: 10.30.1.15
 NETOPTICS-MIB-DIRECTOR::ntpDst.0.0 = INTEGER: on(1)
 NETOPTICS-MIB-DIRECTOR::ntpTimezone.0.0 = STRING: New_York
 NETOPTICS-MIB-DIRECTOR::ntpSrvrIpv6.0.0 = STRING:
 Error in packet.
 Reason: Unknown Error

Is the agent you query based on Net-SNMP?

What do you see if you run snmpwalk -d -Ddump -v 2c 

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Core dump on Sun 5.10 in udpTable.c

2014-04-22 Thread Niels Baggesen
Den 31-03-2014 16:05, Brian Platt skrev:
 Cores being created on a Sun O/S 5.10 server:

 Below is info that maybe helpful.  If a different version should be used
 please advise.

What version of Net-SNMP?

You might want to try the 5.7.3 pre-release, which is supposed to fix 
problems with (too) many entries in various tables on Solaris.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Sending snmp traps to a broadcast ip

2014-04-22 Thread Niels Baggesen
Den 25-03-2014 02:41, oscar sumano skrev:
 I’m trying to send out snmp to a broadcast ip but i get the following
 error message.

 snmptrap: Failure in sendto (Permission denied)

You probably need to be root to send to a broadcast address.

 snmptrap -v 2c -c public 192.168.2.255   IF-MIB::linkUp
 .iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOperStatus.1 i 1

This may or may not work. SNMP is not supposed to be used with broadcast

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Building net-snmp for HP-UX

2014-04-22 Thread Niels Baggesen
Den 17-04-2014 16:34, Joel Hansell skrev:
 Yes, the Ixnet solved it. Now we get non-null addresses for the sender
 IP out of rcvfrom.

 So I guess this build issue is solved. Might I suggest this to be added
 to the README.hpux11 in the future?

I would rather do something to configure to do it automatically.

Would you be willing to try it out, if I create an updated configure script?

 However, we still ran into bug 2010, which seems to be long outstanding.
 http://sourceforge.net/p/net-snmp/bugs/2010/

 Back to the drawing board it was. In the end, we stuck with the older
 5.4.1 version, before bug 2010 was introduced, which solved our problem.

I dont understand what you the might see, could you be more specific?

With the current 5.7.3 pre-release I see

1398197847 2014-04-22 22:17:27 Received event 0 10.0.0.2 (via 
[UDP:[127.0.0.1]:51011-[127.0.0.1]:162];

This looks like that bug is fixed.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Building net-snmp for HP-UX

2014-04-02 Thread Niels Baggesen
On Mon, Mar 31, 2014 at 09:57:44PM +0200, Niels Baggesen wrote:
 Den 31-03-2014 08:34, Niels Baggesen skrev:
  On Fri, Mar 28, 2014 at 02:02:08PM +0100, Joel Hansell wrote:
  No luck there either, I'm afraid. Same old depressing output after
  replacing that line and re-compiling.
  (Used host name in the snmpTrapdAddr directive, this time, same result as
  with ip address.)
 
  It was ua bit of a long shot :-) It might even be that it does not take
  that code path ...
 
 OK, according to the config it should take that path 
 
 Here is an extended patch, with some more debug. Could you try that?

And then another thought ... googling around for similar problems,
reveals a library called xnet that might be needed in HP-UX.

You might try with --with-libs=-lxnet added to configure.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Building net-snmp for HP-UX

2014-03-31 Thread Niels Baggesen
On Fri, Mar 28, 2014 at 02:02:08PM +0100, Joel Hansell wrote:
 No luck there either, I'm afraid. Same old depressing output after
 replacing that line and re-compiling.
 (Used host name in the snmpTrapdAddr directive, this time, same result as
 with ip address.)

It was ua bit of a long shot :-) It might even be that it does not take
that code path ...

Could you post the generated net-snmp-config.h, and I will try to give
it some more thought tonight.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Building net-snmp for HP-UX

2014-03-31 Thread Niels Baggesen
Den 31-03-2014 08:34, Niels Baggesen skrev:
 On Fri, Mar 28, 2014 at 02:02:08PM +0100, Joel Hansell wrote:
 No luck there either, I'm afraid. Same old depressing output after
 replacing that line and re-compiling.
 (Used host name in the snmpTrapdAddr directive, this time, same result as
 with ip address.)

 It was ua bit of a long shot :-) It might even be that it does not take
 that code path ...

OK, according to the config it should take that path 

Here is an extended patch, with some more debug. Could you try that?


diff --git a/snmplib/transports/snmpUDPBaseDomain.c 
b/snmplib/transports/snmpUDPBaseDomain.c
index 58b6fde..8618423 100644
--- a/snmplib/transports/snmpUDPBaseDomain.c
+++ b/snmplib/transports/snmpUDPBaseDomain.c
@@ -386,7 +386,7 @@ netsnmp_udpbase_recv(netsnmp_transport *t, void 
*buf, int size,
   void **opaque, int *olength)
  {
  int rc = -1;
-socklen_t   fromlen = sizeof(struct sockaddr);
+socklen_t   fromlen = sizeof(netsnmp_sockaddr_storage);
  netsnmp_indexed_addr_pair *addr_pair = NULL;
  struct sockaddr *from;

@@ -409,6 +409,12 @@ netsnmp_udpbase_recv(netsnmp_transport *t, void 
*buf, int size,
local_addr_len, 
(addr_pair-if_index));
  #else
  rc = recvfrom(t-sock, buf, size, MSG_DONTWAIT, from, 
fromlen);
+   DEBUGMSGTL((netsnmp_udp, fromlen=%d-%d, af=%d\n,
+   sizeof(netsnmp_sockaddr_storage),
+   fromlen, from-sa_family));
+   DEBUGMSGTL((netsnmp_udp, port=%hu, addr=%08lx\n,
+   ntohs(((struct sockaddr_in *)from)-sin_port),
+   (long)((struct sockaddr_in *)from)-sin_addr.s_addr));
  #endif /* netsnmp_udpbase_recvfrom_sendto_defined */
 if (rc  0  errno != EINTR) {
 break;

(even if the patchis f***ed up in the mail, it should be simple enough 
to do by hand :-)

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Building net-snmp for HP-UX

2014-03-28 Thread Niels Baggesen
On Fri, Mar 28, 2014 at 10:14:48AM +0100, Joel Hansell wrote:
 I'm not sure if you can get much out of it. As I wrote earlier, it seems
 like the recvfrom() call is the culprit, returning 0.0.0.0.
 As you can see, we're using the directive
 snmpTrapdAddr 10.0.1.10:1162

Right, there was not much new there :-(

But I got an idea anyway. Maybe this will help?

diff --git a/snmplib/transports/snmpUDPBaseDomain.c
b/snmplib/transports/snmpUDPBaseDomain.c
index 58b6fde..8497f71 100644
--- a/snmplib/transports/snmpUDPBaseDomain.c
+++ b/snmplib/transports/snmpUDPBaseDomain.c
@@ -386,7 +386,7 @@ netsnmp_udpbase_recv(netsnmp_transport *t, void
*buf, int size,
  void **opaque, int *olength)
 {
 int rc = -1;
-socklen_t   fromlen = sizeof(struct sockaddr);
+socklen_t   fromlen = sizeof(netsnmp_sockaddr_storage);
 netsnmp_indexed_addr_pair *addr_pair = NULL;
 struct sockaddr *from;


/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Building net-snmp for HP-UX

2014-03-27 Thread Niels Baggesen
Den 27-03-2014 11:01, Joel Hansell skrev:
 As to bits, our machines are 64-bit (see output below), and it seems
 that net-snmp is built as a 64-bit application.
 # uname -a
 HP-UX hostname B.11.23 U ia64 0070894574 unlimited-user license
 # getconf KERNEL_BITS
 64
 # file /stand/vmunix
 /stand/vmunix:  ELF-64 executable object file - IA64
 # file snmptrapd
 snmptrapd:  ELF-64 executable object file - IA64

 All the libs listed by ldd snmptrapd are also ELF-64 shared object
 file - IA64.

OK

  Could you maybe try building our 5.7.3 pre-release, to see if that
  helps things?

 Sure thing! Unfortunately, it doesn't seem to help. %b is still producing:
 UDP: [0.0.0.0]:0-[0.0.0.0]

:-(

  What about compiler warnings while you build. Are you drowning in
  them? Are there any that might be relevant?

 The make works flawlessly, no warnings or error. The configure script
 logs a lot of errors, but I think it's supposed to... Attaching the
 output files from configure.

Yes, the configure.log is expected to be full of warnings and errors, 
while it detects what is available and what is not on the system.

Could you try running snmptrapd with some debugging enabled, so we might 
get a hint as to where the information is lost? Try adding this to your 
snmptrapd invocation: -Dsocket,udp,netsnmp,domain,UDP,transport,tdomain
and tell us what it logs

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Building net-snmp for HP-UX

2014-03-26 Thread Niels Baggesen
Den 26-03-2014 15:32, Joel Hansell skrev:
 Now, I figured I would try to work around the logging format issue, by
 building the older (working) net-snmp 5.6.1.1 on my own, and see if I
 can patch our earlier problem some other way.
 Imagine my surprise when my build of 5.6.1.1 exhibits the same problem
 as Ata had with 5.7.2, where it logs 0.0.0.0 for both sender and
 receiver address!

My immediate suspicion would be a 32/64 bit issue. HP-UX machines are 
big-endian, right? Do they still support a mixture of 32 and 64 bit 
applications?

Could you maybe try building our 5.7.3 pre-release, to see if that helps 
things?

What about compiler warnings while you build. Are you drowning in them? 
Are there any that might be relevant?

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming


--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Problems with async

2014-03-21 Thread Niels Baggesen
On Thu, Mar 20, 2014 at 03:01:21PM +, Pentasuglia, Corey wrote:
 Thanks again for the response Niels. I hope you don't mind me throwing
 one more at you. Is there a good way to take the value/values that are
 returned and convert them into strings (if they are of different snmp
 types)? Given the example below it seems like I'd have to have a case
 statement, but is there an easier way?

man netsnmp_varbind_api

You probably want snprint_variable or snprint_value.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Problems with async

2014-03-19 Thread Niels Baggesen
Den 19-03-2014 20:27, Pentasuglia, Corey skrev:
 Say I get the system description:
 SNMPv2-MIB::sysDescr.0 = STRING: Linux system.name kernel#...so on
 How can I just retrieve what comes have STRING: and store it off in I a 
 string?

if (vars-type == ASN_OCTET_STR) {
char *str = malloc(vars-val_len+1);
memcpy(str, vars-val.string, vars-val_len);
str[vars-val_len] = '\0';
...

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Problems with async

2014-03-18 Thread Niels Baggesen
Den 17-03-2014 12:54, Pentasuglia, Corey skrev:
 Is there anything I’m missing here? This app is in c++, so the callback
 is the only method that is declared with extern “C”. If this is
 incorrect please let me know. I am not setting the void*, because I
 don’t need to send any data to the callback. As a starting point I have
 a debug point on the callback method that doesn’t get hit. The
 snmp_async_send does not show any errors being sent.

What is there looks OK, but I am missing the select loop that detects 
that responses have been received and calls snmp_read to handle them?

Have you checked with tcpdump/wireshark that the packets are flowing?

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: omsnmp plugging creates authentication problem on SNMP receiver side.

2014-03-14 Thread Niels Baggesen
Den 11-03-2014 15:02, VIPUL PRAJAPATI skrev:
 Currently i am using rsyslog 7.6.0 build packge and doing implementation
 for to transfer all the syslog messages to the SNMP listener as a SNMP
 trap messages. for that i compiled and configured all the parameters and
 set one destination IP as a SNMP listener. my actual problem is when i
 run my binary on client and see the trap on manager side, its showing a
 error messages containing authentication error even OMSNMP only permits
 SNMP V1 0r SNMP V2C. so give me your valuable suggestion so that i can
 solve my problem ASAP.

This is a volunteer driven service, so ASAP is not an option!

What exactly is the error you see? Is the problem authentication of the 
trap, or a trap caused by some other access to the SNMP daemon?

Even though you use V1 or V2c the trapreceiver can validate the 
community and sending host.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: change required in man page for snmptrapd.conf

2014-03-10 Thread Niels Baggesen
Den 03-03-2014 06:30, Mohan Gorai skrev:
 But the actual output is like below.
 Host: hostname***  (UDP: [xx.xx.xx.xx]:xxx)
 DISMAN-EVENT-MIB::sysUpTimeInstance  13:0:54:35.94
   SNMPv2-MIB::snmpTrapOID.0
 SNMPv2-SMI::enterprises.42.9.0.99
  SNMPv2-SMI::enterprises.42.9.1  TestTrap
   SNMP-COMMUNITY-MIB::snmpTrapAddress.0  xx.xx.xx.xx
 SNMP-COMMUNITY-MIB::snmpTrapCommunity.0  public
SNMPv2-MIB::snmpTrapEnterprise.0 SNMPv2-SMI::enterprises.42.9

This is actually the contents of a mail sent by traptoemail. The data 
passed to traptoemail would have been

hostname***
UDP: [xx.xx.xx.xx]:xxx
DISMAN-EVENT-MIB::sysUpTimeInstance  13:0:54:35.94
SNMPv2-MIB::snmpTrapOID.0 SNMPv2-SMI::enterprises.42.9.0.99
et.c.

The format is configurable, using the format execute string config 
directive, the default being format execute %B\n%b\n%V\n%v\n (but if 
you change that, you should probably use something else than traptoemail 
to process it)

But there seems to need some docs for the format directive :-(

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Conflicting definition of ACTION in Net-SNMP and GNU C libraries

2014-03-06 Thread Niels Baggesen
On Thu, Feb 27, 2014 at 09:22:12PM +0600, Yana A Kireyonok (aka Iron Bug) wrote:
 This might be the quirk of GNU autotools or GCC, too. But I haven't seen
 any troubles with this toolset, I build a lot of things.

Ok so it fails when it hidt the perl part ...

That explains why I don't see it. My standard build does something like
20 different platforms all building from the same nfs mounted source
directory, and building outside source is not possible for the perl
things.

It seems that there is some simple dependency missing that will hold
back the perl until subdirs has finished.

Thanks for the note.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Subversion Kills Productivity. Get off Subversion  Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Conflicting definition of ACTION in Net-SNMP and GNU C libraries

2014-02-27 Thread Niels Baggesen
On Wed, Feb 26, 2014 at 02:12:53PM +0600, Yana A Kireyonok (aka Iron Bug) wrote:
 Also would be a good point to add to build instructions of the library a
 note that the library cannot be built in parallel (make -jprocessors).

It would be better to make sure it works :-)

 Because when tried to be built it in parallel, it fails with strange errors
 about missing links and it's not obvious to users that the cause is just
 the parallel building.

I routinely build with make -j4, and I dont remember seeing any problems.

What version and OS is this? Can you provide a log of the failure?

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis  security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Hard limit of Open TCP connections

2014-02-19 Thread Niels Baggesen

Den 19-02-2014 14:11, rohith skrev:

Thanks Tim for the response .

Niels,

Do we have a patch specific to this issue ?


The attached patch has been applied to all branches from 5.4 and forward.

/Niels

--
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming
diff --git a/agent/mibgroup/kernel_sunos5.c b/agent/mibgroup/kernel_sunos5.c
index 3270642..9a534fc 100644
--- a/agent/mibgroup/kernel_sunos5.c
+++ b/agent/mibgroup/kernel_sunos5.c
@@ -1002,27 +1002,31 @@ getmib(int groupname, int subgroupname, void **statbuf, size_t *size,
 	rc = getmsg(sd, NULL, strbuf, flags);
 	switch (rc) {
 	case -1:
-		rc = -ENOSR;
+		ret = -ENOSR;
+		snmp_perror(getmsg);
 		goto Return;
 
 	default:
-		rc = -ENODATA;
+		snmp_log(LOG_ERR, kernel_sunos5/getmib: getmsg returned %d\n, rc);
+		ret = -ENODATA;
 		goto Return;
 
 	case MOREDATA:
-		oldsize = ( ((void *)strbuf.buf) - *statbuf) + strbuf.len;
-		strbuf.buf = (void *)realloc(*statbuf,oldsize+4096);
+		DEBUGMSGTL((kernel_sunos5, .. getmib increased buffer size\n));
+		oldsize = ( strbuf.buf - (char *)*statbuf) + strbuf.len;
+		strbuf.buf = (char *)realloc(*statbuf, oldsize+4096);
 		if(strbuf.buf != NULL) {
 		*statbuf = strbuf.buf;
 		*size = oldsize + 4096;
-		strbuf.buf = *statbuf + oldsize;
+		strbuf.buf = (char *)*statbuf + oldsize;
 		strbuf.maxlen = 4096;
+		result = NOT_FOUND;
 		break;
 		}
-		strbuf.buf = *statbuf + (oldsize - strbuf.len);
+		strbuf.buf = (char *)*statbuf + (oldsize - strbuf.len);
 	case 0:
 		/* fix buffer to real size  position */
-		strbuf.len += ((void *)strbuf.buf) - *statbuf;
+		strbuf.len += strbuf.buf - (char*)*statbuf;
 		strbuf.buf = *statbuf;
 		strbuf.maxlen = *size;
 
--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471iu=/4140/ostg.clktrk___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Hard limit of Open TCP connections

2014-02-18 Thread Niels Baggesen
On Tue, Feb 18, 2014 at 03:54:59PM +0530, rohith wrote:
 When i look at the code I see a hard coded limit of 1000 connections in 
 mibcache(kernel_sunos5.c has an entry MIB_TCP_CONN in Mibcache which has 
 support for 1000 TCP connections).

We have a prerelease of 5.7.3 out, which effectively should remove any
limits of the mibcache (among many other things).

You can find it at

http://sourceforge.net/projects/net-snmp/files/net-snmp/5.7.3-pre-releases/

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: hrprocessorload-returns-incorrect-values-for-processor-s-100

2014-01-27 Thread Niels Baggesen
Den 13-01-2014 08:25, Jianhai Luan skrev:
 Hi Niels,
The patch is being verified in customer's environment, and the
 customer don't update the issue until now. So sorry for more time to
 wait the result.

As this seems OK for a one or two digit cpu numbers, I have applied it 
to the active branches, and conside this problem closed.

/Nies

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: 5.7.2 and 5.7.3.pre1 won't compile on Solaris 10 or 11 on SPARC

2014-01-27 Thread Niels Baggesen
Den 27-01-2014 21:30, Bruce Shaw skrev:
 Using GSWgcc4core and GSWgmake.

 ./configure --with-mib-modules=ucd-snmp/lmSensors ucd-snmp/diskio smux
 mibII/mta_sendmail --with-cc=gcc

 make barfs on

 libtool: compile:  gcc -I../../include -I. -I../../agent
 -I../../agent/mibgroup -I../../snmplib -fno-strict-aliasing -g -O2
 -Usolaris2 -Dsolaris2=solaris2 -c mibII/icmp.c  -fPIC -DPIC -o
 mibII/.libs/icmp.o
 mibII/icmp.c: In function 'solaris_read_icmp6_stat':
 mibII/icmp.c:1510:12: error: 'icmp6stat' undeclared (first use in this
 function)

I have just fixed this in the 5-7-patches branch. You can also 
--enable-ipv6 to make it compile.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Creating inetCidrRouteTable row entries

2014-01-27 Thread Niels Baggesen
Den 21-01-2014 16:32, Daniel Tingstrom skrev:
 I couldn't find an existing function to convert a prefix length to a
 netmask, so I just wrote my own. Net SNMP version is 5.7.2. Here is the
 patch:

Thanks for finding this!

 --- route_ioctl.c.old 2012-10-09 18:28:58.0 -0400
 +++ route_ioctl.c 2014-01-21 10:30:32.239381288 -0500
 @@ -114,7 +114,7 @@
   DEBUGMSGTL((access:route,via %s\n, DEBUGSTR));

   mask.sin_family = AF_INET;
 -mask.sin_addr.s_addr = htonl(0);
 +mask.sin_addr.s_addr = entry-rt_pfx_len ? htonl((( ((uint32_t)1) 
 (32-entry-rt_pfx_len)) - 1) ^ 0xU) : 0;
   DEBUGSTR = inet_ntoa(mask.sin_addr);
   DEBUGMSGTL((access:route,mask %s\n, DEBUGSTR));

Thanks for the patch. I did create a function for converting prefix to 
mask, and it should be fixed the the next 5.7.3.pre release.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: pass extension, parameter passing bug

2014-01-13 Thread Niels Baggesen
Den 13-01-2014 15:20, Dennis Lampert skrev:
 But my SNMP daemon outputs the following

   ucd-snmp/pass: pass-running:  /bin/bash /home/skims/test.sh -g 
 .1.3.6.1.4.1.8072.2.265

   ucd-snmp/pass: pass-running:  /bin/bash /home/skims/test.sh -s 
 .1.3.6.1.4.1.8072.2.265.1 string ucd-snmp/pass: pass-running returned: 
 .1.3.6.1.4.1.8072.2.265.1


 As you can see it does not output the string I wanted to pass.

Not even that, but the output line is not complete with a newline, but 
it is not something that I can reproduce immediately.

How exactly does your snmpd.conf entry look like, and what doesyour 
script do?

Btw, why do you give /bin/bash explicitly? A #!/bin/bash at the top of 
your script should suffice

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: 转发:cisco asa 5520 cpu mib

2014-01-09 Thread Niels Baggesen
Den 18-12-2013 02:35, Conny skrev:

 Problem Description:
  Now want to use chechk_snmp monitoring a cisco asa 5520 firewall
 CUP usage,
 I do not know a firewall cpu's mib ID is the number that you would like
 to ask

$ snmpwalk -On asa CISCO-PROCESS-MIB::cpmCPUTotal5min
.1.3.6.1.4.1.9.9.109.1.1.1.1.5.1 = Gauge32: 8
.1.3.6.1.4.1.9.9.109.1.1.1.1.5.2 = Gauge32: 9
.1.3.6.1.4.1.9.9.109.1.1.1.1.5.3 = Gauge32: 8
.1.3.6.1.4.1.9.9.109.1.1.1.1.5.4 = Gauge32: 8
.1.3.6.1.4.1.9.9.109.1.1.1.1.5.5 = Gauge32: 8
.1.3.6.1.4.1.9.9.109.1.1.1.1.5.6 = Gauge32: 7
.1.3.6.1.4.1.9.9.109.1.1.1.1.5.7 = Gauge32: 7
.1.3.6.1.4.1.9.9.109.1.1.1.1.5.8 = Gauge32: 8
.1.3.6.1.4.1.9.9.109.1.1.1.1.5.9 = Gauge32: 9
.1.3.6.1.4.1.9.9.109.1.1.1.1.5.10 = Gauge32: 8

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: hrprocessorload-returns-incorrect-values-for-processor-s-100

2014-01-09 Thread Niels Baggesen

Den 06-01-2014 08:35, Jianhai Luan skrev:

Hi all,
   I am working the issue such as *SNMP HRPROCESSORLOAD RETURNS
INCORRECT VALUES FOR PROCESSOR #'S  100 *. I google to find useful
information, and find the below URL:
http://mailing.unix.net-snmp-users.narkive.com/o21D50GY/hrprocessorload-returns-incorrect-values-for-processor-s-100
   My question is why do the patch  not be merged into latest version?
and if do the patch have other effect?


I am not following net-snmp-users, so I cannot tell what happened to it, 
but if you could verify the attached patch I will make sure it gets into 
5.7.3


/Niels

--
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming
diff --git a/agent/mibgroup/hardware/cpu/cpu_linux.c b/agent/mibgroup/hardware/cpu/cpu_linux.c
index 8a081cd..b1dc308 100644
--- a/agent/mibgroup/hardware/cpu/cpu_linux.c
+++ b/agent/mibgroup/hardware/cpu/cpu_linux.c
@@ -154,7 +154,9 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) {
 snmp_log_perror(Missing CPU info entry);
 break;
 }
-b1 = b2+5; /* Skip cpuN  */
+b1 = b2; /* Skip cpuN  */
+while(*b1 != ' ') b1++;
+b1++;
 }
 
 num_cpuline_elem = sscanf(b1, %llu %llu %llu %llu %llu %llu %llu %llu %llu %llu,
--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Fwd: Re: Code Merge Request #1: Minor editorial changes to Perl bindings (open)

2014-01-09 Thread Niels Baggesen
Den 06-12-2013 10:47, Michael Bunk skrev:
 Dear SNMP-Devs,

 I discovered that SourceForge supports merge requests like GitHub...
 don't know since when.  But since mine ended up as the first for
 net-snmp, I decided that it might be a good idea to draw some attention
 to it, so it doesn't go unnoticed:

If you hadn't sent this warning, we probably wouldn't have noticed
either :-)

Thanks for the patch, it has been merged.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming


--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Help! Convert OCTET string to READABLE string

2013-12-12 Thread Niels Baggesen
On Thu, Dec 05, 2013 at 06:04:22PM +0800, namgmail wrote:
 Hi Niels,
 
 This is my full command:
 
 Sender:
  update=a1 a1 a2 a3 ...a400   #long string count from
 a1 to a400
   snmpset -v1 -c private 192.168.4.113 *.1.3.6.1.4.1.5*
 *s*  ${update}

I would like to see exactly what your update string looks like!

Also, please run snmpset with the -d option to dump the packets that are
sent and received, so we know if this is a snmpset or a snmpd problem.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Help! Convert OCTET string to READABLE string

2013-12-03 Thread Niels Baggesen
Den 04-12-2013 07:09, namgmail skrev:
 Now it work if i add -Oa or-OT in the snmpset command.I can see
 readable string .

 But it shows only   half of string not full string...

Are you it isn't the agent that truncates the string?

Try adding -d to the snmpset command to see the packets crossing the 
wire. And if still in doubt, post the complete command and the output here.

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Fwd: Re: Compilation issue on HPUX

2013-11-26 Thread Niels Baggesen
Den 25-11-2013 20:56, Felipe Souza skrev:
 Hi Niels,

 Thanks for your reply.

Please keep the list CC'ed too

 checking for gcc... gcc
 checking whether the C compiler works... no
 configure: error: in `/tmp/net-snmp-5.7.2':
 configure: error: C compiler cannot create executables

What does it say in config.log?

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming


--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Compilation issue on HPUX

2013-11-26 Thread Niels Baggesen
Den 26-11-2013 11:45, Felipe Souza skrev:
 Hi Niels..

 the config.log is attached.

Did you try to look into config.log yourself?

configure:6571: checking for gcc
configure:6587: found /usr/local/bin/gcc
configure:6598: result: gcc
configure:6827: checking for C compiler version
configure:6836: gcc --version 5
/usr/lib/dld.sl: Unresolved symbol: libintl_bindtextdomain (code)  from gcc
./configure[6838]: 15518 Abort(coredump)
configure:6847: $? = 134

How did you install that gcc? It does not seem to match your system!

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Compilation issue on HPUX

2013-11-26 Thread Niels Baggesen
Den 26-11-2013 12:30, Felipe Souza skrev:
 weird.. I had installed gcc using depot file for HP PA-RISC.

 gcc depot:
 gcc-4.2.3-hppa-11.31.depot

 depencies depot:
 libgcc-4.2.3-hppa-11.31.depot
 zlib-1.2.8-hppa-11.31.depot

 # swlist |grep -i gcc
gcc   4.2.3  gcc
libgcc4.2.3  libgcc

Something is certainly amiss with that gcc installation, and not being 
an HP-UX man I cannot help you there.

Any HP-UX admins lurking around?

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Problem using IP_RECVDSTADDR on HPUX.

2013-11-21 Thread Niels Baggesen
Den 19-11-2013 11:03, Jean-Paul VILLETTE skrev:

 The tarballs don't seem to be online. Problems ?

Sorry 'bout that :-(

A filesystem had filled up, but they should be back now

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


  1   2   3   4   >