Commit Graph

38 Commits

Author SHA1 Message Date
kanjitalk755
a944344f84 BasiliskII/src/slirp/* copied from jvernet/macemu 2017-12-06 15:35:41 +09:00
Alexei Svitkine
6bc3dd29a8 Fix off by one error in sscanf length arg. 2016-12-17 22:43:38 -05:00
Alexei Svitkine
d19e757e1c Fix some more Xcode8 warnings & analyze warnings. 2016-12-17 22:24:00 -05:00
Alexei Svitkine
1f211fb37b fix some warnings in Xcode8 build 2016-12-17 22:04:57 -05:00
Alexei Svitkine
268611ca75 Fix SLIRP networking on OS X (and maybe other platforms?).
The bug was introduced by 0daa18ab2a,
which erroneously changed some signed types to unsigned types,
breaking logic involving negative numbers (e.g. when subtracting
sizes).
2016-11-02 02:08:51 -04:00
Alexei Svitkine
11f7e3b1a1 Fix typo in an earlier commit. 2015-08-10 10:36:39 -04:00
Alexei Svitkine
a99d496fd4 Fix Xcode project following move of files and fix a warning. 2015-08-09 18:50:06 -04:00
Alexei Svitkine
a06cbd6784 Fix non-Windows build. 2015-08-09 18:31:30 -04:00
James Touton
0daa18ab2a slirp compiles cleanly in MSVC.
Use standard C prototypes instead of K&R.
2015-08-06 01:11:28 -07:00
Christian Bauer
b4940ae29d more cleanups (unused/uninitialized variables, forgotten free()s, etc.) 2012-09-08 12:33:39 +02:00
asvitkine
c34dd6ecd3 Apparently this change allows compilation with clang.
Patch by "Madd the Sane" (http://sourceforge.net/users/madd_the_sane)
2012-04-21 16:51:23 +00:00
asvitkine
0c77b00081 Switch slirp to 3-clause BSD license. This change went in upstream to QEMU's
version of slirp (where this code comes from), with the following checkin:

commit 2f5f89963186d42a7ded253bc6cf5b32abb45cec
Author: aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Date:   Mon Jan 26 19:37:41 2009 +0000

    Remove the advertising clause from the slirp license

    According to the FSF, the 4-clause BSD license, which slirp is covered under,
    is not compatible with the GPL or LGPL[1].

    [1] http://www.fsf.org/licensing/licenses/index_html#GPLIncompatibleLicenses

    There are three declared copyright holders in slirp that use the 4-clause
    BSD license, the Regents of UC Berkley, Danny Gasparovski, and Kelly Price.
    Below are the appropriate permissions to remove the advertise clause from slirp
    from each party.

    Special thanks go to Richard Fontana from Red Hat for contacting all of the
    necessary authors to resolve this issue!

    Regents of UC Berkley:
    From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

    July 22, 1999

    To All Licensees, Distributors of Any Version of BSD:

    As you know, certain of the Berkeley Software Distribution ("BSD") source
    code files require that further distributions of products containing all or
    portions of the software, acknowledge within their advertising materials
    that such products contain software developed by UC Berkeley and its
    contributors.

    Specifically, the provision reads:

    "     * 3. All advertising materials mentioning features or use of this software
          *    must display the following acknowledgement:
          *    This product includes software developed by the University of
          *    California, Berkeley and its contributors."

    Effective immediately, licensees and distributors are no longer required to
    include the acknowledgement within advertising materials.  Accordingly, the
    foregoing paragraph of those BSD Unix files containing it is hereby deleted
    in its entirety.

    William Hoskins
    Director, Office of Technology Licensing
    University of California, Berkeley

    Danny Gasparovski:

    Subject: RE: Slirp license
    Date: Thu, 8 Jan 2009 10:51:00 +1100
    From: "Gasparovski, Daniel" <Daniel.Gasparovski@ato.gov.au>
    To: "Richard Fontana" <rfontana@redhat.com>

    Hi Richard,

    I have no objection to having Slirp code in QEMU be licensed under the
    3-clause BSD license.

    Thanks for taking the effort to consult me about this.


    Dan ...

    Kelly Price:

    Date: Thu, 8 Jan 2009 19:38:56 -0500
    From: "Kelly Price" <strredwolf@gmail.com>
    To: "Richard Fontana" <rfontana@redhat.com>
    Subject: Re: Slirp license

    Thanks for contacting me, Richard.  I'm glad you were able to find
    Dan, as I've been "keeping the light on" for Slirp.  I have no use for
    it now, and I have little time for it (now holding onto Keenspot's
    Comic Genesis and having a regular US state government position). If
    Dan would like to return to the project, I'd love to give it back to
    him.

    As for copyright, I don't own all of it.  Dan does, so I will defer to
    him.  Any of my patches I will gladly license to the 3-part BSD
    license.  My interest in re-licensing was because we didn't have ready
    info to contact Dan.  If Dan would like to port Slirp back out of
    QEMU, a lot of us 64-bit users would be grateful.

    Feel free to share this email address with Dan.  I will be glad to
    effect a transfer of the project to him and Mr. Bellard of the QEMU
    project.

    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6451 c046a42c-6fe2-441c-8c8c-71466251a162
2012-04-01 15:02:44 +00:00
asvitkine
f8ddd3eccf Switch slirp to 3-clause BSD license. This change went in upstream to QEMU's
version of slirp (where this code comes from), with the following checkin:

commit 2f5f89963186d42a7ded253bc6cf5b32abb45cec
Author: aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Date:   Mon Jan 26 19:37:41 2009 +0000

    Remove the advertising clause from the slirp license

    According to the FSF, the 4-clause BSD license, which slirp is covered under,
    is not compatible with the GPL or LGPL[1].

    [1] http://www.fsf.org/licensing/licenses/index_html#GPLIncompatibleLicenses

    There are three declared copyright holders in slirp that use the 4-clause
    BSD license, the Regents of UC Berkley, Danny Gasparovski, and Kelly Price.
    Below are the appropriate permissions to remove the advertise clause from slirp
    from each party.

    Special thanks go to Richard Fontana from Red Hat for contacting all of the
    necessary authors to resolve this issue!

    Regents of UC Berkley:
    From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

    July 22, 1999

    To All Licensees, Distributors of Any Version of BSD:

    As you know, certain of the Berkeley Software Distribution ("BSD") source
    code files require that further distributions of products containing all or
    portions of the software, acknowledge within their advertising materials
    that such products contain software developed by UC Berkeley and its
    contributors.

    Specifically, the provision reads:

    "     * 3. All advertising materials mentioning features or use of this software
          *    must display the following acknowledgement:
          *    This product includes software developed by the University of
          *    California, Berkeley and its contributors."

    Effective immediately, licensees and distributors are no longer required to
    include the acknowledgement within advertising materials.  Accordingly, the
    foregoing paragraph of those BSD Unix files containing it is hereby deleted
    in its entirety.

    William Hoskins
    Director, Office of Technology Licensing
    University of California, Berkeley

    Danny Gasparovski:

    Subject: RE: Slirp license
    Date: Thu, 8 Jan 2009 10:51:00 +1100
    From: "Gasparovski, Daniel" <Daniel.Gasparovski@ato.gov.au>
    To: "Richard Fontana" <rfontana@redhat.com>

    Hi Richard,

    I have no objection to having Slirp code in QEMU be licensed under the
    3-clause BSD license.

    Thanks for taking the effort to consult me about this.


    Dan ...

    Kelly Price:

    Date: Thu, 8 Jan 2009 19:38:56 -0500
    From: "Kelly Price" <strredwolf@gmail.com>
    To: "Richard Fontana" <rfontana@redhat.com>
    Subject: Re: Slirp license

    Thanks for contacting me, Richard.  I'm glad you were able to find
    Dan, as I've been "keeping the light on" for Slirp.  I have no use for
    it now, and I have little time for it (now holding onto Keenspot's
    Comic Genesis and having a regular US state government position). If
    Dan would like to return to the project, I'd love to give it back to
    him.

    As for copyright, I don't own all of it.  Dan does, so I will defer to
    him.  Any of my patches I will gladly license to the 3-part BSD
    license.  My interest in re-licensing was because we didn't have ready
    info to contact Dan.  If Dan would like to port Slirp back out of
    QEMU, a lot of us 64-bit users would be grateful.

    Feel free to share this email address with Dan.  I will be glad to
    effect a transfer of the project to him and Mr. Bellard of the QEMU
    project.

    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6451 c046a42c-6fe2-441c-8c8c-71466251a162
2012-03-30 01:10:28 +00:00
asvitkine
d157f74b5d fix a warning and indents 2011-12-27 07:29:34 +00:00
asvitkine
b51267b090 Fix warning with undeclared free() with clang 2010-08-22 19:43:29 +00:00
gbeauche
25c5b9599e Update to slirp sources from QEMU 0.9.0:
- fix UDP (Jason Wessel)
- enable TCP_NODELAY for slirp redirection (Daniel Jacobowitz)
2007-11-03 16:36:35 +00:00
gbeauche
d7eb0f4d6d Update to slirp sources from QEMU 0.8.2:
- set slirp client hostname
- fix slirp redirection on systems without a useful host IP address
- separate alias_addr (10.0.2.2) from our_addr (Ed Swierk)
- fix 32+ KB packets handling (Ed Swierk)
- fix UDP broadcast translation error
- solaris port (Ben Taylor)
2007-11-03 11:11:42 +00:00
gbeauche
c3a75ac75a Add VERSION file so that to track differences from "upstream" slirp sources, i.e. QEMU. 2007-11-03 10:01:27 +00:00
asvitkine
e2cde00af4 fix compile warning & potential buffer overflow at the same time 2007-01-24 05:42:23 +00:00
asvitkine
dc68e99f7c fix compile warnings w/ slirp caused by not including stdlib 2007-01-22 14:48:40 +00:00
gbeauche
e4f5757403 Merge from the QEMU tree:
- Fix IP packet re-assembly logic (Ed Swierk)
- Suppress unaligned accesses (Fabrice Bellard)
2006-05-14 17:27:38 +00:00
gbeauche
08b783d52b slight updates for win32... 2006-04-29 10:54:12 +00:00
gbeauche
f0d77218c8 fix build on win32 2006-04-29 10:41:25 +00:00
gbeauche
8ca74c4eac FAST_TIMO is 2 ms not 2 usec. Noticed on Windows but this obviously can't
fix my problem with slirp_select_fill() there as it still doesn't fill in
any socket descriptor. :-/ I think I won't bother much for Windows...
2006-04-26 06:26:14 +00:00
gbeauche
5f3874c853 Apply the qemu-slirp-performance.patch from Kenneth Duda available here:
<http://lists.nongnu.org/archive/html/qemu-devel/2006-04/msg00245.html>

This does improve slirp performance a lot, especially in FTP passive mode
transfers. i.e. now, they are equally as fast as non passive mode. I get
approx. 800 KB/sec in B2 and 500 KB/sec in SheepShaver (over a DSL line).
In native env, the max download data rate from my ISP is around 950 KB/sec.
2006-04-13 22:15:02 +00:00
gbeauche
896ada92dc Try to improve slirp performance again (though passive mode is still slower) 2006-04-02 21:06:50 +00:00
gbeauche
7c68ef5418 fix memory leak (1.0.17) 2006-04-02 08:47:39 +00:00
gbeauche
61fb95dd6f Merge in slirp updates from QEMU:
- improved performance (still not visible in B2 part, especially passive mode)
- set SO_REUSEADDR before calling bind()
- win32 compile fix
2006-03-25 07:57:38 +00:00
gbeauche
e9e3ad9a4b Further unaligned access fixes on IRIX (Brian J. Johnson). Configury needed
to ensure compiler supports bit-field members of unsigned char type.
2006-01-27 23:31:38 +00:00
gbeauche
a615a4ac24 Use the most portable POSIX-style non-blocking I/O (O_NONBLOCK) instead of
BSD-style through FIONBIO. It turns out Tru64 and probably IRIX don't support
the latter when fd is a pipe (slirp case).
2006-01-24 23:46:19 +00:00
gbeauche
5ee0a6741b Packet headers can be examined through unaligned addresses. This patch
fixes this, especially for MIPS & SPARC platforms. [Initial patch from
Brian J. Johnson]
2006-01-17 21:19:12 +00:00
nigel
641fa2c01e Compiling on Mac OS X 10.2 doesn't define uint8_t using the standard headers.
Including stdint.h should be safe, but if it clashes, we could put an OS X
specific wrapper around it: #if (defined(__MACH__) && defined(__APPLE__))
2005-12-30 01:19:53 +00:00
gbeauche
0ca22128d6 Fixes for IRIX/mips build with MIPSPro compilers 2005-12-04 15:23:02 +00:00
cebix
fa5ae3ab6e minor cleanups 2005-06-30 21:25:26 +00:00
gbeauche
2bc79fd857 Enable Basilisk II to work even if slirp_init() failed. Disable ethernet
emulation in that case, don't exit(1).
2005-06-12 22:48:48 +00:00
gbeauche
84c9d99d18 Remove bootp debug code as it uses varargs macros that are not supported in
all foreign compilers (including preprocessor shipped with MacOS X!). Also
fix build on platforms not including <stdint.h> by default.
2005-05-14 17:37:07 +00:00
gbeauche
fdfcd3eb86 Some 64-bit fixes to bootp, icmp, udp (cu-seeme). However, it can happen
that on certain occasions, it doesn't work. Some timing problem?
2005-05-13 14:02:37 +00:00
gbeauche
5fffe6e2cd slirp user mode network emulation code from qemu 2005-05-13 09:00:59 +00:00