History

can: cangw: introduce optional uid to reference created routing jobs

Similar to referencing iptables rules by their line number this UID allows to reference created routing jobs, e.g. to alter configured data modifications. The UID is an optional non-zero value which can be provided at routing job creation time. When the UID is set the UID replaces the data modification configuration as job identification attribute e.g. at job removal time.

Oliver Hartkopp committed 11 years ago

Commit dd895d71 parent 3d5db5e2 files · +61 −12Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/can/gw.h+5−0
@@ -78,6 +78,7 @@ enum { · 77 unmodified lines
78 CGW_FILTER, /* specify struct can_filter on source CAN device */78 CGW_FILTER, /* specify struct can_filter on source CAN device */
79 CGW_DELETED, /* number of deleted CAN frames (see max_hops param) */79 CGW_DELETED, /* number of deleted CAN frames (see max_hops param) */
80 CGW_LIM_HOPS, /* limit the number of hops of this specific rule */80 CGW_LIM_HOPS, /* limit the number of hops of this specific rule */
81 CGW_MOD_UID, /* user defined identifier for modification updates */
81 __CGW_MAX82 __CGW_MAX
82};83};
83 84
@@ -162,6 +163,10 @@ enum { · 78 unmodified lines
162 * load time of the can-gw module). This value is used to reduce the number of163 * load time of the can-gw module). This value is used to reduce the number of
163 * possible hops for this gateway rule to a value smaller then max_hops.164 * possible hops for this gateway rule to a value smaller then max_hops.
164 *165 *
166 * CGW_MOD_UID (length 4 bytes):
167 * Optional non-zero user defined routing job identifier to alter existing
168 * modification settings at runtime.
169 *
165 * CGW_CS_XOR (length 4 bytes):170 * CGW_CS_XOR (length 4 bytes):
166 * Set a simple XOR checksum starting with an initial value into171 * Set a simple XOR checksum starting with an initial value into
167 * data[result-idx] using data[start-idx] .. data[end-idx]172 * data[result-idx] using data[start-idx] .. data[end-idx]