Add support of an offset value for incremental counter and random. With this option the sysadmin is able to start the counter to a certain value and then apply the generated number. Example: meta mark set numgen inc mod 2 offset 100 This will generate marks with the serie 100, 101, 100, 101, ...
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -1136,12 +1136,14 @@ enum nft_trace_types { · 1135 unmodified lines | ||
| 1136 | 1136 | * @NFTA_NG_DREG: destination register (NLA_U32) |
| 1137 | 1137 | * @NFTA_NG_MODULUS: maximum counter value (NLA_U32) |
| 1138 | 1138 | * @NFTA_NG_TYPE: operation type (NLA_U32) |
| 1139 | + * @NFTA_NG_OFFSET: offset to be added to the counter (NLA_U32) | |
| 1139 | 1140 | */ |
| 1140 | 1141 | enum nft_ng_attributes { |
| 1141 | 1142 | NFTA_NG_UNSPEC, |
| 1142 | 1143 | NFTA_NG_DREG, |
| 1143 | 1144 | NFTA_NG_MODULUS, |
| 1144 | 1145 | NFTA_NG_TYPE, |
| 1146 | + NFTA_NG_OFFSET, | |
| 1145 | 1147 | __NFTA_NG_MAX |
| 1146 | 1148 | }; |
| 1147 | 1149 | #define NFTA_NG_MAX (__NFTA_NG_MAX - 1) |