 
     @hostapd_conf_file "hostapd.conf"
     @hostapd_pid_file "hostapd.pid"
+
+    @dnsmasq_conf_file "dnsmasq.conf"
+    @dnsmasq_pid_file "dnsmasq.pid"
 
     defp ensure_interface(interface) do
       unless interface in Nerves.NetworkInterface.interfaces() do

      Logger.busy(3, "Starting hostapd on #{interface}")
      ensure_interface(interface)

      {hostapd_port, hostapd_os_pid} = setup_hostapd(interface, "192.168.25.1")

      state = %State{
        hostapd: {hostapd_port, hostapd_os_pid},
        interface: interface,
        ip_addr: "192.168.25.1"
      }

      {:ok, state}
    end

    defp setup_hostapd(interface, ip_addr) do

      cond do
        port == hostapd_port ->
          handle_hostapd(data, state)
        match?({^port, _}, state.dnsmasq) ->
          handle_dnsmasq(data, state)
        true ->
          {:noreply, state}
      end
