Skip to content

Commit

Permalink
can: extend sockaddr_can to include j1939 members
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
kurt-vd authored and marckleinebudde committed Sep 4, 2019
1 parent 2a0c9aa commit f5223e9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions include/uapi/linux/can.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,23 @@ struct sockaddr_can {
/* transport protocol class address information (e.g. ISOTP) */
struct { canid_t rx_id, tx_id; } tp;

/* J1939 address information */
struct {
/* 8 byte name when using dynamic addressing */
__u64 name;

/* pgn:
* 8 bit: PS in PDU2 case, else 0
* 8 bit: PF
* 1 bit: DP
* 1 bit: reserved
*/
__u32 pgn;

/* 1 byte address */
__u8 addr;
} j1939;

/* reserved for future CAN protocols address information */
} can_addr;
};
Expand Down

0 comments on commit f5223e9

Please sign in to comment.