Update ftp.c to work with Nikhil's TCP stack.

Remove the now-totally-obsolete sockaddr_in field from tcp.h.
This commit is contained in:
Michael Brown
2006-12-05 19:07:47 +00:00
parent a128b33b8b
commit 89bcb57201
5 changed files with 100 additions and 34 deletions

View File

@@ -49,6 +49,8 @@ struct ftp_request {
* remote server.
*/
void ( *callback ) ( char *data, size_t len );
/** Eventual return status */
int rc;
/** Asynchronous operation for this FTP operation */
struct async_operation aop;

View File

@@ -144,10 +144,6 @@ extern void tcp_close ( struct tcp_connection *conn );
*/
struct tcp_connection {
struct sockaddr_tcpip peer; /* Remote socket address */
/* FIXME: this field should no longer be present */
struct sockaddr_in sin;
uint16_t local_port; /* Local port, in network byte order */
int tcp_state; /* TCP state */
int tcp_lstate; /* Last TCP state */
@@ -206,6 +202,10 @@ struct tcp_header {
extern struct tcpip_protocol tcp_protocol;
static inline int tcp_closed ( struct tcp_connection *conn ) {
return ( conn->tcp_state == TCP_CLOSED );
}
extern void tcp_init_conn ( struct tcp_connection *conn );
extern int tcp_connect ( struct tcp_connection *conn );
extern int tcp_connectto ( struct tcp_connection *conn,