]> rtime.felk.cvut.cz Git - can-eth-gw.git/blobdiff - kernel/canethgw.h
Add "patched" Linux kernel as submodule
[can-eth-gw.git] / kernel / canethgw.h
index 2005bab600aef43949af2ddd5bd852bd02d8d677..65d9cc51b8e9dd36042e978b385918c129bf141d 100644 (file)
@@ -1,5 +1,30 @@
-int  gw_udp_recv( void* data );
-void gw_udp_send( struct can_frame* cf );
-int  gw_can_recv( void* data );
-void gw_can_send( struct can_frame* cf );
+#ifndef CANETHGW_H
+#define CANETHGW_H
+
+#include <linux/types.h>
+
+struct cegw_ioctl
+{
+       __u32 can_sock;
+       __u32 udp_sock;
+       __u32 udp_dstcnt;
+       __u32 udp_addrlen;
+       struct sockaddr_in udp_dst[0];
+};
+
+#ifdef __KERNEL__
+struct cegw_job
+{
+       struct kref refcount;
+       struct socket* can_sock;
+       struct socket* udp_sock;
+       __u32  udp_dstcnt;
+       struct sockaddr_in udp_dst[0];
+};
+#endif
+
+#define CEGW_IOCTL_BASE 'c'
+#define CEGW_IOCTL_START _IOW(CEGW_IOCTL_BASE, 0, struct cegw_ioctl)
+
+#endif /* CANETHGW_H */