2 * Hyper Operating System Application Framework
5 * @brief %jp{TCP/IP プロトコル}
7 * Copyright (C) 2006-2007 by Project HOS
8 * http://sourceforge.jp/projects/hos/
12 #ifndef __HOS__tcpip_local_h__
13 #define __HOS__tcpip_local_h__
17 #include "tcpipfile.h"
18 #include "system/file/syncdrv_local.h"
21 #define TCP_FLAG_FIN 0x01
22 #define TCP_FLAG_SYN 0x02
23 #define TCP_FLAG_RST 0x04
24 #define TCP_FLAG_PSH 0x08
25 #define TCP_FLAG_ACK 0x10
26 #define TCP_FLAG_URG 0x20
34 FILE_ERR TcpIp_Constructor(C_TCPIP *self, const T_DRVOBJ_METHODS *pMethods, const char *pszIp); /**< コンストラクタ */
35 void TcpIp_Destructor(C_TCPIP *self); /**< デストラクタ */
37 HANDLE TcpIp_Open(C_DRVOBJ *pDrvObj, const char *pszPath, int iMode);
38 void TcpIp_Close(C_DRVOBJ *pDrvObj, C_FILEOBJ *pFileObj);
39 FILE_ERR TcpIp_IoControl(C_DRVOBJ *pDrvObj, C_FILEOBJ *pFileObj, int iFunc, void *pInBuf, FILE_SIZE InSize, const void *pOutBuf, FILE_SIZE OutSize);
40 FILE_POS TcpIp_Seek(C_DRVOBJ *pDrvObj, C_FILEOBJ *pFileObj, FILE_POS Offset, int iOrign);
41 FILE_SIZE TcpIp_Read(C_DRVOBJ *pDrvObj, C_FILEOBJ *pFileObj, void *pBuf, FILE_SIZE Size);
42 FILE_SIZE TcpIp_Write(C_DRVOBJ *pDrvObj, C_FILEOBJ *pFileObj, const void *pData, FILE_SIZE Size);
43 FILE_ERR TcpIp_Flush(C_DRVOBJ *pDrvObj, C_FILEOBJ *pFileObj);
45 int TcpIp_GetSendBuf(C_TCPIP *self, void **ppBuf); /* IPデータグラム送信バッファ取得 */
46 void TcpIp_SendBuf(C_TCPIP *self, void **ppBuf); /* IPデータグラムバッファ送信 */
47 void TcpIp_Recv(void); /* IPパケット受信プロセス */
55 #endif /* __HOS__tcpip_local_h__ */