16 lines
389 B
Rust
16 lines
389 B
Rust
use super::{RawDhcpOption, DhcpOptionError};
|
|
use crate::options::DhcpOption;
|
|
use core::net::Ipv4Addr;
|
|
|
|
pub struct ExtensionsPath;
|
|
|
|
impl DhcpOption for ExtensionsPath {
|
|
const CODE: u8 = 18;
|
|
type Item = String;
|
|
|
|
fn parse(option: &RawDhcpOption) -> Result<Self::Item, DhcpOptionError> {
|
|
let data = core::str::from_utf8(&option.data)?;
|
|
Ok(data.to_string())
|
|
}
|
|
}
|