[Ericsson AB]

12 Definition of Agent Net if

snmp_agent_netif_1
The Purpose of Agent Net if

The Network Interface (Net if) process delivers SNMP PDUs to a master agent, and receives SNMP PDUs from the master agent. The most common behaviour of a Net if process is that is receives bytes from a network, decodes them into an SNMP PDU, which it sends to a master agent. When the master agent has processed the PDU, it sends a response PDU to the Net if process, which encodes the PDU into bytes and transmits the bytes onto the network.

However, that simple behaviour can be modified in numerous ways. For example, the Net if process can apply some kind of encrypting/decrypting scheme on the bytes or act as a proxy filter, which sends some packets to a proxy agent and some packets to the master agent.

It is also possible to write your own Net if process. The default Net if process is implemented in the module snmpa_net_if and it uses UDP as the transport protocol.

This section describes how to write a Net if process.

12.1 Mandatory Functions

A Net if process must implement the SNMP agent network interface behaviour.

12.2 Messages

The section Messages describes mandatory messages, which Net if must send and be able to receive.

12.2.1 Outgoing Messages

Net if must send the following message when it receives an SNMP PDU from the network that is aimed for the MasterAgent:

MasterAgent ! {snmp_pdu, Vsn, Pdu, PduMS, ACMData, From, Extra}
      

The following message is used to report that a response to a request has been received. The only request an agent can send is an Inform-Request.

Pid ! {snmp_response_received, Vsn, Pdu, From}
      

12.2.2 Incoming Messages

This section describes the incoming messages which a Net if process must be able to receive.

12.2.3 Notes

Since the Net if process is responsible for encoding and decoding of SNMP messages, it must also update the relevant counters in the SNMP group in MIB-II. It can use the functions in the module snmpa_mpd for this purpose (refer to the Reference Manual, section snmp, module snmpa_mpd for more details.)

There are also some useful functions for encoding and decoding of SNMP messages in the module snmp_pdus.


Copyright © 1991-2006 Ericsson AB