Statistics
| Branch: | Revision:

root / slirp / tftp.c @ a74cdab4

History | View | Annotate | Download (9.4 kB)

# Date Author Comment
89d2d3af 02/25/2011 05:58 pm Stefan Weil

slirp: Remove some type casts caused by bad declaration of x.tp_buf

x.tp_buf was declared as a uint8_t array, but always used as
a char array (which needed a lot of type casts).

The patch includes these changes:

  • Fix declaration of x.tp_buf and remove all type casts....
facf1a60 01/13/2011 12:38 pm Sergei Gavrikov

slirp: Use strcasecmp() to check tftp mode, tsize

According to RFC 1350 (TFTP Revision 2) the mode field can contain any
combination of upper and lower case; also RFC 2349 propagates that the
transfer size option ("tsize") is case in-sensitive too.

Current implementation of embedded TFTP server missed that what does...

b6dce92e 07/25/2010 05:59 pm Stefan Weil

slirp: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int types

There is no need to have a second set of integral types.
Replace them by the standard types from stdint.h.

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

aca9fcd2 03/07/2010 03:13 pm Blue Swirl

slirp: remove dead assignments, spotted by clang

Value stored is never read.

Signed-off-by: Blue Swirl <>

1cb1a66a 01/14/2010 01:14 am Milan Plzik

Qemu's internal TFTP server breaks lock-step-iness of TFTP

According to RFC 1350 and RFC 2347, TFTP server should answer RRQ by
either OACK or DATA packet. Qemu's internal TFTP server answers RRQ with
additional options by sending both OACK and DATA packet, thus breaking...

bfe4e172 01/11/2010 09:41 pm Thomas Horsten

Handle TFTP ERROR from client

If a PXE client only wants to find out the size of a file, it will
open the file and then abort the transfer by sending a TFTP ERROR packet.

The ERROR packet should cause qemu to terminate the session. If not,
the sessions will soon run out and cause timeouts in the client....

74efd61a 06/29/2009 10:18 pm Jan Kiszka

slirp: tftp: Relax filename format check

[ Applies on top of my recently posted slirp series. ]

Allow tftp requests with filenames that do not start with a slash.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

460fec67 06/29/2009 04:52 pm Jan Kiszka

slirp: Factor out internal state structure

The essence of this patch is to stuff (almost) all global variables of
the slirp stack into the structure Slirp. In this step, we still keep
the structure as global variable, directly accessible by the whole
stack. Changes to the external interface of slirp will be applied in...

f8e3cbd3 06/29/2009 04:52 pm Jan Kiszka

slirp: tftp: Cleanup tftp_prefix check

Perform check for set prefix early (if it's not given, tftp is disabled)
and drop redundant second check.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

ef2d54d8 06/29/2009 04:52 pm Jan Kiszka

slirp: tftp: Clean up tftp_send_error

The return code of tftp_send_error is not used, drop it. And also make
sure to always terminate the session.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

20c24bf2 06/29/2009 04:52 pm Jan Kiszka

slirp: tftp: Refactor tftp_handle_rrq

Specifically make the filename extraction more readable, and always
report errors back to the client.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

9367964a 06/29/2009 04:52 pm Jan Kiszka

slirp: tftp: Rework filename handling

This changes the filename handling from a static buffer in tftp_session
for the client-provided name + prefix to a dynamically allocated buffer
that keeps the combined path in one place.

Signed-off-by: Jan Kiszka <>...

0d62c4cf 06/29/2009 04:52 pm Jan Kiszka

slirp: Drop dead code

After all its years inside the qemu tree, there is no point in keeping
the dead code paths of slirp. This patch is a first round of removing
usually commented out code parts. More cleanups need to follow (and
maybe finally a proper reindention)....

ad196a9d 06/29/2009 04:52 pm Jan Kiszka

slirp: Move smb, redir, tftp and bootp parameters and -net channel

So far a couple of slirp-related parameters were expressed via
stand-alone command line options. This it inconsistent and unintuitive.
Moreover, it prevents both dynamically reconfigured (host_net_add/...

b55266b5 09/20/2008 11:07 am blueswir1

Suppress gcc 4.x -Wpointer-sign (included in -Wall) warnings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5275 c046a42c-6fe2-441c-8c8c-71466251a162

363a37d5 08/21/2008 08:58 pm blueswir1

Fix OpenBSD linker warnings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5044 c046a42c-6fe2-441c-8c8c-71466251a162

9634d903 10/26/2007 10:01 pm blueswir1

Use const and static as needed, disable unused code

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3452 c046a42c-6fe2-441c-8c8c-71466251a162

3b46e624 09/17/2007 11:09 am ths

find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162

5fafdf24 09/17/2007 12:08 am ths

find -type f | xargs sed -i 's/[\t ]$//g' # on most files

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162

0db1137d 02/20/2007 02:12 am ths

Change -tftp option to take a root directory, by Anthony Liguori.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2441 c046a42c-6fe2-441c-8c8c-71466251a162

1f697db9 02/20/2007 02:07 am ths

Add OACK support to slirp TFTP server, by Anthony Liguori.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2440 c046a42c-6fe2-441c-8c8c-71466251a162

6d46bf8a 10/10/2004 01:57 am bellard

win32 fix

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1113 c046a42c-6fe2-441c-8c8c-71466251a162

9bf05444 08/26/2004 01:12 am bellard

port redirection support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1054 c046a42c-6fe2-441c-8c8c-71466251a162

a3504c87 08/25/2004 11:55 pm bellard

removed gettimeofday usage

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1053 c046a42c-6fe2-441c-8c8c-71466251a162

c7f74643 08/25/2004 12:57 am bellard

TFTP support (Magnus Damm)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1050 c046a42c-6fe2-441c-8c8c-71466251a162