diff options
author | Gerd Hoffmann | 2018-11-13 08:03:20 +0100 |
---|---|---|
committer | Samuel Thibault | 2019-01-14 00:40:54 +0100 |
commit | 9a50b0e0b80faf8f4e53d3f7e73144421561a7c8 (patch) | |
tree | 10e94c45e61b735eb7f9707fa5a7ad0dd7823f15 /slirp | |
parent | slirp: remove dead declarations (diff) | |
download | qemu-9a50b0e0b80faf8f4e53d3f7e73144421561a7c8.tar.gz qemu-9a50b0e0b80faf8f4e53d3f7e73144421561a7c8.tar.xz qemu-9a50b0e0b80faf8f4e53d3f7e73144421561a7c8.zip |
slirp: add tftp tracing
Useful when debugging pxeboot, to see what the guest tries to do.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp')
-rw-r--r-- | slirp/tftp.c | 3 | ||||
-rw-r--r-- | slirp/trace-events | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/slirp/tftp.c b/slirp/tftp.c index a9bc4bb1b6..735b57aa55 100644 --- a/slirp/tftp.c +++ b/slirp/tftp.c @@ -26,6 +26,7 @@ #include "slirp.h" #include "qemu-common.h" #include "qemu/cutils.h" +#include "trace.h" static inline int tftp_session_in_use(struct tftp_session *spt) { @@ -204,6 +205,7 @@ static void tftp_send_error(struct tftp_session *spt, struct mbuf *m; struct tftp_t *tp; + trace_slirp_tftp_error(msg); m = m_get(spt->slirp); if (!m) { @@ -323,6 +325,7 @@ static void tftp_handle_rrq(Slirp *slirp, struct sockaddr_storage *srcsas, break; } } + trace_slirp_tftp_rrq(req_fname); /* check mode */ if ((pktlen - k) < 6) { diff --git a/slirp/trace-events b/slirp/trace-events new file mode 100644 index 0000000000..ff8f656e8c --- /dev/null +++ b/slirp/trace-events @@ -0,0 +1,5 @@ +# See docs/devel/tracing.txt for syntax documentation. + +# slirp/tftp.c +slirp_tftp_rrq(const char *file) "file: %s" +slirp_tftp_error(const char *file) "msg: %s" |