nispor / mozim

DHCP Client Daemon
Apache License 2.0
11 stars 9 forks source link

Add proxy mode #6

Closed cathay4t closed 2 years ago

cathay4t commented 2 years ago

Use case:

The mozim API:

let config = DhcpV4Config::new_proxy(out_going_interface, mac_to_proxy)?;
let mut cli = DhcpV4Client::init(config, None)?

loop {
    let events = cli.poll(POLL_WAIT_TIME)?;
    for event in events {
        if let Some(lease) = cli.process(event)? {
            // Send this lease info to container
        }
    }
}

CLI:

Limitation:

Integration test case included.