slirp: Make slirp_lookup() a public function net_slirp_lookup()

Make slirp_lookup() a public function so other files can look up the
Slirp stack too. We improve the interface a bit so this is practical:
 * use Error arguments to report failures rather than calling
   monitor_printf() directly
 * return a Slirp* rather than a SlirpStack*, since the latter is a type
   local to this source file
 * rename to net_slirp_lookup() to match the other public functions
   in net/slirp.h

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
qemu-char: Add a chr_del_client method to char backends

Add a chr_del_client method to char backends. This makes sense
mostly for TCP, where it means "close the current connection and
then go back to listening for a new one"; the semantics are
as if the remote end had closed the connection.

This could for completeness be supported for other backends
(eg pipe, fd, tty), but this patch only supports it in TCP.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
monitor.c: Add support for Android console

Implement the Android console by hijacking the stock QEMU
monitor and implementing a different command set.

This commit provides the initial minimal framework and
changes to the core monitor code; it implements only the
two commands 'help' and 'kill'.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
android-console: Add support for redir commands

Add support for the redir commands which allow addition, removal
and listing of TCP and UDP port rediroctions.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
android-console: Implement quit

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
android-console: Add KO: prefix to parser syntax error messages

Indirect all the syntax error messages from the command parser
through a function pointer, so the Android console can override
it to put the KO: prefix on them.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
android-console: Make 'help' output match the classic emulator

Implement the 'help' command ourselves rather than using the
monitor's usual version, so we can make the output text match the
format of the classic emulator. This might not be necessary but
perhaps external tools are parsing the output to see what commands
are supported.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
.travis.yml: disable IRC notifications
.travis.yml: refactor build steps into script.
android_pipe: import the qemu_pipe/goldfish_pipe code

This brings in the android emulator pipe code from the current aosp-qemu
master branch. It works with and has been tested with the pingpong
pipe device. Currently the device cannot save and restore.

  - remove dependency on android utils (ANEW/ASTRDUP/AFREE)
  - detach from the goldfish_device bus bits (inc irq raising)
  - import a few helper functions (uint64_set_high/low, goldfish_guest_is_64bit)
  - disable the VM save/restore code
  - use current_cpu for memory translation ops instead of cpu_single_env
  - fix debugging prints using portable formats
  - common code path for translating vaddr->qemu addr*
  - make some debug statments user-visible (unimp and guest errors)

There is a hacking backlink between AndroidPipeState and the PipeDevice
stuff (which should be merged cleanly later) just so we can get back to
->irq when we need to.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---

v2
 - Fix get_qemu_addr_of_guest_buffer() to use cpu_physical_memory_map(),
 - remove remaining dead code (#if 0/commented)
 - rename remaining Goldfish/goldfish_ to Android/android_
 - add a little commentary to the top of the file
 - completely remove state save/restore code
 - add some FIXME statements where known
hw/arm/ranchu: add pipe device