Sponsored Content
Special Forums IP Networking snmp ... mib2c.scalar.conf, how manipulate variables Post 302184583 by zainab on Saturday 12th of April 2008 12:51:01 AM
Old 04-12-2008
Question snmp ... mib2c.scalar.conf, how manipulate variables

Hi,

I'm reading net-snmp, using Unix (Solaries) and C language ...

- using mib2c.scalar.conf to get the .c and .h code ... I want to manipulate variable ( managed object which already defined in MIB file ) but there is no such variable declared in the generated .c code only handler for each variable?
how can I manipulate variable outside snmpset ... and to get modified value when I request snmpget ?

-(The mib2c.int-watch.conf declare only integer and I want to declare string so I use mib2c.scalar.conf, am I write ?)

Thank you in advance ..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Accessing Variables from .conf file

I can't figure out how to access variables that are stored in a separate file. Can someone let me in on the secret? Please, and thank you. -Kevin (7 Replies)
Discussion started by: wayne1411
7 Replies

2. Infrastructure Monitoring

snmp,how to edit code generated by mib2c?

Hi, I'm reading net-snmp site, using C language and unix environment, I have manager ( do get/set command), agent and server ... I'm trying to monitor cpu, memory and disk usage and get Ip address of server and send the value back to agent, stored in variable which enable manager to gets the... (1 Reply)
Discussion started by: zainab
1 Replies

3. Solaris

basic question on sd.conf and lpc.conf file

Hello Guys, Do we need to configure this file only if we add SAN disk or even if we add local disk, do we need to modify? (4 Replies)
Discussion started by: mokkan
4 Replies

4. Infrastructure Monitoring

Proper permission /etc/snmp/snmpd.conf

Hi All, I'm hardening my linux. And I came across with this file. /etc/snmp/snmpd.conf It's current mod is 644 with root:root ownership and group. Can I make this 640 without hurting the OS? Meaning no public read access. Does other resources need to read to it? Thanks and more... (1 Reply)
Discussion started by: itik
1 Replies

5. Infrastructure Monitoring

conf snmp red hat 5

Please just installed in the company Red Hat Enterprise 5, I need to know how to configure the snmpd. conf cheymane community and you can collect the data it generates from a server which runs WhatsUp Gold <email deleted per forum rules> (2 Replies)
Discussion started by: cheymane
2 Replies

6. IP Networking

Sending data from DELL OMSA SNMP and Custom SNMP MIB to same UDP port 161

Hi , Currently DELL OMSA SNMP sends data through default udp port 161.I want my custom SNMP MIB also to send data in the same udp port 161.Whether its possible.If yes where to configure .I tried starting my custom MIB in udp port 161,but it throws port already in use.Kindly guide. (0 Replies)
Discussion started by: prabakar4all
0 Replies

7. Red Hat

Sending data from DELL OMSA SNMP and Custom SNMP MIB to same UDP port 161

Hi , Currently DELL OMSA SNMP sends data through default udp port 161.I want my custom SNMP MIB also to send data in the same udp port 161.Whether its possible.If yes where to configure .I tried starting my custom MIB in udp port 161,but it throws port already in use.Kindly guide. (1 Reply)
Discussion started by: prabakar4all
1 Replies

8. UNIX for Dummies Questions & Answers

Need to transfer all kernel logs (var/log/messages) to the snmp listener as snmp trap

i am working with embedded system -Dell DCS management sub system. my question is as below: currently we are using linux kernel 2.6.30 build and we have a kernel logs stored to the /var/log/messages path. now we have to transfer all this logs to the specified SNMP target as a part of SNMP... (4 Replies)
Discussion started by: vipul_prajapati
4 Replies

9. Shell Programming and Scripting

Script to update rsyslog.conf and auditd.conf

Hello all, Newbie here. I'm currently tasked with updating rsyslog.conf and auditd.conf on a large set of servers. I know the exact logging configurations that I want to enable. I have updated both files on on a server and hope to use the updated files as a template for the rest of the... (3 Replies)
Discussion started by: Mide
3 Replies

10. Solaris

Configure resolv.conf and nsswitch.conf

Hi, I've installed Solaris 11.3(live media) and configured DNS. Everytime I reboot the server, resolv.conf got deleted and it created a new nsswitch.conf. I used below to configure both settings: # svccfg -s dns/client svc:/network/dns/client> setprop config/nameserver = (xx.xx.xx.aa... (1 Reply)
Discussion started by: flexihopper18
1 Replies
table_array(3snmp)						     net-snmp							table_array(3snmp)

NAME
table_array - Helps you implement a table when data can be stored locally. Functions int netsnmp_table_container_register (netsnmp_handler_registration *reginfo, netsnmp_table_registration_info *tabreg, netsnmp_table_array_callbacks *cb, netsnmp_container *container, int group_rows) register specified callbacks for the specified table/oid. int netsnmp_table_array_register (netsnmp_handler_registration *reginfo, netsnmp_table_registration_info *tabreg, netsnmp_table_array_callbacks *cb, netsnmp_container *container, int group_rows) netsnmp_mib_handler * netsnmp_find_table_array_handler (netsnmp_handler_registration *reginfo) find the handler for the table_array helper. netsnmp_container * netsnmp_extract_array_context (netsnmp_request_info *request) find the context data used by the table_array helper int netsnmp_table_array_check_row_status (netsnmp_table_array_callbacks *cb, netsnmp_request_group *ag, long *rs_new, long *rs_old) this function is called to validate RowStatus transitions. Detailed Description Helps you implement a table when data can be stored locally. The data is stored in a sorted array, using a binary search for lookups. The table_array handler is used (automatically) in conjuntion with the table handler. It is primarily intended to be used with the mib2c configuration file mib2c.array-user.conf. The code generated by mib2c is useful when you have control of the data for each row. If you cannot control when rows are added and deleted (or at least be notified of changes to row data), then this handler is probably not for you. This handler makes use of callbacks (function pointers) to handle various tasks. Code is generated for each callback, but will need to be reviewed and flushed out by the user. NOTE NOTE NOTE: Once place where mib2c is somewhat lacking is with regards to tables with external indices. If your table makes use of one or more external indices, please review the generated code very carefully for comments regarding external indices. NOTE NOTE NOTE: This helper, the API and callbacks are still being tested and may change. The generated code will define a structure for storage of table related data. This structure must be used, as it contains the index OID for the row, which is used for keeping the array sorted. You can add addition fields or data to the structure for your own use. The generated code will also have code to handle SNMP-SET processing. If your table does not support any SET operations, simply comment out the #define <PREFIX>_SET_HANDLING (where <PREFIX> is your table name) in the header file. SET processing modifies the row in-place. The duplicate_row callback will be called to save a copy of the original row. In the event of a failure before the commite phase, the row_copy callback will be called to restore the original row from the copy. Code will be generated to handle row creation. This code may be disabled by commenting out the #define <PREFIX>_ROW_CREATION in the header file. If your table contains a RowStatus object, by default the code will not allow object in an active row to be modified. To allow active rows to be modified, remove the comment block around the #define <PREFIX>_CAN_MODIFY_ACTIVE_ROW in the header file. Code will be generated to maintain a secondary index for all rows, stored in a binary tree. This is very useful for finding rows by a key other than the OID index. By default, the functions for maintaining this tree will be based on a character string. NOTE: this will likely be made into a more generic mechanism, using new callback methods, in the near future. The generated code contains many TODO comments. Make sure you check each one to see if it applies to your code. Examples include checking indices for syntax (ranges, etc), initializing default values in newly created rows, checking for row activation and deactivation requirements, etc. Function Documentation netsnmp_container* netsnmp_extract_array_context (netsnmp_request_info * request) find the context data used by the table_array helper Definition at line 229 of file table_array.c. netsnmp_mib_handler* netsnmp_find_table_array_handler (netsnmp_handler_registration * reginfo) find the handler for the table_array helper. Definition at line 212 of file table_array.c. int netsnmp_table_array_check_row_status (netsnmp_table_array_callbacks * cb, netsnmp_request_group * ag, long * rs_new, long * rs_old) this function is called to validate RowStatus transitions. Definition at line 236 of file table_array.c. int netsnmp_table_container_register (netsnmp_handler_registration * reginfo, netsnmp_table_registration_info * tabreg, netsnmp_table_array_callbacks * cb, netsnmp_container * container, int group_rows) register specified callbacks for the specified table/oid. If the group_rows parameter is set, the row related callbacks will be called once for each unique row index. Otherwise, each callback will be called only once, for all objects. Definition at line 149 of file table_array.c. Author Generated automatically by Doxygen for net-snmp from the source code. Version 5.4.3.pre1 23 May 2010 table_array(3snmp)
All times are GMT -4. The time now is 09:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy