sockets: switch over tcp/telnet/unix serial line to new helper functions (Gerd Hoffman)

This switches the tcp, telnet and unix socket support for character
devices (serial/parallel, ...) to the new socket helpers.  Thereby they
gain IPv6 support and also get ability to search for a free tcp port.
Syntax is the same as for vnc, using a to= option, like this:

	-serial tcp:localhost:5000,to=5099,server

This will check the 5000 -> 5099 port range (inclusive) for a free tcp
port.  Likewise you can get auto-allocated unix sockets by specifying an
empty path:

	-serial unix:,server

qemu will create a randomly named socket in $TMPDIR then.

tcp also got new "ipv4" and "ipv6" options to make qemu try only the
specified internet protocol version.

You can use the "info chardev" command added by the first patch in this
series to figure the tcp port / unix socket actually allocated.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5697 c046a42c-6fe2-441c-8c8c-71466251a162
1 file changed
tree: db10aff7a47def7c7abcb051da2c5f4aba2a5486
  1. audio/
  2. bsd-user/
  3. darwin-user/
  4. fpu/
  5. gdb-xml/
  6. hw/
  7. keymaps/
  8. linux-user/
  9. pc-bios/
  10. slirp/
  11. target-alpha/
  12. target-arm/
  13. target-cris/
  14. target-i386/
  15. target-m68k/
  16. target-mips/
  17. target-ppc/
  18. target-sh4/
  19. target-sparc/
  20. tcg/
  21. tests/
  22. .gitignore
  23. a.out.h
  24. aes.c
  25. aes.h
  26. aio.c
  27. alpha-dis.c
  28. alpha.ld
  29. arm-dis.c
  30. arm-semi.c
  31. arm.ld
  32. block-bochs.c
  33. block-cloop.c
  34. block-cow.c
  35. block-dmg.c
  36. block-nbd.c
  37. block-parallels.c
  38. block-qcow.c
  39. block-qcow2.c
  40. block-raw-posix.c
  41. block-raw-win32.c
  42. block-vmdk.c
  43. block-vpc.c
  44. block-vvfat.c
  45. block.c
  46. block.h
  47. block_int.h
  48. bswap.h
  49. bt-host.c
  50. bt-vhci.c
  51. buffered_file.c
  52. buffered_file.h
  53. Changelog
  54. check_ops.sh
  55. cocoa.m
  56. configure
  57. console.c
  58. console.h
  59. COPYING
  60. COPYING.LIB
  61. cpu-all.h
  62. cpu-defs.h
  63. cpu-exec.c
  64. cris-dis.c
  65. curses.c
  66. curses_keys.h
  67. cutils.c
  68. d3des.c
  69. d3des.h
  70. dis-asm.h
  71. disas.c
  72. disas.h
  73. dyngen-exec.h
  74. dyngen.c
  75. elf.h
  76. elf_ops.h
  77. exec-all.h
  78. exec.c
  79. feature_to_c.sh
  80. gdbstub.c
  81. gdbstub.h
  82. gen-icount.h
  83. host-utils.c
  84. host-utils.h
  85. hostregs_helper.h
  86. hpet.h
  87. hppa-dis.c
  88. hppa.ld
  89. i386-dis.c
  90. i386.ld
  91. ia64.ld
  92. keymaps.c
  93. kqemu.c
  94. kqemu.h
  95. kvm-all.c
  96. kvm.h
  97. LICENSE
  98. loader.c
  99. m68k-dis.c
  100. m68k-semi.c
  101. m68k.ld
  102. MAINTAINERS
  103. Makefile
  104. Makefile.target
  105. migration-exec.c
  106. migration-tcp.c
  107. migration.c
  108. migration.h
  109. mips-dis.c
  110. mips.ld
  111. mipsel.ld
  112. monitor.c
  113. nbd.c
  114. nbd.h
  115. net-checksum.c
  116. net.c
  117. net.h
  118. osdep.c
  119. osdep.h
  120. ppc-dis.c
  121. ppc.ld
  122. ppc64.ld
  123. qemu-aio.h
  124. qemu-binfmt-conf.sh
  125. qemu-char.c
  126. qemu-char.h
  127. qemu-common.h
  128. qemu-doc.texi
  129. qemu-img.c
  130. qemu-img.texi
  131. qemu-lock.h
  132. qemu-log.h
  133. qemu-malloc.c
  134. qemu-nbd.c
  135. qemu-nbd.texi
  136. qemu-sockets.c
  137. qemu-tech.texi
  138. qemu-timer.h
  139. qemu-tool.c
  140. qemu_socket.h
  141. readline.c
  142. README
  143. s390-dis.c
  144. s390.ld
  145. sdl.c
  146. sdl_keysym.h
  147. sh4-dis.c
  148. softmmu-semi.h
  149. softmmu_defs.h
  150. softmmu_exec.h
  151. softmmu_header.h
  152. softmmu_template.h
  153. sparc-dis.c
  154. sparc.ld
  155. sparc64.ld
  156. sys-queue.h
  157. sysemu.h
  158. tap-win32.c
  159. texi2pod.pl
  160. thunk.c
  161. thunk.h
  162. TODO
  163. translate-all.c
  164. uboot_image.h
  165. usb-linux.c
  166. VERSION
  167. vgafont.h
  168. vl.c
  169. vnc.c
  170. vnc_keysym.h
  171. vnchextile.h
  172. x86_64.ld
  173. x_keymap.c