From 05b284399eedf50b360d7d70e821162c8ac79f3f Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 23 Mar 2006 20:34:08 +0000 Subject: Moved old tcp.h to old_tcp.h, to avoid name clash with new (uIP-based) tcp.h. --- src/include/etherboot.h | 2 +- src/include/old_tcp.h | 37 +++++++++++++++++++++++++++++++++++++ src/include/tcp.h | 37 ------------------------------------- src/proto/http.c | 2 +- src/proto/tftpcore.c | 2 +- 5 files changed, 40 insertions(+), 40 deletions(-) create mode 100644 src/include/old_tcp.h delete mode 100644 src/include/tcp.h (limited to 'src') diff --git a/src/include/etherboot.h b/src/include/etherboot.h index d8fcc98c2..6ce55c101 100644 --- a/src/include/etherboot.h +++ b/src/include/etherboot.h @@ -147,7 +147,7 @@ enum { #include "if_arp.h" #include "ip.h" #include "udp.h" -#include "tcp.h" +#include "old_tcp.h" #include "bootp.h" #include "igmp.h" #include "nfs.h" diff --git a/src/include/old_tcp.h b/src/include/old_tcp.h new file mode 100644 index 000000000..93e1485e8 --- /dev/null +++ b/src/include/old_tcp.h @@ -0,0 +1,37 @@ +#ifndef _TCP_H +#define _TCP_H + +#define TCP_INITIAL_TIMEOUT (3*TICKS_PER_SEC) +#define TCP_MAX_TIMEOUT (60*TICKS_PER_SEC) +#define TCP_MIN_TIMEOUT (TICKS_PER_SEC) +#define TCP_MAX_RETRY 10 +#define TCP_MAX_HEADER ((int)sizeof(struct iphdr)+64) +#define TCP_MIN_WINDOW (1500-TCP_MAX_HEADER) +#define TCP_MAX_WINDOW (65535-TCP_MAX_HEADER) + +#define FIN 1 +#define SYN 2 +#define RST 4 +#define PSH 8 +#define ACK 16 +#define URG 32 + + +struct tcphdr { + uint16_t src; + uint16_t dst; + int32_t seq; + int32_t ack; + uint16_t ctrl; + uint16_t window; + uint16_t chksum; + uint16_t urgent; +}; + +extern int tcp_transaction ( unsigned long destip, unsigned int destsock, + void *ptr, + int (*send)(int len, void *buf, void *ptr), + int (*recv)(int len, const void *buf, void *ptr)); + + +#endif /* _TCP_H */ diff --git a/src/include/tcp.h b/src/include/tcp.h deleted file mode 100644 index 93e1485e8..000000000 --- a/src/include/tcp.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _TCP_H -#define _TCP_H - -#define TCP_INITIAL_TIMEOUT (3*TICKS_PER_SEC) -#define TCP_MAX_TIMEOUT (60*TICKS_PER_SEC) -#define TCP_MIN_TIMEOUT (TICKS_PER_SEC) -#define TCP_MAX_RETRY 10 -#define TCP_MAX_HEADER ((int)sizeof(struct iphdr)+64) -#define TCP_MIN_WINDOW (1500-TCP_MAX_HEADER) -#define TCP_MAX_WINDOW (65535-TCP_MAX_HEADER) - -#define FIN 1 -#define SYN 2 -#define RST 4 -#define PSH 8 -#define ACK 16 -#define URG 32 - - -struct tcphdr { - uint16_t src; - uint16_t dst; - int32_t seq; - int32_t ack; - uint16_t ctrl; - uint16_t window; - uint16_t chksum; - uint16_t urgent; -}; - -extern int tcp_transaction ( unsigned long destip, unsigned int destsock, - void *ptr, - int (*send)(int len, void *buf, void *ptr), - int (*recv)(int len, const void *buf, void *ptr)); - - -#endif /* _TCP_H */ diff --git a/src/proto/http.c b/src/proto/http.c index 4fa594f66..3264f2ad9 100644 --- a/src/proto/http.c +++ b/src/proto/http.c @@ -1,5 +1,5 @@ #include "proto.h" -#include "tcp.h" +#include "old_tcp.h" #include "url.h" #include "etherboot.h" diff --git a/src/proto/tftpcore.c b/src/proto/tftpcore.c index 511c68599..c7673bdbf 100644 --- a/src/proto/tftpcore.c +++ b/src/proto/tftpcore.c @@ -1,5 +1,5 @@ #include "tftp.h" -#include "tcp.h" /* for struct tcphdr */ +#include "old_tcp.h" /* for struct tcphdr */ #include "errno.h" #include "etherboot.h" #include "tftpcore.h" -- cgit v1.2.3-55-g7522