mirror of
https://github.com/ipxe/ipxe
synced 2025-12-22 04:50:25 +03:00
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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user