Discussion:
Net SNMP query
(too old to reply)
Vivek Maurya
2014-12-30 07:58:38 UTC
Permalink
Hi All,

I have following scenario to develop, could anybody suggest how to
implement it.

Net SNMP has default implementation of "*sysName*". I want to modify
*sysName* value whenever SNMP server query, sysName is not constant it will
be dynamic value. But I do not want to modify exist code of Net SNMP.

Is there any way to achieve it?.
--
Vivek Maurya
NIJESH V P
2014-12-30 08:41:30 UTC
Permalink
you can change sysname using snmpset request.
Post by Vivek Maurya
Hi All,
I have following scenario to develop, could anybody suggest how to
implement it.
Net SNMP has default implementation of "*sysName*". I want to modify
*sysName* value whenever SNMP server query, sysName is not constant it
will be dynamic value. But I do not want to modify exist code of Net SNMP.
Is there any way to achieve it?.
--
Vivek Maurya
------------------------------------------------------------
------------------
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-users mailing list
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
NIJESH V P
2014-12-30 08:46:05 UTC
Permalink
net-snmp/agent/mibgroup/mibII/system_mib.c contain the code of sysname
implementation.you can add your code there.
XXXXXXXXXXXX
...............
static void
system_parse_config_sysname(const char *token, char *cptr)
{
system_parse_config_string(token, cptr, "sysName", sysName,
sizeof(sysName), &sysNameSet);

}
.............................................
check this
Post by NIJESH V P
you can change sysname using snmpset request.
Post by Vivek Maurya
Hi All,
I have following scenario to develop, could anybody suggest how to
implement it.
Net SNMP has default implementation of "*sysName*". I want to modify
*sysName* value whenever SNMP server query, sysName is not constant it
will be dynamic value. But I do not want to modify exist code of Net SNMP.
Is there any way to achieve it?.
--
Vivek Maurya
------------------------------------------------------------
------------------
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-users mailing list
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Vivek Maurya
2014-12-30 08:55:40 UTC
Permalink
I do not want to modify SNMP exist code.
Post by NIJESH V P
net-snmp/agent/mibgroup/mibII/system_mib.c contain the code of sysname
implementation.you can add your code there.
XXXXXXXXXXXX
...............
static void
system_parse_config_sysname(const char *token, char *cptr)
{
system_parse_config_string(token, cptr, "sysName", sysName,
sizeof(sysName), &sysNameSet);
}
.............................................
check this
Post by NIJESH V P
you can change sysname using snmpset request.
Post by Vivek Maurya
Hi All,
I have following scenario to develop, could anybody suggest how to
implement it.
Net SNMP has default implementation of "*sysName*". I want to modify
*sysName* value whenever SNMP server query, sysName is not constant it
will be dynamic value. But I do not want to modify exist code of Net SNMP.
Is there any way to achieve it?.
--
Vivek Maurya
------------------------------------------------------------
------------------
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-users mailing list
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
--
Vivek
8796174307(Pune)
Wes Hardaker
2014-12-31 01:50:15 UTC
Permalink
Post by Vivek Maurya
I do not want to modify SNMP exist code.
You can configure the agent to remove the implementation of that
variable and re-implement it using an extension instead. See the
"EXTENDING AGENT FUNCTIONALITY" section of the snmpd.conf manual page.
--
Wes Hardaker
Parsons
Pal
2014-12-31 02:18:46 UTC
Permalink
Why can't you just add "sysName <your-sys-name>" in your agents snmpd.conf file?
Agent will parse this and sets the hostname accordingly.
Thanks

Sent from my iPhone
Post by Wes Hardaker
Post by Vivek Maurya
I do not want to modify SNMP exist code.
You can configure the agent to remove the implementation of that
variable and re-implement it using an extension instead. See the
"EXTENDING AGENT FUNCTIONALITY" section of the snmpd.conf manual page.
--
Wes Hardaker
Parsons
------------------------------------------------------------------------------
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-users mailing list
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Vivek Maurya
2014-12-31 09:45:51 UTC
Permalink
Thanks Pal & Wes
Post by Pal
Why can't you just add "sysName <your-sys-name>" in your agents snmpd.conf
file?
Agent will parse this and sets the hostname accordingly.
Thanks
Sent from my iPhone
On Dec 30, 2014, at 5:50 PM, Wes Hardaker <
Post by Vivek Maurya
I do not want to modify SNMP exist code.
You can configure the agent to remove the implementation of that
variable and re-implement it using an extension instead. See the
"EXTENDING AGENT FUNCTIONALITY" section of the snmpd.conf manual page.
--
Wes Hardaker
Parsons
------------------------------------------------------------------------------
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-users mailing list
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
--
Vivek
8796174307(Pune)
Loading...