open Nftables let nftables = [ Flush FlushRuleset; Add (AddRule { family = Inet; table = "filter"; chain = "forward"; expr = [ Log { prefix = Some "test"; group = None }; Match { left = Payload (Udp UdpSport); right = Set [Number 53]; op = NotEq }; Verdict Accept ] }) ] let json = json_of_nftables nftables let () = print_string (Yojson.Basic.to_string json); print_newline ()