Version of http://mbed.org/cookbook/NetServicesTribute with setting set the same for LPC2368

Dependents:   UDPSocketExample 24LCxx_I2CApp WeatherPlatform_pachube HvZServerLib ... more

Embed: (wiki syntax)

« Back to documentation index

msg_in.c File Reference

msg_in.c File Reference

SNMP input message processing (RFC1157). More...

Go to the source code of this file.

Functions

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.

Variables

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

void snmp_init ( void   )

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_ididentifies 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_ididentifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1)
msg_pspoints 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_ididentifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1)
msg_pspoints 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_ididentifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1)
msg_pspoints 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:
ppoints to pbuf chain of SNMP message (UDP payload)
ofspoints to first octet of SNMP message
pdu_lenthe length of the UDP payload
ofs_retreturns the ofset of the variable bindings
m_statpoints 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

const char snmp_publiccommunity[7] = "public"

default SNMP community string

Agent default "public" community string.

Definition at line 54 of file msg_in.c.

const s32_t snmp_version = 0

SNMP v1 == 0.

Agent Version constant, 0 = v1 oddity.

Definition at line 52 of file msg_in.c.