versadac  1
versadac - Scalable Recorder Firmware
os_sckt.h
1 /*---------------------------------------------------------------------------*/
2 /* Copyright (C) 2006 Woodhead Software & Electonics. All rights reserved. */
3 /*---------------------------------------------------------------------------*/
4 /* This program is protected by international copyright. */
5 /* */
6 /* The use of this software including but not limited to its Source Code */
7 /* is subject to restrictions as agreed in the license agreement between */
8 /* you and Woodhead. */
9 /* Copying or distribution is not allowed unless expressly permitted */
10 /* according to your license agreement with Woodhead. */
11 /*---------------------------------------------------------------------------*/
12 /* */
13 /* Project : STACK PROFINET Controller */
14 /* Component : Hardware Interface */
15 /* $Workfile:: os_sckt.h $*/
16 /* $Revision:: 1 $*/
17 /* $Date:: 7/06/10 11:05 $*/
18 /* */
19 /*---------------------------------------------------------------------------*/
20 /* */
21 /* D e s c r i p t i o n : */
22 /* Network Abstraction Layer */
23 /* */
24 /*---------------------------------------------------------------------------*/
25 
26 #ifndef _SOCKET_H
27 #define _SOCKET_H
28 
29 #define OS_AFINET AF_INET
30 #define OS_INADDR_ANY INADDR_ANY
31 
32 APP_DWORD OsSockInit (APP_VOID);
33 APP_DWORD OsSockCleanup (APP_VOID);
34 
35 
36 
37 APP_DWORD OsSockBind(APP_LPDWORD lpdwSocket ,LPST_OS_SOCKADDR_IN pSockAdr);
38 APP_DWORD OsSockListen(APP_LPDWORD lpdwSockId,APP_WORD wBack);
39 APP_DWORD OsSockAccept(APP_LPDWORD lpdwSockId, APP_LPDWORD lpdwNewSockId);
40 APP_DWORD OsSockSelect(APP_LPDWORD lpdwSockId);
41 
42 APP_DWORD OsSockReceiveFrom(APP_LPDWORD lpdwSockId, APP_LPBYTE pbyBuf,APP_LPWORD pwLen,LPST_OS_SOCKADDR_IN pSockAdr);
43 APP_DWORD OsSockSendTo(APP_LPDWORD lpdwSockId, APP_PBYTE pBuf, APP_DWORD len, APP_DWORD flags,LPST_OS_SOCKADDR_IN pSockAdr);
44 APP_DWORD SockTask (APP_VOID);
45 
46 APP_DWORD OsSockOpen (APP_LPDWORD lpdwSocket, APP_BYTE dwSocketType );
47 APP_DWORD OsSockSetOption (APP_LPDWORD lpdwSocket, APP_BYTE dwSocketType );
48 APP_DWORD OsSockClose (APP_LPDWORD lpdwSocket, APP_BYTE bySocketType );
49 
50 #endif
Definition: stk_sckt.h:49