From patchwork Thu Oct 11 15:48:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Sutter X-Patchwork-Id: 982577 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=nwl.cc Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42WFlh2cLVzB4Pc for ; Fri, 12 Oct 2018 02:49:52 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730880AbeJKXRh (ORCPT ); Thu, 11 Oct 2018 19:17:37 -0400 Received: from orbyte.nwl.cc ([151.80.46.58]:40734 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727375AbeJKXRh (ORCPT ); Thu, 11 Oct 2018 19:17:37 -0400 Received: from localhost ([::1]:48268 helo=tatos) by orbyte.nwl.cc with esmtp (Exim 4.91) (envelope-from ) id 1gAdDh-0007hI-LE; Thu, 11 Oct 2018 17:49:49 +0200 From: Phil Sutter To: Pablo Neira Ayuso Cc: netfilter-devel@vger.kernel.org Subject: [nft PATCH 4/8] monitor: Drop fake XML support Date: Thu, 11 Oct 2018 17:48:57 +0200 Message-Id: <20181011154901.20082-5-phil@nwl.cc> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181011154901.20082-1-phil@nwl.cc> References: <20181011154901.20082-1-phil@nwl.cc> MIME-Version: 1.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Since libnftnl doesn't support XML formatting, pretending to do so in nft monitor is pointless. Signed-off-by: Phil Sutter --- src/monitor.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/monitor.c b/src/monitor.c index 4310c3b8dc434..d75410888e3d0 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -203,7 +203,6 @@ static int netlink_events_table_cb(const struct nlmsghdr *nlh, int type, nftnl_table_get_u64(nlt, NFTNL_TABLE_HANDLE)); nft_mon_print(monh, "\n"); break; - case NFTNL_OUTPUT_XML: case NFTNL_OUTPUT_JSON: nftnl_table_fprintf(monh->ctx->octx->output_fp, nlt, monh->format, netlink_msg2nftnl_of(type)); @@ -245,7 +244,6 @@ static int netlink_events_chain_cb(const struct nlmsghdr *nlh, int type, break; } break; - case NFTNL_OUTPUT_XML: case NFTNL_OUTPUT_JSON: nftnl_chain_fprintf(monh->ctx->octx->output_fp, nlc, monh->format, netlink_msg2nftnl_of(type)); @@ -292,7 +290,6 @@ static int netlink_events_set_cb(const struct nlmsghdr *nlh, int type, break; } break; - case NFTNL_OUTPUT_XML: case NFTNL_OUTPUT_JSON: nftnl_set_fprintf(monh->ctx->octx->output_fp, nls, monh->format, netlink_msg2nftnl_of(type)); @@ -441,7 +438,6 @@ static int netlink_events_setelem_cb(const struct nlmsghdr *nlh, int type, set_free(dummyset); break; - case NFTNL_OUTPUT_XML: case NFTNL_OUTPUT_JSON: nftnl_set_fprintf(monh->ctx->octx->output_fp, nls, monh->format, netlink_msg2nftnl_of(type)); @@ -486,7 +482,6 @@ static int netlink_events_obj_cb(const struct nlmsghdr *nlh, int type, break; } break; - case NFTNL_OUTPUT_XML: case NFTNL_OUTPUT_JSON: nftnl_obj_fprintf(monh->ctx->octx->output_fp, nlo, monh->format, netlink_msg2nftnl_of(type)); @@ -542,7 +537,6 @@ static int netlink_events_rule_cb(const struct nlmsghdr *nlh, int type, break; } break; - case NFTNL_OUTPUT_XML: case NFTNL_OUTPUT_JSON: nftnl_rule_fprintf(monh->ctx->octx->output_fp, nlr, monh->format, netlink_msg2nftnl_of(type));