class NetmaskGroup

Represents a group of netmasks that can be used to match ComboAddresses against.

newNMG() → NetmaskGroup

Returns a NetmaskGroup

classmethod NetmaskGroup:addMask(mask)
classmethod NetmaskGroup:addMask(masks)

Add one or more masks to the NMG.

  • mask (string) – Add this mask, prefix with ! to exclude this mask from matching.
  • masks (table) – Adds the keys of the table to the NetmaskGroup. It should be a table whose keys are ComboAddress objects and values are integers, as returned by exceed* functions.
classmethod NetmaskGroup:match(address) → bool

Checks if address is matched by this NetmaskGroup.

Parameters:address (ComboAddress) – The address to match.
classmethod NetmaskGroup:clear()

Clears the NetmaskGroup.

classmethod NetmaskGroup:size() → int

Returns number of netmasks in this NetmaskGroup.