This patch prepares struct sockaddr_can for SAE J1939.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -175,6 +175,23 @@ struct sockaddr_can { · 174 unmodified lines | ||
| 175 | 175 | /* transport protocol class address information (e.g. ISOTP) */ |
| 176 | 176 | struct { canid_t rx_id, tx_id; } tp; |
| 177 | 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 | + | |
| 178 | 195 | /* reserved for future CAN protocols address information */ |
| 179 | 196 | } can_addr; |
| 180 | 197 | }; |