win32/nicdrv.h
Go to the documentation of this file.
1 /*
2  * Licensed under the GNU General Public License version 2 with exceptions. See
3  * LICENSE file in the project root for full license information
4  */
5 
11 #ifndef _nicdrvh_
12 #define _nicdrvh_
13 
14 #ifdef __cplusplus
15 extern "C"
16 {
17 #endif
18 
19 #define HAVE_REMOTE
20 
21 #include <pcap.h>
22 #include <Packet32.h>
23 
25 typedef struct
26 {
28  pcap_t **sock;
32  int (*txbuflength)[EC_MAXBUF];
34  ec_bufT *tempbuf;
38  int (*rxbufstat)[EC_MAXBUF];
40  int (*rxsa)[EC_MAXBUF];
41 } ec_stackT;
42 
44 typedef struct
45 {
46  ec_stackT stack;
47  pcap_t *sockhandle;
51  int rxbufstat[EC_MAXBUF];
53  int rxsa[EC_MAXBUF];
55  ec_bufT tempinbuf;
56 } ecx_redportt;
57 
59 typedef struct
60 {
61  ec_stackT stack;
62  pcap_t *sockhandle;
66  int rxbufstat[EC_MAXBUF];
68  int rxsa[EC_MAXBUF];
70  ec_bufT tempinbuf;
72  int tempinbufs;
76  int txbuflength[EC_MAXBUF];
78  ec_bufT txbuf2;
80  int txbuflength2;
82  int lastidx;
84  int redstate;
86  ecx_redportt *redport;
87  CRITICAL_SECTION getindex_mutex;
88  CRITICAL_SECTION tx_mutex;
89  CRITICAL_SECTION rx_mutex;
90 } ecx_portt;
91 
92 extern const uint16 priMAC[3];
93 extern const uint16 secMAC[3];
94 
95 #ifdef EC_VER1
96 extern ecx_portt ecx_port;
98 
99 int ec_setupnic(const char * ifname, int secondary);
100 int ec_closenic(void);
101 void ec_setbufstat(int idx, int bufstat);
102 int ec_getindex(void);
103 int ec_outframe(int idx, int sock);
104 int ec_outframe_red(int idx);
105 int ec_waitinframe(int idx, int timeout);
106 int ec_srconfirm(int idx,int timeout);
107 #endif
108 
109 void ec_setupheader(void *p);
110 int ecx_setupnic(ecx_portt *port, const char * ifname, int secondary);
111 int ecx_closenic(ecx_portt *port);
112 void ecx_setbufstat(ecx_portt *port, int idx, int bufstat);
113 int ecx_getindex(ecx_portt *port);
114 int ecx_outframe(ecx_portt *port, int idx, int sock);
115 int ecx_outframe_red(ecx_portt *port, int idx);
116 int ecx_waitinframe(ecx_portt *port, int idx, int timeout);
117 int ecx_srconfirm(ecx_portt *port, int idx,int timeout);
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #endif
ecx_waitinframe
int ecx_waitinframe(ecx_portt *port, int idx, int timeout)
Definition: erika/nicdrv.c:467
ec_bufT
uint8 ec_bufT[EC_BUFSIZE]
Definition: ethercattype.h:87
ec_waitinframe
int ec_waitinframe(int idx, int timeout)
secMAC
const uint16 secMAC[3]
Definition: erika/nicdrv.c:67
rxbuf
uint8 rxbuf[1024]
Definition: eoe_test.c:50
ec_setupheader
void ec_setupheader(void *p)
Definition: erika/nicdrv.c:151
ecx_redportt
struct ecx_redport ecx_redportt
priMAC
const uint16 priMAC[3]
Definition: erika/nicdrv.c:65
ec_closenic
int ec_closenic(void)
ecx_portt::tx_mutex
CRITICAL_SECTION tx_mutex
Definition: win32/nicdrv.h:88
ec_setupnic
int ec_setupnic(const char *ifname, int secondary)
Packet32.h
ec_setbufstat
void ec_setbufstat(int idx, int bufstat)
EC_MAXBUF
#define EC_MAXBUF
Definition: ethercattype.h:62
ec_outframe
int ec_outframe(int idx, int sock)
ecx_outframe
int ecx_outframe(ecx_portt *port, int idx, int sock)
Definition: erika/nicdrv.c:215
txbuf
uint8 txbuf[1024]
Definition: eoe_test.c:40
ec_srconfirm
int ec_srconfirm(int idx, int timeout)
ec_outframe_red
int ec_outframe_red(int idx)
pcap_t
struct pcap pcap_t
Definition: pcap/pcap.h:87
ecx_port
ecx_portt ecx_port
Definition: ethercatmain.c:97
ecx_setupnic
int ecx_setupnic(ecx_portt *port, const char *ifname, int secondary)
Definition: erika/nicdrv.c:90
ec_getindex
int ec_getindex(void)
ec_stackT
Definition: erika/nicdrv.h:19
ecx_setbufstat
void ecx_setbufstat(ecx_portt *port, int idx, int bufstat)
Definition: erika/nicdrv.c:202
ecx_srconfirm
int ecx_srconfirm(ecx_portt *port, int idx, int timeout)
Definition: erika/nicdrv.c:490
ecx_portt::getindex_mutex
CRITICAL_SECTION getindex_mutex
Definition: win32/nicdrv.h:87
uint16
uint16_t uint16
Definition: osal.h:29
ecx_outframe_red
int ecx_outframe_red(ecx_portt *port, int idx)
Definition: erika/nicdrv.c:237
ecx_portt
Definition: erika/nicdrv.h:53
ecx_redport
ecx_redportt ecx_redport
Definition: ethercatmain.c:98
ecx_getindex
int ecx_getindex(ecx_portt *port)
Definition: erika/nicdrv.c:168
ecx_closenic
int ecx_closenic(ecx_portt *port)
Definition: erika/nicdrv.c:140
ecx_portt::rx_mutex
CRITICAL_SECTION rx_mutex
Definition: win32/nicdrv.h:89
ecx_portt
struct ecx_port ecx_portt
ecx_redportt
Definition: erika/nicdrv.h:38


soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Wed Mar 2 2022 01:01:49