r21090 - in /trunk/libio-interface-perl: Changes Interface.pm Interface.xs META.yml Makefile.PL debian/changelog
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Sat Jun 14 20:33:24 UTC 2008
Author: gregoa
Date: Sat Jun 14 20:33:22 2008
New Revision: 21090
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=21090
Log:
New upstream release.
Modified:
trunk/libio-interface-perl/Changes
trunk/libio-interface-perl/Interface.pm
trunk/libio-interface-perl/Interface.xs
trunk/libio-interface-perl/META.yml
trunk/libio-interface-perl/Makefile.PL
trunk/libio-interface-perl/debian/changelog
Modified: trunk/libio-interface-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-interface-perl/Changes?rev=21090&op=diff
==============================================================================
--- trunk/libio-interface-perl/Changes (original)
+++ trunk/libio-interface-perl/Changes Sat Jun 14 20:33:22 2008
@@ -1,4 +1,7 @@
Revision history for Perl extension IO::Interface.
+1.05 Fri Jun 6 11:53:21 EDT 2008
+ Fix from Mitsuru Yoshida to compile on FreeBSD.
+
1.04 Wed Dec 26 13:38:53 EST 2007
Fix from John Lightsey to avoid dmesg warnings on BSD systems.
Modified: trunk/libio-interface-perl/Interface.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-interface-perl/Interface.pm?rev=21090&op=diff
==============================================================================
--- trunk/libio-interface-perl/Interface.pm (original)
+++ trunk/libio-interface-perl/Interface.pm Sat Jun 14 20:33:22 2008
@@ -28,7 +28,7 @@
@EXPORT = qw( );
@ISA = qw(Exporter DynaLoader);
-$VERSION = '1.04';
+$VERSION = '1.05';
sub AUTOLOAD {
# This AUTOLOAD is used to 'autoload' constants from the constant()
Modified: trunk/libio-interface-perl/Interface.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-interface-perl/Interface.xs?rev=21090&op=diff
==============================================================================
--- trunk/libio-interface-perl/Interface.xs (original)
+++ trunk/libio-interface-perl/Interface.xs Sat Jun 14 20:33:22 2008
@@ -13,6 +13,11 @@
/* location of getifaddrs() definition */
#ifdef USE_GETIFADDRS
#include <ifaddrs.h>
+
+#ifdef HAVE_SOCKADDR_DL_STRUCT
+#include <net/if_dl.h>
+#endif
+
#endif
#ifndef SIOCGIFCONF
@@ -560,12 +565,51 @@
STRLEN len;
IOCTL_CMD_T operation;
struct ifreq ifr;
+#if (defined(USE_GETIFADDRS) && defined(HAVE_SOCKADDR_DL_STRUCT))
+ struct ifaddrs* ifap = NULL;
+ struct sockaddr_dl* sdl;
+ sa_family_t family;
+ char *sdlname, *haddr, *s;
+ int hlen = 0;
+ int i;
+#endif
char *newaddr,hwaddr[128];
CODE:
{
-#if !(defined(HAS_IOCTL) && defined(SIOCGIFHWADDR))
+#if !((defined(HAS_IOCTL) && defined(SIOCGIFHWADDR)) || defined(USE_GETIFADDRS))
XSRETURN_UNDEF;
-#else
+#endif
+#if (defined(USE_GETIFADDRS) && defined(HAVE_SOCKADDR_DL_STRUCT))
+ getifaddrs(&ifap);
+
+ while(1) {
+ if (ifap == NULL) break;
+ if (strncmp(name, ifap -> ifa_name, IFNAMSIZ) == 0) {
+ family = ifap -> ifa_addr -> sa_family;
+ if (family == AF_LINK) {
+ sdl = (struct sockaddr_dl *) ifap->ifa_addr;
+ haddr = sdl->sdl_data + sdl->sdl_nlen;
+ hlen = sdl->sdl_alen;
+ break;
+ }
+ }
+ ifap = ifap -> ifa_next;
+ }
+ freeifaddrs(ifap);
+
+ s = hwaddr;
+ s[0] = '\0';
+ if (ifap != NULL) {
+ for (i = 0; i < hlen; i++) {
+ if (i < hlen - 1)
+ len = sprintf(s,"%02x:",(unsigned char)haddr[i]);
+ else
+ len = sprintf(s,"%02x",(unsigned char)haddr[i]);
+ s += len;
+ }
+ }
+ RETVAL = hwaddr;
+#elif (defined(HAS_IOCTL) && defined(SIOCGIFHWADDR))
bzero((void*)&ifr,sizeof(struct ifreq));
strncpy(ifr.ifr_name,name,IFNAMSIZ-1);
ifr.ifr_hwaddr.sa_family = AF_UNSPEC;
@@ -587,6 +631,7 @@
}
OUTPUT:
RETVAL
+
int
if_flags(sock, name, ...)
Modified: trunk/libio-interface-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-interface-perl/META.yml?rev=21090&op=diff
==============================================================================
--- trunk/libio-interface-perl/META.yml (original)
+++ trunk/libio-interface-perl/META.yml Sat Jun 14 20:33:22 2008
@@ -1,11 +1,12 @@
--- #YAML:1.0
name: IO-Interface
-version: 1.04
+version: 1.05
abstract: ~
license: ~
-generated_by: ExtUtils::MakeMaker version 6.32
+author: ~
+generated_by: ExtUtils::MakeMaker version 6.44
distribution_type: module
requires:
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.2.html
- version: 1.2
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+ version: 1.3
Modified: trunk/libio-interface-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-interface-perl/Makefile.PL?rev=21090&op=diff
==============================================================================
--- trunk/libio-interface-perl/Makefile.PL (original)
+++ trunk/libio-interface-perl/Makefile.PL Sat Jun 14 20:33:22 2008
@@ -39,6 +39,14 @@
$attrs{DEFINE} .= ' -DUSE_GETIFADDRS';
print " Okay, I will use it.\n";
}
+ print "Checking for sockaddr_dl...";
+ if (!-r "/usr/include/net/if_dl.h") {
+ print " Nope, will not use it.\n";
+ } else {
+ $attrs{DEFINE} .= ' -DHAVE_SOCKADDR_DL_STRUCT';
+ print " Okay, I will use it.\n";
+ }
+
\%attrs;
},
);
Modified: trunk/libio-interface-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-interface-perl/debian/changelog?rev=21090&op=diff
==============================================================================
--- trunk/libio-interface-perl/debian/changelog (original)
+++ trunk/libio-interface-perl/debian/changelog Sat Jun 14 20:33:22 2008
@@ -1,3 +1,9 @@
+libio-interface-perl (1.05-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org> Sat, 14 Jun 2008 22:32:21 +0200
+
libio-interface-perl (1.04-2) unstable; urgency=low
[ gregor herrmann ]
More information about the Pkg-perl-cvs-commits
mailing list