summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBenedikt Spranger <b.spranger@linutronix.de>2012-11-29 18:48:45 (GMT)
committerThomas Graf <tgraf@suug.ch>2012-11-29 21:17:58 (GMT)
commit5251188673e425bfddcbbe7fad19f7e0e945bf62 (patch)
tree3ab3cf867d836ee89a2d813b9fa690400319456c /include
parentab7f42e0bc97f4e04bcbc9f09b0ac41a06f90cf3 (diff)
downloadlibnl-5251188673e425bfddcbbe7fad19f7e0e945bf62.zip
libnl-5251188673e425bfddcbbe7fad19f7e0e945bf62.tar.gz
libnl-5251188673e425bfddcbbe7fad19f7e0e945bf62.tar.bz2
link: basic socket-CAN support
Controller Area Network (CAN) is a networking technology which has widespread use in automation, embedded devices and automotive fields. The socket-CAN package is an implementation of CAN protocols for Linux. All socket-CAN related configurations are carried out through Netlink. Add basic socket-CAN support to libnl to be able to configure CAN devices with libnl. Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Diffstat (limited to 'include')
-rw-r--r--include/netlink/route/link/can.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/netlink/route/link/can.h b/include/netlink/route/link/can.h
new file mode 100644
index 0000000..0a99dfd
--- /dev/null
+++ b/include/netlink/route/link/can.h
@@ -0,0 +1,32 @@
+/*
+ * netlink/route/link/can.h CAN interface
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2012 Benedikt Spranger <b.spranger@linutronix.de>
+ */
+
+#ifndef NETLINK_LINK_CAN_H_
+#define NETLINK_LINK_CAN_H_
+
+#include <netlink/netlink.h>
+#include <netlink/route/link.h>
+#include <linux/can/netlink.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int rtnl_link_is_can(struct rtnl_link *link);
+
+extern char *rtnl_link_can_ctrlmode2str(int, char *, size_t);
+extern int rtnl_link_can_str2ctrlmode(const char *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif