LIBCURL implementation example

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
mypspdev
Posts: 178
Joined: Wed Jul 11, 2007 10:30 pm

LIBCURL implementation example

Post by mypspdev »

Please I've compiled CURL and implemented as from some available examples.
My problem is concerning may be some DHCP permission or patch to be added.
I can call some "my home private network" ftp servers or http servers, but when attempting to access web URL, no connection is available to externa internet sites.

My program act as follows for calls to an intranet FTP, it works well both with ftp server on another PSP or on PC:

res=curl_easy_setopt(curl, CURLOPT_URL, "ftp://192.168.1.23");
res=curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);

It doesn't work for web URL.

Any patch or further parameter recommended to pass through the access point?

Thanks in advance for help
tabularasa
Posts: 13
Joined: Wed Nov 22, 2006 12:28 am

Post by tabularasa »

With web URL you mean something like 'google.com'?
Well, then you have to resolve the hostname first.
mypspdev
Posts: 178
Joined: Wed Jul 11, 2007 10:30 pm

Post by mypspdev »

tabularasa wrote:With web URL you mean something like 'google.com'?
Well, then you have to resolve the hostname first.
Thanks for your attention.
Yes,I mean "www.google.com" for example.

No! Back to the problem of setting-up a resolver running under 3.xx and not under 1.50 as from pspdev example!

I'm in trouble to set-up a resolver under 3.xx:
as you can see here http://forums.ps2dev.org/viewtopic.php?t=9097

My resover attempt is here:
http://rapidshare.com/files/60685449/Re ... x.rar.html

May you please help me? thanks a lot
User avatar
tacoSunday
Posts: 34
Joined: Fri Aug 31, 2007 10:05 pm

Post by tacoSunday »

Um, I dont think he needs to resolve the hostname first. libcurl does that itself(I know this to be true as I use libcurl on the psp without resolving the hostname). This is the most of the point of libcurl, to parse and resolve the URL(as well as handle the underlying protocols). You probably just have a fubared router config. Make sure your wifi router has the dns servers and whatnot set up correctly.

EDIT:
It has just come to mind that I am not using the svn version of libcurl. Mabey the resolver in the svn version is messed up. Try this version.
mypspdev
Posts: 178
Joined: Wed Jul 11, 2007 10:30 pm

Post by mypspdev »

Resolving should work only if PSP Network Connection has dynamic IP Address from DHCP.
If IP is preassigned by PSP Network connection (fixed) resolving doen't work at all.

CURL is simple: few commands for doing everything. I've tested it.

Thanks
User avatar
tacoSunday
Posts: 34
Joined: Fri Aug 31, 2007 10:05 pm

Post by tacoSunday »

Glad to hear it. On the other hand, setting the primary and secondary dns servers in the psp's manual ip config doesn't work? I'm going to check that one out when I get home.

EDIT: Hehe, butterfingers!
Post Reply