Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

snmpa_network_interface_filter(3erl) [linux man page]

snmpa_network_interface_filter(3erl)			     Erlang Module Definition			      snmpa_network_interface_filter(3erl)

NAME
snmpa_network_interface_filter - Behaviour module for the SNMP agent network-interface filter. DESCRIPTION
This module defines the behaviour of the agent network interface filter. A snmpa_network_interface_filter compliant module must export the following functions: * accept_recv/2 * accept_send/2 * accept_recv_pdu/3 * accept_send_pdu/2 The semantics of them and their exact signatures are explained below. The purpose of the network interface filter is to allow for filtering of messages (accept or reject) receive and send. This is done on two levels: * The first level is at the UDP entry / exit point, i.e. immediately after the receipt of the message, before any message processing is done (accept_recv) and immediately before sending the message, after all message processing is done (accept_send). * The second level is at the MPD entry / exit point, i.e. immediately after the basic message processing (accept_recv_pdu) / immediately before the basic message processing (accept_send_pdu). Note that the network interface filter is something which is used by the network interface implementation provided by the application ( snmpa_net_if ). The default filter accepts all messages. A network interface filter can e.g. be used during testing or for load regulation. If the intended use is load regulation, see also req_limit and the function register_notification_filter . DATA TYPES
port() = integer() > 0 pdu_type() = 'get-request' | 'get-next-request' | 'get-response' | 'set-request' | trap | 'get-bulk-request' | 'inform-request' | report EXPORTS
accept_recv(Ip, Port) -> boolean() Types Ip = ip_address() Port = port() Called at the reception of a message (before any processing has been done). For the message to be discarded, the function must return false . accept_send(Ip, Port) -> boolean() Types Ip = ip_address() Port = port() Called before the sending of a message (after all processing has been done). For the message to be discarded, the function must return false . accept_recv_pdu(Ip, Port, PduType) -> boolean() Types Ip = ip_address() Port = port() PduType = pdu_type() Called after the basic message processing (MPD) has been done, but before the pdu is handed over to the master-agent for primary processing. For the pdu to be discarded, the function must return false . accept_send_pdu(Targets, PduType) -> Reply Types Targets = targets() targets() = [target()] target() = {ip_address(), port()} PduType = pdu_type() > 0 Reply = boolean() | NewTargets NewTargets = targets() Called before the basic message processing (MPD) is done, when a pdu has been received from the master-agent. For the message to be discarded all together, the function must return false . Note that it is possible for this function to filter out targets (but not add its own) by returning an updated Targets list ( New- Targets ). Ericsson AB snmp 4.19 snmpa_network_interface_filter(3erl)

Check Out this Related Man Page

snmpm_user(3erl)					     Erlang Module Definition						  snmpm_user(3erl)

NAME
snmpm_user - Behaviour module for the SNMP manager user. DESCRIPTION
This module defines the behaviour of the manager user. A snmpm_user compliant module must export the following functions: * handle_error/3 * handle_agent/4 * handle_pdu/4 * handle_trap/3 * handle_inform/3 * handle_report/3 The semantics of them and their exact signatures are explained below. Note that if an agent is registered using the old, no longer documented, functions (using Addr and Port), the old variant of the callback functions, handle_pdu, handle_trap, handle_inform and handle_report, will be called. EXPORTS
handle_error(ReqId, Reason, UserData) -> Reply Types ReqId = integer() Reason = {unexpected_pdu, SnmpInfo} | {invalid_sec_info, SecInfo, SnmpInfo} | {empty_message, Addr, Port} | term() Addr = ip_address() Port = integer() UserData = term() Reply = ignore This function is called when the manager needs to communicate an "asynchronous" error, to the user: e.g. failure to send an asyn- chronous message (i.e. encoding error), a received message was discarded due to security error, the manager failed to generate a response message to a received inform-request, or when receiving an unexpected PDU from an agent (could be an expired async request). If ReqId is less then 0, it means that this information was not available to the manager (that info was never retrieved before the message was discarded). For SnmpInfo see handle_agent below. handle_agent(Addr, Port, Type, SnmpInfo, UserData) -> Reply Types Addr = ip_address() Port = integer() Type = pdu | trap | report | inform SnmpInfo = SnmpPduInfo | SnmpTrapInfo | SnmpReportInfo | SnmpInformInfo ErrorStatus = atom() ErrorIndex = integer() Varbinds = [varbind()] varbind() = #varbind UserData = term() Reply = ignore | {register, UserId, TargetName, agent_info()} UserId = term() TargetName = target_name() agent_info() = [{agent_info_item(), agent_info_value()}] This function is called when a message is received from an unknown agent. Note that this will always be the default user that is called. For more info about the agent_info() , see register_agent . The arguments Type and SnmpInfo relates in the following way: * pdu - SnmpPduInfo (see handle_pdu for more info). * trap - SnmpTrapInfo (see handle_trap for more info). * report - SnmpReportInfo (see handle_report for more info). * inform - SnmpInformInfo (see handle_inform for more info). The only user which would return {register, UserId, TargetName, agent_info()} is the default user . handle_pdu(TargetName, ReqId, SnmpPduInfo, UserData) -> Reply Types TargetName = target_name() ReqId = term() SnmpPduInfo = {ErrorStatus, ErrorIndex, Varbinds} ErrorStatus = atom() ErrorIndex = integer() Varbinds = [varbind()] varbind() = #varbind UserData = term() Reply = ignore Handle the reply to an asynchronous request, such as async_get , async_get_next or async_set . It could also be a late reply to a synchronous request. ReqId is returned by the asynchronous request function. handle_trap(TargetName, SnmpTrapInfo, UserData) -> Reply Types TargetName = TargetName2 = target_name() SnmpTrapInfo = {Enteprise, Generic, Spec, Timestamp, Varbinds} | {ErrorStatus, ErrorIndex, Varbinds} Enterprise = oid() Generic = integer() Spec = integer() Timestamp = integer() ErrorStatus = atom() ErrorIndex = integer() Varbinds = [varbind()] varbind() = #varbind UserData = term() Reply = ignore | unregister | {register, UserId, TargetName2, agent_info()} UserId = term() agent_info() = [{agent_info_item(), agent_info_value()}] Handle a trap/notification message from an agent. For more info about the agent_info() , see register_agent The only user which would return {register, UserId, TargetName2, agent_info()} is the default user . handle_inform(TargetName, SnmpInformInfo, UserData) -> Reply Types TargetName = TargetName2 = target_name() SnmpInformInfo = {ErrorStatus, ErrorIndex, Varbinds} ErrorStatus = atom() ErrorIndex = integer() Varbinds = [varbind()] varbind() = #varbind UserData = term() Reply = ignore | unregister | {register, UserId, TargetName2, agent_info()} UserId = term() agent_info() = [{agent_info_item(), agent_info_value()}] Handle a inform message. For more info about the agent_info() , see register_agent The only user which would return {register, UserId, TargetName2, agent_info()} is the default user . If the inform request behaviour configuration option is set to user or {user, integer()} , the response (acknowledgment) to this inform-request will be sent when this function returns. handle_report(TargetName, SnmpReportInfo, UserData) -> Reply Types TargetName = TargetName2 = target_name() Addr = ip_address() Port = integer() SnmpReportInfo = {ErrorStatus, ErrorIndex, Varbinds} ErrorStatus = atom() ErrorIndex = integer() Varbinds = [varbind()] varbind() = #varbind UserData = term() Reply = ignore | unregister | {register, UserId, TargetName2, agent_info()} UserId = term() agent_info() = [{agent_info_item(), agent_info_value()}] Handle a report message. For more info about the agent_info() , see register_agent The only user which would return {register, UserId, TargetName2, agent_info()} is the default user . Ericsson AB snmp 4.19 snmpm_user(3erl)
Man Page