]> rtime.felk.cvut.cz Git - can-eth-gw.git/blobdiff - kernel/canethgw.h
support for ipv6 added
[can-eth-gw.git] / kernel / canethgw.h
index 5acb34b52db16f3c17230e59b071edcdceb4b06f..ab1b6c1b5e008a0ecb426bf478c3a75bd36617e0 100644 (file)
@@ -1,4 +1,31 @@
-static int  gw_udp_recv( void* data );
-static void gw_udp_send( struct can_frame* cf, struct in_addr ipaddr, u16 port );
-static int  gw_can_recv( void* data );
-static void gw_can_send( struct can_frame* cf, int ifidx );
+#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;
+       __u8 udp_dst[0];
+};
+
+#ifdef __KERNEL__
+struct cegw_job
+{
+       struct kref refcount;
+       struct socket* can_sock;
+       struct socket* udp_sock;
+       u32  udp_dstcnt;
+       u32  udp_addrlen;
+       u8   udp_dst[0];
+};
+#endif
+
+#define CEGW_IOCTL_BASE 'c'
+#define CEGW_IOCTL_START _IOW(CEGW_IOCTL_BASE, 0, struct cegw_ioctl)
+
+#endif /* CANETHGW_H */
+