anchor.diff:      end,
       Config.
   
  +find_executables([], Config) ->
  +    Config;
  +find_executables([Exec | Execs], Config) ->
  +    case os:find_executable(atom_to_list(Exec)) of
  +	false ->
  +	    {skip, Exec ++ " not found"};
  +	Path ->
  +	    find_executables(
  +	      Execs,
  +	      [{Exec, Path} | Config])
  +    end.
  +
   start_agent(Config) ->
       ok = application:load(snmp),
       ok = application:set_env(snmp, agent, app_env(Config)),
  
positive.code:     ].
  
  groups() ->
      [{ipv4, [],    [{group, get},
  		    {group, inform}
  		   ]},
       {ipv6, [],    [{group, get},
  		    {group, inform},
  		    {group, dual_ip}
  		   ]},
       {get, [],     [erlang_agent_netsnmp_get]},
       {inform, [],  [erlang_agent_netsnmp_inform]},
       {dual_ip, [], [erlang_agent_dual_ip_get]}
      ].
  
  init_per_suite(Config) ->
  
negative.code:     agent_config(Dir, Transports, Domain, TrapAddr, Versions),
      [{host, Host}, {snmp_versions, Versions}, {ip_version, ipv4}
       | 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 ->
  		    Dir = ?config(priv_dir, Config),
  		    Domain = transportDomainUdpIpv4,
  		    AgentPort = ?config(agent_port, Config),
  		    ManagerPort = ?config(manager_port, Config),
  		    {ok, Host} = inet:gethostname(),
  		    {ok, IPv4Addr} = inet:getaddr(Host, inet),
  		    {ok, IPv6Addr} = inet:getaddr(Host, inet6),
  		    Transports =
  			[{Domain, {IPv4Addr, AgentPort}},
  			 {transportDomainUdpIpv6, {IPv6Addr, AgentPort}}],
  		    Targets =
  			[{Domain, {IPv4Addr, ManagerPort}},
  			 {transportDomainUdpIpv6, {IPv6Addr, ManagerPort}}],
  		    Versions = [v2],
  		    agent_config(Dir, Transports, Targets, Versions),
  		    [{host, Host}, {port, ?AGENT_PORT},
  		     {snmp_versions, Versions}
  		     | NewConfig];
  		_ ->
  		    {skip, "Host does not support IPV6"}
  	    end;
  	Other ->
  	    Other
      end;
  %%
  init_per_group(get, Config) ->
      %% From Ubuntu package snmp
      find_executables([snmpget], Config);
  %%
  init_per_group(inform, Config) ->
      %% From Ubuntu package snmptrapfmt
      find_executables([snmptrapd], Config);
  init_per_group(_, Config) ->
      Config.
  
  