Line 15... |
Line 15... |
#define FRAME_COUNT 100
|
#define FRAME_COUNT 100
|
#define FRAME_COUNT_SYNC 50
|
#define FRAME_COUNT_SYNC 50
|
#define FRAME_COUNT_SEND 10
|
#define FRAME_COUNT_SEND 10
|
#define FRAME_COUNT_RCV 5
|
#define FRAME_COUNT_RCV 5
|
#define RETRANSMIT_TIME 110
|
#define RETRANSMIT_TIME 110
|
#define SOCKET_TIMEOUT 15
|
#define SOCKET_TIMEOUT 10
|
#define SEND_WINDOW 7000
|
#define SEND_WINDOW 7000
|
#define RECEIVE_WINDOW 5120
|
#define RECEIVE_WINDOW (536*FRAME_COUNT/4)
|
|
|
typedef enum IPMode_e {
|
typedef enum IPMode_e {
|
IP_MODE_UDP,
|
IP_MODE_UDP,
|
IP_MODE_TCP,
|
IP_MODE_TCP,
|
IP_MODE_PING
|
IP_MODE_PING
|
Line 79... |
Line 79... |
IPCallbackPtr userFunc;
|
IPCallbackPtr userFunc;
|
void *userPtr;
|
void *userPtr;
|
void *userPtr2;
|
void *userPtr2;
|
uint32 userData;
|
uint32 userData;
|
uint32 userData2;
|
uint32 userData2;
|
|
OS_Semaphore_t *userSemaphore;
|
};
|
};
|
|
|
//ethernet.c
|
//ethernet.c
|
void EthernetSendPacket(const unsigned char *packet, int length); //Windows
|
void EthernetSendPacket(const unsigned char *packet, int length); //Windows
|
void EthernetInit(unsigned char MacAddress[6]);
|
void EthernetInit(unsigned char MacAddress[6]);
|
Line 98... |
Line 99... |
IPSocket *IPOpen(IPMode_e mode, uint32 ipAddress, uint32 port, IPSockFuncPtr funcPtr);
|
IPSocket *IPOpen(IPMode_e mode, uint32 ipAddress, uint32 port, IPSockFuncPtr funcPtr);
|
void IPWriteFlush(IPSocket *socket);
|
void IPWriteFlush(IPSocket *socket);
|
uint32 IPWrite(IPSocket *socket, const uint8 *buf, uint32 length);
|
uint32 IPWrite(IPSocket *socket, const uint8 *buf, uint32 length);
|
uint32 IPRead(IPSocket *socket, uint8 *buf, uint32 length);
|
uint32 IPRead(IPSocket *socket, uint8 *buf, uint32 length);
|
void IPClose(IPSocket *socket);
|
void IPClose(IPSocket *socket);
|
#ifdef IPPRINTF
|
#ifdef INSIDE_TCPIP
|
void IPPrintf(IPSocket *socket, char *message, int arg0, int arg1, int arg2, int arg3);
|
int IPPrintf(IPSocket *socket, char *message,
|
|
int arg0, int arg1, int arg2, int arg3,
|
|
int arg4, int arg5, int arg6, int arg7);
|
#else
|
#else
|
void IPPrintf(IPSocket *socket, char *message, ...);
|
int IPPrintf(IPSocket *socket, char *message, ...);
|
#endif
|
#endif
|
void IPResolve(char *name, IPCallbackPtr resolvedFunc, void *arg);
|
void IPResolve(char *name, IPCallbackPtr resolvedFunc, void *arg);
|
uint32 IPAddressSelf(void);
|
uint32 IPAddressSelf(void);
|
|
|
//http.c
|
//http.c
|
Line 129... |
Line 132... |
void TftpdInit(void);
|
void TftpdInit(void);
|
IPSocket *TftpTransfer(uint32 ip, char *filename, uint8 *buffer, int size,
|
IPSocket *TftpTransfer(uint32 ip, char *filename, uint8 *buffer, int size,
|
IPCallbackPtr callback);
|
IPCallbackPtr callback);
|
void ConsoleInit(void);
|
void ConsoleInit(void);
|
void *IPNameValue(const char *name, void *value);
|
void *IPNameValue(const char *name, void *value);
|
|
int ConsoleGetch(void);
|
|
#ifndef INSIDE_NETUTIL
|
|
int ConsoleScanf(char *format, ...);
|
|
int ConsolePrintf(char *format, ...);
|
|
#endif
|
|
|
#endif //__TCPIP_H__
|
#endif //__TCPIP_H__
|
|
|
No newline at end of file
|
No newline at end of file
|