curl-users
Re: curl 7.2.1 patch to specify http request output port
Date: Wed, 20 Sep 2000 10:16:31 +0200
Hi all!
> -----Orignial message-----
> Von: Daniel Stenberg [mailto:daniel_at_haxx.se]
> Gesendet: Sonntag, 17. September 2000 21:28
> An: Stephen Kick
> Cc: Curl Mailinglist
> Betreff: Re: curl 7.2.1 patch to specify http request output port
>
>
> On Fri, 15 Sep 2000, Stephen Kick wrote:
>
> ...
>
> > The patch has only been tested with RedHat 6.2, x86. I do
> not know how
> > it will work on other architectures. Someone needs to
> check the errno's
> > I am checking in case they are not supported on other
> architectures. I
> > have updated some of the documentation to describe the
> syntax but I have
> > not updated the man pages.
>
Hrm, your new function for interface selection indeed doesn't work on win32
due to missing headers and libs ("net/if.h" I suspect). No problem, though,
we just won't be able to use your code on win32 (activate the #ifdef LINUX).
Another glitch appears in curl-7.3-pre5's src/main.c where an element named
"interface" was added to struct Configurable. This is a reserved word for
MingW32 gcc and consequently chokes the compiler. Please consider renaming
the variable to "iface" or some such (patch below).
#### BEGIN patch
*** main.c.org Tue Sep 19 09:07:02 2000
--- main.c Wed Sep 20 09:59:33 2000
***************
*** 301,307 ****
char *headerfile;
char remotefile;
char *ftpport;
! char *interface;
unsigned short porttouse;
char *range;
int low_speed_limit;
--- 301,307 ----
char *headerfile;
char remotefile;
char *ftpport;
! char *iface;
unsigned short porttouse;
char *range;
int low_speed_limit;
***************
*** 617,623 ****
break;
case '7': /* there is no short letter for this */
/* interface */
! GetStr(&config->interface, nextarg);
break;
case '6': /* there is no short letter for this */
/* krb4 level string */
--- 617,623 ----
break;
case '7': /* there is no short letter for this */
/* interface */
! GetStr(&config->iface, nextarg);
break;
case '6': /* there is no short letter for this */
/* krb4 level string */
***************
*** 1511,1517 ****
/* three new ones in libcurl 7.3: */
curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, config.proxytunnel);
! curl_easy_setopt(curl, CURLOPT_INTERFACE, config.interface);
curl_easy_setopt(curl, CURLOPT_KRB4LEVEL, config.krb4level);
if((config.progressmode == CURL_PROGRESS_BAR) &&
--- 1511,1517 ----
/* three new ones in libcurl 7.3: */
curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, config.proxytunnel);
! curl_easy_setopt(curl, CURLOPT_INTERFACE, config.iface);
curl_easy_setopt(curl, CURLOPT_KRB4LEVEL, config.krb4level);
if((config.progressmode == CURL_PROGRESS_BAR) &&
#### END patch
Cheers,
Jörn
> --
> Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
> ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
>
Received on 2000-09-20