]> rtime.felk.cvut.cz Git - socketcan-devel.git/commitdiff
Introduced can_core.h analogue to linux/can/core.h in Kernel 2.6 tree.
authorhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Thu, 8 Mar 2007 12:28:39 +0000 (12:28 +0000)
committerhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Thu, 8 Mar 2007 12:28:39 +0000 (12:28 +0000)
Updated dates in copyright notices. Cosmetics.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@178 030b6a49-0b11-0410-94ab-b0dab22257f2

12 files changed:
kernel/2.4/can/af_can.c
kernel/2.4/can/af_can.h
kernel/2.4/can/bcm.c
kernel/2.4/can/bcm.h
kernel/2.4/can/can.h
kernel/2.4/can/can_core.h [new file with mode: 0644]
kernel/2.4/can/can_error.h
kernel/2.4/can/can_ioctl.h
kernel/2.4/can/proc.c
kernel/2.4/can/raw.c
kernel/2.4/can/raw.h
kernel/2.4/can/version.h

index f32ccc2c52701e2e489dce44639a009f6a9729ae..17ab5e94d9292953b8e736ae0dc099331e85468f 100644 (file)
 #include <net/sock.h>
 #include <asm/uaccess.h>
 
-#include "af_can.h"
+#include "can.h"
+#include "can_core.h"
 #include "version.h"
-
+#include "af_can.h"
 
 RCSID("$Id$");
 
index 4e181b8fd3f0f4d5ebc05fa970edb2713123e824..3c063b8d82cadce0b8e175a9b511a483ca5ae774 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * af_can.h
  *
- * Copyright (c) 2002-2005 Volkswagen Group Electronic Research
+ * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -53,19 +53,6 @@ RCSID("$Id$");
 
 #include "can.h"
 
-#define DNAME(dev) ((dev) ? (dev)->name : "any")
-
-#define CAN_PROC_DIR "net/can" /* /proc/... */
-
-struct can_proto {
-       int              type;
-       int              protocol;
-       int              capability;
-       struct proto_ops *ops;
-       int              (*init)(struct sock *sk);
-       size_t           obj_size;
-};
-
 /* af_can rx dispatcher structures */
 
 struct receiver {
@@ -128,24 +115,4 @@ struct s_pstats {
 void can_init_proc(void);
 void can_remove_proc(void);
 
-/* function prototypes for the CAN networklayer core (af_can.c) */
-
-void can_debug_skb(struct sk_buff *skb);
-void can_debug_cframe(const char *msg, struct can_frame *cframe, ...);
-
-void can_proto_register(struct can_proto *cp);
-void can_proto_unregister(struct can_proto *cp);
-int  can_rx_register(struct net_device *dev, canid_t can_id, canid_t mask,
-                    void (*func)(struct sk_buff *, void *), void *data,
-                    char *ident);
-int  can_rx_unregister(struct net_device *dev, canid_t can_id, canid_t mask,
-                      void (*func)(struct sk_buff *, void *), void *data);
-void can_dev_register(struct net_device *dev,
-                     void (*func)(unsigned long msg, void *), void *data);
-void can_dev_unregister(struct net_device *dev,
-                       void (*func)(unsigned long msg, void *), void *data);
-int  can_send(struct sk_buff *skb, int loop);
-
-unsigned long timeval2jiffies(struct timeval *tv, int round_up);
-
 #endif /* AF_CAN_H */
index 362b65a8992903157fc29c954817a1b52bdee9dc..6e8a6bf64882c9ac97538acf4ae1b4d289c92d45 100644 (file)
@@ -50,7 +50,8 @@
 #include <linux/poll.h>
 #include <net/sock.h>
 
-#include "af_can.h"
+#include "can.h"
+#include "can_core.h"
 #include "version.h"
 #include "bcm.h"
 
index 21253769eda6181091a3f3c77957d0df96538dc3..aa703576aad9c756c012ba5e05ead52cb3c2c59b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * bcm.h
  *
- * Copyright (c) 2002-2005 Volkswagen Group Electronic Research
+ * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index fd9c4d9394abf868f9f18f257932dcd0be43565b..4ffa521ccc6e18aa5a73149df3844801c51b2a90 100644 (file)
@@ -68,9 +68,6 @@ RCSID("$Id$");
 /* ARP protocol identifier (dummy type for non ARP hardware) */
 #define ARPHRD_CAN     280     /* to be moved to include/linux/if_arp.h */
 
-
-
-
 /* special address description flags for the CAN_ID */
 #define CAN_EFF_FLAG 0x80000000U /* EFF/SFF is set in the MSB */
 #define CAN_RTR_FLAG 0x40000000U /* remote transmission request */
@@ -89,8 +86,6 @@ struct can_frame {
        __u8    data[8] __attribute__ ((aligned(8)));
 };
 
-
-
 /* particular protocols of the protocol family PF_CAN */
 #define CAN_RAW                1 /* RAW sockets */
 #define CAN_BCM                2 /* Broadcast Manager */
diff --git a/kernel/2.4/can/can_core.h b/kernel/2.4/can/can_core.h
new file mode 100644 (file)
index 0000000..4174c99
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * can_core.h
+ *
+ * Protoypes and definitions for CAN protocol modules using the PF_CAN core
+ *
+ * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, the following disclaimer and
+ *    the referenced file 'COPYING'.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Volkswagen nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * Alternatively, provided that this notice is retained in full, this
+ * software may be distributed under the terms of the GNU General
+ * Public License ("GPL") version 2 as distributed in the 'COPYING'
+ * file from the main directory of the linux kernel source.
+ *
+ * The provided data structures and external interfaces from this code
+ * are not restricted to be used by modules with a GPL compatible license.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * Send feedback to <socketcan-users@lists.berlios.de>
+ *
+ */
+
+#ifndef CAN_CORE_H
+#define CAN_CORE_H
+
+#include "version.h"
+RCSID("$Id$");
+
+#include <linux/skbuff.h>
+#include <linux/netdevice.h>
+
+#include "can.h"
+
+#define DNAME(dev) ((dev) ? (dev)->name : "any")
+
+#define CAN_PROC_DIR "net/can" /* /proc/... */
+
+struct can_proto {
+       int              type;
+       int              protocol;
+       int              capability;
+       struct proto_ops *ops;
+       int              (*init)(struct sock *sk);
+       size_t           obj_size;
+};
+
+/* function prototypes for the CAN networklayer core (af_can.c) */
+
+void can_debug_skb(struct sk_buff *skb);
+void can_debug_cframe(const char *msg, struct can_frame *cframe, ...);
+
+void can_proto_register(struct can_proto *cp);
+void can_proto_unregister(struct can_proto *cp);
+int  can_rx_register(struct net_device *dev, canid_t can_id, canid_t mask,
+                    void (*func)(struct sk_buff *, void *), void *data,
+                    char *ident);
+int  can_rx_unregister(struct net_device *dev, canid_t can_id, canid_t mask,
+                      void (*func)(struct sk_buff *, void *), void *data);
+void can_dev_register(struct net_device *dev,
+                     void (*func)(unsigned long msg, void *), void *data);
+void can_dev_unregister(struct net_device *dev,
+                       void (*func)(unsigned long msg, void *), void *data);
+int  can_send(struct sk_buff *skb, int loop);
+
+unsigned long timeval2jiffies(struct timeval *tv, int round_up);
+
+#endif /* CAN_CORE_H */
index d44bc7cf089523ebae5e6ab2b719e2f96c24864c..6aceb77f41e9cde51dbc359a223b8d857d63539f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * can_error_h
  *
- * Copyright (c) 2002-2005 Volkswagen Group Electronic Research
+ * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 8a8ad6b295cbaa8af29fd4fad7a5b05e97a7cdc7..c048c31cfdbecfb419281b60e6c037898710f268 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * can_ioctl_h
  *
- * Copyright (c) 2002-2005 Volkswagen Group Electronic Research
+ * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 5ad0ff623d02b27d377b2d3ec06e6f0d50540545..e77ce5dc0fb9a1f95ccde4f31dcece9f21e58b2b 100644 (file)
 #include <linux/module.h>
 #include <linux/proc_fs.h>
 
-#include "af_can.h"
+#include "can.h"
+#include "can_core.h"
 #include "version.h"
+#include "af_can.h"
 
 RCSID("$Id$");
 
index 69e4273de2443df7338cde0506acafc564e9954a..f5147cd9d72eca106ab739c8a2f509da76861b31 100644 (file)
@@ -50,7 +50,8 @@
 #include <linux/poll.h>
 #include <net/sock.h>
 
-#include "af_can.h"
+#include "can.h"
+#include "can_core.h"
 #include "can_error.h"
 #include "version.h"
 #include "raw.h"
index f30b98116482b4b8901ea6a2bc73002739efe509..ce0d47e4165d127c87637feaadd8ac722d4cf4e0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * raw.h
  *
- * Copyright (c) 2002-2005 Volkswagen Group Electronic Research
+ * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 69d7edbe3eb3ac23be45b66d3341eb0cc65135a7..795bcff6e002cc559adbf5fba9ec2c2b10988e1a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * version.h
  *
- * Copyright (c) 2002-2005 Volkswagen Group Electronic Research
+ * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without