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
int ec_outframe(int idx, int sock)
RTHANDLE tx_region
Definition: intime/nicdrv.h:83
int ec_setupnic(const char *ifname, int secondary)
int ecx_setupnic(ecx_portt *port, const char *ifname, int secondary)
Definition: erika/nicdrv.c:90
HPERXBUFFERSET * rx_buffers
Definition: intime/nicdrv.h:87
uint8 txbuf[1024]
Definition: eoe_test.c:40
#define EC_MAXBUF
Definition: ethercattype.h:62
uint16_t uint16
Definition: osal.h:29
HPEHANDLE handle
Definition: intime/nicdrv.h:86
RTHANDLE getindex_region
Definition: intime/nicdrv.h:82
const uint16 priMAC[3]
Definition: erika/nicdrv.c:65
RTHANDLE rx_region
Definition: intime/nicdrv.h:84
void ecx_setbufstat(ecx_portt *port, int idx, int bufstat)
Definition: erika/nicdrv.c:202
int ec_srconfirm(int idx, int timeout)
void ec_setupheader(void *p)
Definition: erika/nicdrv.c:151
void ec_setbufstat(int idx, int bufstat)
struct ecx_port ecx_portt
int ec_outframe_red(int idx)
HPERXBUFFERSET * rx_buffers
Definition: intime/nicdrv.h:51
uint8 ec_bufT[EC_BUFSIZE]
Definition: ethercattype.h:87
int ec_closenic(void)
int ecx_outframe(ecx_portt *port, int idx, int sock)
Definition: erika/nicdrv.c:215
int ec_getindex(void)
int ecx_getindex(ecx_portt *port)
Definition: erika/nicdrv.c:168
const uint16 secMAC[3]
Definition: erika/nicdrv.c:67
int ec_waitinframe(int idx, int timeout)
int ecx_waitinframe(ecx_portt *port, int idx, int timeout)
Definition: erika/nicdrv.c:467
int ecx_closenic(ecx_portt *port)
Definition: erika/nicdrv.c:140
struct ecx_redport ecx_redportt
int ecx_outframe_red(ecx_portt *port, int idx)
Definition: erika/nicdrv.c:237
int ecx_srconfirm(ecx_portt *port, int idx, int timeout)
Definition: erika/nicdrv.c:490
HPEHANDLE handle
Definition: intime/nicdrv.h:50
uint8 rxbuf[1024]
Definition: eoe_test.c:50


soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Mon Feb 28 2022 23:46:57