X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=doc%2Fhtml%2Fref%2Fnet-snmp-starting-the-snmp-agent.html;fp=doc%2Fhtml%2Fref%2Fnet-snmp-starting-the-snmp-agent.html;h=0000000000000000000000000000000000000000;hb=739c21725ce2774a605a0f1de3edaac2c43aea0f;hp=b209c10c53112315dd7a9c1e688c71ffa82dc779;hpb=ae71e0fa8076a1b59600b3a0ea10155a2cb534ae;p=karo-tx-redboot.git diff --git a/doc/html/ref/net-snmp-starting-the-snmp-agent.html b/doc/html/ref/net-snmp-starting-the-snmp-agent.html deleted file mode 100644 index b209c10c..00000000 --- a/doc/html/ref/net-snmp-starting-the-snmp-agent.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - - - -
A routine to instantiate and start the SNMP agent thread in the default -configuration is provided in -PACKAGES/net/snmp/agent/VERSION/src/snmptask.c
It starts the snmpd thread at priority -CYGPKG_NET_THREAD_PRIORITY+1 -by default, ie. one step less important than the TCP/IP stack service -thread. -It also statically creates and uses a very large stack of around 100 -KiloBytes. -To use that convenience function, this code fragment may be copied (in -plain C).
#ifdef CYGPKG_SNMPAGENT -{ - extern void cyg_net_snmp_init(void); - cyg_net_snmp_init(); - -} -#endif |
In case you need to perform initialization, for example setting up SNMPv3 -security features, when the snmp agent starts and every time it restarts, -you can register a callback function by simply writing the global variable: -
externC void (*snmpd_reinit_function)( void ); |
The entry point to the SNMP agent is -
externC void snmpd( void (*initfunc)( void ) ); |
Note that if you call snmpd(); yourself and do -not call cyg_net_snmp_init(); then -that routine, global variable, and the default large stack will not be -used. This is the recommended way control such features from your -application; create and start the thread yourself at the appropriate -moment.
Other APIs from the snmpd module are available, -specifically: -
void SnmpdShutDown(int a); |
The parameter a is ignored. It is there because in -snmpd's “natural environment” this routine -is a UNIX signal handler.
The helper functions in the network stack for managing -DHCP -leases will call SnmpdShutDown() -when necessary, for example if network interfaces go down and/or come up -again.