diff options
author | Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be> | 2018-10-08 12:48:35 +0300 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2019-09-04 14:29:15 +0300 |
commit | f5223e9eee651e005c0f6d6d078909087601b7e9 (patch) | |
tree | 8c840907459bfa34956a9473170b062ffbf83e9b | |
parent | 2a0c9aaa6247c817e45bfc1aaa5eaeafe7a331d6 (diff) | |
download | linux-f5223e9eee651e005c0f6d6d078909087601b7e9.tar.xz |
can: extend sockaddr_can to include j1939 members
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>
-rw-r--r-- | include/uapi/linux/can.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/uapi/linux/can.h b/include/uapi/linux/can.h index 06d92d6be6e6..1e988fdeba34 100644 --- a/include/uapi/linux/can.h +++ b/include/uapi/linux/can.h @@ -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; }; |