File: can.defn

package info (click to toggle)
ifupdown 0.8.19
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 896 kB
  • ctags: 250
  • sloc: ansic: 2,432; sh: 715; perl: 508; makefile: 89
file content (28 lines) | stat: -rw-r--r-- 1,035 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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