New port: net/p5-Net-RawSock
Net::RawSock provides a base function to send raw IP datagrams from Perl. The raw IP datagram is packed into a buffer and written on the network layer with the write_ip() function. PR: ports/47868 Submitted by: Nicolas Jombart <ecu@ipv42.net>
This commit is contained in:
parent
597dbc1bd0
commit
59debebffe
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=74742
9 changed files with 92 additions and 0 deletions
|
@ -401,6 +401,7 @@
|
|||
SUBDIR += p5-Net-Pcap
|
||||
SUBDIR += p5-Net-Radius
|
||||
SUBDIR += p5-Net-RawIP
|
||||
SUBDIR += p5-Net-RawSock
|
||||
SUBDIR += p5-Net-SCP
|
||||
SUBDIR += p5-Net-SMPP
|
||||
SUBDIR += p5-Net-SNMP
|
||||
|
|
29
net/p5-Net-RawSock/Makefile
Normal file
29
net/p5-Net-RawSock/Makefile
Normal file
|
@ -0,0 +1,29 @@
|
|||
# New ports collection makefile for: p5-Net-Divert
|
||||
# Date created: January 30, 2003
|
||||
# Whom: Nicolas Jombart
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= Net-RawSock
|
||||
PORTVERSION= 1.0
|
||||
CATEGORIES= net perl5
|
||||
MASTER_SITES= http://www.hsc.fr/ressources/outils/rawsock/download/
|
||||
PKGNAMEPREFIX= p5-
|
||||
|
||||
MAINTAINER= ecu@ipv42.net
|
||||
|
||||
PERL_CONFIGURE= yes
|
||||
|
||||
MANPREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
|
||||
MAN3= Net::RawSock.3
|
||||
DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
|
||||
|
||||
post-install:
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
.for f in README demo.pl
|
||||
@${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
1
net/p5-Net-RawSock/distinfo
Normal file
1
net/p5-Net-RawSock/distinfo
Normal file
|
@ -0,0 +1 @@
|
|||
MD5 (Net-RawSock-1.0.tar.gz) = 3da41c4705c56a5cd3d6a1587a3a72c1
|
17
net/p5-Net-RawSock/files/patch-Makefile.PL
Normal file
17
net/p5-Net-RawSock/files/patch-Makefile.PL
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- ../../../Net-RawSock-1.0/Makefile.PL Thu Feb 21 14:05:26 2002
|
||||
+++ Makefile.PL Mon Feb 3 14:18:38 2003
|
||||
@@ -1,4 +1,5 @@
|
||||
- use ExtUtils::MakeMaker;
|
||||
+use ExtUtils::MakeMaker;
|
||||
+
|
||||
WriteMakefile(
|
||||
NAME => 'Net::RawSock',
|
||||
DISTNAME => 'Net-RawSock',
|
||||
@@ -6,6 +7,7 @@
|
||||
LIBS => [''], # e.g., '-lm'
|
||||
DEFINE => '', # e.g., '-DHAVE_SOMETHING'
|
||||
INC => '', # e.g., '-I/usr/include/other'
|
||||
+ PM => {'RawSock.pm' => '$(INST_LIBDIR)/RawSock.pm'},
|
||||
dist => {
|
||||
'COMPRESS' => "gzip -9f",
|
||||
'SUFFIX' => "gz"
|
11
net/p5-Net-RawSock/files/patch-RawSock.pm
Normal file
11
net/p5-Net-RawSock/files/patch-RawSock.pm
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- RawSock.pm.orig Mon Feb 3 14:28:08 2003
|
||||
+++ RawSock.pm Mon Feb 3 14:28:30 2003
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
-Stephane Aubert E<lt>Stephane.Aubert@hsc-labs.frE<gt>
|
||||
+Stephane Aubert E<lt>Stephane.Aubert@hsc-labs.comE<gt>
|
||||
|
||||
=cut
|
||||
|
21
net/p5-Net-RawSock/files/patch-RawSock.xs
Normal file
21
net/p5-Net-RawSock/files/patch-RawSock.xs
Normal file
|
@ -0,0 +1,21 @@
|
|||
--- RawSock.xs.orig Thu Jan 30 00:11:00 2003
|
||||
+++ RawSock.xs Thu Jan 30 09:58:31 2003
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <netinet/in.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
||||
@@ -67,7 +68,9 @@
|
||||
RETVAL = 2;
|
||||
} else {
|
||||
len = ntohs(ip_hdr->tot_len);
|
||||
- if (sendto(fd,(char *)pkt,len,0x0,(struct sockaddr *)&sa,sizeof(sa))<0) {
|
||||
+ ip_hdr->tot_len = len;
|
||||
+ if (sendto(fd, (void *)pkt, len, 0x0,
|
||||
+ (struct sockaddr *)&sa, sizeof(sa)) < len) {
|
||||
RETVAL = 3;
|
||||
} else {
|
||||
RETVAL = 0;
|
1
net/p5-Net-RawSock/pkg-comment
Normal file
1
net/p5-Net-RawSock/pkg-comment
Normal file
|
@ -0,0 +1 @@
|
|||
Net::RawSock provides a base function to send raw IP packets from Perl
|
3
net/p5-Net-RawSock/pkg-descr
Normal file
3
net/p5-Net-RawSock/pkg-descr
Normal file
|
@ -0,0 +1,3 @@
|
|||
Net::RawSock provides a base function to send raw IP datagrams
|
||||
from Perl. The raw IP datagram is packed into a buffer and written
|
||||
on the network layer with the write_ip() function.
|
8
net/p5-Net-RawSock/pkg-plist
Normal file
8
net/p5-Net-RawSock/pkg-plist
Normal file
|
@ -0,0 +1,8 @@
|
|||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Net/RawSock.pm
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Net/RawSock/.packlist
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Net/RawSock/RawSock.so
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Net/RawSock/RawSock.bs
|
||||
@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Net/RawSock/ 2>/dev/null || true
|
||||
%%PORTDOCS%%share/doc/p5-Net-RawSock/README
|
||||
%%PORTDOCS%%share/doc/p5-Net-RawSock/demo.pl
|
||||
%%PORTDOCS%%@dirrm share/doc/p5-Net-RawSock
|
Loading…
Reference in a new issue