1%%
2%% %CopyrightBegin%
3%%
4%% Copyright Ericsson AB 2009-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(snmpm_net_if_filter).
21
22-export([accept_recv/2,
23	 accept_send/2,
24	 accept_recv_pdu/3,
25	 accept_send_pdu/3]).
26
27-include("snmp_debug.hrl").
28
29accept_recv(Domain, _Address) when is_atom(Domain) ->
30    ?d("accept_recv -> entry with~n"
31       "   Domain:  ~p~n"
32       "   Address: ~p", [Domain, _Address]),
33    true;
34accept_recv(_Addr, Port) when is_integer(Port) ->
35    ?d("accept_recv -> entry with~n"
36       "   Addr: ~p~n"
37       "   Port: ~p", [_Addr, Port]),
38    true.
39
40accept_send(Domain, _Address) when is_atom(Domain) ->
41    ?d("accept_send -> entry with~n"
42       "   Domain:  ~p~n"
43       "   Address: ~p", [Domain, _Address]),
44    true;
45accept_send(_Addr, Port) when is_integer(Port) ->
46    ?d("accept_send -> entry with~n"
47       "   Addr: ~p~n"
48       "   Port: ~p", [_Addr, Port]),
49    true.
50
51accept_recv_pdu(Domain, _Address, _PduType) when is_atom(Domain) ->
52    ?d("accept_recv_pdu -> entry with~n"
53       "   Domain:  ~p~n"
54       "   Address: ~p~n"
55       "   PduType: ~p", [Domain, _Address, _PduType]),
56    true;
57accept_recv_pdu(_Addr, Port, _PduType) when is_integer(Port) ->
58    ?d("accept_recv_pdu -> entry with~n"
59       "   Addr: ~p~n"
60       "   Port: ~p~n"
61       "   PduType: ~p", [_Addr, Port, _PduType]),
62    true.
63
64accept_send_pdu(Domain, _Address, _PduType) when is_atom(Domain) ->
65    ?d("accept_send_pdu -> entry with~n"
66       "   Domain:  ~p~n"
67       "   Address: ~p~n"
68       "   PduType: ~p", [Domain, _Address, _PduType]),
69    true;
70accept_send_pdu(_Addr, Port, _PduType) when is_integer(Port) ->
71    ?d("accept_send_pdu -> entry with~n"
72       "   Addr:    ~p~n"
73       "   Port:    ~p~n"
74       "   PduType: ~p", [_Addr, Port, _PduType]),
75    true.
76
77