Add typed high-level ruleset and set API
This commit is contained in:
22
src/LibNftables/NftTable.cs
Normal file
22
src/LibNftables/NftTable.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace LibNftables;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a typed nftables table definition.
|
||||
/// </summary>
|
||||
public sealed class NftTable
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the nftables family for the table.
|
||||
/// </summary>
|
||||
public NftFamily Family { get; set; } = NftFamily.Inet;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the table name.
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sets declared in this table.
|
||||
/// </summary>
|
||||
public IList<NftSet> Sets { get; } = new List<NftSet>();
|
||||
}
|
||||
Reference in New Issue
Block a user