r34182 - in /trunk/libnet-arp-perl: ARP.pm ARP.xs Changes arp.h debian/changelog debian/patches/10alignment-and-headers.patch debian/patches/documentation.diff debian/patches/get_mac.diff debian/patches/series get_mac_linux.c send_packet_linux.c
thialme-guest at users.alioth.debian.org
thialme-guest at users.alioth.debian.org
Sun Apr 26 20:21:20 UTC 2009
Author: thialme-guest
Date: Sun Apr 26 20:21:15 2009
New Revision: 34182
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=34182
Log:
Integrated new upstream release.
+ Removed the following patches
- get_mac_func.diff
- documentation.diff
- 10alignment-and-headers.patch
Removed:
trunk/libnet-arp-perl/debian/patches/10alignment-and-headers.patch
trunk/libnet-arp-perl/debian/patches/documentation.diff
trunk/libnet-arp-perl/debian/patches/get_mac.diff
Modified:
trunk/libnet-arp-perl/ARP.pm
trunk/libnet-arp-perl/ARP.xs
trunk/libnet-arp-perl/Changes
trunk/libnet-arp-perl/arp.h
trunk/libnet-arp-perl/debian/changelog
trunk/libnet-arp-perl/debian/patches/series
trunk/libnet-arp-perl/get_mac_linux.c
trunk/libnet-arp-perl/send_packet_linux.c
Modified: trunk/libnet-arp-perl/ARP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-arp-perl/ARP.pm?rev=34182&op=diff
==============================================================================
--- trunk/libnet-arp-perl/ARP.pm (original)
+++ trunk/libnet-arp-perl/ARP.pm Sun Apr 26 20:21:15 2009
@@ -87,6 +87,8 @@
This module can be used to create and send ARP packets and to
get the mac address of an ethernet interface or ip address.
+=over
+
=item B<send_packet()>
Net::ARP::send_packet('lo', # Device
@@ -117,6 +119,8 @@
and stores it in the variable $mac. The return value is
"unknown" if the mac cannot be looked up.
+=back
+
=head1 SEE ALSO
man -a arp
Modified: trunk/libnet-arp-perl/ARP.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-arp-perl/ARP.xs?rev=34182&op=diff
==============================================================================
--- trunk/libnet-arp-perl/ARP.xs (original)
+++ trunk/libnet-arp-perl/ARP.xs Sun Apr 26 20:21:15 2009
@@ -27,6 +27,7 @@
#include <string.h>
#include <errno.h>
#include <net/ethernet.h>
+#include <netinet/ether.h>
#include <net/if.h>
#include <arpa/inet.h>
#include "arp.h"
@@ -44,11 +45,12 @@
CODE:
int uid;
- unsigned int packetsize = sizeof(struct arphdr) + sizeof(struct ether_header);
+ unsigned int packetsize = sizeof(struct my_arphdr) + sizeof(struct ether_header);
unsigned char packet[packetsize];
struct ether_header *ethhdr = (struct ether_header *)packet;
- struct arphdr *arp = (struct arphdr *)(packet + sizeof(struct ether_header));
+ struct my_arphdr *arp = (struct my_arphdr *)(packet + sizeof(struct ether_header));
u_short op;
+ in_addr_t ipaddr;
RETVAL = 1;
@@ -158,12 +160,15 @@
arp->pa_len = IP_ALEN; // Protocol address length
arp->opcode = htons(op); // ARP operation
memcpy(arp->source_add,(u_char *)ether_aton(smac),ETH_ALEN); // Source MAC
- *(u_long *)arp->source_ip = inet_addr(sip); // Source IP
+ ipaddr = inet_addr(sip);
+ memcpy(arp->source_ip, (u_char *)&ipaddr, IP_ALEN); // Source IP
if(strcmp(dmac,"ff:ff:ff:ff:ff:ff"))
- memcpy(arp->dest_add,(u_char *)ether_aton(dmac),ETH_ALEN); // Destination MAC
-
- *(u_long *)arp->dest_ip = inet_addr(dip); // Destination IP
+ memcpy(arp->dest_add,(u_char *)ether_aton(dmac),ETH_ALEN); // Destination MAC
+
+ ipaddr = inet_addr(dip);
+ memcpy(arp->dest_ip, (u_char *)&ipaddr, IP_ALEN); // Destination IP
+
// Run packet!! Run!
@@ -185,8 +190,8 @@
char *
get_mac(dev)
+ unsigned char *dev;
CODE:
- char dev[16];
char tmp[20] = "unknown";
if(SOCK_TYPE == SOCK_RAW)
Modified: trunk/libnet-arp-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-arp-perl/Changes?rev=34182&op=diff
==============================================================================
--- trunk/libnet-arp-perl/Changes (original)
+++ trunk/libnet-arp-perl/Changes Sun Apr 26 20:21:15 2009
@@ -1,3 +1,8 @@
+Changes between 1.0.3 and 1.0.4
+
+fix FTBFS due to unaligned assignment problems by Niko Tyni <ntyni at debian.org>
+get_mac unknown device fix by Franck Joncourt <franck.mail at dthconnex.com>
+
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Changes between 1.0.2 and 1.0.3
Modified: trunk/libnet-arp-perl/arp.h
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-arp-perl/arp.h?rev=34182&op=diff
==============================================================================
--- trunk/libnet-arp-perl/arp.h (original)
+++ trunk/libnet-arp-perl/arp.h Sun Apr 26 20:21:15 2009
@@ -43,7 +43,7 @@
#define IP_ALEN 4
// ARP Header Struktur
-struct arphdr {
+struct my_arphdr {
u_short hw_type; // hardware type
u_short proto_type; // protocol type
u_char ha_len; // hardware address len
Modified: trunk/libnet-arp-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-arp-perl/debian/changelog?rev=34182&op=diff
==============================================================================
--- trunk/libnet-arp-perl/debian/changelog (original)
+++ trunk/libnet-arp-perl/debian/changelog Sun Apr 26 20:21:15 2009
@@ -1,8 +1,13 @@
-libnet-arp-perl (1.0.3-3) UNRELEASED; urgency=low
+libnet-arp-perl (1.0.4-1) UNRELEASED; urgency=low
+ * New upstream release.
+ + Removed the following patches (integrated upstream)
+ - get_mac_func.diff
+ - documentation.diff
+ - 10alignment-and-headers.patch
* Added header (author, bug number, description) to all patches.
- -- Franck Joncourt <franck.mail at dthconnex.com> Tue, 21 Apr 2009 00:19:25 +0200
+ -- Franck Joncourt <franck.mail at dthconnex.com> Sun, 26 Apr 2009 22:07:55 +0200
libnet-arp-perl (1.0.3-2) unstable; urgency=low
Modified: trunk/libnet-arp-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-arp-perl/debian/patches/series?rev=34182&op=diff
==============================================================================
--- trunk/libnet-arp-perl/debian/patches/series (original)
+++ trunk/libnet-arp-perl/debian/patches/series Sun Apr 26 20:21:15 2009
@@ -1,6 +1,3 @@
-documentation.diff
-get_mac.diff
return-value.patch
-10alignment-and-headers.patch
prototypes.patch
20skip_send_packet_test.patch
Modified: trunk/libnet-arp-perl/get_mac_linux.c
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-arp-perl/get_mac_linux.c?rev=34182&op=diff
==============================================================================
--- trunk/libnet-arp-perl/get_mac_linux.c (original)
+++ trunk/libnet-arp-perl/get_mac_linux.c Sun Apr 26 20:21:15 2009
@@ -23,6 +23,9 @@
#include <stdlib.h>
#include <sys/ioctl.h>
#include <net/ethernet.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
#include <net/if.h>
int get_mac_linux(u_char *dev, char *mac)
Modified: trunk/libnet-arp-perl/send_packet_linux.c
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-arp-perl/send_packet_linux.c?rev=34182&op=diff
==============================================================================
--- trunk/libnet-arp-perl/send_packet_linux.c (original)
+++ trunk/libnet-arp-perl/send_packet_linux.c Sun Apr 26 20:21:15 2009
@@ -22,6 +22,11 @@
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <arpa/inet.h>
+#include <unistd.h>
#include "arp.h"
int send_packet_linux(u_char *dev, u_char *packet, u_int packetsize)
More information about the Pkg-perl-cvs-commits
mailing list