Don't choke on duplicate OACK packets.

Make await_tftp() static and create tftp_get() for fetching the next TFTP
packet instead.
This commit is contained in:
Michael Brown
2005-06-01 18:00:01 +00:00
parent 378e922f8f
commit f2198e8a65
3 changed files with 116 additions and 63 deletions

View File

@@ -1,11 +1,19 @@
#ifndef TFTPCORE_H
#define TFTPCORE_H
/** @file
*
* TFTP core functions
*
* This file provides functions that are common to the TFTP (rfc1350),
* TFTM (rfc2090) and MTFTP (PXE) protocols.
*
*/
#include "tftp.h"
extern int await_tftp ( int ival, void *ptr, unsigned short ptype,
struct iphdr *ip, struct udphdr *udp,
struct tcphdr *tcp );
extern int tftp_get ( struct tftp_state *state, long timeout,
union tftp_any **reply );
extern int tftp_open ( struct tftp_state *state, const char *filename,
union tftp_any **reply );