can-eth-gw-utils Utilities
0.1
A bidirectional CAN to Ethernet Gateway (Utilities)
|
cegwctl - CAN - Ethernet Gateway Control Utility
cegwctl [ __-f__ | __--can-fd__ ] [ __-t__ TYPE | __--type__=_TYPE_ ] [ __-b__ | __--bidirectional__ ] add route SRC DST
cegwctl [ __-f__ | __--can-fd__ ] [ __-t__ TYPE | __--type__=_TYPE_ ] add dev [NAME]
TYPE := { none | eth | net | udp | tcp }
cegwctl del route ID
cegwctl del dev NAME
cegwctl route
Control Utility for the ce_gw Kernel Programm.
__-b__, __--bidirectional__
If you add a route from SRC to DST, there will be also add the same route back from DST to SRC.
__-f__, __--can-fd__
A Flag for the larger CAN-FD Frames.
__-t__ TYPE, __--type__=_TYPE_
Set The Type of the Gateway. 'net' is the Default. udp, tcp are not supported yet.
add route SRC DST
Add a Gateway from SRC to DST, where SRC and DST are the String names of the Interfaces.
add dev [NAME]
Add a virtual ethernet device. You need this device for adding a route. NAME will be the name of the new device. If you don't set NAME, it will be called `cegwd`, where d is a consecutive number. With the options [ __-f__ | __--can-fd__ ] [ __-t__ TYPE | __--type__=_TYPE_ ] you can set a meaningfull MTU.
+------+-----+------+--------------------------+ | TYPE | FD? | BYTE | MTU Size Description | +------+-----+------+--------------------------+ | NONE | --- | 1500 | Standart Ethernet MTU | | ETH | NO | 8 | Max CAN Payload | | ETH | YES | 64 | Max CAN-FD Payload | | NET | NO | 16 | Max CAN Frame | | NET | YES | 72 | Max CAN-FD Frame | | UDP | --- | 1500 | Standart Ethernet MTU | | TCP | --- | 1500 | Standart Ethernet MTU | +------+-----+------+--------------------------+
del route ID
Deletes the Gateway with ID.
del dev NAME
Deletes a previously with add dev added device with NAME as name.
route [ID]
List active Gateways and Informations or if ID is specified, Information of the Gateway with ID will printed
Add a Gateway:
cegwctl -f -t net add route "eth0" "can0"
cegwctl returns a zero exit status if the command succeeds. Non Zero if an error has occured.
(C) Copyright 2013 Fabian Raab, Stefan Smarzly
This file is part of CAN-Eth-GW.
CAN-Eth-GW is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
CAN-Eth-GW is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with CAN-Eth-GW. If not, see http://www.gnu.org/licenses/.
Fabian Raab fabia n.ra ab@tu m.de
ip(8)