| .. | .. |
|---|
| 1 | | -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ |
|---|
| 1 | +/* SPDX-License-Identifier: ((GPL-2.0-only WITH Linux-syscall-note) OR BSD-3-Clause) */ |
|---|
| 2 | 2 | /* |
|---|
| 3 | 3 | * linux/can.h |
|---|
| 4 | 4 | * |
|---|
| .. | .. |
|---|
| 157 | 157 | #define CAN_TP20 4 /* VAG Transport Protocol v2.0 */ |
|---|
| 158 | 158 | #define CAN_MCNET 5 /* Bosch MCNet */ |
|---|
| 159 | 159 | #define CAN_ISOTP 6 /* ISO 15765-2 Transport Protocol */ |
|---|
| 160 | | -#define CAN_NPROTO 7 |
|---|
| 160 | +#define CAN_J1939 7 /* SAE J1939 */ |
|---|
| 161 | +#define CAN_NPROTO 8 |
|---|
| 161 | 162 | |
|---|
| 162 | 163 | #define SOL_CAN_BASE 100 |
|---|
| 163 | 164 | |
|---|
| .. | .. |
|---|
| 174 | 175 | /* transport protocol class address information (e.g. ISOTP) */ |
|---|
| 175 | 176 | struct { canid_t rx_id, tx_id; } tp; |
|---|
| 176 | 177 | |
|---|
| 178 | + /* J1939 address information */ |
|---|
| 179 | + struct { |
|---|
| 180 | + /* 8 byte name when using dynamic addressing */ |
|---|
| 181 | + __u64 name; |
|---|
| 182 | + |
|---|
| 183 | + /* pgn: |
|---|
| 184 | + * 8 bit: PS in PDU2 case, else 0 |
|---|
| 185 | + * 8 bit: PF |
|---|
| 186 | + * 1 bit: DP |
|---|
| 187 | + * 1 bit: reserved |
|---|
| 188 | + */ |
|---|
| 189 | + __u32 pgn; |
|---|
| 190 | + |
|---|
| 191 | + /* 1 byte address */ |
|---|
| 192 | + __u8 addr; |
|---|
| 193 | + } j1939; |
|---|
| 194 | + |
|---|
| 177 | 195 | /* reserved for future CAN protocols address information */ |
|---|
| 178 | 196 | } can_addr; |
|---|
| 179 | 197 | }; |
|---|