lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] DNS client for lwIP raw API


From: Pettinato, Jim
Subject: [lwip-users] DNS client for lwIP raw API
Date: Tue, 19 Jun 2007 08:29:55 -0400

All:

As mentioned here before, I have ported Adam Dunkel's original uIP DNS
client (resolv.c) to something that works for raw API apps. There has
been some interest expressed recently in this code by others, and since
I don't want to keep everyone who might benefit waiting until we decide
whether to integrate this into the core or maintain it as a separate
application, I have attached the module here.

In the nature of the raw API, this DNS client has been implemented using
the callback scheme - there is a gethostbyname() function that accepts a
callback argument that is stored away if a query is required for the
requested host, and then is called when the DNS query completes or times
out. See the header file for more details.

The only requirements to use it (other than including the module in the
build and calling gethostbyname() with an appropriate callback function)
is to call resolv_init() with an appropriate DNS server IP address, and
adding a call to the resolve_tmr() function approximately once a second
in your timer routine.

Let me know if you 1. can't access the attachment and 2. need this code
immediately; and I'll post it as inline text or forward it to your
specific email address.

- Jim

__
 

James M. Pettinato, Jr.
Software Engineer
E: address@hidden | P: 814 898 5250 

FMC Technologies Measurement Solutions Inc.
1602 Wagner Avenue | Erie PA | 16510 USA 
Phone: 814 898 5000 | Fax: 814 899-3414
www.fmctechnologies.com 

Attachment: resolv.c
Description: resolv.c

Attachment: resolv.h
Description: resolv.h


reply via email to

[Prev in Thread] Current Thread [Next in Thread]