OSDN Git Service

(none)
[hos/hos-v4a.git] / aplfw / driver / tcpip / tcpip / tcpip.h
1 /** 
2  *  Hyper Operating System  Application Framework
3  *
4  * @file  tcpip.h
5  * @brief %jp{TCP/IP プロトコル}
6  *
7  * Copyright (C) 2006-2007 by Project HOS
8  * http://sourceforge.jp/projects/hos/
9  */
10
11
12 #ifndef __HOS__tcpip_h__
13 #define __HOS__tcpip_h__
14
15
16 #include "system/sysapi/sysapi.h"
17 #include "system/file/chrdrv.h"
18
19
20
21 typedef struct t_tcpip_address
22 {
23         unsigned char   ubAddress[4];
24         unsigned short  uhPort;
25 } T_TCPIP_ADDRESS;
26
27
28
29 struct c_tcpipfile;
30
31 typedef struct c_tcpip
32 {
33         C_CHRDRV                        ChrDrv;                                 /* キャラクタ型デバイスドライバを継承 */
34
35         HANDLE                          hIp;                                    /* IP層 */
36         
37         int                                     iOpenCount;                             /* オープンカウンタ */
38
39         SYSPRC_HANDLE           hPrcRecv;                               /* 受信プロセス */
40         
41         struct c_tcpipfile      *pUdpHead;
42         struct c_tcpipfile      *pTcpHead;
43         
44         unsigned short          uhPacketId;
45
46 //      unsigned char           ubSendBuf[IPETHER_MAXPACKET_SIZE];
47         unsigned char           ubRecvBuf[2048];
48         unsigned char           ubSendBuf[2048];
49 } C_TCPIP;
50
51
52
53
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57
58 void Tcpip_Create(C_TCPIP *self, HANDLE hIp);   /**< コンストラクタ */
59 void Tcpip_Delete(C_DRVOBJ *pDrvObj);                   /**< デストラクタ */
60
61 #ifdef __cplusplus
62 }
63 #endif
64
65
66 #endif  /* __HOS__ipether_h__ */
67
68
69 /* endof file */