History

netfilter: nft_numgen: add number generation offset

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, ...

Laura Garcia Liebana committed 10 years ago

Commit 2b03bf71 parent 14e2dee2 files · +28 −6Browse files

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

Unified · Split

include/uapi/linux/netfilter/nf_tables.h+2−0
@@ -1136,12 +1136,14 @@ enum nft_trace_types { · 1135 unmodified lines
1136 * @NFTA_NG_DREG: destination register (NLA_U32)1136 * @NFTA_NG_DREG: destination register (NLA_U32)
1137 * @NFTA_NG_MODULUS: maximum counter value (NLA_U32)1137 * @NFTA_NG_MODULUS: maximum counter value (NLA_U32)
1138 * @NFTA_NG_TYPE: operation type (NLA_U32)1138 * @NFTA_NG_TYPE: operation type (NLA_U32)
1139 * @NFTA_NG_OFFSET: offset to be added to the counter (NLA_U32)
1139 */1140 */
1140enum nft_ng_attributes {1141enum nft_ng_attributes {
1141 NFTA_NG_UNSPEC,1142 NFTA_NG_UNSPEC,
1142 NFTA_NG_DREG,1143 NFTA_NG_DREG,
1143 NFTA_NG_MODULUS,1144 NFTA_NG_MODULUS,
1144 NFTA_NG_TYPE,1145 NFTA_NG_TYPE,
1146 NFTA_NG_OFFSET,
1145 __NFTA_NG_MAX1147 __NFTA_NG_MAX
1146};1148};
1147#define NFTA_NG_MAX (__NFTA_NG_MAX - 1)1149#define NFTA_NG_MAX (__NFTA_NG_MAX - 1)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t