From cc63125ef5a5fc12e5dc68b10a6ab46f5707b6e9 Mon Sep 17 00:00:00 2001 From: Josef Karthauser Date: Sat, 28 Apr 2001 15:16:33 +0000 Subject: [PATCH] IO::Interface adds object-methods to IO::Socket objects to allow them to get and set operational characteristics of network interface cards, such as IP addresses, net masks, and so forth. It is useful for identifying runtime characteristics of cards, such as broadcast addresses, and finding interfaces that satisfy certain criteria, such as the ability to multicast. PR: ports/26876 --- net/Makefile | 1 + net/p5-IO-Interface/Makefile | 22 ++++++++++++++++++ net/p5-IO-Interface/distinfo | 1 + net/p5-IO-Interface/files/patch-OSIOCGIFCONF | 24 ++++++++++++++++++++ net/p5-IO-Interface/pkg-comment | 1 + net/p5-IO-Interface/pkg-descr | 9 ++++++++ net/p5-IO-Interface/pkg-plist | 8 +++++++ 7 files changed, 66 insertions(+) create mode 100644 net/p5-IO-Interface/Makefile create mode 100644 net/p5-IO-Interface/distinfo create mode 100644 net/p5-IO-Interface/files/patch-OSIOCGIFCONF create mode 100644 net/p5-IO-Interface/pkg-comment create mode 100644 net/p5-IO-Interface/pkg-descr create mode 100644 net/p5-IO-Interface/pkg-plist diff --git a/net/Makefile b/net/Makefile index 2ee6cab318c7..919be0fff85e 100644 --- a/net/Makefile +++ b/net/Makefile @@ -226,6 +226,7 @@ SUBDIR += p5-Archie SUBDIR += p5-Cflow SUBDIR += p5-Frontier-RPC + SUBDIR += p5-IO-Interface SUBDIR += p5-Mon SUBDIR += p5-Net SUBDIR += p5-Net-DNS diff --git a/net/p5-IO-Interface/Makefile b/net/p5-IO-Interface/Makefile new file mode 100644 index 000000000000..3c11093de961 --- /dev/null +++ b/net/p5-IO-Interface/Makefile @@ -0,0 +1,22 @@ +# New ports collection makefile for: net/p5-IO-Interface +# Date created: 26 April 2001 +# Whom: Anton Berezin +# +# $FreeBSD$ +# + +PORTNAME= IO-Interface +PORTVERSION= 0.94 +CATEGORIES= net perl5 +MASTER_SITES= ${MASTER_SITE_PERL_CPAN} +MASTER_SITE_SUBDIR= IO +PKGNAMEPREFIX= p5- + +MAINTAINER= tobez@tobez.org + +PERL_CONFIGURE= yes + +MAN3= IO::Interface.3 +MANPREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION} + +.include diff --git a/net/p5-IO-Interface/distinfo b/net/p5-IO-Interface/distinfo new file mode 100644 index 000000000000..36001a4dc38e --- /dev/null +++ b/net/p5-IO-Interface/distinfo @@ -0,0 +1 @@ +MD5 (IO-Interface-0.94.tar.gz) = 3488c7120239b1f257728793f092d903 diff --git a/net/p5-IO-Interface/files/patch-OSIOCGIFCONF b/net/p5-IO-Interface/files/patch-OSIOCGIFCONF new file mode 100644 index 000000000000..9c168ee1d8e7 --- /dev/null +++ b/net/p5-IO-Interface/files/patch-OSIOCGIFCONF @@ -0,0 +1,24 @@ +--- Interface.xs.orig Wed Apr 25 15:45:43 2001 ++++ Interface.xs Wed Apr 25 15:47:13 2001 +@@ -13,6 +13,12 @@ + #include + #endif + ++#ifdef OSIOCGIFCONF ++#define MY_SIOCGIFCONF OSIOCGIFCONF ++#else ++#define MY_SIOCGIFCONF SIOCGIFCONF ++#endif ++ + #ifdef PerlIO + typedef PerlIO * InputStream; + #else +@@ -581,7 +587,7 @@ + croak("Couldn't malloc buffer for ioctl: %s",strerror(errno)); + ifc.ifc_len = len; + ifc.ifc_buf = buf; +- if (ioctl(PerlIO_fileno(sock),SIOCGIFCONF,&ifc) < 0) { ++ if (ioctl(PerlIO_fileno(sock),MY_SIOCGIFCONF,&ifc) < 0) { + if (errno != EINVAL || lastlen != 0) + XSRETURN_EMPTY; + } else { diff --git a/net/p5-IO-Interface/pkg-comment b/net/p5-IO-Interface/pkg-comment new file mode 100644 index 000000000000..f66ee23f69b2 --- /dev/null +++ b/net/p5-IO-Interface/pkg-comment @@ -0,0 +1 @@ +Perl extension for access to network card configuration information diff --git a/net/p5-IO-Interface/pkg-descr b/net/p5-IO-Interface/pkg-descr new file mode 100644 index 000000000000..708b25eb9615 --- /dev/null +++ b/net/p5-IO-Interface/pkg-descr @@ -0,0 +1,9 @@ +IO::Interface adds object-methods to IO::Socket objects to allow +them to get and set operational characteristics of network interface +cards, such as IP addresses, net masks, and so forth. It is useful +for identifying runtime characteristics of cards, such as broadcast +addresses, and finding interfaces that satisfy certain criteria, +such as the ability to multicast. + +-Anton + diff --git a/net/p5-IO-Interface/pkg-plist b/net/p5-IO-Interface/pkg-plist new file mode 100644 index 000000000000..57a092cf7714 --- /dev/null +++ b/net/p5-IO-Interface/pkg-plist @@ -0,0 +1,8 @@ +lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/IO/Interface.pm +lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/IO/Interface/.packlist +lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/IO/Interface/Interface.bs +lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/IO/Interface/Interface.so +lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/IO/Interface/autosplit.ix +@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/IO/Interface +@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/IO 2>/dev/null || true +@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/IO 2>/dev/null || true