intime/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 #define HAVE_REMOTE
15 
16 #include <rt.h>
17 #include "hpeif2.h"
18 
20 typedef struct
21 {
23  int *sock;
27  int (*txbuflength)[EC_MAXBUF];
29  ec_bufT *tempbuf;
33  int (*rxbufstat)[EC_MAXBUF];
35  int (*rxsa)[EC_MAXBUF];
36 } ec_stackT;
37 
38 typedef struct
39 {
40  ec_stackT stack;
44  int rxbufstat[EC_MAXBUF];
46  int rxsa[EC_MAXBUF];
48  ec_bufT tempinbuf;
49  /* Intime */
50  HPEHANDLE handle;
51  HPERXBUFFERSET *rx_buffers;
52  HPETXBUFFERSET *tx_buffers[EC_MAXBUF];
53 } ecx_redportt;
54 
55 typedef struct
56 {
57  ec_stackT stack;
61  int rxbufstat[EC_MAXBUF];
63  int rxsa[EC_MAXBUF];
65  ec_bufT tempinbuf;
67  int tempinbufs;
71  int txbuflength[EC_MAXBUF];
73  ec_bufT txbuf2;
75  int txbuflength2;
77  int lastidx;
79  int redstate;
81  ecx_redportt *redport;
82  RTHANDLE getindex_region;
83  RTHANDLE tx_region;
84  RTHANDLE rx_region;
85  /* Intime */
86  HPEHANDLE handle;
87  HPERXBUFFERSET *rx_buffers;
88  HPETXBUFFERSET *tx_buffers[EC_MAXBUF];
89 } ecx_portt;
90 
91 extern const uint16 priMAC[3];
92 extern const uint16 secMAC[3];
93 
94 //extern ecx_portt ecx_port;
95 //extern ecx_redportt ecx_redport;
96 
97 int ec_setupnic(const char * ifname, int secondary);
98 int ec_closenic(void);
99 void ec_setupheader(void *p);
100 void ec_setbufstat(int idx, int bufstat);
101 int ec_getindex(void);
102 int ec_outframe(int idx, int sock);
103 int ec_outframe_red(int idx);
104 int ec_waitinframe(int idx, int timeout);
105 int ec_srconfirm(int idx,int timeout);
106 
107 int ecx_setupnic(ecx_portt *port, const char * ifname, int secondary);
108 int ecx_closenic(ecx_portt *port);
109 void ecx_setbufstat(ecx_portt *port, int idx, int bufstat);
110 int ecx_getindex(ecx_portt *port);
111 int ecx_outframe(ecx_portt *port, int idx, int sock);
112 int ecx_outframe_red(ecx_portt *port, int idx);
113 int ecx_waitinframe(ecx_portt *port, int idx, int timeout);
114 int ecx_srconfirm(ecx_portt *port, int idx,int timeout);
115 
116 #endif
ecx_portt::tx_region
RTHANDLE tx_region
Definition: intime/nicdrv.h:83
ec_bufT
uint8 ec_bufT[EC_BUFSIZE]
Definition: ethercattype.h:87
ecx_redportt::handle
HPEHANDLE handle
Definition: intime/nicdrv.h:50
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
ecx_redportt
struct ecx_redport ecx_redportt
ecx_outframe_red
int ecx_outframe_red(ecx_portt *port, int idx)
Definition: erika/nicdrv.c:237
ec_setupheader
void ec_setupheader(void *p)
Definition: erika/nicdrv.c:151
ec_closenic
int ec_closenic(void)
ec_setupnic
int ec_setupnic(const char *ifname, int secondary)
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)
txbuf
uint8 txbuf[1024]
Definition: eoe_test.c:40
ec_srconfirm
int ec_srconfirm(int idx, int timeout)
ecx_portt::rx_buffers
HPERXBUFFERSET * rx_buffers
Definition: intime/nicdrv.h:87
ec_outframe_red
int ec_outframe_red(int idx)
ecx_portt::getindex_region
RTHANDLE getindex_region
Definition: intime/nicdrv.h:82
ec_getindex
int ec_getindex(void)
priMAC
const uint16 priMAC[3]
Definition: erika/nicdrv.c:65
ecx_portt::handle
HPEHANDLE handle
Definition: intime/nicdrv.h:86
ec_stackT
Definition: erika/nicdrv.h:19
ecx_closenic
int ecx_closenic(ecx_portt *port)
Definition: erika/nicdrv.c:140
uint16
uint16_t uint16
Definition: osal.h:29
ecx_outframe
int ecx_outframe(ecx_portt *port, int idx, int sock)
Definition: erika/nicdrv.c:215
ecx_portt::rx_region
RTHANDLE rx_region
Definition: intime/nicdrv.h:84
ecx_waitinframe
int ecx_waitinframe(ecx_portt *port, int idx, int timeout)
Definition: erika/nicdrv.c:467
ecx_portt
Definition: erika/nicdrv.h:53
ecx_srconfirm
int ecx_srconfirm(ecx_portt *port, int idx, int timeout)
Definition: erika/nicdrv.c:490
ecx_setbufstat
void ecx_setbufstat(ecx_portt *port, int idx, int bufstat)
Definition: erika/nicdrv.c:202
ecx_setupnic
int ecx_setupnic(ecx_portt *port, const char *ifname, int secondary)
Definition: erika/nicdrv.c:90
ecx_redportt::rx_buffers
HPERXBUFFERSET * rx_buffers
Definition: intime/nicdrv.h:51
ecx_portt
struct ecx_port ecx_portt
ecx_redportt
Definition: erika/nicdrv.h:38
ecx_getindex
int ecx_getindex(ecx_portt *port)
Definition: erika/nicdrv.c:168


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