Changes between Version 5 and Version 6 of Packages/SNMP


Ignore:
Timestamp:
07/17/15 23:42:31 (9 years ago)
Author:
Chris Johns
Comment:

Add formatting to make the code section readable.

Legend:

Unmodified
Added
Removed
Modified
  • Packages/SNMP

    v5 v6  
    1313
    1414You can build NetSNMP using the [wiki:TBR/UserManual/RTEMS_Source_Builder RTEMS Source Builder] (RSB). Get the RSB to build your tools and RTEMS then:
    15 
     15{{{
    1616  $ cd rtems
    1717  $ ../source-builder/sb-set-builder --log=log_net_snmp_zynq \
     
    2020         --host=arm-rtems4.11 --with-rtems-bsp=xilinx_zynq_zc706 \
    2121                      4.11/net-mgmt/net-snmp
    22 
     22}}}
    2323This will build the latest NetSNMP (5.7.2.1) build for the Xilinx Zynq ZC702 BSP.
    2424
     
    2828
    2929The NetSNMP agent runs as a single task under RTEMS. The agents main is compiled specifically for RTEMS and is involked by calling the function:
    30 
     30{{{
    3131  int snmpd_init (rtems_task_priority priority, char* cmdline);
    32 
     32}}}
    3333The command line is the documented in the snmpd man page ([http://net-snmp.sourceforge.net/docs/man/snmpd.html]). Select the priority that suites your application. SNMP will use your processing resources and as it is typically used for monitoring a priority lower than your important real-time tasks as well as the networking stack is recommended.
    3434
     
    3838
    3939The standard NetSNMP configure script creates a list of modules that the agent supports. The modules active when snmpd is running is controlled by command line options. This makes sense on a Unix or Windows host. Here you build into the agent all that is supported by the host and the system administrator enables what is needed. On an embedded system this approach results in an executable that is much larger than required. To keep the image size to what you need a function called by the agent that specifies the list of agent modules you require needs to be provided. An RTEMS application may look like:
    40 
     40{{{
    4141 #include <stdio.h>
    4242 #include <rtems.h>
     
    138138   rtems_task_delete (RTEMS_SELF);
    139139 }
     140}}}