Xenomai API
2.5.6.1
|
00001 00043 #ifndef _RTIPC_H 00044 00045 #ifdef __KERNEL__ 00046 00047 #include <linux/net.h> 00048 #include <linux/socket.h> 00049 #include <linux/if.h> 00050 00051 #else /* !__KERNEL__ */ 00052 00053 #include <sys/types.h> 00054 #include <sys/socket.h> 00055 00056 #endif /* !__KERNEL__ */ 00057 00058 #include <nucleus/types.h> 00059 #include <rtdm/rtdm.h> 00060 00061 /* Address family */ 00062 #define AF_RTIPC 111 00063 00064 /* Protocol family */ 00065 #define PF_RTIPC AF_RTIPC 00066 00067 enum { 00068 IPCPROTO_IPC = 0, /* Default protocol (IDDP) */ 00069 IPCPROTO_XDDP = 1, /* Cross-domain datagram protocol */ 00070 IPCPROTO_IDDP = 2, /* Intra-domain datagram protocol */ 00071 IPCPROTO_BUFP = 3, /* Buffer protocol */ 00072 IPCPROTO_MAX 00073 }; 00074 00075 /* 00076 * Valid port ranges: 00077 * XDDP = [0..OPT_PIPE_NRDEV-1] 00078 * IDDP = [0..OPT_IDDP_NRPORT-1] 00079 * BUFP = [0..OPT_BUFP_NRPORT-1] 00080 */ 00081 typedef int16_t rtipc_port_t; 00082 00083 struct sockaddr_ipc { 00084 sa_family_t sipc_family; /* AF_RTIPC */ 00085 rtipc_port_t sipc_port; 00086 }; 00087 00088 /* RTIPC socket level */ 00089 #define SOL_RTIPC 311 00090 00091 /* SOL_RTIPC level option names (via setsockopt) */ 00092 #define XDDP_SETSTREAMBUF 1 00093 #define XDDP_SETMONITOR 2 00094 #define XDDP_SETLOCALPOOL 3 00095 #define XDDP_SETLABEL 4 00096 #define XDDP_GETLABEL 5 00097 #define IDDP_SETLOCALPOOL 6 00098 #define IDDP_GETSTALLCOUNT 7 00099 #define IDDP_SETLABEL 8 00100 #define IDDP_GETLABEL 9 00101 #define BUFP_SETBUFFER 10 00102 #define BUFP_SETLABEL 11 00103 #define BUFP_GETLABEL 12 00104 00105 #define XDDP_LABEL_LEN XNOBJECT_NAME_LEN 00106 #define IDDP_LABEL_LEN XNOBJECT_NAME_LEN 00107 #define BUFP_LABEL_LEN XNOBJECT_NAME_LEN 00108 00109 /* XDDP in-kernel monitored events */ 00110 #define XDDP_EVTIN 1 00111 #define XDDP_EVTOUT 2 00112 #define XDDP_EVTDOWN 3 00113 #define XDDP_EVTNOBUF 4 00114 00115 #endif /* !_RTIPC_H */