anchor.diff:  %%  {Name, Ip, Udp, Timeout, RetryCount, TagList, Params, EngineId,
   %%   TMask, MMS}
   %%-----------------------------------------------------------------
  -check_target_addr({Name, Ip, Udp, Timeout, RetryCount, TagList,
  -                   Params, EngineId, TMask, MMS}) ->
  +default_domain() ->
  +    snmpUDPDomain.
  +
  +check_target_addr({Name, Domain, Ip, Udp, Timeout, RetryCount, TagList,
  +		   Params, EngineId, TMask, MMS}) ->
       ?vtrace("check target address with:"
  -	"~n   Name:       ~s"
  -	"~n   Ip:         ~p"
  -	"~n   Udp:        ~p"
  -	"~n   Timeout:    ~p"
  -	"~n   RetryCount: ~p"
  -	"~n   TagList:    ~p"
  -	"~n   Params:     ~p"
  -	"~n   EngineId:   ~p"
  -	"~n   TMask:      ~p"
  -	"~n   MMS:        ~p",
  -    [Name,Ip,Udp,Timeout,RetryCount,
  -     TagList,Params,EngineId,TMask,MMS]),
  +	    "~n   Name:       ~s"
  +	    "~n   Domain:     ~p"
  +	    "~n   Ip:         ~p"
  +	    "~n   Udp:        ~p"
  +	    "~n   Timeout:    ~p"
  +	    "~n   RetryCount: ~p"
  +	    "~n   TagList:    ~p"
  +	    "~n   Params:     ~p"
  +	    "~n   EngineId:   ~p"
  +	    "~n   TMask:      ~p"
  +	    "~n   MMS:        ~p",
  +	    [Name, 
  +	     Domain, Ip, Udp, 
  +	     Timeout, RetryCount,
  +	     TagList, Params, EngineId, TMask, MMS]),
       snmp_conf:check_string(Name,{gt,0}),
  -    snmp_conf:check_ip(Ip),
  +    snmp_conf:check_domain(Domain),
  +    snmp_conf:check_ip(Domain, Ip),
       snmp_conf:check_integer(Udp, {gt, 0}),
       snmp_conf:check_integer(Timeout, {gte, 0}),
       snmp_conf:check_integer(RetryCount, {gte,0}),
       snmp_conf:check_string(TagList),
       snmp_conf:check_string(Params),
       check_engine_id(EngineId),
  -    TAddr = Ip ++ [Udp div 256, Udp rem 256],
  -    check_mask(TMask, TAddr),
  +    TAddress = snmp_conf:mk_taddress(Domain, Ip, Udp),
  +    TDomain  = snmp_conf:mk_tdomain(Domain), 
  +    check_mask(TDomain, TMask, TAddress),
       snmp_conf:check_packet_size(MMS),
       ?vtrace("check target address done",[]),
  -    
  -    Addr = {Name, ?snmpUDPDomain, TAddr, Timeout,
  +    Addr = {Name, TDomain, TAddress, Timeout,
   	    RetryCount, TagList, Params,
   	    ?'StorageType_nonVolatile', ?'RowStatus_active', EngineId,
               TMask, MMS}, % Values for Augmenting table in SNMP-COMMUNITY-MIB
       {ok, Addr};
  +check_target_addr({Name, Ip, Udp, Timeout, RetryCount, TagList,
  +                   Params, EngineId, TMask, MMS}) ->
  +    Domain = default_domain(), 
  +    check_target_addr({Name, 
  +		       Domain, Ip, Udp, 
  +		       Timeout, RetryCount, TagList,
  +		       Params, EngineId, TMask, MMS});
   check_target_addr({Name, Ip, Udp, Timeout, RetryCount, TagList, Params, 
                      EngineId}) ->
       check_target_addr({Name, Ip, Udp, Timeout, RetryCount, TagList,
  
positive.code: init_var(Var) -> ets:insert(snmp_agent_table, {Var, 0}).
  
  vars() ->
      [snmpUnavailableContexts,
       snmpUnknownContexts].
  
  %%-----------------------------------------------------------------
  %% API functions
  
negative.code: 
  add_addr(Name, Ip, Port, Timeout, Retry, TagList, 
  	 Params, EngineId, TMask, MMS) ->
      Domain = default_domain(), 
      add_addr(Name, Domain, Ip, Port, Timeout, Retry, TagList, 
  	     Params, EngineId, TMask, MMS).
  
  add_addr(Name, Domain, Ip, Port, Timeout, Retry, TagList, 
  	 Params, EngineId, TMask, MMS) ->
      Addr = {Name, Domain, Ip, Port, Timeout, Retry, TagList, 
  	    Params, EngineId, TMask, MMS},
      case (catch check_target_addr(Addr)) of
  	{ok, Row} ->
  