From patchwork Mon Mar 14 05:20:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 2340 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director14.mail.ord1d.rsapps.net ([172.30.191.6]) by backend41.mail.ord1d.rsapps.net with LMTP id wEqDA5trL2ICUAAAqwncew (envelope-from ) for ; Mon, 14 Mar 2022 12:21:47 -0400 Received: from proxy4.mail.ord1d.rsapps.net ([172.30.191.6]) by director14.mail.ord1d.rsapps.net with LMTP id sGA5H5trL2L5UAAAeJ7fFg (envelope-from ) for ; Mon, 14 Mar 2022 12:21:47 -0400 Received: from smtp22.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy4.mail.ord1d.rsapps.net with LMTPS id zx/THptrL2I/eQAAiYrejw (envelope-from ) for ; Mon, 14 Mar 2022 12:21:47 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp22.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: d7cdddba-a3b2-11ec-abac-5254001a15c2-1-1 Received: from [216.105.38.7] ([216.105.38.7:54350] helo=lists.sourceforge.net) by smtp22.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id E5/9E-14080-A9B6F226; Mon, 14 Mar 2022 12:21:46 -0400 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nTnQq-0006eE-G8; Mon, 14 Mar 2022 16:20:27 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nTnQg-0006e3-Qs for openvpn-devel@lists.sourceforge.net; Mon, 14 Mar 2022 16:20:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uHn41mwtMk/q1QwSchDqLmTfO5jsJ6m6BPjxvmt2T1c=; b=XbH8j1rbOuzw0RRrQ5ZTnN9DfZ 4WFsQtIP83Nx8Nn7z/HOGvSuXZAi+xOt/0Qw6bf5VBBofnux+xHeadgREI8W0BrtNSm4lM41ot4uY xl3QFq1JriL/sC5rMu2XIa5Nt7COCX6WdwNL7ob8rpp9lQBOBW5gg8Pv4WBgejq9ASHU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=uHn41mwtMk/q1QwSchDqLmTfO5jsJ6m6BPjxvmt2T1c=; b=A x7Z1rbFclfhPkE8YSXN7wpKbcoVibGuC1VYG+ORwTSjA5l6Ov8NvNMjvy7U/vfigg3JhkYC1p3UUX 9Gf01IDNAPQ/ZgrW8SJJfr9D9V3KdunKweYhceVvAjZ5+8y2EkMGWLyDQ7OFPiT3umTO2sNwugh4n QsZJPILJsU2BoGNc=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.94.2) id 1nTnQd-00FY0F-Bk for openvpn-devel@lists.sourceforge.net; Mon, 14 Mar 2022 16:20:17 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Mon, 14 Mar 2022 17:20:48 +0100 Message-Id: <20220314162048.22955-1-a@unstable.cc> MIME-Version: 1.0 X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: sitnl.h must have slipped in when implementing the networking AI and the SITNL backend. However it is unused and should simply be removed. Signed-off-by: Antonio Quartulli --- src/openvpn/sitnl.h | 217 1 file changed, 217 deletions(-) delete mode 100644 src/openvpn/sitnl.h Content analysis details: (0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1nTnQd-00FY0F-Bk Subject: [Openvpn-devel] [PATCH] remove unused sitnl.h file X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Antonio Quartulli Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox sitnl.h must have slipped in when implementing the networking AI and the SITNL backend. However it is unused and should simply be removed. Signed-off-by: Antonio Quartulli Acked-by: Lev Stipakov --- src/openvpn/sitnl.h | 217 -------------------------------------------- 1 file changed, 217 deletions(-) delete mode 100644 src/openvpn/sitnl.h diff --git a/src/openvpn/sitnl.h b/src/openvpn/sitnl.h deleted file mode 100644 index 41a6a0b8..00000000 --- a/src/openvpn/sitnl.h +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Simplified Interface To NetLink - * - * Copyright (C) 2016-2022 Antonio Quartulli - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program (see the file COPYING included with this - * distribution); if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef SITNL_H_ -#define SITNL_H_ - -#ifdef TARGET_LINUX - -#include -#include - -/** - * Bring interface up or down. - * - * @param iface the interface to modify - * @param up true if the interface has to be brought up, false otherwise - * - * @return 0 on success, a negative error code otherwise - */ -int sitnl_iface_up(const char *iface, bool up); - -/** - * Set the MTU for an interface - * - * @param iface the interface to modify - * @param mtru the new MTU - * - * @return 0 on success, a negative error code otherwise - */ -int sitnl_iface_mtu_set(const char *iface, uint32_t mtu); - -/** - * Add an IPv4 address to an interface - * - * @param iface the interface where the address has to be added - * @param addr the address to add - * @param prefixlen the prefix length of the network associated with the address - * @param broadcast the broadcast address to configure on the interface - * - * @return 0 on success, a negative error code otherwise - */ -int sitnl_addr_v4_add(const char *iface, const in_addr_t *addr, int prefixlen, - const in_addr_t *broadcast); - -/** - * Add an IPv6 address to an interface - * - * @param iface the interface where the address has to be added - * @param addr the address to add - * @param prefixlen the prefix length of the network associated with the address - * - * @return 0 on success, a negative error code otherwise - */ - -int sitnl_addr_v6_add(const char *iface, const struct in6_addr *addr, - int prefixlen); - -/** - * Remove an IPv4 from an interface - * - * @param iface the interface to remove the address from - * @param prefixlen the prefix length of the network associated with the address - * - * @return 0 on success, a negative error code otherwise - */ -int sitnl_addr_v4_del(const char *iface, const in_addr_t *addr, int prefixlen); - -/** - * Remove an IPv6 from an interface - * - * @param iface the interface to remove the address from - * @param prefixlen the prefix length of the network associated with the address - * - * @return 0 on success, a negative error code otherwise - */ -int sitnl_addr_v6_del(const char *iface, const struct in6_addr *addr, - int prefixlen); - -/** - * Add a point-to-point IPv4 address to an interface - * - * @param iface the interface where the address has to be added - * @param local the address to add - * @param remote the associated p-t-p remote address - * - * @return 0 on success, a negative error code otherwise - */ -int sitnl_addr_ptp_v4_add(const char *iface, const in_addr_t *local, - const in_addr_t *remote); - -/** - * Remove a point-to-point IPv4 address from an interface - * - * @param iface the interface to remove the address from - * @param local the address to remove - * - * @return 0 on success, a negative error code otherwise - */ -int sitnl_addr_ptp_v4_del(const char *iface, const in_addr_t *local); - - -/** - * Add a route for an IPv4 address/network - * - * @param dst the destination of the route - * @param prefixlen the length of the prefix of the destination - * @param gw the gateway for this route - * @param iface the interface for this route (can be NULL) - * @param table the table to add this route to (if 0, will be added to the - * main table) - * @param metric the metric associated with the route - * - * @return 0 on success, a negative error code otherwise - */ -int sitnl_route_v4_add(const in_addr_t *dst, int prefixlen, - const in_addr_t *gw, const char *iface, uint32_t table, - int metric); - -/** - * Add a route for an IPv6 address/network - * - * @param dst the destination of the route - * @param prefixlen the length of the prefix of the destination - * @param gw the gateway for this route - * @param iface the interface for this route (can be NULL) - * @param table the table to add this route to (if 0, will be added to the - * main table) - * @param metric the metric associated with the route - * - * @return 0 on success, a negative error code otherwise - */ -int sitnl_route_v6_add(const struct in6_addr *dst, int prefixlen, - const struct in6_addr *gw, const char *iface, - uint32_t table, int metric); - -/** - * Delete a route for an IPv4 address/network - * - * @param dst the destination of the route - * @param prefixlen the length of the prefix of the destination - * @param gw the gateway for this route - * @param iface the interface for this route (can be NULL) - * @param table the table to add this route to (if 0, will be added to the - * main table) - * @param metric the metric associated with the route - * - * @return 0 on success, a negative error code otherwise - */ -int sitnl_route_v4_del(const in_addr_t *dst, int prefixlen, - const in_addr_t *gw, const char *iface, uint32_t table, - int metric); - -/** - * Delete a route for an IPv4 address/network - * - * @param dst the destination of the route - * @param prefixlen the length of the prefix of the destination - * @param gw the gateway for this route - * @param iface the interface for this route (can be NULL) - * @param table the table to add this route to (if 0, will be added to the - * main table) - * @param metric the metric associated with the route - * - * @return 0 on success, a negative error code otherwise - */ -int sitnl_route_v6_del(const struct in6_addr *dst, int prefixlen, - const struct in6_addr *gw, const char *iface, - uint32_t table, int metric); - -/** - * Retrieve the gateway and outgoing interface for the specified IPv4 - * address/network - * - * @param dst The destination to lookup - * @param prefixlen The length of the prefix of the destination - * @param best_gw Location where the retrieved GW has to be stored - * @param best_iface Location where the retrieved interface has to be stored - * - * @return 0 on success, a negative error code otherwise - */ -int sitnl_route_v4_best_gw(const in_addr_t *dst, int prefixlen, - in_addr_t *best_gw, char *best_iface); - -/** - * Retrieve the gateway and outgoing interface for the specified IPv6 - * address/network - * - * @param dst The destination to lookup - * @param prefixlen The length of the prefix of the destination - * @param best_gw Location where the retrieved GW has to be stored - * @param best_iface Location where the retrieved interface has to be stored - * - * @return 0 on success, a negative error code otherwise - */ -int sitnl_route_v6_best_gw(const struct in6_addr *dst, int prefixlen, - struct in6_addr *best_gw, char *best_iface); - -#endif /* TARGET_LINUX */ - -#endif /* SITNL_H_ */