~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/can/netlink.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/uapi/linux/can/netlink.h (Version linux-6.11.5) and /include/uapi/linux/can/netlink.h (Version linux-4.18.20)


  1 /* SPDX-License-Identifier: GPL-2.0-only WITH  !!   1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 /*                                                  2 /*
  3  * linux/can/netlink.h                              3  * linux/can/netlink.h
  4  *                                                  4  *
  5  * Definitions for the CAN netlink interface        5  * Definitions for the CAN netlink interface
  6  *                                                  6  *
  7  * Copyright (c) 2009 Wolfgang Grandegger <wg@      7  * Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com>
  8  *                                                  8  *
  9  * This program is free software; you can redi      9  * This program is free software; you can redistribute it and/or modify
 10  * it under the terms of the version 2 of the      10  * it under the terms of the version 2 of the GNU General Public License
 11  * as published by the Free Software Foundatio     11  * as published by the Free Software Foundation
 12  *                                                 12  *
 13  * This program is distributed in the hope tha     13  * This program is distributed in the hope that it will be useful,
 14  * but WITHOUT ANY WARRANTY; without even the      14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR     15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 16  * GNU General Public License for more details     16  * GNU General Public License for more details.
 17  */                                                17  */
 18                                                    18 
 19 #ifndef _UAPI_CAN_NETLINK_H                        19 #ifndef _UAPI_CAN_NETLINK_H
 20 #define _UAPI_CAN_NETLINK_H                        20 #define _UAPI_CAN_NETLINK_H
 21                                                    21 
 22 #include <linux/types.h>                           22 #include <linux/types.h>
 23                                                    23 
 24 /*                                                 24 /*
 25  * CAN bit-timing parameters                       25  * CAN bit-timing parameters
 26  *                                                 26  *
 27  * For further information, please read chapte     27  * For further information, please read chapter "8 BIT TIMING
 28  * REQUIREMENTS" of the "Bosch CAN Specificati     28  * REQUIREMENTS" of the "Bosch CAN Specification version 2.0"
 29  * at http://www.semiconductors.bosch.de/pdf/c     29  * at http://www.semiconductors.bosch.de/pdf/can2spec.pdf.
 30  */                                                30  */
 31 struct can_bittiming {                             31 struct can_bittiming {
 32         __u32 bitrate;          /* Bit-rate in     32         __u32 bitrate;          /* Bit-rate in bits/second */
 33         __u32 sample_point;     /* Sample poin     33         __u32 sample_point;     /* Sample point in one-tenth of a percent */
 34         __u32 tq;               /* Time quanta     34         __u32 tq;               /* Time quanta (TQ) in nanoseconds */
 35         __u32 prop_seg;         /* Propagation     35         __u32 prop_seg;         /* Propagation segment in TQs */
 36         __u32 phase_seg1;       /* Phase buffe     36         __u32 phase_seg1;       /* Phase buffer segment 1 in TQs */
 37         __u32 phase_seg2;       /* Phase buffe     37         __u32 phase_seg2;       /* Phase buffer segment 2 in TQs */
 38         __u32 sjw;              /* Synchronisa     38         __u32 sjw;              /* Synchronisation jump width in TQs */
 39         __u32 brp;              /* Bit-rate pr     39         __u32 brp;              /* Bit-rate prescaler */
 40 };                                                 40 };
 41                                                    41 
 42 /*                                                 42 /*
 43  * CAN hardware-dependent bit-timing constant  !!  43  * CAN harware-dependent bit-timing constant
 44  *                                                 44  *
 45  * Used for calculating and checking bit-timin     45  * Used for calculating and checking bit-timing parameters
 46  */                                                46  */
 47 struct can_bittiming_const {                       47 struct can_bittiming_const {
 48         char name[16];          /* Name of the     48         char name[16];          /* Name of the CAN controller hardware */
 49         __u32 tseg1_min;        /* Time segmen !!  49         __u32 tseg1_min;        /* Time segement 1 = prop_seg + phase_seg1 */
 50         __u32 tseg1_max;                           50         __u32 tseg1_max;
 51         __u32 tseg2_min;        /* Time segmen !!  51         __u32 tseg2_min;        /* Time segement 2 = phase_seg2 */
 52         __u32 tseg2_max;                           52         __u32 tseg2_max;
 53         __u32 sjw_max;          /* Synchronisa     53         __u32 sjw_max;          /* Synchronisation jump width */
 54         __u32 brp_min;          /* Bit-rate pr     54         __u32 brp_min;          /* Bit-rate prescaler */
 55         __u32 brp_max;                             55         __u32 brp_max;
 56         __u32 brp_inc;                             56         __u32 brp_inc;
 57 };                                                 57 };
 58                                                    58 
 59 /*                                                 59 /*
 60  * CAN clock parameters                            60  * CAN clock parameters
 61  */                                                61  */
 62 struct can_clock {                                 62 struct can_clock {
 63         __u32 freq;             /* CAN system      63         __u32 freq;             /* CAN system clock frequency in Hz */
 64 };                                                 64 };
 65                                                    65 
 66 /*                                                 66 /*
 67  * CAN operational and error states                67  * CAN operational and error states
 68  */                                                68  */
 69 enum can_state {                                   69 enum can_state {
 70         CAN_STATE_ERROR_ACTIVE = 0,     /* RX/     70         CAN_STATE_ERROR_ACTIVE = 0,     /* RX/TX error count < 96 */
 71         CAN_STATE_ERROR_WARNING,        /* RX/     71         CAN_STATE_ERROR_WARNING,        /* RX/TX error count < 128 */
 72         CAN_STATE_ERROR_PASSIVE,        /* RX/     72         CAN_STATE_ERROR_PASSIVE,        /* RX/TX error count < 256 */
 73         CAN_STATE_BUS_OFF,              /* RX/     73         CAN_STATE_BUS_OFF,              /* RX/TX error count >= 256 */
 74         CAN_STATE_STOPPED,              /* Dev     74         CAN_STATE_STOPPED,              /* Device is stopped */
 75         CAN_STATE_SLEEPING,             /* Dev     75         CAN_STATE_SLEEPING,             /* Device is sleeping */
 76         CAN_STATE_MAX                              76         CAN_STATE_MAX
 77 };                                                 77 };
 78                                                    78 
 79 /*                                                 79 /*
 80  * CAN bus error counters                          80  * CAN bus error counters
 81  */                                                81  */
 82 struct can_berr_counter {                          82 struct can_berr_counter {
 83         __u16 txerr;                               83         __u16 txerr;
 84         __u16 rxerr;                               84         __u16 rxerr;
 85 };                                                 85 };
 86                                                    86 
 87 /*                                                 87 /*
 88  * CAN controller mode                             88  * CAN controller mode
 89  */                                                89  */
 90 struct can_ctrlmode {                              90 struct can_ctrlmode {
 91         __u32 mask;                                91         __u32 mask;
 92         __u32 flags;                               92         __u32 flags;
 93 };                                                 93 };
 94                                                    94 
 95 #define CAN_CTRLMODE_LOOPBACK           0x01       95 #define CAN_CTRLMODE_LOOPBACK           0x01    /* Loopback mode */
 96 #define CAN_CTRLMODE_LISTENONLY         0x02       96 #define CAN_CTRLMODE_LISTENONLY         0x02    /* Listen-only mode */
 97 #define CAN_CTRLMODE_3_SAMPLES          0x04       97 #define CAN_CTRLMODE_3_SAMPLES          0x04    /* Triple sampling mode */
 98 #define CAN_CTRLMODE_ONE_SHOT           0x08       98 #define CAN_CTRLMODE_ONE_SHOT           0x08    /* One-Shot mode */
 99 #define CAN_CTRLMODE_BERR_REPORTING     0x10       99 #define CAN_CTRLMODE_BERR_REPORTING     0x10    /* Bus-error reporting */
100 #define CAN_CTRLMODE_FD                 0x20      100 #define CAN_CTRLMODE_FD                 0x20    /* CAN FD mode */
101 #define CAN_CTRLMODE_PRESUME_ACK        0x40      101 #define CAN_CTRLMODE_PRESUME_ACK        0x40    /* Ignore missing CAN ACKs */
102 #define CAN_CTRLMODE_FD_NON_ISO         0x80      102 #define CAN_CTRLMODE_FD_NON_ISO         0x80    /* CAN FD in non-ISO mode */
103 #define CAN_CTRLMODE_CC_LEN8_DLC        0x100  << 
104 #define CAN_CTRLMODE_TDC_AUTO           0x200  << 
105 #define CAN_CTRLMODE_TDC_MANUAL         0x400  << 
106                                                   103 
107 /*                                                104 /*
108  * CAN device statistics                          105  * CAN device statistics
109  */                                               106  */
110 struct can_device_stats {                         107 struct can_device_stats {
111         __u32 bus_error;        /* Bus errors     108         __u32 bus_error;        /* Bus errors */
112         __u32 error_warning;    /* Changes to     109         __u32 error_warning;    /* Changes to error warning state */
113         __u32 error_passive;    /* Changes to     110         __u32 error_passive;    /* Changes to error passive state */
114         __u32 bus_off;          /* Changes to     111         __u32 bus_off;          /* Changes to bus off state */
115         __u32 arbitration_lost; /* Arbitration    112         __u32 arbitration_lost; /* Arbitration lost errors */
116         __u32 restarts;         /* CAN control    113         __u32 restarts;         /* CAN controller re-starts */
117 };                                                114 };
118                                                   115 
119 /*                                                116 /*
120  * CAN netlink interface                          117  * CAN netlink interface
121  */                                               118  */
122 enum {                                            119 enum {
123         IFLA_CAN_UNSPEC,                          120         IFLA_CAN_UNSPEC,
124         IFLA_CAN_BITTIMING,                       121         IFLA_CAN_BITTIMING,
125         IFLA_CAN_BITTIMING_CONST,                 122         IFLA_CAN_BITTIMING_CONST,
126         IFLA_CAN_CLOCK,                           123         IFLA_CAN_CLOCK,
127         IFLA_CAN_STATE,                           124         IFLA_CAN_STATE,
128         IFLA_CAN_CTRLMODE,                        125         IFLA_CAN_CTRLMODE,
129         IFLA_CAN_RESTART_MS,                      126         IFLA_CAN_RESTART_MS,
130         IFLA_CAN_RESTART,                         127         IFLA_CAN_RESTART,
131         IFLA_CAN_BERR_COUNTER,                    128         IFLA_CAN_BERR_COUNTER,
132         IFLA_CAN_DATA_BITTIMING,                  129         IFLA_CAN_DATA_BITTIMING,
133         IFLA_CAN_DATA_BITTIMING_CONST,            130         IFLA_CAN_DATA_BITTIMING_CONST,
134         IFLA_CAN_TERMINATION,                     131         IFLA_CAN_TERMINATION,
135         IFLA_CAN_TERMINATION_CONST,               132         IFLA_CAN_TERMINATION_CONST,
136         IFLA_CAN_BITRATE_CONST,                   133         IFLA_CAN_BITRATE_CONST,
137         IFLA_CAN_DATA_BITRATE_CONST,              134         IFLA_CAN_DATA_BITRATE_CONST,
138         IFLA_CAN_BITRATE_MAX,                     135         IFLA_CAN_BITRATE_MAX,
139         IFLA_CAN_TDC,                          !! 136         __IFLA_CAN_MAX
140         IFLA_CAN_CTRLMODE_EXT,                 << 
141                                                << 
142         /* add new constants above here */     << 
143         __IFLA_CAN_MAX,                        << 
144         IFLA_CAN_MAX = __IFLA_CAN_MAX - 1      << 
145 };                                             << 
146                                                << 
147 /*                                             << 
148  * CAN FD Transmitter Delay Compensation (TDC) << 
149  *                                             << 
150  * Please refer to struct can_tdc_const and ca << 
151  * include/linux/can/bittiming.h for further d << 
152  */                                            << 
153 enum {                                         << 
154         IFLA_CAN_TDC_UNSPEC,                   << 
155         IFLA_CAN_TDC_TDCV_MIN,  /* u32 */      << 
156         IFLA_CAN_TDC_TDCV_MAX,  /* u32 */      << 
157         IFLA_CAN_TDC_TDCO_MIN,  /* u32 */      << 
158         IFLA_CAN_TDC_TDCO_MAX,  /* u32 */      << 
159         IFLA_CAN_TDC_TDCF_MIN,  /* u32 */      << 
160         IFLA_CAN_TDC_TDCF_MAX,  /* u32 */      << 
161         IFLA_CAN_TDC_TDCV,      /* u32 */      << 
162         IFLA_CAN_TDC_TDCO,      /* u32 */      << 
163         IFLA_CAN_TDC_TDCF,      /* u32 */      << 
164                                                << 
165         /* add new constants above here */     << 
166         __IFLA_CAN_TDC,                        << 
167         IFLA_CAN_TDC_MAX = __IFLA_CAN_TDC - 1  << 
168 };                                                137 };
169                                                   138 
170 /*                                             !! 139 #define IFLA_CAN_MAX    (__IFLA_CAN_MAX - 1)
171  * IFLA_CAN_CTRLMODE_EXT nest: controller mode << 
172  */                                            << 
173 enum {                                         << 
174         IFLA_CAN_CTRLMODE_UNSPEC,              << 
175         IFLA_CAN_CTRLMODE_SUPPORTED,    /* u32 << 
176                                                << 
177         /* add new constants above here */     << 
178         __IFLA_CAN_CTRLMODE,                   << 
179         IFLA_CAN_CTRLMODE_MAX = __IFLA_CAN_CTR << 
180 };                                             << 
181                                                   140 
182 /* u16 termination range: 1..65535 Ohms */        141 /* u16 termination range: 1..65535 Ohms */
183 #define CAN_TERMINATION_DISABLED 0                142 #define CAN_TERMINATION_DISABLED 0
184                                                   143 
185 #endif /* !_UAPI_CAN_NETLINK_H */                 144 #endif /* !_UAPI_CAN_NETLINK_H */
186                                                   145 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php