Skip to content

Commit f5223e9

Browse files
kurt-vdmarckleinebudde
authored andcommitted
can: extend sockaddr_can to include j1939 members
This patch prepares struct sockaddr_can for SAE J1939. Signed-off-by: Kurt Van Dijck <[email protected]> Signed-off-by: Oleksij Rempel <[email protected]> Acked-by: Oliver Hartkopp <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent 2a0c9aa commit f5223e9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

include/uapi/linux/can.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,23 @@ struct sockaddr_can {
175175
/* transport protocol class address information (e.g. ISOTP) */
176176
struct { canid_t rx_id, tx_id; } tp;
177177

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+
178195
/* reserved for future CAN protocols address information */
179196
} can_addr;
180197
};

0 commit comments

Comments
 (0)