diff options
author | Thomas Huth <thuth@redhat.com> | 2016-03-15 10:31:23 +0100 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:49:37 -0600 |
commit | 2905695acc40b68bede66e11286c5470b3f7c8b2 (patch) | |
tree | 15a80599646f984a63931a6a845a1de1341a5cbc /slirp/tftp.h | |
parent | 420e9bc9815de5e0f07c56dd3b83ff0710f1d231 (diff) | |
download | hqemu-2905695acc40b68bede66e11286c5470b3f7c8b2.zip hqemu-2905695acc40b68bede66e11286c5470b3f7c8b2.tar.gz |
slirp: Add IPv6 support to the TFTP code
Add the handler code for incoming TFTP packets to udp6_input(),
and make sure that the TFTP code can send packets with both,
udp_output() and udp6_output() by introducing a wrapper function
called tftp_udp_output().
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp/tftp.h')
-rw-r--r-- | slirp/tftp.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/slirp/tftp.h b/slirp/tftp.h index e1cc24b..1cb1adf 100644 --- a/slirp/tftp.h +++ b/slirp/tftp.h @@ -16,7 +16,6 @@ #define TFTP_FILENAME_MAX 512 struct tftp_t { - struct ip ip; struct udphdr udp; uint16_t tp_op; union { @@ -30,20 +29,20 @@ struct tftp_t { } tp_error; char tp_buf[512 + 2]; } x; -}; +} __attribute__((packed)); struct tftp_session { Slirp *slirp; char *filename; int fd; - struct in_addr client_ip; + struct sockaddr_storage client_addr; uint16_t client_port; uint32_t block_nr; int timestamp; }; -void tftp_input(struct mbuf *m); +void tftp_input(struct sockaddr_storage *srcsas, struct mbuf *m); #endif |