can-eth-gw-utils Utilities  0.1
A bidirectional CAN to Ethernet Gateway (Utilities)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
man cegwctl

NAME

cegwctl - CAN - Ethernet Gateway Control Utility

SYNOPSIS

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

DESCRIPTION

Control Utility for the ce_gw Kernel Programm.

OPTIONS

  • __-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.

  • TYPE := { none | eth | net | udp | tcp } Types

COMMANDS

  • 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

EXAMPLES

Add a Gateway:

      cegwctl -f -t net add route "eth0" "can0"

EXIT-STATUS

cegwctl returns a zero exit status if the command succeeds. Non Zero if an error has occured.

COPYRIGHT

(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/.

AUTHOR

Fabian Raab fabia.nosp@m.n.ra.nosp@m.ab@tu.nosp@m.m.de

SEE ALSO

http://can-eth-gw.github.io/

ip(8)