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 <dev.kurt@vandijck-laurijssen.be>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • 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.