net: introduce NICState and qemu_new_nic()

Common state for all NICs.

The opaque member will replace the opaque member in VLANClientState
since only NICs need it.

The conf member will allow us to iterate over NICs, access the MAC
addr for the NIC and send a packet from each NIC in qemu_announce_self().

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2 files changed
tree: 28f9b764654e6605e1c23465dfcdfd8ddff4d8a0
  1. audio/
  2. block/
  3. bsd-user/
  4. darwin-user/
  5. default-configs/
  6. fpu/
  7. gdb-xml/
  8. hw/
  9. linux-user/
  10. net/
  11. pc-bios/
  12. QMP/
  13. roms/
  14. slirp/
  15. target-alpha/
  16. target-arm/
  17. target-cris/
  18. target-i386/
  19. target-m68k/
  20. target-microblaze/
  21. target-mips/
  22. target-ppc/
  23. target-sh4/
  24. target-sparc/
  25. tcg/
  26. tests/
  27. .gitignore
  28. .gitmodules
  29. a.out.h
  30. acl.c
  31. acl.h
  32. aes.c
  33. aes.h
  34. aio.c
  35. alpha-dis.c
  36. alpha.ld
  37. arm-dis.c
  38. arm-semi.c
  39. arm.ld
  40. async.c
  41. balloon.h
  42. block-migration.c
  43. block-migration.h
  44. block.c
  45. block.h
  46. block_int.h
  47. bswap.h
  48. bt-host.c
  49. bt-host.h
  50. bt-vhci.c
  51. buffered_file.c
  52. buffered_file.h
  53. cache-utils.c
  54. cache-utils.h
  55. Changelog
  56. check-qdict.c
  57. check-qfloat.c
  58. check-qint.c
  59. check-qjson.c
  60. check-qlist.c
  61. check-qstring.c
  62. cmd.c
  63. cmd.h
  64. cocoa.m
  65. CODING_STYLE
  66. config.h
  67. configure
  68. console.c
  69. console.h
  70. COPYING
  71. COPYING.LIB
  72. cpu-all.h
  73. cpu-common.h
  74. cpu-defs.h
  75. cpu-exec.c
  76. create_config
  77. cris-dis.c
  78. curses.c
  79. curses_keys.h
  80. cutils.c
  81. d3des.c
  82. d3des.h
  83. def-helper.h
  84. device_tree.c
  85. device_tree.h
  86. dis-asm.h
  87. disas.c
  88. disas.h
  89. dma-helpers.c
  90. dma.h
  91. dyngen-exec.h
  92. elf.h
  93. envlist.c
  94. envlist.h
  95. exec-all.h
  96. exec.c
  97. feature_to_c.sh
  98. gdbstub.c
  99. gdbstub.h
  100. gen-icount.h
  101. host-utils.c
  102. host-utils.h
  103. hostregs_helper.h
  104. hpet.h
  105. hppa-dis.c
  106. hppa.ld
  107. hxtool
  108. i386-dis.c
  109. i386.ld
  110. ia64.ld
  111. ioport-user.c
  112. ioport.c
  113. ioport.h
  114. json-lexer.c
  115. json-lexer.h
  116. json-parser.c
  117. json-parser.h
  118. json-streamer.c
  119. json-streamer.h
  120. keymaps.c
  121. keymaps.h
  122. kvm-all.c
  123. kvm.h
  124. libfdt_env.h
  125. LICENSE
  126. linux-aio.c
  127. m68k-dis.c
  128. m68k-semi.c
  129. m68k.ld
  130. MAINTAINERS
  131. Makefile
  132. Makefile.hw
  133. Makefile.target
  134. Makefile.user
  135. microblaze-dis.c
  136. migration-exec.c
  137. migration-fd.c
  138. migration-tcp.c
  139. migration-unix.c
  140. migration.c
  141. migration.h
  142. mips-dis.c
  143. mips.ld
  144. module.c
  145. module.h
  146. monitor.c
  147. monitor.h
  148. nbd.c
  149. nbd.h
  150. net-checksum.c
  151. net.c
  152. net.h
  153. osdep.c
  154. osdep.h
  155. path.c
  156. pci-ids.txt
  157. posix-aio-compat.c
  158. ppc-dis.c
  159. ppc.ld
  160. ppc64.ld
  161. qbool.c
  162. qbool.h
  163. qdict-test-data.txt
  164. qdict.c
  165. qdict.h
  166. qemu-aio.h
  167. qemu-binfmt-conf.sh
  168. qemu-char.c
  169. qemu-char.h
  170. qemu-common.h
  171. qemu-config.c
  172. qemu-config.h
  173. qemu-doc.texi
  174. qemu-img-cmds.hx
  175. qemu-img.c
  176. qemu-img.texi
  177. qemu-io.c
  178. qemu-lock.h
  179. qemu-log.h
  180. qemu-malloc.c
  181. qemu-monitor.hx
  182. qemu-nbd.c
  183. qemu-nbd.texi
  184. qemu-option.c
  185. qemu-option.h
  186. qemu-options.hx
  187. qemu-queue.h
  188. qemu-sockets.c
  189. qemu-tech.texi
  190. qemu-thread.c
  191. qemu-thread.h
  192. qemu-timer.h
  193. qemu-tool.c
  194. qemu.sasl
  195. qemu_socket.h
  196. qerror.c
  197. qerror.h
  198. qfloat.c
  199. qfloat.h
  200. qint.c
  201. qint.h
  202. qjson.c
  203. qjson.h
  204. qlist.c
  205. qlist.h
  206. qobject.h
  207. qstring.c
  208. qstring.h
  209. readline.c
  210. readline.h
  211. README
  212. rules.mak
  213. s390-dis.c
  214. s390.ld
  215. savevm.c
  216. sdl.c
  217. sdl_keysym.h
  218. sdl_zoom.c
  219. sdl_zoom.h
  220. sdl_zoom_template.h
  221. sh4-dis.c
  222. softmmu-semi.h
  223. softmmu_defs.h
  224. softmmu_exec.h
  225. softmmu_header.h
  226. softmmu_template.h
  227. sparc-dis.c
  228. sparc.ld
  229. sparc64.ld
  230. sysemu.h
  231. targphys.h
  232. tcg-runtime.c
  233. texi2pod.pl
  234. thunk.c
  235. thunk.h
  236. TODO
  237. translate-all.c
  238. uboot_image.h
  239. usb-bsd.c
  240. usb-linux.c
  241. usb-stub.c
  242. VERSION
  243. vgafont.h
  244. vl.c
  245. vnc-auth-sasl.c
  246. vnc-auth-sasl.h
  247. vnc-auth-vencrypt.c
  248. vnc-auth-vencrypt.h
  249. vnc-tls.c
  250. vnc-tls.h
  251. vnc.c
  252. vnc.h
  253. vnc_keysym.h
  254. vnchextile.h
  255. x86_64.ld
  256. x_keymap.c
  257. x_keymap.h