]> rtime.felk.cvut.cz Git - can-utils.git/blobdiff - include/socketcan/can/gw.h
cangw: add an option for the per rule limitation of frame hops
[can-utils.git] / include / socketcan / can / gw.h
index 9c290dc29c3095d6a0b6f64364e03c8939bfd3d6..56d3246d73489fed10b66db8fe196a20a19b94f2 100644 (file)
@@ -45,6 +45,7 @@ enum {
        CGW_DST_IF,     /* ifindex of destination network interface */
        CGW_FILTER,     /* specify struct can_filter on source CAN device */
        CGW_DELETED,    /* number of deleted CAN frames (see max_hops param) */
+       CGW_LIM_HOPS,   /* limit the number of hops of this specific rule */
        __CGW_MAX
 };
 
@@ -116,13 +117,19 @@ enum {
  * Sets a CAN receive filter for the gateway job specified by the
  * struct can_filter described in include/linux/can.h
  *
- * CGW_MOD_XXX (length 17 bytes):
+ * CGW_MOD_(AND|OR|XOR|SET) (length 17 bytes):
  * Specifies a modification that's done to a received CAN frame before it is
  * send out to the destination interface.
  *
  * <struct can_frame> data used as operator
  * <u8> affected CAN frame elements
  *
+ * CGW_LIM_HOPS (length 1 byte):
+ * Limit the number of hops of this specific rule. Usually the received CAN
+ * frame can be processed as much as 'max_hops' times (which is given at module
+ * load time of the can-gw module). This value is used to reduce the number of
+ * possible hops for this gateway job to a value smaller then max_hops.
+ *
  * CGW_CS_XOR (length 4 bytes):
  * Set a simple XOR checksum starting with an initial value into
  * data[result-idx] using data[start-idx] .. data[end-idx]