openwrt / odhcp6c

This repository is a mirror of https://git.openwrt.org/?p=project/odhcp6c.git. It is for reference only and is not active for checks-ins or reporting issues; issues should be reported at: https://bugs.openwrt.org. Pull requests will be accepted which will be merged in odhcp6c.git
GNU General Public License v2.0
78 stars 84 forks source link

odhcp6c - Embedded DHCPv6 Client

Abstract

odhcp6c is a minimal DHCPv6 and RA-client for use in embedded Linux systems especially routers. It compiles to only about 35 KB (-Os -s).

Features

  1. IPv6 bootstrap from different environments with autodetection a) RA only b) RA + stateless DHCPv6 c) RA + stateful DHCPv6 (either IA_NA or IA_PD or both)

  2. Handling of non-temporary addresses (IA_NA) a) handling of valid and preferred lifetimes b) automatic fallback to stateless or PD-only mode

  3. Support for DHCPv6 extension a) Reconfigure-Messages b) Prefix Delegation (including handling of valid and preferred lifetimes) c) Prefix Exclusion d) DNS Configuration Options e) NTP Options f) SIP Options g) Information-Refresh Options h) Configurable SOL_MAX_RT i) DS-Lite AFTR-Name Option j) Softwire address and port mapped clients (MAP, LW4over6) j) CER-ID (experimental) k) Server unicast Option

  4. Support for requesting and parsing Router Advertisements a) parsing of prefixes, routes, MTU and RDNSS options

Compiling

odhcp6c uses cmake:

State Script

The state script is called whenever the DHCPv6 state changes. The script is called with the following parameters:

States:

Environment: