From nobody Mon Mar 06 19:26:45 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PVpVF5DcZz3wGvG; Mon, 6 Mar 2023 19:26:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PVpVF4j6Qz4LSN; Mon, 6 Mar 2023 19:26:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678130805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fS28klaDEVL/PPuoLq36JqJ6qj98ektKV96hc+CusEk=; b=T4fNhVSAE9Rdgodu7GdvRi5+s8jyHgTlHz/7zyGvAFYeveD4F/1nvUq172rfuJtL/iNpVh rPa+P8sIZ1a0fd1lbyJ/gROSR4ntsIhk7/feSK3/uHrZsZqy11aP8qX1lb2AaIZP7fKdgX Ahqgas0zg2orZ9AuTGa4AGiJqc+nsc4KwQxh+5qhAFLsfREnrgoCfTeCjTMuBQ+f2xx32E 1qbJT9S8/30jRrVVfv7GlG9oe3skfqwXtXZnPoOgcOr25kL8kaRAp519O75r4mwz0u7Ffc I3k1WvkZ9SV1p8jjeXVx6Ty+2I7VOh+5TtTGAxaZ/iug6i4OHnOf48eqkhB1tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678130805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fS28klaDEVL/PPuoLq36JqJ6qj98ektKV96hc+CusEk=; b=bKC+pY660XVn0v1QIp8CuObVWHGucKW4zXBpYIa25VrcRcmQL0w+P/a4X0K6HGWr+H+mYW GHdlmy4Xrj7Yqw6o45qn1DZtz7soNI4uRK7b1EKbFMnTC1kgixVg84PiW1x15Vm9BlGP2U Gtzv2vMPqS4MKJNlVFssQ7+H4XCQtRjn2fj2c7Hbi0eIIKiYLZVaCrA53+UqoX8MqP7gc/ DhBM53MC5NNXTqmUDbQ5LzdipXpV7UjnJJgq39QQ/h1TH0ACqjbS9A9RnGNmPxElXu7Jv9 iJGLmOPbhlBNzACsgVQo45UFVv0NRFQZSKyP3y2LlipEH69pjLU7utL9/r8CuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678130805; a=rsa-sha256; cv=none; b=OytoKmm1Br52g08SCOS5faQbRz4R8kS6d8Dj7kt6oXeFo+bG6K2RAUcDY5XyTauutyig9d L2EX1gcw3AEcmN3zF6LL0kIQKn+xPpMsuOb4RkjWRfuZyLhpYW9LKW38oAsR2uo6JLhKZi esudHOL/Kmj56Bd7OB4obU2tXcC7Tq0RhdqX9DV32Yf2vN2F5Ahxq8/JsshVASVM7A2rA3 +GvDM+Yt/mbFrCwVHwQCwjPG7DjwqBdjn3xg4Z6b3xCPq/2H8++6tijzSoA/PKaOJr1vHq qG/ijlT2Scj0GWw4P6x8cU+MCLGmsqqgEdb8oE6fSfhLMBvRzx6fgz25qRiG0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PVpVF3lYtz1Cxt; Mon, 6 Mar 2023 19:26:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 326JQjU4004045; Mon, 6 Mar 2023 19:26:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 326JQjBi004044; Mon, 6 Mar 2023 19:26:45 GMT (envelope-from git) Date: Mon, 6 Mar 2023 19:26:45 GMT Message-Id: <202303061926.326JQjBi004044@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: ceb716ddd375 - main - net/libndp: + Neighbor discovery protocol library. List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ceb716ddd375d47c6519e24ba4dcf63e1d0022d1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=ceb716ddd375d47c6519e24ba4dcf63e1d0022d1 commit ceb716ddd375d47c6519e24ba4dcf63e1d0022d1 Author: Gleb Popov AuthorDate: 2023-03-06 19:12:47 +0000 Commit: Gleb Popov CommitDate: 2023-03-06 19:26:35 +0000 net/libndp: + Neighbor discovery protocol library. Sponsored by: Serenity Cybersecurity, LLC --- net/Makefile | 1 + net/libndp/Makefile | 21 +++++++++++++++++++++ net/libndp/distinfo | 3 +++ net/libndp/files/patch-libndp_libndp.c | 29 +++++++++++++++++++++++++++++ net/libndp/pkg-descr | 3 +++ net/libndp/pkg-plist | 8 ++++++++ 6 files changed, 65 insertions(+) diff --git a/net/Makefile b/net/Makefile index 14f22947d29c..f31d9f07b85d 100644 --- a/net/Makefile +++ b/net/Makefile @@ -388,6 +388,7 @@ SUBDIR += libmdf SUBDIR += libmediawiki SUBDIR += libnatpmp + SUBDIR += libndp SUBDIR += libnet SUBDIR += libnfs SUBDIR += libngtcp2 diff --git a/net/libndp/Makefile b/net/libndp/Makefile new file mode 100644 index 000000000000..b5a010672312 --- /dev/null +++ b/net/libndp/Makefile @@ -0,0 +1,21 @@ +PORTNAME= libndp +PORTVERSION= 1.8 +CATEGORIES= net + +MAINTAINER= arrowd@FreeBSD.org +COMMENT= Neighbor discovery library +WWW= https://github.com/jpirko/libndp + +LICENSE= LGPL21 +LICENSE_FILE= ${WRKSRC}/COPYING + +USES= autoreconf libtool + +GNU_CONFIGURE= yes +USE_LDCONFIG= yes + +USE_GITHUB= yes +GH_ACCOUNT= jpirko +GH_TAGNAME= v${PORTVERSION} + +.include diff --git a/net/libndp/distinfo b/net/libndp/distinfo new file mode 100644 index 000000000000..9497b9359526 --- /dev/null +++ b/net/libndp/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1678114865 +SHA256 (jpirko-libndp-1.8-v1.8_GH0.tar.gz) = c3ea76e253def89869651686a827da75b56896fe94fabd87d8c14b1d4588fd05 +SIZE (jpirko-libndp-1.8-v1.8_GH0.tar.gz) = 29145 diff --git a/net/libndp/files/patch-libndp_libndp.c b/net/libndp/files/patch-libndp_libndp.c new file mode 100644 index 000000000000..ff0855a4302b --- /dev/null +++ b/net/libndp/files/patch-libndp_libndp.c @@ -0,0 +1,29 @@ +--- libndp/libndp.c.orig 2021-05-20 09:39:25 UTC ++++ libndp/libndp.c +@@ -35,6 +35,17 @@ + #include + #include + ++#ifdef __FreeBSD__ ++#define s6_addr8 __u6_addr.__u6_addr8 ++#define s6_addr16 __u6_addr.__u6_addr16 ++#define s6_addr32 __u6_addr.__u6_addr32 ++#define SIOCGIFHWADDR SIOCGIFMAC ++#define ND_RA_FLAG_HOME_AGENT ND_RA_FLAG_HA ++#define ND_OPT_PI_FLAG_RADDR 0x20 ++#define ifr_hwaddr ifr_addr ++#define ETH_ALEN 6 ++#endif ++ + #include "ndp_private.h" + #include "list.h" + +@@ -209,7 +220,7 @@ resend: + memcpy(&sin6.sin6_addr, addr, sizeof(sin6.sin6_addr)); + sin6.sin6_scope_id = ifindex; + resend: +- ret = sendto(sockfd, buf, buflen, flags, &sin6, sizeof(sin6)); ++ ret = sendto(sockfd, buf, buflen, flags, (struct sockaddr*)&sin6, sizeof(sin6)); + if (ret == -1) { + switch(errno) { + case EINTR: diff --git a/net/libndp/pkg-descr b/net/libndp/pkg-descr new file mode 100644 index 000000000000..a10fed9ee2f3 --- /dev/null +++ b/net/libndp/pkg-descr @@ -0,0 +1,3 @@ +This package contains a library which provides a wrapper for IPv6 Neighbor +Discovery Protocol. It also provides a tool named ndptool for sending and +receiving NDP messages. diff --git a/net/libndp/pkg-plist b/net/libndp/pkg-plist new file mode 100644 index 000000000000..3de754a2be60 --- /dev/null +++ b/net/libndp/pkg-plist @@ -0,0 +1,8 @@ +bin/ndptool +include/ndp.h +lib/libndp.a +lib/libndp.so +lib/libndp.so.0 +lib/libndp.so.0.2.0 +libdata/pkgconfig/libndp.pc +man/man8/ndptool.8.gz