r48163 - in /trunk/libio-socket-multicast6-perl: Build.PL Changes MANIFEST META.yml Makefile.PL README debian/changelog examples/unicast-recieve.pl examples/unicast-send.pl lib/IO/Socket/Multicast6.pm t/05interface.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Thu Dec 3 23:44:56 UTC 2009


Author: gregoa
Date: Thu Dec  3 23:44:50 2009
New Revision: 48163

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=48163
Log:
new upstream release, includes copyright statement

Added:
    trunk/libio-socket-multicast6-perl/examples/unicast-recieve.pl
      - copied unchanged from r48162, branches/upstream/libio-socket-multicast6-perl/current/examples/unicast-recieve.pl
    trunk/libio-socket-multicast6-perl/examples/unicast-send.pl
      - copied unchanged from r48162, branches/upstream/libio-socket-multicast6-perl/current/examples/unicast-send.pl
    trunk/libio-socket-multicast6-perl/t/05interface.t
      - copied unchanged from r48162, branches/upstream/libio-socket-multicast6-perl/current/t/05interface.t
Removed:
    trunk/libio-socket-multicast6-perl/Makefile.PL
Modified:
    trunk/libio-socket-multicast6-perl/Build.PL
    trunk/libio-socket-multicast6-perl/Changes
    trunk/libio-socket-multicast6-perl/MANIFEST
    trunk/libio-socket-multicast6-perl/META.yml
    trunk/libio-socket-multicast6-perl/README
    trunk/libio-socket-multicast6-perl/debian/changelog
    trunk/libio-socket-multicast6-perl/lib/IO/Socket/Multicast6.pm

Modified: trunk/libio-socket-multicast6-perl/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-socket-multicast6-perl/Build.PL?rev=48163&op=diff
==============================================================================
--- trunk/libio-socket-multicast6-perl/Build.PL (original)
+++ trunk/libio-socket-multicast6-perl/Build.PL Thu Dec  3 23:44:50 2009
@@ -30,9 +30,6 @@
 		'Socket::Multicast6'	=> '0.01',
 		'IO::Socket::INET6'		=> '2.51',
 	},
-	
-	create_makefile_pl => 'passthrough',
-	
 );
 
 $build->create_build_script;

Modified: trunk/libio-socket-multicast6-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-socket-multicast6-perl/Changes?rev=48163&op=diff
==============================================================================
--- trunk/libio-socket-multicast6-perl/Changes (original)
+++ trunk/libio-socket-multicast6-perl/Changes Thu Dec  3 23:44:50 2009
@@ -1,4 +1,9 @@
 Revision history for Perl extension IO::Socket::Multicast6
+
+0.03  Wed Nov 11 17:06:22 GMT 2009
+    - Minor changes to documentation
+    - Changed to import all symbols from Socket and Socket6
+    - Added missing files to the manifest
 
 0.02  Tue Sep 19 14:25:15 BST 2006
     - added support for mcast_send and mcast_dest
@@ -6,4 +11,4 @@
     - Resuse_Addr is now enabled by default
 
 0.01  Tue Aug 15 15:40:30 BST 2006
-	- original version based on IO::Socket::Multicast v1.04
+	   - original version based on IO::Socket::Multicast v1.04

Modified: trunk/libio-socket-multicast6-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-socket-multicast6-perl/MANIFEST?rev=48163&op=diff
==============================================================================
--- trunk/libio-socket-multicast6-perl/MANIFEST (original)
+++ trunk/libio-socket-multicast6-perl/MANIFEST Thu Dec  3 23:44:50 2009
@@ -2,12 +2,14 @@
 Changes
 examples/multicast-recieve.pl
 examples/multicast-send.pl
+examples/unicast-recieve.pl
+examples/unicast-send.pl
 lib/IO/Socket/Multicast6.pm
-Makefile.PL
 MANIFEST
 META.yml
 README
 t/00use.t
+t/05interface.t
 t/10loopback.t
 t/10ttl.t
 t/20add-drop.t

Modified: trunk/libio-socket-multicast6-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-socket-multicast6-perl/META.yml?rev=48163&op=diff
==============================================================================
--- trunk/libio-socket-multicast6-perl/META.yml (original)
+++ trunk/libio-socket-multicast6-perl/META.yml Thu Dec  3 23:44:50 2009
@@ -1,11 +1,13 @@
 ---
 name: IO-Socket-Multicast6
-version: 0.02
+version: 0.03
 author:
   - 'Based on L<IO::Socket::Multicast> by Lincoln Stein, lstein at cshl.org.'
   - 'IO::Socket::Multicast6 by Nicholas J Humfrey, E<lt>njh at cpan.orgE<gt>.'
 abstract: Send and receive IPv4 and IPv6 multicast messages
 license: perl
+resources:
+  license: http://dev.perl.org/licenses/
 requires:
   IO::Interface: 1.01
   IO::Socket::INET6: 2.51
@@ -19,5 +21,8 @@
 provides:
   IO::Socket::Multicast6:
     file: lib/IO/Socket/Multicast6.pm
-    version: 0.02
-generated_by: Module::Build version 0.26
+    version: 0.03
+generated_by: Module::Build version 0.280801
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.2.html
+  version: 1.2

Modified: trunk/libio-socket-multicast6-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-socket-multicast6-perl/README?rev=48163&op=diff
==============================================================================
--- trunk/libio-socket-multicast6-perl/README (original)
+++ trunk/libio-socket-multicast6-perl/README Thu Dec  3 23:44:50 2009
@@ -18,6 +18,7 @@
 
       # Drop a multicast group
       $s->mcast_drop('FF15::0561');
+
 
       # create a new IPv4 UDP socket ready to send datagrams to port 1100
       my $s = IO::Socket::Multicast6->new(
@@ -141,6 +142,10 @@
         distinguish which group a message was addressed to by identifying
         which socket it was received on.
 
+    $success = $socket->mcast_add_source($multicast_add, $source_addr
+    [,$interface])
+        Same as mcast_add() but for Source Specific Multicast (SSM).
+
     $success = $socket->mcast_drop($multicast_address)
         This reverses the action of mcast_add(), removing the indicated
         multicast address from the list of subscribed groups.
@@ -241,8 +246,8 @@
 
      use constant GROUP => 'FF15::0561';
      use constant PORT  => '2000';
- 
-     my $sock = IO::Socket::Multicast6->new(
+     
+ my $sock = IO::Socket::Multicast6->new(
                         Proto=>'udp',
                         Domain=>AF_INET6,
                         PeerAddr=>GROUP,
@@ -272,8 +277,8 @@
                         Domain=>AF_INET6,
                         LocalAddr=>GROUP,
                         LocalPort=>PORT);
-                    
-     $sock->mcast_add(GROUP) || die "Couldn't set group: $!\n";
+                        
+ $sock->mcast_add(GROUP) || die "Couldn't set group: $!\n";
 
      while (1) {
         my $data;
@@ -286,15 +291,21 @@
     crash on versions of Linux earlier than 2.2.0 because of a kernel bug in
     the implementation of the multicast socket options.
 
+SEE ALSO
+    <http://www.ietf.org/rfc/rfc2553.txt>
+
+    perl(1), IO::Socket(3), Socket::Multicast6(3), IO::Socket::INET6(3).
+
 AUTHOR
     Based on IO::Socket::Multicast by Lincoln Stein, lstein at cshl.org.
 
     IO::Socket::Multicast6 by Nicholas J Humfrey, <njh at cpan.org>.
 
-    This module is distributed under the same terms as Perl itself.
-
-SEE ALSO
-    <http://www.ietf.org/rfc/rfc2553.txt>
-
-    perl(1), IO::Socket(3), Socket::Multicast6(3), IO::Socket::INET6(3).
-
+COPYRIGHT AND LICENSE
+    Copyright (C) 2006-2009 Nicholas J Humfrey Copyright (C) 2000-2005
+    Lincoln Stein
+
+    This library is free software; you can redistribute it and/or modify it
+    under the same terms as Perl itself, either Perl version 5.6.1 or, at
+    your option, any later version of Perl 5 you may have available.
+

Modified: trunk/libio-socket-multicast6-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-socket-multicast6-perl/debian/changelog?rev=48163&op=diff
==============================================================================
--- trunk/libio-socket-multicast6-perl/debian/changelog (original)
+++ trunk/libio-socket-multicast6-perl/debian/changelog Thu Dec  3 23:44:50 2009
@@ -1,9 +1,5 @@
-libio-socket-multicast6-perl (0.02-1) UNRELEASED; urgency=low
-
-  TODO:
-  missing copyright information:
-  http://rt.cpan.org/Public/Bug/Display.html?id=51557
+libio-socket-multicast6-perl (0.03-1) UNRELEASED; urgency=low
 
   * Initial release (closes: #525009).
 
- -- gregor herrmann <gregoa at debian.org>  Sun, 15 Nov 2009 16:28:08 +0100
+ -- gregor herrmann <gregoa at debian.org>  Fri, 04 Dec 2009 00:41:07 +0100

Modified: trunk/libio-socket-multicast6-perl/lib/IO/Socket/Multicast6.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-socket-multicast6-perl/lib/IO/Socket/Multicast6.pm?rev=48163&op=diff
==============================================================================
--- trunk/libio-socket-multicast6-perl/lib/IO/Socket/Multicast6.pm (original)
+++ trunk/libio-socket-multicast6-perl/lib/IO/Socket/Multicast6.pm Thu Dec  3 23:44:50 2009
@@ -6,15 +6,14 @@
 use IO::Socket::INET6;
 use IO::Interface::Simple;
 use Socket::Multicast6 qw/ :all /;
-use Socket6 qw/ AF_INET6 IPPROTO_IP IPPROTO_IPV6 
-                inet_pton inet_ntop pack_sockaddr_in6/;
-use Socket qw/ AF_INET sockaddr_family pack_sockaddr_in /;
+use Socket;
+use Socket6;
 use Carp 'croak';
 
 
 
 @ISA = qw(IO::Socket::INET6);
-$VERSION = '0.02';
+$VERSION = '0.03';
 
 
 # Regular expressions to match IP addresses
@@ -58,6 +57,31 @@
 		or croak "Could not set IPV6_JOIN_GROUP socket option: $!";
 	} else {
 		croak("mcast_add failed, unsupported socket family." );
+	}
+	
+	# Success
+	return 1;
+}
+
+sub mcast_add_source {
+	my $sock = shift;
+	my $group = shift || croak 'usage: $sock->mcast_add_source($mcast_addr, $source_addr [,$interface])';
+	my $source = shift || croak 'usage: $sock->mcast_add_source($mcast_addr, $source_addr [,$interface])';
+	my $interface = shift;
+
+	if ($sock->sockdomain() == AF_INET) {
+		my $if_addr = _get_if_ipv4addr($interface);
+		my $ip_mreq = pack_ip_mreq_source(
+						inet_pton( AF_INET, $group ),
+						inet_pton( AF_INET, $source ),       
+						inet_pton( AF_INET, $if_addr ) );
+		
+		setsockopt($sock, IPPROTO_IP, IP_ADD_SOURCE_MEMBERSHIP, $ip_mreq )
+		or croak "Could not set IP_ADD_SOURCE_MEMBERSHIP socket option: $!";
+	} elsif ($sock->sockdomain() == AF_INET6) {
+		croak("mcast_add_source failed, IPv6 is currently unsupported." );
+	} else {
+		croak("mcast_add_source failed, unsupported socket family." );
 	}
 	
 	# Success
@@ -431,6 +455,12 @@
 which group a message was addressed to by identifying which socket it
 was received on.
 
+
+=item $success = $socket->mcast_add_source($multicast_add, $source_addr [,$interface])
+
+Same as mcast_add() but for Source Specific Multicast (SSM).
+
+
 =item $success = $socket->mcast_drop($multicast_address)
 
 This reverses the action of mcast_add(), removing the indicated
@@ -596,19 +626,25 @@
 in the implementation of the multicast socket options.
 
 
+=head1 SEE ALSO
+
+L<http://www.ietf.org/rfc/rfc2553.txt>
+
+perl(1), IO::Socket(3), Socket::Multicast6(3), IO::Socket::INET6(3).
+
 =head1 AUTHOR
 
 Based on L<IO::Socket::Multicast> by Lincoln Stein, lstein at cshl.org.
 
 IO::Socket::Multicast6 by Nicholas J Humfrey, E<lt>njh at cpan.orgE<gt>.
 
-This module is distributed under the same terms as Perl itself.
-
-
-=head1 SEE ALSO
-
-L<http://www.ietf.org/rfc/rfc2553.txt>
-
-perl(1), IO::Socket(3), Socket::Multicast6(3), IO::Socket::INET6(3).
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2006-2009 Nicholas J Humfrey
+Copyright (C) 2000-2005 Lincoln Stein
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself, either Perl version 5.6.1 or,
+at your option, any later version of Perl 5 you may have available.
 
 =cut




More information about the Pkg-perl-cvs-commits mailing list