DNS Query - Embedded app with WIP


#1

I am using the OpenAT WIP library for my emdedded app. There is little in the documentation addressing DNS queries using WIP . The only info is a flow diagram that implies the WIP will do a DNS query on a name automatically. This DOES NOT happen. I already have an app with my own IP/UDP/TCP stack but am using WIP for a quick running demo. WIP takes up ~92k and I will revert to my own stack (5k) in a bit. However I need to do DNS queries by name within my code. Has anyone done this and is there any more specific info on the process of doing a DNS query? For now I only have one HOST so IP address is code in for now. BTW this is embedded with no input by the custome through a serial port. :smiley:


#2

What makes you say that?

Try a search: there have been a few threads that suggest that it does happen - it just doesn’t work properly! :angry:


#3

I have just found exactly the same thing. From experience and documentation I think TCP clients automatically do DNS lookups, but UDP clients do not. I get a “-994” error (invalid parameter) if I do not use “1.2.3.4” type addresses (I am trying “someaddress.com”).

In actual fact, I open the UDP “socket” with a blank UDPCreate. Then, at each write, I use:

wip_writeOpts(udpsocket, data, datalen,
WIP_COPT_PEER_PORT, 1234,
WIP_COPT_PEER_STRADDR, “someaddress.com”,
WIP_COPT_END);


#4

Thanks for the info.

I did discover, by deep trace, exactly what happens within WIP concerning DNS query. The docs do not tell you what takes place. It is only in the diagram that it indicates such. As far as I am concerned WIP is far too expensive in code space for doing TCP/IP especially since that is all I want to do. I already have my own IP/TCP/UDP stack that runs very efficiently in about 12-13k of code. I will be implementing my own DNS query and TCP connection scenarios with my stack and save up to 65k of code space AND have full control of all that takes place. I only used WIP to get a project demo going and did that in a few days. One consistant problem I get with WIP is error -1000 with no indication that the TCP connections had been aborted. Not good for a person like me who is intent on handling all errors properly.


#5

Would you care to share what, exactly, you found?