[PATCH] add support for more TCP_ constants to Socket

[email protected] (Salvador Fandino)
Newsgroups perl.perl5.porters
Message-ID <[email protected]>
The attached patch adds all the missing TCP_ constants defined in Linux 
<netinet/tcp.h> to the Socket module.

Cheers,

  - Salva
socket.patch (text/x-patch, 1.2 KB)
diff --git a/ext/Socket/Makefile.PL b/ext/Socket/Makefile.PL
index d95d916..672e226 100644
--- a/ext/Socket/Makefile.PL
+++ b/ext/Socket/Makefile.PL
@@ -43,6 +43,9 @@ my @names = (qw(AF_802 AF_AAL AF_APPLETALK AF_CCITT AF_CHAOS AF_CTF
 		SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO
 		SO_STATE SO_TYPE SO_USELOOPBACK SO_XOPEN SO_XSE
 		TCP_KEEPALIVE TCP_MAXRT TCP_MAXSEG TCP_NODELAY TCP_STDURG
+		TCP_CORK TCP_KEEPIDLE TCP_KEEPINTVL TCP_KEEPCNT
+		TCP_SYNCNT TCP_LINGER2 TCP_DEFER_ACCEPT TCP_WINDOW_CLAMP
+		TCP_INFO TCP_QUICKACK TCP_CONGESTION TCP_MD5SIG
 		UIO_MAXIOV
 		),
             {name=>"IPPROTO_IP", type=>"IV", default=>["IV", 0]},
diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm
index 753644a..1ef9573 100644
--- a/ext/Socket/Socket.pm
+++ b/ext/Socket/Socket.pm
@@ -377,7 +377,20 @@ use XSLoader ();
 	       TCP_MAXRT
 	       TCP_MAXSEG
 	       TCP_NODELAY
-	       TCP_STDURG);
+	       TCP_STDURG
+	       TCP_MAXRT
+	       TCP_CORK
+	       TCP_KEEPIDLE
+	       TCP_KEEPINTVL
+	       TCP_KEEPCNT
+	       TCP_SYNCNT
+	       TCP_LINGER2
+	       TCP_DEFER_ACCEPT
+	       TCP_WINDOW_CLAMP
+	       TCP_INFO
+	       TCP_QUICKACK
+	       TCP_CONGESTION
+	       TCP_MD5SIG);
 
 %EXPORT_TAGS = (
     crlf    => [qw(CR LF CRLF $CR $LF $CRLF)],
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.