« Back to documentation index 
    
msg_in.c File Reference 
SNMP input message processing (RFC1157).  
More... 
Go to the source code of this file. 
static err_t  snmp_pdu_header_check  (struct pbuf *p, u16_t ofs, u16_t pdu_len, u16_t *ofs_ret, struct snmp_msg_pstat *m_stat)  Checks and decodes incoming SNMP message header, logs header errors.   void  snmp_init  (void)  Starts SNMP Agent.   static void  snmp_msg_get_event  (u8_t request_id, struct snmp_msg_pstat *msg_ps)  Service an internal or external event for SNMP GET.   static void  snmp_msg_getnext_event  (u8_t request_id, struct snmp_msg_pstat *msg_ps)  Service an internal or external event for SNMP GETNEXT.   static void  snmp_msg_set_event  (u8_t request_id, struct snmp_msg_pstat *msg_ps)  Service an internal or external event for SNMP SET.   void  snmp_msg_event  (u8_t request_id)  Handle one internal or external event.   struct snmp_varbind *  snmp_varbind_alloc  (struct snmp_obj_id  *oid, u8_t type, u8_t len)  Varbind-list functions.   const s32_t  snmp_version  = 0  SNMP v1 == 0.   const char  snmp_publiccommunity  [7] = "public"  default SNMP community string   
Detailed Description 
SNMP input message processing (RFC1157). 
Definition in file msg_in.c .
Function Documentation 
Starts SNMP Agent. 
Agent setup, start listening to port 161.
Allocates UDP pcb and binds it to IP_ADDR_ANY port 161. 
Definition at line 71  of file msg_in.c .
 
 
      
        
          void snmp_msg_event  
          ( 
          u8_t  
           request_id  ) 
           
      
 
Handle one internal or external event. 
Handle an internal (recv) or external (private response) event.
Called for one async event. (recv external/private answer)
Parameters: 
  
    request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1)  
   
Definition at line 784  of file msg_in.c .
 
 
      
        
          static void snmp_msg_get_event  
          ( 
          u8_t  
           request_id ,  
         
        
          struct snmp_msg_pstat *  
           msg_ps   
         
        
          ) 
           [static] 
      
 
Service an internal or external event for SNMP GET. 
Parameters: 
  
    request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1)  msg_ps points to the assosicated message process state  
   
test object identifier for .iso.org.dod.internet prefix 
Definition at line 147  of file msg_in.c .
 
 
      
        
          static void snmp_msg_getnext_event  
          ( 
          u8_t  
           request_id ,  
         
        
          struct snmp_msg_pstat *  
           msg_ps   
         
        
          ) 
           [static] 
      
 
Service an internal or external event for SNMP GETNEXT. 
Parameters: 
  
    request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1)  msg_ps points to the assosicated message process state  
   
Definition at line 380  of file msg_in.c .
 
 
      
        
          static void snmp_msg_set_event  
          ( 
          u8_t  
           request_id ,  
         
        
          struct snmp_msg_pstat *  
           msg_ps   
         
        
          ) 
           [static] 
      
 
Service an internal or external event for SNMP SET. 
Parameters: 
  
    request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1)  msg_ps points to the assosicated message process state  
   
set_value_a()
test object identifier for .iso.org.dod.internet prefix 
Definition at line 525  of file msg_in.c .
 
 
      
        
          static err_t snmp_pdu_header_check  
          ( 
          struct pbuf *  
           p ,  
         
        
          u16_t  
           ofs ,  
         
        
          u16_t  
           pdu_len ,  
         
        
          u16_t *  
           ofs_ret ,  
         
        
          struct snmp_msg_pstat *  
           m_stat   
         
        
          ) 
           [static] 
      
 
Checks and decodes incoming SNMP message header, logs header errors. 
Parameters: 
  
    p points to pbuf chain of SNMP message (UDP payload)  ofs points to first octet of SNMP message  pdu_len the length of the UDP payload  ofs_ret returns the ofset of the variable bindings  m_stat points to the current message request state return  
   
Returns: 
ERR_OK SNMP header is sane and accepted 
ERR_ARG SNMP header is either malformed or rejected  
 
Definition at line 903  of file msg_in.c .
 
 
      
        
          struct snmp_varbind* snmp_varbind_alloc  
          ( 
          struct snmp_obj_id  *  
           oid ,  
         
        
          u8_t  
           type ,  
         
        
          u8_t  
           len   
         
        
          ) 
           [read] 
      
 
Varbind-list functions. 
Definition at line 1303  of file msg_in.c .
 
 
Variable Documentation 
default SNMP community string 
Agent default "public" community string. 
Definition at line 54  of file msg_in.c .
 
 
SNMP v1 == 0. 
Agent Version constant, 0 = v1 oddity. 
Definition at line 52  of file msg_in.c .