Re: snmpget: Remove quotes in output string

2020-10-01 Thread Wes Hardaker via Net-snmp-coders
Pushpa Thimmaiah writes: > Why output of few mib-object of data-type string are enclosed in quote and few > are not > Eg: > IF-MIB::ifName.5 = STRING: eth2    <- No quotes > RFC1213-MIB::sysName.0 = STRING: "pushpat-ThinkPad-L480"  <- Qu

Re: snmpget: Remove quotes in output string

2020-09-19 Thread Pushpa Thimmaiah
Hi All, Why output of few mib-object of data-type string are enclosed in quote and few are not Eg: IF-MIB::ifName.5 = STRING: eth2<- No quotes RFC1213-MIB::sysName.0 = STRING: "pushpat-ThinkPad-L480" <- Quotes Wireshark shows that quotes are added at

Re: snmpget: Remove quotes in output string

2020-09-19 Thread Pushpa Thimmaiah
Hi Wes Hardaker, I have noticed following 1 ) Few mib-object with string type has no double-quotes IF-MIB::ifName.5 = STRING: eth2 HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Physical memory HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2020-9-19,14:33:8.0,+5:30 2) snmpcmd/snmpget has no

Re: snmpget: Remove quotes in output string

2020-09-18 Thread Wes Hardaker via Net-snmp-coders
Pushpa Thimmaiah writes: > Hi All, > > I can understand response to snmpget/snmpwalk display string datatype  in > double-quotes as in following example.  Kindly let me know If there any way to > remove or hide quotes from display. I know you anwsered yourself, but you migh

RE: snmpget: Remove quotes in output string

2020-09-16 Thread Drovalev R.N.
quotes in output string Hi All, I can understand response to snmpget/snmpwalk display string datatype in double-quotes as in following example. Kindly let me know If there any way to remove or hide quotes from display. Output of SNMPWALK

snmpget: Remove quotes in output string

2020-09-15 Thread Pushpa Thimmaiah
Hi All, I can understand response to snmpget/snmpwalk display string datatype in double-quotes as in following example. Kindly let me know If there any way to remove or hide quotes from display. Output of SNMPWALK

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 spr

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

2019-12-03 Thread Bek, Anshul
Hi , Below is the output of snmpwalk: [root@cucm-12-5-1-pub<mailto:root@cucm-12-5-1-pub> ~]# snmpwalk -c test -v2c localhost 1.3.6.1.4.1.9.9.156.1.1.2 SNMPv2-SMI::enterprises.9.9.156.1.1.2.1.2.1 = STRING: "10.63.37.50" SNMPv2-SMI::enterprises.9.9.156.1.1.2.1.2.2 = STRING: &quo

v2c trap source field string incorrect?

2015-05-22 Thread Raymond P Chudzinski
I have a need to get the IP address (v4 and/or v6) displayed in the snmptrapd logs. - I disable the hostname resolution with the ‘-n’ switch. - I print %B The resulting string is “[xxx.xxx.xxx.xxx]:161->[yyy.yyy.yyy.yyy]” where I would expect to get the just the address (be it ipv4 or i

Re: string as index of a table

2014-10-17 Thread Fulko Hew
On Fri, Oct 17, 2014 at 10:38 AM, sarath azad wrote: > Hi Niels, > > But using a query like: snmpwalk $host table>.1..\"ABCDE\" > is not working also. Below are the test results : > > snmpget $host table>.1..10."66.67.68.69.70.71.72.73.74.75" > .1.."BCDEFGHIJK" = INTEGER: 0 > snmpget $host

Re: string as index of a table

2014-10-17 Thread sarath azad
ay, October 16, 2014 10:00 PM, Niels Baggesen wrote: 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

Re: string as index of a table

2014-10-16 Thread Joel Hansell
Hi, I've seen this technique used by a major telecom vendor, so it's certainly technically doable. They included DateAndTime and a name string as part of the index on trap varbinds. I would advise you to find a different way, though, just for the reasons you mention. It's not hu

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. .1. no.>.5."65.66.67.68

string as index of a table

2014-10-16 Thread sarath azad
Hello, Could you please if it is advisable to use a string eg. name of item as a table index? The table is yet to be defined, need defined and added to a MIB file. The table will contain info of different items and our requirement is if we can get the info of a particular item by doing snmpget

Re: problem in SNMPSET on table with string data type columns

2014-10-03 Thread Bill Fenner
ndler_registration > netsnmp_create_table_data > netsnmp_table_helper_add_indexes > netsnmp_register_table > > The problem we are facing is that if our table is columns, c1, c2, and c3, > and if c1 is of string data type. > Now if we are doing “snm

Re: problem in SNMPSET on table with string data type columns

2014-10-03 Thread sarath azad
he problem we are facing is that if our table is columns,c1, c2, and c3, and if c1 is of string data type. Now if we are doing “snmpset c1  c2  c3 ” we are getting these valuesval1, val2 and val3 properly in code and they are getting properly updated inthe table.But if we are giving columns in

Re: problem in SNMPSET on table with string data type columns

2014-09-04 Thread Bill Fenner
er_registration > netsnmp_create_table_data > netsnmp_table_helper_add_indexes > netsnmp_register_table > > The problem we are facing is that if our table is columns, c1, c2, and c3, > and if c1 is of string data type. > Now if we are doing “snmpset c1 c2 c3

Re: problem in SNMPSET on table with string data type columns

2014-09-04 Thread sarath azad
that if our table is columns, c1, c2, and c3, and if c1 is of string data type. Now if we are doing “snmpset c1 c2 c3 ” we are getting these values val1, val2 and val3 properly in code and they are getting properly updated in the table. But if we are giving columns in different order like

Re: problem in SNMPSET on table with string data type columns

2014-09-03 Thread Bill Fenner
solving the below problem, in doing SNMPSET for > tables with string data? > > thanks and regards > S Sarath > > > On Friday, August 22, 2014 9:03 PM, sarath azad > wrote: > > > Hello, > > Could you please help in resolving the below issue? > For SNMPSE

problem in SNMPSET on table with string data type columns

2014-09-03 Thread sarath azad
Hello, Could you please help in solving the below problem, in doing SNMPSET for tables with string data? thanks and regards S Sarath On Friday, August 22, 2014 9:03 PM, sarath azad wrote: Hello, Could you please help in resolving the below issue? For SNMPSET on a table which contains

problem in SNMPSET with string data type columns

2014-08-22 Thread sarath azad
Hello,   Could you please help in resolving the below issue? For SNMPSET on a table which contains a column of "string" data type, if we are giving values of all the columns in the single SNMPSET query, then we are getting the values of the string column properly, only if the order

transport->f_fmtaddr returns callback string

2014-01-28 Thread Sonia .
Hi, I am facing some issue with the function f_fmtaddr, as it always return callback string in place of client IP address. My implementation is: addr_string = transport->f_fmtaddr(transport, transport_data, transport_data_length); I am not been able to fetch the IP address of the Cli

Re: Help! Convert OCTET string to READABLE string

2013-12-16 Thread Bill Fenner
This is a limitation in the execute / pass / pass_persist infrastructure: the truncation happens when creating the output to send to the script. setPass() sets up the command string and the arguments into passthru->command, which is a statically allocated buffer. setPassPersist() has the s

Re: Help! Convert OCTET string to READABLE string

2013-12-13 Thread namgmail
On 12/13/2013 1:52 PM, Niels Baggesen wrote: 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

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

Re: Help! Convert OCTET string to READABLE string

2013-12-05 Thread namgmail
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}" Receiver: +>Added 1 more line in '/&#

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 t

Re: Help! Convert OCTET string to READABLE string

2013-12-03 Thread namgmail
On 12/4/2013 6:55 AM, Magnus Fromreide wrote: Hi Magnus Fromreide, Thank you so much for your valuable suggestions. 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... Thanks, Have a n

Re: Help! Convert OCTET string to READABLE string

2013-12-03 Thread Magnus Fromreide
On Tue, 2013-12-03 at 10:22 +0800, namgmail wrote: > Hi pro, > > I have a problem with SNMPSET ,this is my command: > > snmpset -v1 -c private > 192.168.x.x.1.3.6.1.4.1.426.8.1.20.5.1.1 s > > > If it's short string it work fine but with lo

Help! Convert OCTET string to READABLE string

2013-12-02 Thread namgmail
Hi pro, I have a problem with SNMPSET ,this is my command: snmpset -v1 -c private 192.168.x.x .1.3.6.1.4.1.426.8.1.20.5.1.1 *s * If it's short string it work fine but with long string it automatic convert to *octet* string.Here is what i got from receiver:

Re: low? octet string limit on AgentX transactions

2013-11-29 Thread Bill Fenner
nmp/bugs/2489/ - a SET request with a big octet string fails to pass from master to subagent, just like the trap with a big octet string fails to pass from subagent to master. My thoughts: 1. Both of these expose a secondary issue (e.g., Fulko experiences that the master agent appears to hang, Stia

Re: Trouble in concatenate a value to a string

2013-10-31 Thread Rafael Ratacheski
The stringstream worked perfectly. thank you very much 2013/10/31 Schmoll Walter > … > > returned += static_cast (*bp++); > > … > returned += static_cast (*bp++); > > … > > **** > > I never used std::string, so I’

Re: Trouble in concatenate a value to a string

2013-10-30 Thread Rafael Ratacheski
*) buf; if (buflen > 0) { cout << static_cast (*bp++); for (size_t i = 1; i < buflen; ++i) cout << "." << static_cast (*bp++); } } string save_ip(const char* buf, size_t buflen) { unsigned const char* bp = (unsigned const cha

RE: Trouble in concatenate a value to a string

2013-10-30 Thread Rafael Ratacheski
Sorry Walter and Magnus. I didnt expose my quest properly. The input of function is a variable with the value of the oid "netdotmediaipadress" and the size of this value. This function make two things: save the input value in a string in the standard ip adress format. And print the inpu

Re: Trouble in concatenate a value to a string

2013-10-29 Thread Magnus Fromreide
On Tue, 2013-10-29 at 18:51 +, Rafael Ratacheski wrote: > Hello, I'm having problem in concatenate the oid value in a > string. I've tried several possible ways, but all unsuccessfully. Can > you help me? My code is >From looking at your code it is unclear what ty

Trouble in concatenate a value to a string

2013-10-29 Thread Rafael Ratacheski
Hello, I'm having problem in concatenate the oid value in a string. I've tried several possible ways, but all unsuccessfully. Can you help me? My code is string print_ip(const void* buf, size_t buflen) { unsigned const char* bp = (unsigned const char*) buf; string retu

low? octet string limit on AgentX transactions

2013-10-28 Thread Fulko Hew
selective debugging for agentx to see the related warning message ("String too long") I located the issue in : agent/mibgroup/agentx/protocol.c line 1249 where it tests the incoming string against the size of the temporary buffer that will be used to hold the string. That buffer is defi

R: snmptrapd snmptt carriage return line feed inside trap text string

2013-06-06 Thread Diego Campoli
ot;, etc. Why cannot exist an Output Option that remove embedded newlines inside text string? But I just resolved with SNMPTT, looking in the SNMPTT ticket repository I found that this problem was already solved on 2010-05-22 "#5 Fix multi-line traps from NET-SNMP 5.4" (see http://sour

Re: snmptrapd snmptt carriage return line feed inside trap text string

2013-06-04 Thread Niels Baggesen
Den 04-06-2013 13:02, Diego Campoli skrev: > So as you can see Hex strings variables are correctly handled. > > Thank you for your time, I wait you for a feedback :) What would you expect snmptrapd should do about strings with embedded newlines? /Niels -- Niels Baggesen -- @home -- Århus -- D

snmptrapd snmptt carriage return line feed inside trap text string

2013-06-04 Thread Diego Campoli
rapname / OID 4: ip address from trap agent 5:trap community string 6:enterprise 7:securityEngineID(snmptthandler-embedded required) 8:

Re: how can I display the oid as string value?

2011-08-03 Thread Wes Hardaker
>>>>> On Wed, 3 Aug 2011 19:16:48 +0100, Dave Shield >>>>> said: DS> On 3 August 2011 16:18, Wes Hardaker wrote: >> Specifically, the Net-SNMP code will only display a string in the OID if >> the MIB definition is properly set up to match the ta

Re: how can I display the oid as string value?

2011-08-03 Thread Dave Shield
On 3 August 2011 16:18, Wes Hardaker wrote: > Specifically, the Net-SNMP code will only display a string in the OID if > the MIB definition is properly set up to match the table's indexes and > contains the same set of indexes (and one of which is the string in question). Which it

Re: how can I display the oid as string value?

2011-08-03 Thread Wes Hardaker
>>>>> On Wed, 3 Aug 2011 10:20:25 +0100, Dave Shield >>>>> said: >> but while doing snmpwalk I am not getting them as String >> snmpwalk -v2c -c public -Oa localhost:11161 1.3.6.1.4.1.11456 >> ABC-MIB::messageType.0.3.65.70.77.98374.98374.4 = STRI

Re: how can I display the oid as string value?

2011-08-03 Thread Dave Shield
On 3 August 2011 06:44, sujata patra wrote: > I like to display the OID as string. So instead of integer I have chosen some > char* > as the key > but while doing snmpwalk I am not getting them as String > snmpwalk -v2c -c public -Oa localhost:11161 1.3.6.1.4.1.11456 > AB

how can I display the oid as string value?

2011-08-02 Thread sujata patra
I like to display the OID as string. So instead of integer I have chosen some char* as the key initialize_table_messageTable(void) {     netsnmp_table_helper_add_indexes(table_info, ASN_INTEGER

Re: net SNMP OID to String

2010-10-18 Thread Robert Story
On Mon, 18 Oct 2010 17:04:06 +0530 Shibu wrote: SG> How can I convert string to OID data type? See snmp_parse_oid() in mib_api.h. -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flas

net SNMP OID to String

2010-10-18 Thread Shibu George
Hi Friends, I am new to net snmp. How can I convert string to OID data type? Thanks, Shibu George * Confidentiality Statement/Disclaimer * This message and any attachments is intended for the sole use of the intended recipient. It may contain confidential information. Any

Re: CFV: simple error string patch

2010-08-24 Thread Wes Hardaker
>>>>> On Tue, 24 Aug 2010 23:01:24 +0200, Thomas Anders >>>>> said: TA> Wes Hardaker wrote: >> To fix an error string which was a cut-n-paste without a replacement in >> the new DTLS code. TA> +1 (what a waste to even do voting on such a tri

Re: CFV: simple error string patch

2010-08-24 Thread Thomas Anders
Wes Hardaker wrote: > To fix an error string which was a cut-n-paste without a replacement in > the new DTLS code. +1 (what a waste to even do voting on such a trivial change. sometimes policies feel strange.) -

Re: CFV: simple error string patch

2010-08-24 Thread Magnus Fromreide
On Tue, 2010-08-24 at 12:50 -0700, Wes Hardaker wrote: > To fix an error string which was a cut-n-paste without a replacement in > the new DTLS code. +1 /MF -- Sell apps to millions through the Intel(R) A

CFV: simple error string patch

2010-08-24 Thread Wes Hardaker
To fix an error string which was a cut-n-paste without a replacement in the new DTLS code. -- Wes Hardaker Please mail all replies to [email protected] diff --git a/net-snmp/snmplib/transports/snmpDTLSUDPDomain.c b/net-snmp/snmplib/transports/snmpDTLSUDPDomain.c index

Re: a problem of setting string in oid

2010-06-22 Thread Yi ZHOU
great, it works proprely.[?] On Mon, Jun 21, 2010 at 11:45 PM, Yi ZHOU wrote: > oh, yes, you're right magnus, i'll try this in the machine tomorrow morning > to see if it works, tks a lot. > > > On Mon, Jun 21, 2010 at 10:42 PM, Magnus Fromreide > wrote: > >> On Mon, Jun 21, 2010 at 09:50:54PM

Re: a problem of setting string in oid

2010-06-21 Thread Yi ZHOU
oh, yes, you're right magnus, i'll try this in the machine tomorrow morning to see if it works, tks a lot. On Mon, Jun 21, 2010 at 10:42 PM, Magnus Fromreide wrote: > On Mon, Jun 21, 2010 at 09:50:54PM +0200, Yi ZHOU wrote: > > thanks magnus, but i did set my xxxNetInterfaceName_len, > > Where? >

Re: a problem of setting string in oid

2010-06-21 Thread Magnus Fromreide
On Mon, Jun 21, 2010 at 09:50:54PM +0200, Yi ZHOU wrote: > thanks magnus, but i did set my xxxNetInterfaceName_len, Where? I do not see any location where entry->xxxNetInterfaceName_len get set in neither your original code nor in the code fragment you have pasted in below. > char* strName =

Re: a problem of setting string in oid

2010-06-21 Thread Yi ZHOU
thanks magnus, but i did set my xxxNetInterfaceName_len, char* strName = "Ethernet"; size_t len = strlen("Ethernet"); entry = xxxNetInterfaceTable_createEntry(0); memcpy(entry->xxxNetInterfaceName, strName, len); entry->xxxNetInterfaceStatus = 0; please ignore the second part

Re: a problem of setting string in oid

2010-06-21 Thread Magnus Fromreide
You never set xxxNetInterfaceName_len. /MF -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: ht

a problem of setting string in oid

2010-06-21 Thread Yi ZHOU
it into a dynamic library(.so), and loaded the library in my agent, but when i used snmpwalk, i got this : xxxNetInterfaceIndex.0 = INTEGER: 0 xxxNetInterfaceIndex.1 = INTEGER: 1 xxxNetInterfaceName.0 = STRING: xxxNetInterfaceName.1 = STRING: xxxNetInterfaceStatus.0 = INTEGER: deactivated(0

RE: Getting Hex-STRING instedof STRING

2010-06-09 Thread Magnus Fromreide
ess upgrading is an option for you then you could do as Dave indicated and make sure that the buffer in your original code isn't on the stack but that will force all set values to have the same length as your default string. /MF -

RE: Getting Hex-STRING instedof STRING

2010-06-09 Thread Prakash
Thanks M/F, I tried your suggested code but it won't compile... netsnmp_init_watcher_info6â was not declared in this scope I am using net-snmp 5.4.2.1 Thanks Prakash The problems I see are: * You are telling the agent that you are returning a buffer of 256 bytes but you are only

Re: Getting Hex-STRING instedof STRING

2010-06-09 Thread Dave Shield
On 8 June 2010 22:00, Magnus Fromreide wrote: >      * You are telling the agent that you are returning a buffer of 256 >        bytes but you are only initializing about ten of those bytes, >        the rest you are leaving unspecified. That's probably more of a design flaw, rather than broken c

Re: Getting Hex-STRING instedof STRING

2010-06-08 Thread Magnus Fromreide
On Tue, 2010-06-08 at 14:47 +0530, Prakash wrote: > Hi all, > > I used the following code to register string type scalar > > netsnmp_handler_registration *reg; > netsnmp_watcher_info *winfo; > > oid abcName_oid[] = {1,3,6,1,4,1,3286,13,5,1,1,3,0}; > char abcNam

Re: Getting Hex-STRING instedof STRING

2010-06-08 Thread Niels Baggesen
Den 08-06-2010 11:17, Prakash skrev: > But I am getting Hex-STRING value.. because the string contains a lot of non-printable bytes ... It would not make sense to declare it a printable string with all those 00 bytes and other strangenesses in it. /Niels -- Niels Baggesen - @home - År

Getting Hex-STRING instedof STRING

2010-06-08 Thread Prakash
Hi all, I used the following code to register string type scalar netsnmp_handler_registration *reg; netsnmp_watcher_info *winfo; oid abcName_oid[] = {1,3,6,1,4,1,3286,13,5,1,1,3,0}; char abcName[256] = "ABC Default value"; reg = netsnmp_create_handler_registration("

Re: own OID - chance data type from string to integer

2010-04-28 Thread Robert Story
On Mon, 26 Apr 2010 16:00:37 +0200 [email protected] wrote: BD> Now the question: Is it possible to declare iso.3.6.1.4.1.424242.2.101.1 BD> = STRING: "278" as an integer and not as a string? No. Look into the pass scripts instead of exec if you want to be able

own OID - chance data type from string to integer

2010-04-26 Thread [email protected]
Hi, I created an own OID with the following line in snmpd.conf: exec .1.3.6.1.4.1.424242.1 myTest /home/mytest /home/mytest (shell script): […] echo $4 return 0 snmpwalk returns: […] iso.3.6.1.4.1.424242.2.100.1 = INTEGER: 0 iso.3.6.1.4.1.424242.2.101.1 = STRING: "278" […] Now the qu

Re: trapsess -e option and OCTET STRING

2010-03-11 Thread Dave Shield
On 18 February 2010 02:33, lanas wrote: >> The -e flag takes a hex value - whether or not this is prefixed with 0x > It could be nice to have that information in man snmpcmd. Done. This will be included in upcoming and future releases. Dave -

Re: trapsess -e option and OCTET STRING

2010-02-17 Thread lanas
On Wed, 17 Feb 2010 09:27:51 +, Dave Shield wrote : > On 17 February 2010 00:41, lanas wrote: > >  The engineID (trapsess -e option) is defined as an OCTET STRING. > > Does this mean that it can be an hexadecimal ASCII string such as: > > 0x85643A5B ... so on ? [...] &g

Re: trapsess -e option and OCTET STRING

2010-02-17 Thread Dave Shield
On 17 February 2010 00:41, lanas wrote: >  The engineID (trapsess -e option) is defined as an OCTET STRING. > Does this mean that it can be an hexadecimal ASCII string such as: > 0x85643A5B ... so on ? Yes >  Will snmpd convert the hex string to hex binary ? Yes. > Will it ma

trapsess -e option and OCTET STRING

2010-02-16 Thread lanas
Hi all, The engineID (trapsess -e option) is defined as an OCTET STRING. Does this mean that it can be an hexadecimal ASCII string such as: 0x85643A5B ... so on ? Will snmpd convert the hex string to hex binary ? I'm asking because this field is seemingly defined as 32 bytes (RFC 3411)

Re: Configuring trap receiver address and community string from the C code

2009-11-18 Thread Wes Hardaker
>>>>> On Fri, 13 Nov 2009 20:04:08 +0530, Goutham BG said: GB> But I need to know how we can configure the trap receiver address and the GB> community string from a standalone (separate) application or from a AgentX GB> subagent? The Net-SNMP master agent, which follows

Re: Configuring trap receiver address and community string from the C code

2009-11-16 Thread Goutham BG
address in the snmpd.conf file. But I need to know how we can configure the trap receiver address and the community string from a standalone (separate) application or from a AgentX subagent? Please refer the figure above. I am using a GUI based tool to configure the system. Text boxes will be provided

Re: Configuring trap receiver address and community string from the C code

2009-11-12 Thread Dave Shield
the trap receiver > address and the community string from a C/C++ program > (or a subagent). If this is part of the main SNMP agent, then the easiest way would probably be to call netsnmp_config("trapsink 10.20.30.40"); That sets up the trap destination, in exactly the same w

Configuring trap receiver address and community string from the C code

2009-11-12 Thread Goutham BG
Hi I am using net-snmp to send alarms generated in the system as SNMPv2 trap notifications. As part of this I need a way to configure the trap receiver address and the community string from a C/C++ program (or a subagent). Can you please let me know how trap receiver address and community string

Session Creation Error String and User Break Point in snmp_send

2009-09-13 Thread Sayan Chaliha
function call fails, and ss = NULL, snmp_sess_perror does not return an error string; it just returns a blank string. The function call was 'snmp_sess_perror("TrapDemo", &session);', and the output was "TrapDemo:". - snmp_send(ss, pdu)

Re: max string size support in snmp_add_var

2009-07-16 Thread Dave Shield
2009/7/15 Sudarshan Soma : > Hi All , I was using ucd-snmp-4.2 package for snmp support. That is a *VERY* old version of the software. The 4.x code has been unsupported for several years now. The "ucd-snmp" package has been superceded by "net-snmp". Please try using a more current version. > Can

max string size support in snmp_add_var

2009-07-15 Thread Sudarshan Soma
Hi All , I was using ucd-snmp-4.2 package for snmp support. When i try to send snmp message of length more than SPRINT_MAX_LEN, it crashes in snmp_api.c at this line strcpy((char*)buf, value); // as buf is of max size SPRINT_MAX_LEN,. I have applied the following patch to fix the problem http://

How can I converse the OID , the variable value, etc to char string??

2009-06-10 Thread mk26
Hello,thanks for your help!! I want to converse the OID,the variable value to char strings,but I don't know how to do this task,would you please help me??? -- Crystal Reports - New Free Runtime and 30 Day Trial Check out

Re: IPV4Z handling in OID string

2008-12-16 Thread brian retford
I certainly will, I guess I was interested in people's opinion about whether it was valid or not - I'm not really sure if the textual conventions cover converting nodes in an OID to human readable format or if that is all kind of ad-hoc - hence the correct solution might be to change the length che

Re: IPV4Z handling in OID string

2008-12-16 Thread Wes Hardaker
> On Mon, 15 Dec 2008 16:10:24 -0800, "brian retford" > said: br> I seem to have ruined my diff due to copy and paste stupidity, and by br> diff'ing across 2 versions and only giving you a partial diff. Here's a diff br> against 5.4.2.1: Can you submit the patch to our patch tracking da

Re: IPV4Z handling in OID string

2008-12-15 Thread brian retford
I seem to have ruined my diff due to copy and paste stupidity, and by diff'ing across 2 versions and only giving you a partial diff. Here's a diff against 5.4.2.1: --- /home/brian/scratch/net-snmp-5.4.2.1/snmplib/mib.c2008-07-30 00:57:19.0 -0700 +++ snmplib/mib.c2008-12-15 15:30:14

IPV4Z handling in OID string

2008-12-15 Thread brian retford
ing 1-4 IPv4 address network-byte order 5-8 zone index network-byte order So two examples from what I'm working on .1.3.6.1.4.1.3375.2.1.2.8.1.2.1.2.3.8.172.27.13.41.0.0.0.1 = Hex-STRING: AC 1B 0D 29 00 00 00 01 F5-BIGIP-SYSTEM-MIB::sysSelfIpAddr.ipv4z."

RE: Net-SNMP 5.3.1 sub agent crash on long string index

2008-11-26 Thread Kobi Vaknin (kvaknin)
Hi Thomas , I've succeeded to reconstruct the problem in Net-SNMP 5.4.2.1, attached the agentx crash log . I'll explain the scenario : the agnetx access to one of our table because of getbulk request ( in snmp walk we don't crash,) in this mode when our table include string in

Re: Net-SNMP 5.3.1 sub agent crash on long string index

2008-11-26 Thread Thomas Anders
Kobi Vaknin (kvaknin) wrote: > Do you know if specific problem was known and already fixed ? The list of fixes between 5.3.1 and 5.4.2 is quite long. See the ChangeLog file that ships with 5.4.2 for details. +Thomas - This

RE: Net-SNMP 5.3.1 sub agent crash on long string index

2008-11-26 Thread Kobi Vaknin (kvaknin)
: Net-SNMP 5.3.1 sub agent crash on long string index Kobi Vaknin (kvaknin) wrote: > I've took the patch *[ net-snmp-Patches-1944581 ] Core dump in > net-snmp for long value of string index * *but now the agent (snmpd) > crash .* Try again with net-snmp 5.4.2 and report back

Re: Net-SNMP 5.3.1 sub agent crash on long string index

2008-11-25 Thread Thomas Anders
Kobi Vaknin (kvaknin) wrote: > I've took the patch *[ net-snmp-Patches-1944581 ] Core dump in net-snmp > for long value of string index * > *but now the agent (snmpd) crash .* Try again with net-snmp 5.4.2 and report back, ple

Net-SNMP 5.3.1 sub agent crash on long string index

2008-11-25 Thread Kobi Vaknin (kvaknin)
Hi , We have encountered with subagent (agentx) crash during get bulk request , the root cause of the problem wad long string Index ( 15 bytes) . I've took the patch [ net-snmp-Patches-1944581 ] Core dump in net-snmp for long value of string index but now the agent (snmpd) crash . we

Re: Why does SNMP query return HEX string value instead of text string?

2008-11-10 Thread Magnus Fromreide
mån 2008-11-10 klockan 12:19 -0800 skrev Need Help: > You stated "decision by your client". Does this mean that when the > "snmpget" command is made and the data is returned, then the "snmpget" > logic determines to display the results as hex? Basically, is the > "snmpget" command which you are c

Re: Why does SNMP query return HEX string value instead of text string?

2008-11-10 Thread Need Help
quot;client"? --- On Mon, 11/10/08, Magnus Fromreide <[EMAIL PROTECTED]> wrote: From: Magnus Fromreide <[EMAIL PROTECTED]> Subject: Re: Why does SNMP query return HEX string value instead of text string? To: [EMAIL PROTECTED] Cc: "net-snmp Coders" Date: Monday, Novembe

Re: Why does SNMP query return HEX string value instead of text string?

2008-11-10 Thread Magnus Fromreide
mån 2008-11-10 klockan 06:02 -0800 skrev Need Help: > > I am using NetSNMP v5.4.1. > > I am issuing the following SNMP command: > > /usr/bin/snmpget -v 2c -c myaccess_ro 127.0.0.1 pageAppCodeModules.0 > > This command usually returns a string value like: > > &

Why does SNMP query return HEX string value instead of text string?

2008-11-10 Thread Need Help
I am using NetSNMP v5.4.1. I am issuing the following SNMP command:   /usr/bin/snmpget -v 2c -c myaccess_ro 127.0.0.1 pageAppCodeModules.0 This command usually returns a string value like: "000-03341-85696-216|DATAPAGE=1(Application Code Modules)|DATASECTION=TABLE(Downloaded Object

RE: snmpset max string length.

2008-10-22 Thread Oleg Rabinovich
rs [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 07, 2008 08:43 To: Oleg Rabinovich Cc: [email protected] Subject: Re: snmpset max string length. Oleg Rabinovich wrote: > Is there any changes after the release (5.4.2) that can affect this issue? > I can try to build it f

Re: snmpset max string length.

2008-10-06 Thread Thomas Anders
Oleg Rabinovich wrote: > Is there any changes after the release (5.4.2) that can affect this issue? > I can try to build it from SVN trunk if needed. Yes, I'd say it's worth a try. +Thomas -- Thomas Anders (thomas.anders at blue-cable.de)

RE: snmpset max string length.

2008-10-06 Thread Oleg Rabinovich
:[EMAIL PROTECTED] Sent: Monday, October 06, 2008 17:36 To: Oleg Rabinovich Cc: [email protected] Subject: Re: snmpset max string length. Oleg Rabinovich wrote: > I need to be able to send a large string (about 8K) to my agentX > extension using snmpset. > > After

Re: snmpset max string length.

2008-10-06 Thread Thomas Anders
Oleg Rabinovich wrote: > I need to be able to send a large string (about 8K) to my agentX > extension using snmpset. > > After getting such string the master agent hangs and doesn't answer to > replies. > > When the string size is smaller ( like 512) all is working fi

community string and other values for snmptrap command

2008-07-18 Thread Zaryab Munir (zmunir)
Hi, I am using snmptrap command to send traps. I want the command to use the version and community string from snmpd.conf file and not from the arguments passed as command line. How does it work? I modified snmpd.conf file with values for trap sink, trap community etc. Then I copied the file

Re: RFV: IPv6 String Format Overflow

2008-06-18 Thread Wes Hardaker
> On Wed, 18 Jun 2008 15:18:20 +0100, "Dave Shield" <[EMAIL PROTECTED]> > said: >>> We're currently in code freeze for the 5.2.5 release, >>> so fixing that line may have to wait until after that is out. >> >> I'm hereby calling for votes to include this fix (r17048) in 5.2.5. >> >> +1

Re: RFV: IPv6 String Format Overflow

2008-06-18 Thread Dave Shield
2008/6/17 Thomas Anders <[EMAIL PROTECTED]>: > Dave Shield wrote: >> 2008/6/16 Chase Douglas <[EMAIL PROTECTED]>: >>> I've found the exact same bug ... >>> but in snmplib/snmpTCPIPv6Domain.c instead of snmplib/snmpUDPIPv6Domain.c. >> >> Thanks for the report. >> I've fixed this in the 5.3.x lines a

RFV: IPv6 String Format Overflow

2008-06-17 Thread Thomas Anders
Dave Shield wrote: > 2008/6/16 Chase Douglas <[EMAIL PROTECTED]>: >> I've found the exact same bug ... >> but in snmplib/snmpTCPIPv6Domain.c instead of snmplib/snmpUDPIPv6Domain.c. > > Thanks for the report. > I've fixed this in the 5.3.x lines and above. > > We're currently in code freeze for th

Re: IPv6 String Format Overflow

2008-06-17 Thread Dave Shield
2008/6/16 Chase Douglas <[EMAIL PROTECTED]>: > I've found the exact same bug ... > but in snmplib/snmpTCPIPv6Domain.c instead of snmplib/snmpUDPIPv6Domain.c. Thanks for the report. I've fixed this in the 5.3.x lines and above. We're currently in code freeze for the 5.2.5 release, so fixing that l

IPv6 String Format Overflow

2008-06-16 Thread Chase Douglas
I've found the exact same bug as described here: http://sourceforge.net/mailarchive/forum.php?thread_name=46C64454.9040209%40linux.vnet.ibm.com&forum_name=net-snmp-coders , but in snmplib/snmpTCPIPv6Domain.c instead of snmplib/ snmpUDPIPv6Domain.c. The following patch solves the buffer overrun:

  1   2   3   >