anchor.diff:      find_executables([snmptrapd], Config);
   init_per_group(_, Config) ->
       Config.
  +
  +init_per_group_ip(Families, Config) ->
  +    Dir = ?config(priv_dir, Config),
  +    AgentPort = ?config(agent_port, Config),
  +    ManagerPort = ?config(manager_port, Config),
  +    Versions = [v2],
  +    {ok, Host} = inet:gethostname(),
  +    Transports =
  +	[begin
  +	     {ok, Addr} = inet:getaddr(Host, Family),
  +	     {domain(Family), {Addr, AgentPort}}
  +	 end || Family <- Families],
  +    Targets =
  +	[begin
  +	     {ok, Addr} = inet:getaddr(Host, Family),
  +	     {domain(Family), {Addr, ManagerPort}}
  +	 end || Family <- Families],
  +    agent_config(Dir, Transports, Targets, Versions),
  +    [{port, ?AGENT_PORT}, {snmp_versions, Versions},
  +     {transports, Transports}, {targets, Targets}
  +     | Config].
  +
  +
   
   end_per_group(_GroupName, Config) ->
       Config.
  
positive.code:       "from snmpnet manager"}].
  
  erlang_agent_netsnmp_get(Config) when is_list(Config) ->
      start_agent(Config),
      Oid = ?sysDescr_instance,
      Expected = expected(Oid, get),
      Expected = snmpget(Oid, Config),
      ok.
  
  %%--------------------------------------------------------------------
  erlang_agent_dual_ip_get() ->
      [{doc,"Test that we can access erlang snmp agent from both " 
        "snmpnet ipv4 and snmpnet ipv6 manager at the same time"}].
  erlang_agent_dual_ip_get(Config) when is_list(Config) ->
      start_agent(Config),
      Oid = ?sysDescr_instance,
      Expected = expected(Oid, get),
      Expected = snmpget(Oid, [{ip_version, ipv4} | Config]),
      Expected = snmpget(Oid, [{ip_version, ipv6} | Config]),
      ok.
  
  %%--------------------------------------------------------------------
  erlang_agent_netsnmp_inform(Config) when is_list(Config) ->
      [TrapAddr | _] = ?config(trapaddrs, Config),
      DataDir = ?config(data_dir, Config),
      Mib = "TestTrapv2",
  
      start_agent(Config),
      ok = snmpa:load_mib(snmp_master_agent, filename:join(DataDir, Mib)),
  
      TrapAddrStr = net_snmp_addr_str(TrapAddr, ?config(manager_port, Config)),
      ProgHandle = start_snmptrapd(Mib, TrapAddrStr, Config),
  
      snmpa:send_notification(
        snmp_master_agent, testTrapv22, {erlang_agent_test, self()}),
  
      receive
  	{snmp_targets, erlang_agent_test, Addresses} ->
  	    ct:pal("Notification sent to: ~p~n", [Addresses])
      end,
      receive
  	{snmp_notification, erlang_agent_test, {got_response, Address}} ->
  	    ct:pal("Got response from: ~p~n", [Address]),
  	    ok;
  	{snmp_notification, erlang_agent_test, {no_response, _} = 
  	     NoResponse} ->
  	    ct:fail(NoResponse)
      end,
  
      stop_program(ProgHandle).
  	
  %%--------------------------------------------------------------------
  erlang_agent_dual_ip_inform(Config) when is_list(Config) ->
      [TrapAddr1, TrapAddr2 | _] = ?config(trapaddrs, Config),
      ManagerPort = ?config(manager_port, Config),
      DataDir = ?config(data_dir, Config),
      Mib = "TestTrapv2",
  
      start_agent(Config),
      ok = snmpa:load_mib(snmp_master_agent, filename:join(DataDir, Mib)),
  
      TrapAddrs =
  	net_snmp_addr_str(TrapAddr1, ManagerPort) ++
  	"," ++
  	net_snmp_addr_str(TrapAddr2, ManagerPort),
      ProgHandle = start_snmptrapd(Mib, TrapAddrs, Config),
  
      snmpa:send_notification(
        snmp_master_agent, testTrapv22, {erlang_agent_test, self()}),
  
      receive
  	{snmp_targets, erlang_agent_test, Addresses} ->
  	    ct:pal("Notification sent to: ~p~n", [Addresses]),
  	    erlang_agent_dual_ip_inform_responses(Addresses)
      end,
      stop_program(ProgHandle).
  
  erlang_agent_dual_ip_inform_responses([]) ->
      receive
  	{snmp_notification, erlang_agent_test, _} = Unexpected ->
  	    ct:pal("Unexpected response: ~p", [Unexpected]),
  	    erlang_agent_dual_ip_inform_responses([])
      after 0 ->
  	    ok
      end;
  erlang_agent_dual_ip_inform_responses([Address | Addresses]) ->
      receive
  	{snmp_notification, erlang_agent_test,
  	 {got_response, Address}} ->
  	    ct:pal("Got response from: ~p~n", [Address]),
  	    erlang_agent_dual_ip_inform_responses(Addresses);
  	{snmp_notification, erlang_agent_test,
  	 {no_response, _} = NoResponse} ->
  	    ct:fail(NoResponse)
  
negative.code: init_per_group(ipv6, Config) ->
      case ct:require(ipv6_hosts) of
  	ok ->
  	    init_per_group_ip([inet6], Config);
  	_ ->
  	    {skip, "Host does not support IPV6"}
      end;
  %%
  init_per_group(ipv4, Config) ->
      init_per_group_ip([inet], Config);
  %%
  init_per_group(dual_ip, Config) ->
      case find_executables([snmpget, snmptrapd], Config) of
  	NewConfig when is_list(NewConfig) ->
  	    case ct:require(ipv6_hosts) of
  		ok ->
  		    init_per_group_ip([inet, inet6], NewConfig);
  		_ ->
  		    {skip, "Host does not support IPV6"}
  	    end;
  