[Bug 192413] libdhcp : IPv6 and IPv4 DHCP client and network configuration library API

bugzilla at redhat.com bugzilla at redhat.com
Wed May 24 20:36:22 UTC 2006


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.

Summary: libdhcp : IPv6 and IPv4 DHCP client and network configuration library API


https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=192413





------- Additional Comments From jvdias at redhat.com  2006-05-24 16:28 EST -------
In reply to Comment #25 From David Cantrell (dcantrel at redhat.com) on 2006-05-24
16:18 EST:

libdhcp   DOES NOT REQUIRE ANY DHCP CLIENTS OR EXEC ANY DHCP CLIENT PROCESS .

Please read the README file shipped in the distribution.

libdhcp RUNS the DHCP client code in same process as the invoking program,
from libraries linked into to the invoker.

That way, we do not have to develop and maintain DHCP and DHCPv6 client
protocol implementations from scratch - we can re-use the same code
used for the FC dhclient and dhcp6c programs, but run from within
one process.

The DHCP and DHCPv6 protocols are separate protocols, with separate ports,
message types and options.

A drop-in replacement for pump is now being tested and will be
submitted today.


In reply to Comment #23 and Comment #24 From Bill Nottingham
(notting at redhat.com) on 2006-05-24 15:53:

Hi Bill -
RE: architecture question :
  Not quite .
    libdhcp provides a callback mechanism whereby DHCP client code can be
    invoked from user code in the same process, and user code can receive
    and process the lease information; it also provides a 'Network Interface
    Configuration' (NIC) library to configure network parameters from either 
    DHCP or static configurations, similar to and as an intended replacement
    for the libpump library used by anaconda, using the libnl Netlink library.
 
    Then libdhcp4client provides the ISC DHCPv4 client in a library,
    and libdhcp6client provides the DHCPv6 client in a library, which
    use the libdhcp interface to enable invocation from user programs
    and processing of the lease information by user programs.

    The libdhcp{4,6}client libraries contain all the objects that the 
    DHCP client programs are built from. They are in fact just the client 
    programs with a renamed 'main()' function, modified to free all 
    memory and reinitialize globals on return of the modified main().
    libdhcp{4,6}client libraries link to no other shared libraries except 
    libc - they contain all the objects from the dh{p,pv6}-client build.  
   
    libdhcp, libdhcp4client and libdhcp6client all build both shared and
    static versions of themselves. libdhcp requires only to be linked
    to a shared or static libdhcp{4,6}client library, depending on the
    functions used by the invoking program. For example, if only NIC 
    functions are used by a libdhcp using program, the linker will not 
    complain about omitting -ldhcp4client or -ldhcp6client from the 
    link command, and the program will run fine without linking to
    the dhcpclient libraries.
    IE. linking to the libdhcp{4,6}client libraries or including the
    dhcp client headers is entirely optional depending on how libdhcp
    is used by the program that links to it.

    libdhcp contains objects which link to libdhcp4client, libdhcp6client, 
    and libnl - depending on which objects an invoking program uses, some
    or all of these libraries may need to be linked in to the invoking program.

RE: dhcdbd issue -
    dhcdbd is intended for a totally different purpose, to maintain a
    lease database and distribute lease information to D-BUS listeners.

    libdhcp is meant to be used by programs such as anaconda's loader2 that
    require a library to do both static network configuration and to do dhcp
    in the same process, without exec-ing other programs or depending on
    external daemons running. The only library that can do this currently
    is libpump, which is not DHCPv6 capable - hence the need for libdhcp.

    However, it's quite possible a future version of dhcdbd could do away
    with having to exec the clients and parse the options from environment
    variable setting strings by using libdhcp. 

-- 
Configure bugmail: https://bugzilla.redhat.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the Fedora-package-review mailing list