From d6e5e32b79bebc8bda47f1c1c5b8e5695d82c7d4 Mon Sep 17 00:00:00 2001 From: Jeltz Date: Tue, 6 Sep 2022 19:35:03 +0200 Subject: [PATCH] Add ipv4 and ipv6 functions to Expr --- nftables.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nftables.ml b/nftables.ml index f9044a8..837ee3f 100644 --- a/nftables.ml +++ b/nftables.ml @@ -66,6 +66,9 @@ module Expr = struct | Range : 'a t * 'a t -> 'a t | Payload : 'a Payload.t -> 'a t + let ipv4 x = Ipv4 x + let ipv6 x = Ipv6 x + let rec to_json : type a. a t -> Yojson.Basic.t = function | String str -> `String str | Number num -> `Int num