Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _PASARELA_INTERFACE_H_
00027 #define _PASARELA_INTERFACE_H_
00028
00029 #include <linux/if.h>
00030 #include "core/interface/Msg.h"
00031
00032
00033 #define SIO_TRANSMISSION (SIOCDEVPRIVATE + 0)
00034 #define SIO_NODEINFO (SIOCDEVPRIVATE + 1)
00035 #define SIO_GETLATESTLQM (SIOCDEVPRIVATE + 2)
00036 #define SIO_NETWORKCONNECTED (SIOCDEVPRIVATE + 3)
00037 #define SIO_QUEUEACTIONS (SIOCDEVPRIVATE + 4)
00038 #define SIO_QUEUEELEMSINFO (SIOCDEVPRIVATE + 5)
00039 #define SIO_RTWMPSETGET (SIOCDEVPRIVATE + 6)
00040 #define SIO_RTWMPPLUGIN (SIOCDEVPRIVATE + 7)
00041 #define SIO_GETLATESTDISTANCES (SIOCDEVPRIVATE + 8)
00042
00043
00044 typedef enum {PUSH, PUSH_DATA, POP_DATA,POP_DATA_TIMEOUT, POP, TIMEDPOP, NONBLOCKINGPOP} tpTransmission;
00045 typedef struct {
00046 tpTransmission type;
00047 Msg *m;
00048 unsigned int port;
00049 unsigned int dest;
00050 unsigned char source;
00051 unsigned int size;
00052 char priority;
00053 int timeout_ms;
00054 int ret;
00055 char * data;
00056 } tpTransmissionInfo;
00057
00058
00059 typedef enum {NODEID, NUMOFNODES} tpNodeI;
00060 typedef struct {
00061 tpNodeI type;
00062 char ret;
00063 } tpNodeInfo;
00064
00065
00066 typedef enum {BLOCKING, NONBLOCKING} tpNetworkConnected;
00067 typedef struct {
00068 tpNetworkConnected type;
00069 int timeout;
00070 int ret;
00071 } tpNetworkConnectedInfo;
00072
00073
00074
00075 typedef enum { REMOVETXMSG, GETCPUDELAY, GETTIMEOUT, GETWCMULT, GETRATE,
00076 SETCPUDELAY, SETTIMEOUT, SETWCMULT, SETRATE} tpQueueAction;
00077 typedef struct {
00078 tpQueueAction queueAction;
00079 int ival;
00080 int fval;
00081 int ret;
00082 } tpQueueActionInfo;
00083
00084
00085 typedef enum {NUMOFFREEPOSITIONSTX, NUMOFELEMSTX, NUMOFELEMSRX} tpGetQueueElems;
00086 typedef struct {
00087 tpGetQueueElems type;
00088 int ret;
00089 } tpGetQueueElemsInfo;
00090
00091
00092
00093 typedef enum { NETIT, GETMTU, GETAS, SERIAL, LOOPID, GINSTANCEID,
00094 GPRIMBASEDROUTING, GMESSAGERESCHEDULE, GFLOWCONTROL, SETAS,
00095 SINSTANCEID, SPRIMBASEDROUTING, SMESSAGERESCHEDULE, SFLOWCONTROL} tpRTWMPSetGet;
00096 typedef struct {
00097 tpRTWMPSetGet type;
00098 union {
00099 int netIT;
00100 unsigned int mtu;
00101 int activeSearch;
00102 unsigned int serial;
00103 unsigned int loopId;
00104 short instanceId;
00105 int primBasedRouting;
00106 int messageReschedule;
00107 int flowControl;
00108 };
00109 } tpRTWMPSetGetInfo;
00110
00111
00112 typedef enum {QOS, BC_PLUS} tpPlugin;
00113
00114
00115 typedef enum {PUSHBC, POPBC, TIMEDPOPBC, ELEMSINRXBC, ELEMSINTXBC, FREEPOSINTXBC} tpBCAcc;
00116 typedef struct {
00117 tpBCAcc type;
00118 Msg *m;
00119 int timeout_ms;
00120 int ret;
00121 } tpBCInfo;
00122
00123
00124 typedef enum {PUSHQOS, POPQOS, TIMEDPOPQOS, FREEPOSQOS} tpQoSAcc;
00125 typedef struct {
00126 tpQoSAcc type;
00127 Msg *m;
00128 int timeout_ms;
00129 int ret;
00130 } tpQoSInfo;
00131
00132
00133 typedef union {
00134 tpTransmissionInfo transmissionInfo;
00135 tpNodeInfo nodeInfo;
00136 char *lqm;
00137 tpNetworkConnectedInfo networkConnected;
00138 tpQueueActionInfo queueAction;
00139 tpGetQueueElemsInfo queueElemsInfo;
00140 tpRTWMPSetGetInfo RTWMPSetGetInfo;
00141 tpPlugin RTWMPplugin;
00142
00143 tpBCInfo BCInfo;
00144 tpQoSInfo QoSInfo;
00145 } tpIOCTL_data;
00146
00147 #endif