€•yÿŒsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ)/translations/zh_CN/networking/iso15765-2”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/zh_TW/networking/iso15765-2”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/it_IT/networking/iso15765-2”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ja_JP/networking/iso15765-2”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ko_KR/networking/iso15765-2”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/pt_BR/networking/iso15765-2”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/sp_SP/networking/iso15765-2”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)�”}”(hŒ2SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)”h]”hŒ2SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)”…”�”}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒC/var/lib/git/docbuild/linux/Documentation/networking/iso15765-2.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒISO 15765-2 (ISO-TP)”h]”hŒISO 15765-2 (ISO-TP)”…”�”}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒOverview”h]”hŒOverview”…”�”}”(hhàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÝh²hh³hÇh´KubhŒ paragraph”“”)�”}”(hXISO 15765-2, also known as ISO-TP, is a transport protocol specifically defined for diagnostic communication on CAN. It is widely used in the automotive industry, for example as the transport protocol for UDSonCAN (ISO 14229-3) or emission-related diagnostic services (ISO 15031-5).”h]”hXISO 15765-2, also known as ISO-TP, is a transport protocol specifically defined for diagnostic communication on CAN. It is widely used in the automotive industry, for example as the transport protocol for UDSonCAN (ISO 14229-3) or emission-related diagnostic services (ISO 15031-5).”…”�”}”(hhðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K hhÝh²hubhï)�”}”(hŒîISO-TP can be used both on CAN CC (aka Classical CAN) and CAN FD (CAN with Flexible Datarate) based networks. It is also designed to be compatible with a CAN network using SAE J1939 as data link layer (however, this is not a requirement).”h]”hŒîISO-TP can be used both on CAN CC (aka Classical CAN) and CAN FD (CAN with Flexible Datarate) based networks. It is also designed to be compatible with a CAN network using SAE J1939 as data link layer (however, this is not a requirement).”…”�”}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒSpecifications used”h]”hŒSpecifications used”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj h²hh³hÇh´KubhŒ bullet_list”“”)�”}”(hhh]”hŒ list_item”“”)�”}”(hŒ™ISO 15765-2:2024 : Road vehicles - Diagnostic communication over Controller Area Network (DoCAN). Part 2: Transport protocol and network layer services. ”h]”hï)�”}”(hŒ˜ISO 15765-2:2024 : Road vehicles - Diagnostic communication over Controller Area Network (DoCAN). Part 2: Transport protocol and network layer services.”h]”hŒ˜ISO 15765-2:2024 : Road vehicles - Diagnostic communication over Controller Area Network (DoCAN). Part 2: Transport protocol and network layer services.”…”�”}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khj$ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjh²hh³hÇh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1jh³hÇh´Khj h²hubeh}”(h]”Œspecifications-used”ah ]”h"]”Œspecifications used”ah$]”h&]”uh1hÈhhÝh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Addressing”h]”hŒ Addressing”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjLh²hh³hÇh´Kubhï)�”}”(hŒsIn its simplest form, ISO-TP is based on two kinds of addressing modes for the nodes connected to the same network:”h]”hŒsIn its simplest form, ISO-TP is based on two kinds of addressing modes for the nodes connected to the same network:”…”�”}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhjLh²hubj)�”}”(hhh]”(j#)�”}”(hŒgphysical addressing is implemented by two node-specific addresses and is used in 1-to-1 communication. ”h]”hï)�”}”(hŒfphysical addressing is implemented by two node-specific addresses and is used in 1-to-1 communication.”h]”hŒfphysical addressing is implemented by two node-specific addresses and is used in 1-to-1 communication.”…”�”}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K hjnubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjkh²hh³hÇh´Nubj#)�”}”(hŒgfunctional addressing is implemented by one node-specific address and is used in 1-to-N communication. ”h]”hï)�”}”(hŒffunctional addressing is implemented by one node-specific address and is used in 1-to-N communication.”h]”hŒffunctional addressing is implemented by one node-specific address and is used in 1-to-N communication.”…”�”}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K#hj†ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjkh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jBjCuh1jh³hÇh´K hjLh²hubhï)�”}”(hŒ3Three different addressing formats can be employed:”h]”hŒ3Three different addressing formats can be employed:”…”�”}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K&hjLh²hubj)�”}”(hhh]”(j#)�”}”(hŒ;"normal" : each address is represented simply by a CAN ID. ”h]”hï)�”}”(hŒ:"normal" : each address is represented simply by a CAN ID.”h]”hŒ>“normalâ€� : each address is represented simply by a CAN ID.”…”�”}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K(hjµubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hj²h²hh³hÇh´Nubj#)�”}”(hŒ¶"extended": each address is represented by a CAN ID plus the first byte of the CAN payload; both the CAN ID and the byte inside the payload shall be different between two addresses. ”h]”hï)�”}”(hŒµ"extended": each address is represented by a CAN ID plus the first byte of the CAN payload; both the CAN ID and the byte inside the payload shall be different between two addresses.”h]”hŒ¹â€œextendedâ€�: each address is represented by a CAN ID plus the first byte of the CAN payload; both the CAN ID and the byte inside the payload shall be different between two addresses.”…”�”}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K*hjÍubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hj²h²hh³hÇh´Nubj#)�”}”(hŒ­"mixed": each address is represented by a CAN ID plus the first byte of the CAN payload; the CAN ID is different between two addresses, but the additional byte is the same. ”h]”hï)�”}”(hŒ¬"mixed": each address is represented by a CAN ID plus the first byte of the CAN payload; the CAN ID is different between two addresses, but the additional byte is the same.”h]”hŒ°â€œmixedâ€�: each address is represented by a CAN ID plus the first byte of the CAN payload; the CAN ID is different between two addresses, but the additional byte is the same.”…”�”}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K.hjåubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hj²h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jBjCuh1jh³hÇh´K(hjLh²hubeh}”(h]”Œ addressing”ah ]”h"]”Œ addressing”ah$]”h&]”uh1hÈhhÝh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ-Transport protocol and associated frame types”h]”hŒ-Transport protocol and associated frame types”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj h²hh³hÇh´K3ubhï)�”}”(hXûWhen transmitting data using the ISO-TP protocol, the payload can either fit inside one single CAN message or not, also considering the overhead the protocol is generating and the optional extended addressing. In the first case, the data is transmitted at once using a so-called Single Frame (SF). In the second case, ISO-TP defines a multi-frame protocol, in which the sender provides (through a First Frame - FF) the PDU length which is to be transmitted and also asks for a Flow Control (FC) frame, which provides the maximum supported size of a macro data block (``blocksize``) and the minimum time between the single CAN messages composing such block (``stmin``). Once this information has been received, the sender starts to send frames containing fragments of the data payload (called Consecutive Frames - CF), stopping after every ``blocksize``-sized block to wait confirmation from the receiver which should then send another Flow Control frame to inform the sender about its availability to receive more data.”h]”(hX7When transmitting data using the ISO-TP protocol, the payload can either fit inside one single CAN message or not, also considering the overhead the protocol is generating and the optional extended addressing. In the first case, the data is transmitted at once using a so-called Single Frame (SF). In the second case, ISO-TP defines a multi-frame protocol, in which the sender provides (through a First Frame - FF) the PDU length which is to be transmitted and also asks for a Flow Control (FC) frame, which provides the maximum supported size of a macro data block (”…”�”}”(hjh²hh³Nh´NubhŒliteral”“”)�”}”(hŒ ``blocksize``”h]”hŒ blocksize”…”�”}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjubhŒM) and the minimum time between the single CAN messages composing such block (”…”�”}”(hjh²hh³Nh´Nubj%)�”}”(hŒ ``stmin``”h]”hŒstmin”…”�”}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjubhŒ­). Once this information has been received, the sender starts to send frames containing fragments of the data payload (called Consecutive Frames - CF), stopping after every ”…”�”}”(hjh²hh³Nh´Nubj%)�”}”(hŒ ``blocksize``”h]”hŒ blocksize”…”�”}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjubhŒ§-sized block to wait confirmation from the receiver which should then send another Flow Control frame to inform the sender about its availability to receive more data.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K5hj h²hubeh}”(h]”Œ-transport-protocol-and-associated-frame-types”ah ]”h"]”Œ-transport protocol and associated frame types”ah$]”h&]”uh1hÈhhÝh²hh³hÇh´K3ubeh}”(h]”Œoverview”ah ]”h"]”Œoverview”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒHow to Use ISO-TP”h]”hŒHow to Use ISO-TP”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjrh²hh³hÇh´KDubhï)�”}”(hŒ´As with others CAN protocols, the ISO-TP stack support is built into the Linux network subsystem for the CAN bus, aka. Linux-CAN or SocketCAN, and thus follows the same socket API.”h]”hŒ´As with others CAN protocols, the ISO-TP stack support is built into the Linux network subsystem for the CAN bus, aka. Linux-CAN or SocketCAN, and thus follows the same socket API.”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KFhjrh²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ,Creation and basic usage of an ISO-TP socket”h]”hŒ,Creation and basic usage of an ISO-TP socket”…”�”}”(hj”h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj‘h²hh³hÇh´KKubhï)�”}”(hŒüTo use the ISO-TP stack, ``#include `` shall be used. A socket can then be created using the ``PF_CAN`` protocol family, the ``SOCK_DGRAM`` type (as the underlying protocol is datagram-based by design) and the ``CAN_ISOTP`` protocol:”h]”(hŒTo use the ISO-TP stack, ”…”�”}”(hj¢h²hh³Nh´Nubj%)�”}”(hŒ ``#include ``”h]”hŒ#include ”…”�”}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj¢ubhŒ7 shall be used. A socket can then be created using the ”…”�”}”(hj¢h²hh³Nh´Nubj%)�”}”(hŒ ``PF_CAN``”h]”hŒPF_CAN”…”�”}”(hj¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj¢ubhŒ protocol family, the ”…”�”}”(hj¢h²hh³Nh´Nubj%)�”}”(hŒ``SOCK_DGRAM``”h]”hŒ SOCK_DGRAM”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj¢ubhŒG type (as the underlying protocol is datagram-based by design) and the ”…”�”}”(hj¢h²hh³Nh´Nubj%)�”}”(hŒ ``CAN_ISOTP``”h]”hŒ CAN_ISOTP”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj¢ubhŒ protocol:”…”�”}”(hj¢h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KMhj‘h²hubhŒ literal_block”“”)�”}”(hŒ*s = socket(PF_CAN, SOCK_DGRAM, CAN_ISOTP);”h]”hŒ*s = socket(PF_CAN, SOCK_DGRAM, CAN_ISOTP);”…”�”}”hjúsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆŒforce”‰Œlanguage”ŒC”Œhighlight_args”}”uh1jøh³hÇh´KRhj‘h²hubhï)�”}”(hŒ†After the socket has been successfully created, ``bind(2)`` shall be called to bind the socket to the desired CAN interface; to do so:”h]”(hŒ0After the socket has been successfully created, ”…”�”}”(hj h²hh³Nh´Nubj%)�”}”(hŒ ``bind(2)``”h]”hŒbind(2)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj ubhŒK shall be called to bind the socket to the desired CAN interface; to do so:”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KVhj‘h²hubj)�”}”(hhh]”(j#)�”}”(hŒTa TX CAN ID shall be specified as part of the sockaddr supplied to the call itself. ”h]”hï)�”}”(hŒSa TX CAN ID shall be specified as part of the sockaddr supplied to the call itself.”h]”hŒSa TX CAN ID shall be specified as part of the sockaddr supplied to the call itself.”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KYhj0ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hj-h²hh³hÇh´Nubj#)�”}”(hŒsa RX CAN ID shall also be specified, unless broadcast flags have been set through socket option (explained below). ”h]”hï)�”}”(hŒra RX CAN ID shall also be specified, unless broadcast flags have been set through socket option (explained below).”h]”hŒra RX CAN ID shall also be specified, unless broadcast flags have been set through socket option (explained below).”…”�”}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K\hjHubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hj-h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jBjCuh1jh³hÇh´KYhj‘h²hubhï)�”}”(hX—Once bound to an interface, the socket can be read from and written to using the usual ``read(2)`` and ``write(2)`` system calls, as well as ``send(2)``, ``sendmsg(2)``, ``recv(2)`` and ``recvmsg(2)``. Unlike the CAN_RAW socket API, only the ISO-TP data field (the actual payload) is sent and received by the userspace application using these calls. The address information and the protocol information are automatically filled by the ISO-TP stack using the configuration supplied during socket creation. In the same way, the stack will use the transport mechanism when required (i.e., when the size of the data payload exceeds the MTU of the underlying CAN bus).”h]”(hŒWOnce bound to an interface, the socket can be read from and written to using the usual ”…”�”}”(hjfh²hh³Nh´Nubj%)�”}”(hŒ ``read(2)``”h]”hŒread(2)”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjfubhŒ and ”…”�”}”(hjfh²hh³Nh´Nubj%)�”}”(hŒ ``write(2)``”h]”hŒwrite(2)”…”�”}”(hj€h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjfubhŒ system calls, as well as ”…”�”}”(hjfh²hh³Nh´Nubj%)�”}”(hŒ ``send(2)``”h]”hŒsend(2)”…”�”}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjfubhŒ, ”…”�”}”(hjfh²hh³Nh´Nubj%)�”}”(hŒ``sendmsg(2)``”h]”hŒ sendmsg(2)”…”�”}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjfubhŒ, ”…”�”}”(hjfh²hh³Nh´Nubj%)�”}”(hŒ ``recv(2)``”h]”hŒrecv(2)”…”�”}”(hj¶h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjfubhŒ and ”…”�”}”hjfsbj%)�”}”(hŒ``recvmsg(2)``”h]”hŒ recvmsg(2)”…”�”}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjfubhXÏ. Unlike the CAN_RAW socket API, only the ISO-TP data field (the actual payload) is sent and received by the userspace application using these calls. The address information and the protocol information are automatically filled by the ISO-TP stack using the configuration supplied during socket creation. In the same way, the stack will use the transport mechanism when required (i.e., when the size of the data payload exceeds the MTU of the underlying CAN bus).”…”�”}”(hjfh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K_hj‘h²hubhï)�”}”(hŒaThe sockaddr structure used for SocketCAN has extensions for use with ISO-TP, as specified below:”h]”hŒaThe sockaddr structure used for SocketCAN has extensions for use with ISO-TP, as specified below:”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kihj‘h²hubjù)�”}”(hŒ¡struct sockaddr_can { sa_family_t can_family; int can_ifindex; union { struct { canid_t rx_id, tx_id; } tp; ... } can_addr; }”h]”hŒ¡struct sockaddr_can { sa_family_t can_family; int can_ifindex; union { struct { canid_t rx_id, tx_id; } tp; ... } can_addr; }”…”�”}”hjîsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰j j j }”uh1jøh³hÇh´Klhj‘h²hubj)�”}”(hhh]”(j#)�”}”(hŒZ``can_family`` and ``can_ifindex`` serve the same purpose as for other SocketCAN sockets. ”h]”hï)�”}”(hŒY``can_family`` and ``can_ifindex`` serve the same purpose as for other SocketCAN sockets.”h]”(j%)�”}”(hŒ``can_family``”h]”hŒ can_family”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjubhŒ and ”…”�”}”(hjh²hh³Nh´Nubj%)�”}”(hŒ``can_ifindex``”h]”hŒ can_ifindex”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjubhŒ7 serve the same purpose as for other SocketCAN sockets.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kwhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjýh²hh³hÇh´Nubj#)�”}”(hŒY``can_addr.tp.rx_id`` specifies the receive (RX) CAN ID and will be used as a RX filter. ”h]”hï)�”}”(hŒX``can_addr.tp.rx_id`` specifies the receive (RX) CAN ID and will be used as a RX filter.”h]”(j%)�”}”(hŒ``can_addr.tp.rx_id``”h]”hŒcan_addr.tp.rx_id”…”�”}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj<ubhŒC specifies the receive (RX) CAN ID and will be used as a RX filter.”…”�”}”(hj<h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kzhj8ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjýh²hh³hÇh´Nubj#)�”}”(hŒ9``can_addr.tp.tx_id`` specifies the transmit (TX) CAN ID ”h]”hï)�”}”(hŒ8``can_addr.tp.tx_id`` specifies the transmit (TX) CAN ID”h]”(j%)�”}”(hŒ``can_addr.tp.tx_id``”h]”hŒcan_addr.tp.tx_id”…”�”}”(hjfh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjbubhŒ# specifies the transmit (TX) CAN ID”…”�”}”(hjbh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K}hj^ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjýh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jBjCuh1jh³hÇh´Kwhj‘h²hubeh}”(h]”Œ,creation-and-basic-usage-of-an-iso-tp-socket”ah ]”h"]”Œ,creation and basic usage of an iso-tp socket”ah$]”h&]”uh1hÈhjrh²hh³hÇh´KKubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒISO-TP socket options”h]”hŒISO-TP socket options”…”�”}”(hj•h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj’h²hh³hÇh´K€ubhï)�”}”(hŒ™When creating an ISO-TP socket, reasonable defaults are set. Some options can be modified with ``setsockopt(2)`` and/or read back with ``getsockopt(2)``.”h]”(hŒ_When creating an ISO-TP socket, reasonable defaults are set. Some options can be modified with ”…”�”}”(hj£h²hh³Nh´Nubj%)�”}”(hŒ``setsockopt(2)``”h]”hŒ setsockopt(2)”…”�”}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj£ubhŒ and/or read back with ”…”�”}”(hj£h²hh³Nh´Nubj%)�”}”(hŒ``getsockopt(2)``”h]”hŒ getsockopt(2)”…”�”}”(hj½h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj£ubhŒ.”…”�”}”(hj£h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K‚hj’h²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒGeneral options”h]”hŒGeneral options”…”�”}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÕh²hh³hÇh´K†ubhï)�”}”(hŒJGeneral socket options can be passed using the ``CAN_ISOTP_OPTS`` optname:”h]”(hŒ/General socket options can be passed using the ”…”�”}”(hjæh²hh³Nh´Nubj%)�”}”(hŒ``CAN_ISOTP_OPTS``”h]”hŒCAN_ISOTP_OPTS”…”�”}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjæubhŒ optname:”…”�”}”(hjæh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KˆhjÕh²hubjù)�”}”(hŒfstruct can_isotp_options opts; ret = setsockopt(s, SOL_CAN_ISOTP, CAN_ISOTP_OPTS, &opts, sizeof(opts))”h]”hŒfstruct can_isotp_options opts; ret = setsockopt(s, SOL_CAN_ISOTP, CAN_ISOTP_OPTS, &opts, sizeof(opts))”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰j j j }”uh1jøh³hÇh´KŠhjÕh²hubhï)�”}”(hŒEwhere the ``can_isotp_options`` structure has the following contents:”h]”(hŒ where the ”…”�”}”(hjh²hh³Nh´Nubj%)�”}”(hŒ``can_isotp_options``”h]”hŒcan_isotp_options”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjubhŒ& structure has the following contents:”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K�hjÕh²hubjù)�”}”(hŒ�struct can_isotp_options { u32 flags; u32 frame_txtime; u8 ext_address; u8 txpad_content; u8 rxpad_content; u8 rx_ext_address; };”h]”hŒ�struct can_isotp_options { u32 flags; u32 frame_txtime; u8 ext_address; u8 txpad_content; u8 rxpad_content; u8 rx_ext_address; };”…”�”}”hj5sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰j j j }”uh1jøh³hÇh´K‘hjÕh²hubj)�”}”(hhh]”(j#)�”}”(hX„``flags``: modifiers to be applied to the default behaviour of the ISO-TP stack. Following flags are available: * ``CAN_ISOTP_LISTEN_MODE``: listen only (do not send FC frames); normally used as a testing feature. * ``CAN_ISOTP_EXTEND_ADDR``: use the byte specified in ``ext_address`` as an additional address component. This enables the "mixed" addressing format if used alone, or the "extended" addressing format if used in conjunction with ``CAN_ISOTP_RX_EXT_ADDR``. * ``CAN_ISOTP_TX_PADDING``: enable padding for transmitted frames, using ``txpad_content`` as value for the padding bytes. * ``CAN_ISOTP_RX_PADDING``: enable padding for the received frames, using ``rxpad_content`` as value for the padding bytes. * ``CAN_ISOTP_CHK_PAD_LEN``: check for correct padding length on the received frames. * ``CAN_ISOTP_CHK_PAD_DATA``: check padding bytes on the received frames against ``rxpad_content``; if ``CAN_ISOTP_RX_PADDING`` is not specified, this flag is ignored. * ``CAN_ISOTP_HALF_DUPLEX``: force ISO-TP socket in half duplex mode (that is, transport mechanism can only be incoming or outgoing at the same time, not both). * ``CAN_ISOTP_FORCE_TXSTMIN``: ignore stmin from received FC; normally used as a testing feature. * ``CAN_ISOTP_FORCE_RXSTMIN``: ignore CFs depending on rx stmin; normally used as a testing feature. * ``CAN_ISOTP_RX_EXT_ADDR``: use ``rx_ext_address`` instead of ``ext_address`` as extended addressing byte on the reception path. If used in conjunction with ``CAN_ISOTP_EXTEND_ADDR``, this flag effectively enables the "extended" addressing format. * ``CAN_ISOTP_WAIT_TX_DONE``: wait until the frame is sent before returning from ``write(2)`` and ``send(2)`` calls (i.e., blocking write operations). * ``CAN_ISOTP_SF_BROADCAST``: use 1-to-N functional addressing (cannot be specified alongside ``CAN_ISOTP_CF_BROADCAST``). * ``CAN_ISOTP_CF_BROADCAST``: use 1-to-N transmission without flow control (cannot be specified alongside ``CAN_ISOTP_SF_BROADCAST``). NOTE: this is not covered by the ISO 15765-2 standard. * ``CAN_ISOTP_DYN_FC_PARMS``: enable dynamic update of flow control parameters. ”h]”(hï)�”}”(hŒo``flags``: modifiers to be applied to the default behaviour of the ISO-TP stack. Following flags are available:”h]”(j%)�”}”(hŒ ``flags``”h]”hŒflags”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjKubhŒf: modifiers to be applied to the default behaviour of the ISO-TP stack. Following flags are available:”…”�”}”(hjKh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KœhjGubj)�”}”(hhh]”(j#)�”}”(hŒd``CAN_ISOTP_LISTEN_MODE``: listen only (do not send FC frames); normally used as a testing feature. ”h]”hï)�”}”(hŒc``CAN_ISOTP_LISTEN_MODE``: listen only (do not send FC frames); normally used as a testing feature.”h]”(j%)�”}”(hŒ``CAN_ISOTP_LISTEN_MODE``”h]”hŒCAN_ISOTP_LISTEN_MODE”…”�”}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjnubhŒJ: listen only (do not send FC frames); normally used as a testing feature.”…”�”}”(hjnh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KŸhjjubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjgubj#)�”}”(hŒþ``CAN_ISOTP_EXTEND_ADDR``: use the byte specified in ``ext_address`` as an additional address component. This enables the "mixed" addressing format if used alone, or the "extended" addressing format if used in conjunction with ``CAN_ISOTP_RX_EXT_ADDR``. ”h]”hï)�”}”(hŒý``CAN_ISOTP_EXTEND_ADDR``: use the byte specified in ``ext_address`` as an additional address component. This enables the "mixed" addressing format if used alone, or the "extended" addressing format if used in conjunction with ``CAN_ISOTP_RX_EXT_ADDR``.”h]”(j%)�”}”(hŒ``CAN_ISOTP_EXTEND_ADDR``”h]”hŒCAN_ISOTP_EXTEND_ADDR”…”�”}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj”ubhŒ: use the byte specified in ”…”�”}”(hj”h²hh³Nh´Nubj%)�”}”(hŒ``ext_address``”h]”hŒ ext_address”…”�”}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj”ubhŒ§ as an additional address component. This enables the “mixedâ€� addressing format if used alone, or the “extendedâ€� addressing format if used in conjunction with ”…”�”}”(hj”h²hh³Nh´Nubj%)�”}”(hŒ``CAN_ISOTP_RX_EXT_ADDR``”h]”hŒCAN_ISOTP_RX_EXT_ADDR”…”�”}”(hj¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj”ubhŒ.”…”�”}”(hj”h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K¢hj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjgubj#)�”}”(hŒy``CAN_ISOTP_TX_PADDING``: enable padding for transmitted frames, using ``txpad_content`` as value for the padding bytes. ”h]”hï)�”}”(hŒx``CAN_ISOTP_TX_PADDING``: enable padding for transmitted frames, using ``txpad_content`` as value for the padding bytes.”h]”(j%)�”}”(hŒ``CAN_ISOTP_TX_PADDING``”h]”hŒCAN_ISOTP_TX_PADDING”…”�”}”(hjâh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjÞubhŒ/: enable padding for transmitted frames, using ”…”�”}”(hjÞh²hh³Nh´Nubj%)�”}”(hŒ``txpad_content``”h]”hŒ txpad_content”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjÞubhŒ as value for the padding bytes.”…”�”}”(hjÞh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K§hjÚubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjgubj#)�”}”(hŒz``CAN_ISOTP_RX_PADDING``: enable padding for the received frames, using ``rxpad_content`` as value for the padding bytes. ”h]”hï)�”}”(hŒy``CAN_ISOTP_RX_PADDING``: enable padding for the received frames, using ``rxpad_content`` as value for the padding bytes.”h]”(j%)�”}”(hŒ``CAN_ISOTP_RX_PADDING``”h]”hŒCAN_ISOTP_RX_PADDING”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjubhŒ0: enable padding for the received frames, using ”…”�”}”(hjh²hh³Nh´Nubj%)�”}”(hŒ``rxpad_content``”h]”hŒ rxpad_content”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjubhŒ as value for the padding bytes.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kªhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjgubj#)�”}”(hŒT``CAN_ISOTP_CHK_PAD_LEN``: check for correct padding length on the received frames. ”h]”hï)�”}”(hŒS``CAN_ISOTP_CHK_PAD_LEN``: check for correct padding length on the received frames.”h]”(j%)�”}”(hŒ``CAN_ISOTP_CHK_PAD_LEN``”h]”hŒCAN_ISOTP_CHK_PAD_LEN”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjNubhŒ:: check for correct padding length on the received frames.”…”�”}”(hjNh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K­hjJubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjgubj#)�”}”(hŒ¦``CAN_ISOTP_CHK_PAD_DATA``: check padding bytes on the received frames against ``rxpad_content``; if ``CAN_ISOTP_RX_PADDING`` is not specified, this flag is ignored. ”h]”hï)�”}”(hŒ¥``CAN_ISOTP_CHK_PAD_DATA``: check padding bytes on the received frames against ``rxpad_content``; if ``CAN_ISOTP_RX_PADDING`` is not specified, this flag is ignored.”h]”(j%)�”}”(hŒ``CAN_ISOTP_CHK_PAD_DATA``”h]”hŒCAN_ISOTP_CHK_PAD_DATA”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjtubhŒ5: check padding bytes on the received frames against ”…”�”}”(hjth²hh³Nh´Nubj%)�”}”(hŒ``rxpad_content``”h]”hŒ rxpad_content”…”�”}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjtubhŒ; if ”…”�”}”(hjth²hh³Nh´Nubj%)�”}”(hŒ``CAN_ISOTP_RX_PADDING``”h]”hŒCAN_ISOTP_RX_PADDING”…”�”}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjtubhŒ( is not specified, this flag is ignored.”…”�”}”(hjth²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K°hjpubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjgubj#)�”}”(hŒŸ``CAN_ISOTP_HALF_DUPLEX``: force ISO-TP socket in half duplex mode (that is, transport mechanism can only be incoming or outgoing at the same time, not both). ”h]”hï)�”}”(hŒž``CAN_ISOTP_HALF_DUPLEX``: force ISO-TP socket in half duplex mode (that is, transport mechanism can only be incoming or outgoing at the same time, not both).”h]”(j%)�”}”(hŒ``CAN_ISOTP_HALF_DUPLEX``”h]”hŒCAN_ISOTP_HALF_DUPLEX”…”�”}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj¾ubhŒ…: force ISO-TP socket in half duplex mode (that is, transport mechanism can only be incoming or outgoing at the same time, not both).”…”�”}”(hj¾h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K´hjºubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjgubj#)�”}”(hŒ```CAN_ISOTP_FORCE_TXSTMIN``: ignore stmin from received FC; normally used as a testing feature. ”h]”hï)�”}”(hŒ_``CAN_ISOTP_FORCE_TXSTMIN``: ignore stmin from received FC; normally used as a testing feature.”h]”(j%)�”}”(hŒ``CAN_ISOTP_FORCE_TXSTMIN``”h]”hŒCAN_ISOTP_FORCE_TXSTMIN”…”�”}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjäubhŒD: ignore stmin from received FC; normally used as a testing feature.”…”�”}”(hjäh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K¸hjàubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjgubj#)�”}”(hŒc``CAN_ISOTP_FORCE_RXSTMIN``: ignore CFs depending on rx stmin; normally used as a testing feature. ”h]”hï)�”}”(hŒb``CAN_ISOTP_FORCE_RXSTMIN``: ignore CFs depending on rx stmin; normally used as a testing feature.”h]”(j%)�”}”(hŒ``CAN_ISOTP_FORCE_RXSTMIN``”h]”hŒCAN_ISOTP_FORCE_RXSTMIN”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj ubhŒG: ignore CFs depending on rx stmin; normally used as a testing feature.”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K»hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjgubj#)�”}”(hŒ÷``CAN_ISOTP_RX_EXT_ADDR``: use ``rx_ext_address`` instead of ``ext_address`` as extended addressing byte on the reception path. If used in conjunction with ``CAN_ISOTP_EXTEND_ADDR``, this flag effectively enables the "extended" addressing format. ”h]”hï)�”}”(hŒö``CAN_ISOTP_RX_EXT_ADDR``: use ``rx_ext_address`` instead of ``ext_address`` as extended addressing byte on the reception path. If used in conjunction with ``CAN_ISOTP_EXTEND_ADDR``, this flag effectively enables the "extended" addressing format.”h]”(j%)�”}”(hŒ``CAN_ISOTP_RX_EXT_ADDR``”h]”hŒCAN_ISOTP_RX_EXT_ADDR”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj0ubhŒ: use ”…”�”}”(hj0h²hh³Nh´Nubj%)�”}”(hŒ``rx_ext_address``”h]”hŒrx_ext_address”…”�”}”(hjFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj0ubhŒ instead of ”…”�”}”(hj0h²hh³Nh´Nubj%)�”}”(hŒ``ext_address``”h]”hŒ ext_address”…”�”}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj0ubhŒP as extended addressing byte on the reception path. If used in conjunction with ”…”�”}”(hj0h²hh³Nh´Nubj%)�”}”(hŒ``CAN_ISOTP_EXTEND_ADDR``”h]”hŒCAN_ISOTP_EXTEND_ADDR”…”�”}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj0ubhŒE, this flag effectively enables the “extendedâ€� addressing format.”…”�”}”(hj0h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K¾hj,ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjgubj#)�”}”(hŒ•``CAN_ISOTP_WAIT_TX_DONE``: wait until the frame is sent before returning from ``write(2)`` and ``send(2)`` calls (i.e., blocking write operations). ”h]”hï)�”}”(hŒ”``CAN_ISOTP_WAIT_TX_DONE``: wait until the frame is sent before returning from ``write(2)`` and ``send(2)`` calls (i.e., blocking write operations).”h]”(j%)�”}”(hŒ``CAN_ISOTP_WAIT_TX_DONE``”h]”hŒCAN_ISOTP_WAIT_TX_DONE”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjŒubhŒ5: wait until the frame is sent before returning from ”…”�”}”(hjŒh²hh³Nh´Nubj%)�”}”(hŒ ``write(2)``”h]”hŒwrite(2)”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjŒubhŒ and ”…”�”}”(hjŒh²hh³Nh´Nubj%)�”}”(hŒ ``send(2)``”h]”hŒsend(2)”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjŒubhŒ) calls (i.e., blocking write operations).”…”�”}”(hjŒh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÃhjˆubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjgubj#)�”}”(hŒy``CAN_ISOTP_SF_BROADCAST``: use 1-to-N functional addressing (cannot be specified alongside ``CAN_ISOTP_CF_BROADCAST``). ”h]”hï)�”}”(hŒx``CAN_ISOTP_SF_BROADCAST``: use 1-to-N functional addressing (cannot be specified alongside ``CAN_ISOTP_CF_BROADCAST``).”h]”(j%)�”}”(hŒ``CAN_ISOTP_SF_BROADCAST``”h]”hŒCAN_ISOTP_SF_BROADCAST”…”�”}”(hjÚh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjÖubhŒB: use 1-to-N functional addressing (cannot be specified alongside ”…”�”}”(hjÖh²hh³Nh´Nubj%)�”}”(hŒ``CAN_ISOTP_CF_BROADCAST``”h]”hŒCAN_ISOTP_CF_BROADCAST”…”�”}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjÖubhŒ).”…”�”}”(hjÖh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÆhjÒubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjgubj#)�”}”(hŒ¼``CAN_ISOTP_CF_BROADCAST``: use 1-to-N transmission without flow control (cannot be specified alongside ``CAN_ISOTP_SF_BROADCAST``). NOTE: this is not covered by the ISO 15765-2 standard. ”h]”hï)�”}”(hŒ»``CAN_ISOTP_CF_BROADCAST``: use 1-to-N transmission without flow control (cannot be specified alongside ``CAN_ISOTP_SF_BROADCAST``). NOTE: this is not covered by the ISO 15765-2 standard.”h]”(j%)�”}”(hŒ``CAN_ISOTP_CF_BROADCAST``”h]”hŒCAN_ISOTP_CF_BROADCAST”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjubhŒN: use 1-to-N transmission without flow control (cannot be specified alongside ”…”�”}”(hjh²hh³Nh´Nubj%)�”}”(hŒ``CAN_ISOTP_SF_BROADCAST``”h]”hŒCAN_ISOTP_SF_BROADCAST”…”�”}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjubhŒ9). NOTE: this is not covered by the ISO 15765-2 standard.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÉhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjgubj#)�”}”(hŒN``CAN_ISOTP_DYN_FC_PARMS``: enable dynamic update of flow control parameters. ”h]”hï)�”}”(hŒM``CAN_ISOTP_DYN_FC_PARMS``: enable dynamic update of flow control parameters.”h]”(j%)�”}”(hŒ``CAN_ISOTP_DYN_FC_PARMS``”h]”hŒCAN_ISOTP_DYN_FC_PARMS”…”�”}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjFubhŒ3: enable dynamic update of flow control parameters.”…”�”}”(hjFh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÍhjBubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjgubeh}”(h]”h ]”h"]”h$]”h&]”jBjCuh1jh³hÇh´KŸhjGubeh}”(h]”h ]”h"]”h$]”h&]”uh1j"hjDh²hh³Nh´Nubj#)�”}”(hX``frame_txtime``: frame transmission time (defined as N_As/N_Ar inside the ISO standard); if ``0``, the default (or the last set value) is used. To set the transmission time to ``0``, the ``CAN_ISOTP_FRAME_TXTIME_ZERO`` macro (equal to 0xFFFFFFFF) shall be used. ”h]”hï)�”}”(hX``frame_txtime``: frame transmission time (defined as N_As/N_Ar inside the ISO standard); if ``0``, the default (or the last set value) is used. To set the transmission time to ``0``, the ``CAN_ISOTP_FRAME_TXTIME_ZERO`` macro (equal to 0xFFFFFFFF) shall be used.”h]”(j%)�”}”(hŒ``frame_txtime``”h]”hŒ frame_txtime”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjxubhŒM: frame transmission time (defined as N_As/N_Ar inside the ISO standard); if ”…”�”}”(hjxh²hh³Nh´Nubj%)�”}”(hŒ``0``”h]”hŒ0”…”�”}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjxubhŒO, the default (or the last set value) is used. To set the transmission time to ”…”�”}”(hjxh²hh³Nh´Nubj%)�”}”(hŒ``0``”h]”hŒ0”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjxubhŒ, the ”…”�”}”(hjxh²hh³Nh´Nubj%)�”}”(hŒ``CAN_ISOTP_FRAME_TXTIME_ZERO``”h]”hŒCAN_ISOTP_FRAME_TXTIME_ZERO”…”�”}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjxubhŒ+ macro (equal to 0xFFFFFFFF) shall be used.”…”�”}”(hjxh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÐhjtubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjDh²hh³hÇh´Nubj#)�”}”(hŒd``ext_address``: extended addressing byte, used if the ``CAN_ISOTP_EXTEND_ADDR`` flag is specified. ”h]”hï)�”}”(hŒc``ext_address``: extended addressing byte, used if the ``CAN_ISOTP_EXTEND_ADDR`` flag is specified.”h]”(j%)�”}”(hŒ``ext_address``”h]”hŒ ext_address”…”�”}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjÔubhŒ(: extended addressing byte, used if the ”…”�”}”(hjÔh²hh³Nh´Nubj%)�”}”(hŒ``CAN_ISOTP_EXTEND_ADDR``”h]”hŒCAN_ISOTP_EXTEND_ADDR”…”�”}”(hjêh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjÔubhŒ flag is specified.”…”�”}”(hjÔh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÕhjÐubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjDh²hh³hÇh´Nubj#)�”}”(hŒF``txpad_content``: byte used as padding value for transmitted frames. ”h]”hï)�”}”(hŒE``txpad_content``: byte used as padding value for transmitted frames.”h]”(j%)�”}”(hŒ``txpad_content``”h]”hŒ txpad_content”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj ubhŒ4: byte used as padding value for transmitted frames.”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KØhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjDh²hh³hÇh´Nubj#)�”}”(hŒC``rxpad_content``: byte used as padding value for received frames. ”h]”hï)�”}”(hŒB``rxpad_content``: byte used as padding value for received frames.”h]”(j%)�”}”(hŒ``rxpad_content``”h]”hŒ rxpad_content”…”�”}”(hj6 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj2 ubhŒ1: byte used as padding value for received frames.”…”�”}”(hj2 h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÚhj. ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjDh²hh³hÇh´Nubj#)�”}”(hŒ~``rx_ext_address``: extended addressing byte for the reception path, used if the ``CAN_ISOTP_RX_EXT_ADDR`` flag is specified. ”h]”hï)�”}”(hŒ}``rx_ext_address``: extended addressing byte for the reception path, used if the ``CAN_ISOTP_RX_EXT_ADDR`` flag is specified.”h]”(j%)�”}”(hŒ``rx_ext_address``”h]”hŒrx_ext_address”…”�”}”(hj\ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjX ubhŒ?: extended addressing byte for the reception path, used if the ”…”�”}”(hjX h²hh³Nh´Nubj%)�”}”(hŒ``CAN_ISOTP_RX_EXT_ADDR``”h]”hŒCAN_ISOTP_RX_EXT_ADDR”…”�”}”(hjn h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjX ubhŒ flag is specified.”…”�”}”(hjX h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÜhjT ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjDh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jBjCuh1jh³hÇh´KœhjÕh²hubeh}”(h]”Œgeneral-options”ah ]”h"]”Œgeneral options”ah$]”h&]”uh1hÈhj’h²hh³hÇh´K†ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒFlow Control options”h]”hŒFlow Control options”…”�”}”(hj� h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjš h²hh³hÇh´Kàubhï)�”}”(hŒ’Flow Control (FC) options can be passed using the ``CAN_ISOTP_RECV_FC`` optname to provide the communication parameters for receiving ISO-TP PDUs.”h]”(hŒ2Flow Control (FC) options can be passed using the ”…”�”}”(hj« h²hh³Nh´Nubj%)�”}”(hŒ``CAN_ISOTP_RECV_FC``”h]”hŒCAN_ISOTP_RECV_FC”…”�”}”(hj³ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj« ubhŒK optname to provide the communication parameters for receiving ISO-TP PDUs.”…”�”}”(hj« h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kâhjš h²hubjù)�”}”(hŒvstruct can_isotp_fc_options fc_opts; ret = setsockopt(s, SOL_CAN_ISOTP, CAN_ISOTP_RECV_FC, &fc_opts, sizeof(fc_opts));”h]”hŒvstruct can_isotp_fc_options fc_opts; ret = setsockopt(s, SOL_CAN_ISOTP, CAN_ISOTP_RECV_FC, &fc_opts, sizeof(fc_opts));”…”�”}”hjË sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰j j j }”uh1jøh³hÇh´Kåhjš h²hubhï)�”}”(hŒHwhere the ``can_isotp_fc_options`` structure has the following contents:”h]”(hŒ where the ”…”�”}”(hjÚ h²hh³Nh´Nubj%)�”}”(hŒ``can_isotp_fc_options``”h]”hŒcan_isotp_fc_options”…”�”}”(hjâ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjÚ ubhŒ& structure has the following contents:”…”�”}”(hjÚ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kêhjš h²hubjù)�”}”(hŒEstruct can_isotp_options { u8 bs; u8 stmin; u8 wftmax; };”h]”hŒEstruct can_isotp_options { u8 bs; u8 stmin; u8 wftmax; };”…”�”}”hjú sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰j j j }”uh1jøh³hÇh´Kìhjš h²hubj)�”}”(hhh]”(j#)�”}”(hŒ3``bs``: blocksize provided in flow control frames. ”h]”hï)�”}”(hŒ2``bs``: blocksize provided in flow control frames.”h]”(j%)�”}”(hŒ``bs``”h]”hŒbs”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj ubhŒ,: blocksize provided in flow control frames.”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kôhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hj h²hh³hÇh´Nubj#)�”}”(hŒ¶``stmin``: minimum separation time provided in flow control frames; can have the following values (others are reserved): * 0x00 - 0x7F : 0 - 127 ms * 0xF1 - 0xF9 : 100 us - 900 us ”h]”(hï)�”}”(hŒx``stmin``: minimum separation time provided in flow control frames; can have the following values (others are reserved):”h]”(j%)�”}”(hŒ ``stmin``”h]”hŒstmin”…”�”}”(hj: h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj6 ubhŒo: minimum separation time provided in flow control frames; can have the following values (others are reserved):”…”�”}”(hj6 h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Köhj2 ubj)�”}”(hhh]”(j#)�”}”(hŒ0x00 - 0x7F : 0 - 127 ms ”h]”hï)�”}”(hŒ0x00 - 0x7F : 0 - 127 ms”h]”hŒ0x00 - 0x7F : 0 - 127 ms”…”�”}”(hjY h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KùhjU ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjR ubj#)�”}”(hŒ0xF1 - 0xF9 : 100 us - 900 us ”h]”hï)�”}”(hŒ0xF1 - 0xF9 : 100 us - 900 us”h]”hŒ0xF1 - 0xF9 : 100 us - 900 us”…”�”}”(hjq h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kûhjm ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjR ubeh}”(h]”h ]”h"]”h$]”h&]”jBjCuh1jh³hÇh´Kùhj2 ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j"hj h²hh³Nh´Nubj#)�”}”(hŒK``wftmax``: maximum number of wait frames provided in flow control frames. ”h]”hï)�”}”(hŒJ``wftmax``: maximum number of wait frames provided in flow control frames.”h]”(j%)�”}”(hŒ ``wftmax``”h]”hŒwftmax”…”�”}”(hj™ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj• ubhŒ@: maximum number of wait frames provided in flow control frames.”…”�”}”(hj• h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kýhj‘ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hj h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jBjCuh1jh³hÇh´Kôhjš h²hubeh}”(h]”Œflow-control-options”ah ]”h"]”Œflow control options”ah$]”h&]”uh1hÈhj’h²hh³hÇh´KàubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒLink Layer options”h]”hŒLink Layer options”…”�”}”(hjÈ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÅ h²hh³hÇh´Mubhï)�”}”(hŒNLink Layer (LL) options can be passed using the ``CAN_ISOTP_LL_OPTS`` optname:”h]”(hŒ0Link Layer (LL) options can be passed using the ”…”�”}”(hjÖ h²hh³Nh´Nubj%)�”}”(hŒ``CAN_ISOTP_LL_OPTS``”h]”hŒCAN_ISOTP_LL_OPTS”…”�”}”(hjÞ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjÖ ubhŒ optname:”…”�”}”(hjÖ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MhjÅ h²hubjù)�”}”(hŒvstruct can_isotp_ll_options ll_opts; ret = setsockopt(s, SOL_CAN_ISOTP, CAN_ISOTP_LL_OPTS, &ll_opts, sizeof(ll_opts));”h]”hŒvstruct can_isotp_ll_options ll_opts; ret = setsockopt(s, SOL_CAN_ISOTP, CAN_ISOTP_LL_OPTS, &ll_opts, sizeof(ll_opts));”…”�”}”hjö sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰j j j }”uh1jøh³hÇh´MhjÅ h²hubhï)�”}”(hŒHwhere the ``can_isotp_ll_options`` structure has the following contents:”h]”(hŒ where the ”…”�”}”(hj h²hh³Nh´Nubj%)�”}”(hŒ``can_isotp_ll_options``”h]”hŒcan_isotp_ll_options”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj ubhŒ& structure has the following contents:”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M hjÅ h²hubjù)�”}”(hŒKstruct can_isotp_ll_options { u8 mtu; u8 tx_dl; u8 tx_flags; };”h]”hŒKstruct can_isotp_ll_options { u8 mtu; u8 tx_dl; u8 tx_flags; };”…”�”}”hj% sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰j j j }”uh1jøh³hÇh´M hjÅ h²hubj)�”}”(hhh]”(j#)�”}”(hŒ‰``mtu``: generated and accepted CAN frame type, can be equal to ``CAN_MTU`` for classical CAN frames or ``CANFD_MTU`` for CAN FD frames. ”h]”hï)�”}”(hŒˆ``mtu``: generated and accepted CAN frame type, can be equal to ``CAN_MTU`` for classical CAN frames or ``CANFD_MTU`` for CAN FD frames.”h]”(j%)�”}”(hŒ``mtu``”h]”hŒmtu”…”�”}”(hj? h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj; ubhŒ9: generated and accepted CAN frame type, can be equal to ”…”�”}”(hj; h²hh³Nh´Nubj%)�”}”(hŒ ``CAN_MTU``”h]”hŒCAN_MTU”…”�”}”(hjQ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj; ubhŒ for classical CAN frames or ”…”�”}”(hj; h²hh³Nh´Nubj%)�”}”(hŒ ``CANFD_MTU``”h]”hŒ CANFD_MTU”…”�”}”(hjc h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj; ubhŒ for CAN FD frames.”…”�”}”(hj; h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Mhj7 ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hj4 h²hh³hÇh´Nubj#)�”}”(hŒ¼``tx_dl``: maximum payload length for transmitted frames, can have one value among: 8, 12, 16, 20, 24, 32, 48, 64. Values above 8 only apply to CAN FD traffic (i.e.: ``mtu = CANFD_MTU``). ”h]”hï)�”}”(hŒ»``tx_dl``: maximum payload length for transmitted frames, can have one value among: 8, 12, 16, 20, 24, 32, 48, 64. Values above 8 only apply to CAN FD traffic (i.e.: ``mtu = CANFD_MTU``).”h]”(j%)�”}”(hŒ ``tx_dl``”h]”hŒtx_dl”…”�”}”(hj‰ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj… ubhŒ�: maximum payload length for transmitted frames, can have one value among: 8, 12, 16, 20, 24, 32, 48, 64. Values above 8 only apply to CAN FD traffic (i.e.: ”…”�”}”(hj… h²hh³Nh´Nubj%)�”}”(hŒ``mtu = CANFD_MTU``”h]”hŒmtu = CANFD_MTU”…”�”}”(hj› h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj… ubhŒ).”…”�”}”(hj… h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Mhj� ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hj4 h²hh³hÇh´Nubj#)�”}”(hŒ‰``tx_flags``: flags set into ``struct canfd_frame.flags`` at frame creation. Only applies to CAN FD traffic (i.e.: ``mtu = CANFD_MTU``). ”h]”hï)�”}”(hŒˆ``tx_flags``: flags set into ``struct canfd_frame.flags`` at frame creation. Only applies to CAN FD traffic (i.e.: ``mtu = CANFD_MTU``).”h]”(j%)�”}”(hŒ ``tx_flags``”h]”hŒtx_flags”…”�”}”(hjÁ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj½ ubhŒ: flags set into ”…”�”}”(hj½ h²hh³Nh´Nubj%)�”}”(hŒ``struct canfd_frame.flags``”h]”hŒstruct canfd_frame.flags”…”�”}”(hjÓ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj½ ubhŒ: at frame creation. Only applies to CAN FD traffic (i.e.: ”…”�”}”(hj½ h²hh³Nh´Nubj%)�”}”(hŒ``mtu = CANFD_MTU``”h]”hŒmtu = CANFD_MTU”…”�”}”(hjå h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj½ ubhŒ).”…”�”}”(hj½ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Mhj¹ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hj4 h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jBjCuh1jh³hÇh´MhjÅ h²hubeh}”(h]”Œlink-layer-options”ah ]”h"]”Œlink layer options”ah$]”h&]”uh1hÈhj’h²hh³hÇh´MubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒTransmission stmin”h]”hŒTransmission stmin”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj h²hh³hÇh´Mubhï)�”}”(hŒüThe transmission minimum separation time (stmin) can be forced using the ``CAN_ISOTP_TX_STMIN`` optname and providing an stmin value in microseconds as a 32bit unsigned integer; this will overwrite the value sent by the receiver in flow control frames:”h]”(hŒIThe transmission minimum separation time (stmin) can be forced using the ”…”�”}”(hj" h²hh³Nh´Nubj%)�”}”(hŒ``CAN_ISOTP_TX_STMIN``”h]”hŒCAN_ISOTP_TX_STMIN”…”�”}”(hj* h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj" ubhŒ� optname and providing an stmin value in microseconds as a 32bit unsigned integer; this will overwrite the value sent by the receiver in flow control frames:”…”�”}”(hj" h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M hj h²hubjù)�”}”(hŒ^uint32_t stmin; ret = setsockopt(s, SOL_CAN_ISOTP, CAN_ISOTP_TX_STMIN, &stmin, sizeof(stmin));”h]”hŒ^uint32_t stmin; ret = setsockopt(s, SOL_CAN_ISOTP, CAN_ISOTP_TX_STMIN, &stmin, sizeof(stmin));”…”�”}”hjB sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰j j j }”uh1jøh³hÇh´M%hj h²hubeh}”(h]”Œtransmission-stmin”ah ]”h"]”Œtransmission stmin”ah$]”h&]”uh1hÈhj’h²hh³hÇh´MubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒReception stmin”h]”hŒReception stmin”…”�”}”(hj\ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjY h²hh³hÇh´M+ubhï)�”}”(hX The reception minimum separation time (stmin) can be forced using the ``CAN_ISOTP_RX_STMIN`` optname and providing an stmin value in microseconds as a 32bit unsigned integer; received Consecutive Frames (CF) which timestamps differ less than this value will be ignored:”h]”(hŒFThe reception minimum separation time (stmin) can be forced using the ”…”�”}”(hjj h²hh³Nh´Nubj%)�”}”(hŒ``CAN_ISOTP_RX_STMIN``”h]”hŒCAN_ISOTP_RX_STMIN”…”�”}”(hjr h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjj ubhŒ± optname and providing an stmin value in microseconds as a 32bit unsigned integer; received Consecutive Frames (CF) which timestamps differ less than this value will be ignored:”…”�”}”(hjj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M-hjY h²hubjù)�”}”(hŒ^uint32_t stmin; ret = setsockopt(s, SOL_CAN_ISOTP, CAN_ISOTP_RX_STMIN, &stmin, sizeof(stmin));”h]”hŒ^uint32_t stmin; ret = setsockopt(s, SOL_CAN_ISOTP, CAN_ISOTP_RX_STMIN, &stmin, sizeof(stmin));”…”�”}”hjŠ sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰j j j }”uh1jøh³hÇh´M2hjY h²hubeh}”(h]”Œreception-stmin”ah ]”h"]”Œreception stmin”ah$]”h&]”uh1hÈhj’h²hh³hÇh´M+ubeh}”(h]”Œiso-tp-socket-options”ah ]”h"]”Œiso-tp socket options”ah$]”h&]”uh1hÈhjrh²hh³hÇh´K€ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒMulti-frame transport support”h]”hŒMulti-frame transport support”…”�”}”(hj¬ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj© h²hh³hÇh´M8ubhï)�”}”(hŒ˜The ISO-TP stack contained inside the Linux kernel supports the multi-frame transport mechanism defined by the standard, with the following constraints:”h]”hŒ˜The ISO-TP stack contained inside the Linux kernel supports the multi-frame transport mechanism defined by the standard, with the following constraints:”…”�”}”(hjº h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M:hj© h²hubj)�”}”(hhh]”(j#)�”}”(hŒfthe maximum size of a PDU is defined by a module parameter, with an hard limit imposed at build time. ”h]”hï)�”}”(hŒethe maximum size of a PDU is defined by a module parameter, with an hard limit imposed at build time.”h]”hŒethe maximum size of a PDU is defined by a module parameter, with an hard limit imposed at build time.”…”�”}”(hjÏ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M=hjË ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjÈ h²hh³hÇh´Nubj#)�”}”(hŒ¾when a transmission is in progress, subsequent calls to ``write(2)`` will block, while calls to ``send(2)`` will either block or fail depending on the presence of the ``MSG_DONTWAIT`` flag. ”h]”hï)�”}”(hŒ½when a transmission is in progress, subsequent calls to ``write(2)`` will block, while calls to ``send(2)`` will either block or fail depending on the presence of the ``MSG_DONTWAIT`` flag.”h]”(hŒ8when a transmission is in progress, subsequent calls to ”…”�”}”(hjç h²hh³Nh´Nubj%)�”}”(hŒ ``write(2)``”h]”hŒwrite(2)”…”�”}”(hjï h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjç ubhŒ will block, while calls to ”…”�”}”(hjç h²hh³Nh´Nubj%)�”}”(hŒ ``send(2)``”h]”hŒsend(2)”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjç ubhŒ< will either block or fail depending on the presence of the ”…”�”}”(hjç h²hh³Nh´Nubj%)�”}”(hŒ``MSG_DONTWAIT``”h]”hŒ MSG_DONTWAIT”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjç ubhŒ flag.”…”�”}”(hjç h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M@hjã ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjÈ h²hh³hÇh´Nubj#)�”}”(hŒ‰no support is present for sending "wait frames": whether a PDU can be fully received or not is decided when the First Frame is received. ”h]”hï)�”}”(hŒˆno support is present for sending "wait frames": whether a PDU can be fully received or not is decided when the First Frame is received.”h]”hŒŒno support is present for sending “wait framesâ€�: whether a PDU can be fully received or not is decided when the First Frame is received.”…”�”}”(hj5 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MDhj1 ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"hjÈ h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jBjCuh1jh³hÇh´M=hj© h²hubeh}”(h]”Œmulti-frame-transport-support”ah ]”h"]”Œmulti-frame transport support”ah$]”h&]”uh1hÈhjrh²hh³hÇh´M8ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒErrors”h]”hŒErrors”…”�”}”(hjZ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjW h²hh³hÇh´MHubhï)�”}”(hŒ+Following errors are reported to userspace:”h]”hŒ+Following errors are reported to userspace:”…”�”}”(hjh h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MJhjW h²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒRX path errors”h]”hŒRX path errors”…”�”}”(hjy h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjv h²hh³hÇh´MMubhŒtable”“”)�”}”(hhh]”hŒtgroup”“”)�”}”(hhh]”(hŒcolspec”“”)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K uh1j‘ hjŽ ubj’ )�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K?uh1j‘ hjŽ ubhŒtbody”“”)�”}”(hhh]”(hŒrow”“”)�”}”(hhh]”(hŒentry”“”)�”}”(hhh]”hï)�”}”(hŒ -ETIMEDOUT”h]”hŒ -ETIMEDOUT”…”�”}”(hj¶ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MPhj³ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j± hj® ubj² )�”}”(hhh]”hï)�”}”(hŒtimeout of data reception”h]”hŒtimeout of data reception”…”�”}”(hjÍ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MPhjÊ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j± hj® ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¬ hj© ubj­ )�”}”(hhh]”(j² )�”}”(hhh]”hï)�”}”(hŒ-EILSEQ”h]”hŒ-EILSEQ”…”�”}”(hjí h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MQhjê ubah}”(h]”h ]”h"]”h$]”h&]”uh1j± hjç ubj² )�”}”(hhh]”hï)�”}”(hŒ7sequence number mismatch during a multi-frame reception”h]”hŒ7sequence number mismatch during a multi-frame reception”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MQhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j± hjç ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¬ hj© ubj­ )�”}”(hhh]”(j² )�”}”(hhh]”hï)�”}”(hŒ-EBADMSG”h]”hŒ-EBADMSG”…”�”}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MRhj!ubah}”(h]”h ]”h"]”h$]”h&]”uh1j± hjubj² )�”}”(hhh]”hï)�”}”(hŒ!data reception with wrong padding”h]”hŒ!data reception with wrong padding”…”�”}”(hj;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MRhj8ubah}”(h]”h ]”h"]”h$]”h&]”uh1j± hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¬ hj© ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j§ hjŽ ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1jŒ hj‰ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡ hjv h²hh³hÇh´Nubeh}”(h]”Œrx-path-errors”ah ]”h"]”Œrx path errors”ah$]”h&]”uh1hÈhjW h²hh³hÇh´MMubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒTX path errors”h]”hŒTX path errors”…”�”}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjph²hh³hÇh´MVubjˆ )�”}”(hhh]”j� )�”}”(hhh]”(j’ )�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K uh1j‘ hj„ubj’ )�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”KAuh1j‘ hj„ubj¨ )�”}”(hhh]”(j­ )�”}”(hhh]”(j² )�”}”(hhh]”hï)�”}”(hŒ-ECOMM”h]”hŒ-ECOMM”…”�”}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MYhj¡ubah}”(h]”h ]”h"]”h$]”h&]”uh1j± hjžubj² )�”}”(hhh]”hï)�”}”(hŒflow control reception timeout”h]”hŒflow control reception timeout”…”�”}”(hj»h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MYhj¸ubah}”(h]”h ]”h"]”h$]”h&]”uh1j± hjžubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¬ hj›ubj­ )�”}”(hhh]”(j² )�”}”(hhh]”hï)�”}”(hŒ -EMSGSIZE”h]”hŒ -EMSGSIZE”…”�”}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MZhjØubah}”(h]”h ]”h"]”h$]”h&]”uh1j± hjÕubj² )�”}”(hhh]”hï)�”}”(hŒflow control reception overflow”h]”hŒflow control reception overflow”…”�”}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MZhjïubah}”(h]”h ]”h"]”h$]”h&]”uh1j± hjÕubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¬ hj›ubj­ )�”}”(hhh]”(j² )�”}”(hhh]”hï)�”}”(hŒ-EBADMSG”h]”hŒ-EBADMSG”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M[hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j± hj ubj² )�”}”(hhh]”hï)�”}”(hŒ0flow control reception with wrong layout/padding”h]”hŒ0flow control reception with wrong layout/padding”…”�”}”(hj)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M[hj&ubah}”(h]”h ]”h"]”h$]”h&]”uh1j± hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¬ hj›ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j§ hj„ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1jŒ hj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡ hjph²hh³hÇh´Nubeh}”(h]”Œtx-path-errors”ah ]”h"]”Œtx path errors”ah$]”h&]”uh1hÈhjW h²hh³hÇh´MVubeh}”(h]”Œerrors”ah ]”h"]”Œerrors”ah$]”h&]”uh1hÈhjrh²hh³hÇh´MHubeh}”(h]”Œhow-to-use-iso-tp”ah ]”h"]”Œhow to use iso-tp”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KDubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒExamples”h]”hŒExamples”…”�”}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjnh²hh³hÇh´M_ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒBasic node example”h]”hŒBasic node example”…”�”}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´Mbubhï)�”}”(hŒ®Following example implements a node using "normal" physical addressing, with RX ID equal to 0x18DAF142 and a TX ID equal to 0x18DA42F1. All options are left to their default.”h]”hŒ²Following example implements a node using “normalâ€� physical addressing, with RX ID equal to 0x18DAF142 and a TX ID equal to 0x18DA42F1. All options are left to their default.”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Mdhjh²hubjù)�”}”(hX½int s; struct sockaddr_can addr; int ret; s = socket(PF_CAN, SOCK_DGRAM, CAN_ISOTP); if (s < 0) exit(1); addr.can_family = AF_CAN; addr.can_ifindex = if_nametoindex("can0"); addr.can_addr.tp.tx_id = 0x18DA42F1 | CAN_EFF_FLAG; addr.can_addr.tp.rx_id = 0x18DAF142 | CAN_EFF_FLAG; ret = bind(s, (struct sockaddr *)&addr, sizeof(addr)); if (ret < 0) exit(1); /* Data can now be received using read(s, ...) and sent using write(s, ...) */”h]”hX½int s; struct sockaddr_can addr; int ret; s = socket(PF_CAN, SOCK_DGRAM, CAN_ISOTP); if (s < 0) exit(1); addr.can_family = AF_CAN; addr.can_ifindex = if_nametoindex("can0"); addr.can_addr.tp.tx_id = 0x18DA42F1 | CAN_EFF_FLAG; addr.can_addr.tp.rx_id = 0x18DAF142 | CAN_EFF_FLAG; ret = bind(s, (struct sockaddr *)&addr, sizeof(addr)); if (ret < 0) exit(1); /* Data can now be received using read(s, ...) and sent using write(s, ...) */”…”�”}”hjžsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰j j j }”uh1jøh³hÇh´Mhhjh²hubeh}”(h]”Œbasic-node-example”ah ]”h"]”Œbasic node example”ah$]”h&]”uh1hÈhjnh²hh³hÇh´MbubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒAdditional examples”h]”hŒAdditional examples”…”�”}”(hj¸h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjµh²hh³hÇh´M~ubhï)�”}”(hŒµMore complete (and complex) examples can be found inside the ``isotp*`` userland tools, distributed as part of the ``can-utils`` utilities at: https://github.com/linux-can/can-utils”h]”(hŒ=More complete (and complex) examples can be found inside the ”…”�”}”(hjÆh²hh³Nh´Nubj%)�”}”(hŒ ``isotp*``”h]”hŒisotp*”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjÆubhŒ, userland tools, distributed as part of the ”…”�”}”(hjÆh²hh³Nh´Nubj%)�”}”(hŒ ``can-utils``”h]”hŒ can-utils”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hjÆubhŒ utilities at: ”…”�”}”(hjÆh²hh³Nh´NubhŒ reference”“”)�”}”(hŒ&https://github.com/linux-can/can-utils”h]”hŒ&https://github.com/linux-can/can-utils”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jöuh1jòhjÆubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M€hjµh²hubeh}”(h]”Œadditional-examples”ah ]”h"]”Œadditional examples”ah$]”h&]”uh1hÈhjnh²hh³hÇh´M~ubeh}”(h]”Œexamples”ah ]”h"]”Œexamples”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´M_ubeh}”(h]”Œiso-15765-2-iso-tp”ah ]”h"]”Œiso 15765-2 (iso-tp)”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”j± Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jCŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jjjojljIjFjjjgjdjkjhj�jŒj¦ j£ j— j” j j¿ j j jV jS jž j› jT jQ jcj`jmjjj[jXjjj²j¯jj uŒ nametypes”}”(j‰jo‰jI‰j‰jg‰jk‰j�‰j¦ ‰j— ‰j ‰j ‰jV ‰jž ‰jT ‰jc‰jm‰j[‰j‰j²‰j‰uh}”(jhÊjlhÝjFj jjLjdj jhjrjŒj‘j£ j’j” jÕj¿ jš j jÅ jS j j› jY jQ j© j`jW jjjv jXjpjjnj¯jj jµuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.