Lines Matching +full:filt +full:- +full:disable

1 .. SPDX-License-Identifier: (GPL-2.0 OR MIT)
14 ISO-11783 (ISOBUS). This last one specifies the so-called ETP (Extended
16 results in a maximum packet size of ((2 ^ 24) - 1) * 7 bytes == 111 MiB.
19 -------------------
21 * SAE J1939-21 : data link layer
22 * SAE J1939-81 : network management
23 * ISO 11783-6 : Virtual Terminal (Extended Transport Protocol)
25 .. _j1939-motivation:
56 ...). In-kernel code for these would not contribute to protocol stability.
61 Since such a library does not communicate with the in-kernel implementation, care
64 the library exclusively, or by the in-kernel system exclusively.
70 ---
72 The J1939 protocol uses the 29-bit CAN identifier with the following structure:
75 29 bit CAN-ID
76 --------------------------------------------------
77 Bit positions within the CAN-ID
78 --------------------------------------------------
89 ------------------------------------------------------------------
90 Bit positions within the CAN-ID
91 ------------------------------------------------------------------
97 In J1939-21 distinction is made between PDU1 format (where PF < 240) and PDU2
98 format (where PF >= 240). Furthermore, when using the PDU2 format, the PS-field
99 contains a so-called Group Extension, which is part of the PGN. When using PDU2
100 format, the Group Extension is set in the PS-field.
104 ----------------------------------------
105 Bit positions within the CAN-ID
106 ----------------------------------------
114 ----------------------------------------
115 Bit positions within the CAN-ID
116 ----------------------------------------
122 On the other hand, when using PDU1 format, the PS-field contains a so-called
124 from user space to kernel (or vice versa) and PDU1 format is used, the PS-field
128 Regarding PGN mapping to 29-bit CAN identifier, the Destination Address shall
133 ----------
141 For dynamic addressing, so-called Address Claiming, extra support is foreseen
142 in the kernel. In J1939 any ECU is known by its 64-bit NAME. At the moment of
152 ---------
169 ---------
175 .. code-block:: C
201 .. code-block:: C
226 ``can_addr.j1939.name`` contains the 64-bit J1939 NAME.
257 - ``SO_J1939_FILTER`` - configure array of filters
258 - ``SO_J1939_PROMISC`` - disable filters set by ``bind(2)`` and ``connect(2)``
263 .. code-block:: C
272 +--------------------+
274 +--------------------+
277 +--------------------+
279 +--------------------+
283 .---------' `---------.
285 +---------------------------+ |
288 +---------------------------+ |
290 |<---------------------'
292 +---------------------------+
294 +---------------------------+
297 +---------------------------+
299 +---------------------------+
302 ``SO_J1939_SEND_PRIO`` - change default send priority for the socket
310 * ``MSG_DONTWAIT``, i.e. non-blocking operation.
323 .. code-block:: C
329 switch (cmsg->cmsg_level) {
331 if (cmsg->cmsg_type == SCM_J1939_DEST_ADDR)
333 else if (cmsg->cmsg_type == SCM_J1939_DEST_NAME)
334 memcpy(&dst_name, CMSG_DATA(cmsg), cmsg->cmsg_len - CMSG_LEN(0));
335 else if (cmsg->cmsg_type == SCM_J1939_PRIO)
342 ------------------
356 .. code-block:: C
363 .pgn = J1939_NO_PGN, /* to disable bind() rx filter for PGN */
375 const struct j1939_filter filt[] = {
388 setsockopt(sock, SOL_CAN_J1939, SO_J1939_FILTER, &filt, sizeof(filt));
405 If no-one else contests the address claim within 250ms after transmission, the
406 kernel marks the NAME-SA assignment as valid. The valid assignment will be kept
407 among other valid NAME-SA assignments. From that point, any socket bound to the
410 If another ECU claims the address, the kernel will mark the NAME-SA expired.
417 ``can-utils`` also include the ``j1939acd`` tool, so it can be used as code example or as
421 -------------
430 .. code-block:: C
449 .. code-block:: C