versadac  1
versadac - Scalable Recorder Firmware
sockuser.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:: sockuser.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 #ifndef _SOCKUSER_H
26 #define _SOCKUSER_H
27 
28 #define SOCKET int
29 /*
30 #define EWOULDBLOCK 0
31 #define EINPROGRESS 1
32 #define EALREADY 2
33 #define ENOTSOCK 3
34 #define EDESTADDRREQ 4
35 #define EMSGSIZE 5
36 #define EPROTOTYPE 6
37 #define ENOPROTOOPT 7
38 #define EPROTONOSUPPORT 8
39 #define ESOCKTNOSUPPORT 9
40 #define EOPNOTSUPP 10
41 #define EPFNOSUPPORT 11
42 #define EAFNOSUPPORT 12
43 #define EADDRINUSE 13
44 #define EADDRNOTAVAIL 14
45 #define ENETDOWN 15
46 #define ENETUNREACH 16
47 #define ENETRESET 17
48 #define ECONNABORTED 18
49 #define ECONNRESET 19
50 #define ENOBUFS 20
51 #define EISCONN 21
52 #define ENOTCONN 22
53 #define ESHUTDOWN 23
54 #define ETOOMANYREFS 24
55 #define ETIMEDOUT 25
56 #define ECONNREFUSED 26
57 #define ELOOP 27
58 #define ENAMETOOLONG 28
59 #define EHOSTDOWN 29
60 #define EHOSTUNREACH 30
61 #define ENOTEMPTY 31
62 #define EPROCLIM 32
63 #define EUSERS 33
64 #define EDQUOT 34
65 #define ESTALE 35
66 #define EREMOTE 36
67 
68 #define EINVAL 37
69 #define EFAULT 38
70 */
71 /* Specific defines*/
72 #define FREE 0
73 #define USED 1
74 
75 
76 
77 
78 typedef struct
79 {
80  APP_DWORD used; /* occupation tag: socket is used/free*/
81  APP_DWORD PendingCnt; /* USED: receive request pending, FREE: no requ. pending*/
82  APP_DWORD SockHndlRd; /* Socket Handle, returned by the operating system*/
83  APP_DWORD ThreadId; /* ID of the socket - service thread*/
84  APP_WORD Port; /* UDP Port where the socket listen */
85 } SOCK_PROP;
86 
87 typedef struct
88 {
89  SOCK_PROP Sock[MAXNUM_SOCKETS];
90 } SOCK_MANAGER;
91 
92 
93 #endif
Definition: sockuser.h:78
Definition: sockuser.h:87