38 #ifndef LWIP_HDR_APPS_SNMP_THREADSYNC_H 
   39 #define LWIP_HDR_APPS_SNMP_THREADSYNC_H 
   41 #include "lwip/apps/snmp_opts.h" 
   49 #include "lwip/apps/snmp_core.h" 
   52 typedef void (*snmp_threadsync_called_fn)(
void* arg);
 
   53 typedef void (*snmp_threadsync_synchronizer_fn)(snmp_threadsync_called_fn fn, 
void* arg);
 
   57 struct threadsync_data
 
   64     const u32_t *root_oid;
 
   71   const struct snmp_threadsync_node *threadsync_node;
 
   72   struct snmp_node_instance proxy_instance;
 
   76 struct snmp_threadsync_instance
 
   80   snmp_threadsync_synchronizer_fn sync_fn;
 
   81   struct threadsync_data          data;
 
   85 struct snmp_threadsync_node
 
   88   struct snmp_leaf_node           node;
 
   90   const struct snmp_leaf_node     *target;
 
   91   struct snmp_threadsync_instance *instance;
 
   94 snmp_err_t snmp_threadsync_get_instance(
const u32_t *root_oid, 
u8_t root_oid_len, 
struct snmp_node_instance* instance);
 
   95 snmp_err_t snmp_threadsync_get_next_instance(
const u32_t *root_oid, 
u8_t root_oid_len, 
struct snmp_node_instance* instance);
 
   98 #define SNMP_CREATE_THREAD_SYNC_NODE(oid, target_leaf_node, threadsync_instance) \ 
   99   {{{ SNMP_NODE_THREADSYNC, (oid) }, \ 
  100     snmp_threadsync_get_instance, \ 
  101     snmp_threadsync_get_next_instance }, \ 
  102     (target_leaf_node), \ 
  103     (threadsync_instance) } 
  106 void snmp_threadsync_init(
struct snmp_threadsync_instance *instance, snmp_threadsync_synchronizer_fn sync_fn);