[systemd-devel] [PATCH v2 02/26] dhcp: Add DHCP client initialization
Lennart Poettering
lennart at poettering.net
Wed Nov 27 12:21:29 PST 2013
On Wed, 27.11.13 16:13, Patrik Flykt (Patrik.Flykt at linux.intel.com) wrote:
> > > +int sd_dhcp_client_set_request_address(DHCPClient *client,
> > > + const struct in_addr
> > > *last_address);
> >
> > struct in_addr? Didn't you plan to use simple uint32_t for this?
> >
> > Also, if this is supposed to cover ipv6 one day too, maybe call this
> > sd_dhcp_client_set_request_address4() or so?
>
> Internally an uint32_t is fine for IPv4 handling.
>
> In the public API I tried to be consistent with a future IPv6
> implementation that probably should use 'struct in6_addr' when passing
> IPv6 addresses. IPv6 could of course use some other structure as well,
> but I expected people to be most familiar with the already existing
> 'struct in6_addr'. From that it followed that using 'in_addr' in the
> public part for IPv4 would be consistent and logical. I have no problems
> using an uint32_t in the public API also if that is wanted.
OK, sticking to libc definitions and keeping this in sync certainly
makes some sense.
> I really haven't decided on function names for DHCPv6, I was thinking
> sd_dhcp6_* would be a good prefix to start with.
Makes sense.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list