1. 10 6月, 2014 1 次提交
  2. 09 6月, 2014 1 次提交
  3. 25 4月, 2014 1 次提交
  4. 17 9月, 2013 4 次提交
  5. 23 8月, 2013 1 次提交
  6. 16 4月, 2013 1 次提交
  7. 22 2月, 2013 2 次提交
    • S
      slirp: switch to GPollFD · 8917c3bd
      Stefan Hajnoczi 提交于
      Slirp uses rfds/wfds/xfds more extensively than other QEMU components.
      
      The rarely-used out-of-band TCP data feature is used.  That means we
      need the full table of select(2) to g_poll(3) events:
      
        rfds -> G_IO_IN | G_IO_HUP | G_IO_ERR
        wfds -> G_IO_OUT | G_IO_ERR
        xfds -> G_IO_PRI
      
      I came up with this table by looking at Linux fs/select.c which maps
      select(2) to poll(2) internally.
      
      Another detail to watch out for are the global variables that reference
      rfds/wfds/xfds during slirp_select_poll().  sofcantrcvmore() and
      sofcantsendmore() use these globals to clear fd_set bits.  When
      sofcantrcvmore() is called, the wfds bit is cleared so that the write
      handler will no longer be run for this iteration of the event loop.
      
      This actually seems buggy to me since TCP connections can be half-closed
      and we'd still want to handle data in half-duplex fashion.  I think the
      real intention is to avoid running the read/write handler when the
      socket has been fully closed.  This is indicated with the SS_NOFDREF
      state bit so we now check for it before invoking the TCP write handler.
      Note that UDP/ICMP code paths don't care because they are
      connectionless.
      
      Note that slirp/ has a lot of tabs and sometimes mixed tabs with spaces.
      I followed the style of the surrounding code.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Message-id: 1361356113-11049-6-git-send-email-stefanha@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      8917c3bd
    • S
      slirp: slirp/slirp.c coding style cleanup · cf1d078e
      Stefan Hajnoczi 提交于
      The slirp glue code uses tabs in some places.  Since the next patch will
      modify the file, convert tabs to spaces and fix checkpatch.pl issues.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Message-id: 1361356113-11049-5-git-send-email-stefanha@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      cf1d078e
  8. 30 1月, 2013 1 次提交
  9. 19 12月, 2012 2 次提交
  10. 15 11月, 2012 1 次提交
  11. 07 8月, 2012 1 次提交
  12. 04 8月, 2012 1 次提交
  13. 27 4月, 2012 1 次提交
  14. 13 3月, 2012 2 次提交
  15. 22 8月, 2011 1 次提交
  16. 21 8月, 2011 1 次提交
  17. 05 8月, 2011 1 次提交
  18. 03 8月, 2011 2 次提交
  19. 25 7月, 2011 1 次提交
    • B
      Wrap recv to avoid warnings · 00aa0040
      Blue Swirl 提交于
      Avoid warnings like these by wrapping recv():
        CC    slirp/ip_icmp.o
      /src/qemu/slirp/ip_icmp.c: In function 'icmp_receive':
      /src/qemu/slirp/ip_icmp.c:418:5: error: passing argument 2 of 'recv' from incompatible pointer type [-Werror]
      /usr/local/lib/gcc/i686-mingw32msvc/4.6.0/../../../../i686-mingw32msvc/include/winsock2.h:547:32: note: expected 'char *' but argument is of type 'struct icmp *'
      
      Remove also casts used to avoid warnings.
      Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      00aa0040
  20. 23 7月, 2011 1 次提交
  21. 21 3月, 2011 1 次提交
    • P
      change all rt_clock references to use millisecond resolution accessors · 7bd427d8
      Paolo Bonzini 提交于
      This was done with:
      
          sed -i '/get_clock\>.*rt_clock/s/get_clock\>/get_clock_ms/' \
              $(git grep -l 'get_clock\>.*rt_clock' )
          sed -i '/new_timer\>.*rt_clock/s/new_timer\>/new_timer_ms/' \
              $(git grep -l 'new_timer\>.*rt_clock' )
      
      after checking that get_clock and new_timer never occur twice
      on the same line.  There were no missed occurrences; however, even
      if there had been, they would have been caught by the compiler.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7bd427d8
  22. 17 9月, 2010 1 次提交
  23. 06 7月, 2010 1 次提交
  24. 07 3月, 2010 1 次提交
  25. 12 9月, 2009 1 次提交
    • B
      Fix sys-queue.h conflict for good · 72cf2d4f
      Blue Swirl 提交于
      Problem: Our file sys-queue.h is a copy of the BSD file, but there are
      some additions and it's not entirely compatible. Because of that, there have
      been conflicts with system headers on BSD systems. Some hacks have been
      introduced in the commits 15cc9235,
      f40d7537,
      96555a96 and
      3990d09a but the fixes were fragile.
      
      Solution: Avoid the conflict entirely by renaming the functions and the
      file. Revert the previous hacks.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      72cf2d4f
  26. 05 9月, 2009 1 次提交
  27. 31 8月, 2009 1 次提交
    • S
      Fix compiler warnings · 9e3a95ef
      Stefan Weil 提交于
      Starting with commit df7a86ed,
      mingw32 builds result in a compiler warning for dns_addr:
      
        CC    slirp/slirp.o
      /home/stefan/src/qemu/savannah/qemu/slirp/slirp.c:50: warning: missing braces around initializer
      /home/stefan/src/qemu/savannah/qemu/slirp/slirp.c:50: warning: (near initialization for ‘dns_addr.S_un’)
      
      Removing the assignment fixes the warning without the need of special code
      for mingw32 (and also saves some bytes in the resulting binary).
      
      To fix another potential compiler warning, the missing 'static'
      attribute was added.
      
      The same changes were applied to dns_addr_time.
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      9e3a95ef
  28. 28 8月, 2009 2 次提交
    • E
      slirp: Read host DNS config on demand · df7a86ed
      Ed Swierk 提交于
      Currently the qemu user-mode networking stack reads the host DNS
      configuration (/etc/resolv.conf or the Windows equivalent) only once
      when qemu starts.  This causes name lookups in the guest to fail if the
      host is moved to a different network from which the original DNS servers
      are unreachable, a common occurrence when the host is a laptop.
      
      This patch changes the slirp code to read the host DNS configuration on
      demand, caching the results for at most 1 second to avoid unnecessary
      overhead if name lookups occur in rapid succession.  On non-Windows
      hosts, /etc/resolv.conf is re-read only if the file has been replaced or
      if its size or mtime has changed.
      Signed-off-by: NEd Swierk <eswierk@aristanetworks.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      df7a86ed
    • E
      slirp: Remove our_addr code · ce0bd027
      Ed Swierk 提交于
      Three problems with our_addr:
      
      - It's determined only once when qemu starts, but the address can change
      (just like the DNS configuration can).
      
      - It's supposed to be the IP address of a host network interface, but
      there's no guarantee that gethostbyname(gethostname()) actually does
      that: the host might be a laptop that has only a loopback interface up,
      or the hostname might be localhost.localdomain, etc.
      
      - It's useless at best: get_dns_addr() calls it, there's no reason to
      send DNS requests to a different IP address if you're running a DNS
      server on the host and resolv.conf points to 127.0.0.1.
      
      These problems are easily solved by removing the code.
      Signed-off-by: NEd Swierk <eswierk@aristanetworks.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ce0bd027
  29. 01 8月, 2009 1 次提交
  30. 28 7月, 2009 2 次提交
  31. 29 6月, 2009 1 次提交