1%%
2%% %CopyrightBegin%
3%%
4%% Copyright Ericsson AB 2007-2016. All Rights Reserved.
5%%
6%% Licensed under the Apache License, Version 2.0 (the "License");
7%% you may not use this file except in compliance with the License.
8%% You may obtain a copy of the License at
9%%
10%%     http://www.apache.org/licenses/LICENSE-2.0
11%%
12%% Unless required by applicable law or agreed to in writing, software
13%% distributed under the License is distributed on an "AS IS" BASIS,
14%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15%% See the License for the specific language governing permissions and
16%% limitations under the License.
17%%
18%% %CopyrightEnd%
19%%
20-module(snmpa_net_if_filter).
21
22%% Behaviour
23-export([accept_recv/2, accept_send/2, accept_recv_pdu/3, accept_send_pdu/2]).
24
25-include("snmp_debug.hrl").
26
27accept_recv(Domain, _Address) when is_atom(Domain) ->
28    ?d("accept_recv -> entry with~n"
29       "   Domain:  ~p~n"
30       "   Address: ~p", [Domain, _Address]),
31    true;
32accept_recv(_Addr, Port) when is_integer(Port) ->
33    ?d("accept_recv -> entry with~n"
34       "   Addr: ~p~n"
35       "   Port: ~p", [_Addr, Port]),
36    true.
37
38accept_send(Domain, _Address) when is_atom(Domain) ->
39    ?d("accept_send -> entry with~n"
40       "   Domain:  ~p~n"
41       "   Address: ~p", [Domain, _Address]),
42    true;
43accept_send(_Addr, Port) when is_integer(Port) ->
44    ?d("accept_send -> entry with~n"
45       "   Addr: ~p~n"
46       "   Port: ~p", [_Addr, Port]),
47    true.
48
49accept_recv_pdu(Domain, _Address, _PduType) when is_atom(Domain) ->
50    ?d("accept_recv -> entry with~n"
51       "   Domain:  ~p~n"
52       "   Address: ~p~n"
53       "   PduType: ~p", [Domain, _Address, _PduType]),
54    true;
55accept_recv_pdu(_Addr, Port, _PduType) when is_integer(Port) ->
56    ?d("accept_recv_pdu -> entry with~n"
57       "   Addr: ~p~n"
58       "   Port: ~p~n"
59       "   PduType: ~p", [_Addr, Port, _PduType]),
60    true.
61
62accept_send_pdu(_Targets, _PduType) ->
63    ?d("accept_send_pdu -> entry with~n"
64       "   Targets: ~p~n"
65       "   PduType: ~p", [_Targets, _PduType]),
66    true.
67
68