Package: ifupdown
Version: 0.6.10
Severity: wishlist
Tags: patch
even though the Debian Kernel Packages support Controller Area Network
(CAN) devices via Socket-CAN there is no standard way to configure
the interface. The attached patch adds CAN support to ifupdown.
diff -rN -u old-0.7/ifupdown.nw new-0.7/ifupdown.nw
--- old-0.7/ifupdown.nw 2010-06-03 13:54:00.178080180 +0200
+++ new-0.7/ifupdown.nw 2010-06-03 13:54:00.758583137 +0200
@@ -110,7 +110,7 @@
CFILES := addrfam.c execute.c config.c main.c archlinux.c
HFILES := header.h archlinux.h
PERLFILES := defn2c.pl defn2man.pl
-DEFNFILES := inet.defn ipx.defn inet6.defn
+DEFNFILES := inet.defn ipx.defn inet6.defn can.defn
OBJ := main.o addrfam.o execute.o config.o \
$(patsubst %.defn,%.o,$(DEFNFILES)) archlinux.o
@@ -4113,6 +4113,47 @@
ipx_interface del %iface% %frame%
@
+\subsection{CAN Address Family}
+
+<<address family declarations>>=
+extern address_family addr_can;
+@
+
+<<address family references>>=
+&addr_can,
+@
+
+<<can.defn>>=
+address_family can
+architecture linux
+
+method static
+ description
+ This method may be used to setup an Controller Area Network (CAN)
+ interface. It requires the the *ip* command from the *iproute* package.
+
+ options
+ bitrate bitrate -- bitrate (1..1000000) *required*
+ samplepoint samplepoint -- sample point (0.000..0.999)
+ loopback loopback -- loop back CAN Messages (on|off)
+ listenonly listenonly -- listen only mode (on|off)
+ triple triple -- activate triple sampling (on|off)
+ oneshot oneshot -- one shot mode (on|off)
+ berr berr -- activate berr reporting (on|off)
+
+ up
+ ip link set %iface% type can bitrate %bitrate%
+ [[ ip link set %iface% type can loopback %loopback% ]]
+ [[ ip link set %iface% type can listen-only %listenonly% ]]
+ [[ ip link set %iface% type can triple-sampling %triple% ]]
+ [[ ip link set %iface% type can one-shot %oneshot% ]]
+ [[ ip link set %iface% type can berr-reporting %berr% ]]
+ ip link set %iface% up
+
+ down
+ ip link set %iface% down
+@
+
\begin{flushleft}
\bibliography{biblio}
\bibliographystyle{unsrt}
diff -rN -u old-0.7/Makefile new-0.7/Makefile
--- old-0.7/Makefile 2010-06-03 13:53:59.414067464 +0200
+++ new-0.7/Makefile 2010-06-03 13:54:00.186081998 +0200
@@ -4,7 +4,7 @@
CFILES := addrfam.c execute.c config.c main.c archlinux.c
HFILES := header.h archlinux.h
PERLFILES := defn2c.pl defn2man.pl
-DEFNFILES := inet.defn ipx.defn inet6.defn
+DEFNFILES := inet.defn ipx.defn inet6.defn can.defn
OBJ := main.o addrfam.o execute.o config.o \
$(patsubst %.defn,%.o,$(DEFNFILES)) archlinux.o
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]