Endpoint configuration · GraphQL type

NumgenExpression type

NumgenExpression represents an nftables expression for generating numbers. This can be used for various purposes like creating unique identifiers, distributing load, or randomizing values.

Fields

Field Name Description
register - NftRegister! The register where the generated number will be stored.
modulus - Uint32! The modulus to apply to the generated number (e.g., result = (number + offset) % modulus).
type - NumgenType! The type of number generation to perform (random or incremental).
offset - Uint32! An offset value added to the generated number before applying the modulus.

Used by

  • ChainExpression union: A union of all possible nftables chain expression types.

Example

Example

{
  "register": "VERDICT",
  "modulus": "1073741824",
  "type": "RANDOM",
  "offset": "1073741824"
}