From: Joshua Pritikin Date: Tue, 11 May 1999 11:10:13 +0000 (-0400) Subject: Socket IPPROTO_TCP [PATCH 5.005_5x] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1494e794755363d23b7bca66c4a024ccc839e963;p=p5sagit%2Fp5-mst-13.2.git Socket IPPROTO_TCP [PATCH 5.005_5x] Message-ID: p4raw-id: //depot/perl@3391 --- diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm index 1654b16..a0bb95d 100644 --- a/ext/Socket/Socket.pm +++ b/ext/Socket/Socket.pm @@ -1,7 +1,7 @@ package Socket; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); -$VERSION = "1.7"; +$VERSION = "1.71"; =head1 NAME @@ -272,7 +272,14 @@ require DynaLoader; UIO_MAXIOV ); -@EXPORT_OK = qw(CR LF CRLF $CR $LF $CRLF); +@EXPORT_OK = qw(CR LF CRLF $CR $LF $CRLF + + IPPROTO_TCP + TCP_KEEPALIVE + TCP_MAXRT + TCP_MAXSEG + TCP_NODELAY + TCP_STDURG); %EXPORT_TAGS = ( crlf => [qw(CR LF CRLF $CR $LF $CRLF)], diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs index 4a8d876..5182587 100644 --- a/ext/Socket/Socket.xs +++ b/ext/Socket/Socket.xs @@ -26,6 +26,8 @@ #include "sockadapt.h" #endif +#include + #ifdef I_SYSUIO # include #endif @@ -332,6 +334,12 @@ constant(char *name, int arg) #else goto not_there; #endif + if (strEQ(name, "IPPROTO_TCP")) +#ifdef IPPROTO_TCP + return IPPROTO_TCP; +#else + goto not_there; +#endif break; case 'J': break; @@ -804,6 +812,36 @@ constant(char *name, int arg) #endif break; case 'T': + if (strEQ(name, "TCP_KEEPALIVE")) +#ifdef TCP_KEEPALIVE + return TCP_KEEPALIVE; +#else + goto not_there; +#endif + if (strEQ(name, "TCP_MAXRT")) +#ifdef TCP_MAXRT + return TCP_MAXRT; +#else + goto not_there; +#endif + if (strEQ(name, "TCP_MAXSEG")) +#ifdef TCP_MAXSEG + return TCP_MAXSEG; +#else + goto not_there; +#endif + if (strEQ(name, "TCP_NODELAY")) +#ifdef TCP_NODELAY + return TCP_NODELAY; +#else + goto not_there; +#endif + if (strEQ(name, "TCP_STDURG")) +#ifdef TCP_STDURG + return TCP_STDURG; +#else + goto not_there; +#endif break; case 'U': if (strEQ(name, "UIO_MAXIOV"))