Ashish wrote:
Was implementing DHCP Codec, and the message structure has a few IP
Addresses (ciaddr, yiaddr, siaddr, giaddr).

The question is, Should I represent the IP Address as InetAddess class
or as a simple String in the message structure?

The reason why I am a little confused is, InetAddress.getByAddress API
actually resolves the address which can hit the performance. ApacheDS
uses this approach.

What's the general approach recommended in such situations? Is there
any advantage that we may get by using InetAddress, instead of a
simpler String representation?

You can have a look at the current implementation of this codec in the Directory project. It's written on top of MINA.

http://svn.apache.org/repos/asf/directory/apacheds/trunk/protocol-dhcp/

--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org


Reply via email to