forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A web address Resolver under 3.xx

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
mypspdev



Joined: 11 Jul 2007
Posts: 178

PostPosted: Thu Oct 04, 2007 7:22 am    Post subject: A web address Resolver under 3.xx Reply with quote

Please I'm experiencing a loop out of which I do not see any exit...

Resolve is a good example well working under 1.50 using

sceNetResolverCreate(&rid, buf, sizeof(buf)
sceNetResolverStartNtoA(rid, RESOLVE_NAME, &addr, 2, 3)
sceNetResolverStartAtoN(rid, &addr, name, sizeof(name), 2, 3)

The startNtoA doen't work under 3.xx or I'm wrong.

I saw in some other sources that it's used

gethostbyname(RESOLVE_NAME)

but I've not yet been able to use it in place of previous ones.

Please any suggestion or help?

My final target is to retrieve a simple document from the web (a txt file) resolving the address.

I saw also this example

http://forums.ps2dev.org/viewtopic.php?p=41426&highlight=ouvrirconnexiontcp#41426

still for 1.50 but it doesn't work for me neither under this fw kernel.

Thanks
Back to top
View user's profile Send private message
tacoSunday



Joined: 31 Aug 2007
Posts: 34

PostPosted: Thu Oct 04, 2007 3:01 pm    Post subject: Reply with quote

If you want to save yourself many headaches, there is a psp port of libcurl floating around this forum. Libcurl is very powerful and easy to use. It takes care of resolving names and handling different protocols for you. All it really needs is wifi connected, url and a FILE pointer or custom IO function. It is also rather well documented.
Back to top
View user's profile Send private message
mypspdev



Joined: 11 Jul 2007
Posts: 178

PostPosted: Thu Oct 04, 2007 4:49 pm    Post subject: Reply with quote

Thanks for this suggestion.
I'll study it.

I saw libcurl under svn-pspdev even if not deeply investigated: there are amiga etc... makefiles but nothing for PSP, yet.

The example from your linkis still for 1.5 not for 3.xx:

I hope it could be adapted to 3.xxand I'll try to substitute
Code:
sceUtilityLoadNetModule(1);
sceUtilityLoadNetModule(3);


instead of

Code:
if((err = pspSdkInetInit()))


Please have you instructions about to compile the required libraries

-libcurl.a
-libpsp_req.a

for PSP ?
Thanks
Back to top
View user's profile Send private message
tacoSunday



Joined: 31 Aug 2007
Posts: 34

PostPosted: Thu Oct 04, 2007 5:11 pm    Post subject: Reply with quote

The package I linked to is just a patch for the official 7.15.1 curl sources. the build process for the psp libs is hinky at best. There are pre-compiled binaries floating around out there somewhere in the aether.
Back to top
View user's profile Send private message
mypspdev



Joined: 11 Jul 2007
Posts: 178

PostPosted: Thu Oct 04, 2007 5:21 pm    Post subject: Reply with quote

tacoSunday wrote:
.......the aether.


Thanks very much.

What more tangible nowadays than aether....
In the past someone beleived that light was travelling through aether than others confirmed the empty space was its domain ....
what about web-sharing?
through empty space or through aether?

... in the aether... parḍn ... in http://svn.pspdev.org/listing.php?repname=pspware&path=%2Ftrunk%2Flibcurl%2F&rev=0&sc=0
there is a readme.psp:

This is a port of libcurl 7.15.1 for the PSP, based originally on danzel's patches but
I have cleaned them up, in part because I added gethostbyname/addr to newlib itself.

To build configure the source with:

LDFLAGS="-L$(psp-config --psp-prefix)/lib -L$(psp-config --pspsdk-path)/lib" \
LIBS="-lc -lpspnet_inet -lpspnet_resolver -lpspuser" \
./configure --host=psp --disable-shared --prefix=$(psp-config --psp-prefix)

Then just:

make CFLAGS=-G0 && make install

TyRaNiD

I'm not so familiar with compiling instructions, but I'll try to intrepret these words.
Back to top
View user's profile Send private message
tacoSunday



Joined: 31 Aug 2007
Posts: 34

PostPosted: Thu Oct 04, 2007 6:04 pm    Post subject: Reply with quote

Looks like the version you found on the svn is more recent than what I linked to (Duh). Definitely use it instead.

As for compilation, if your toolchain is set up correctly TyRaNiD's commands should go off without a hitch. It's not the hinky crap I had to go through :)

Best of luck on your endeavors.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group