toe-beans 0.10.0

DHCP library, client, and server
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::MessageOptions;
use mac_address::MacAddress;

/// Define common methods on your custom Message
/// that a client or server will need to use.
///
/// ...or don't and use our homemade [Message](crate::v4::message::Message)
/// with this already implemented.
pub trait MessageHelpers {
    /// Search this Message's list of options for a specific option.
    fn find_option(&self, tag: u8) -> Option<&MessageOptions>;

    /// Add an option to the list of options
    fn add_option(&mut self, option: MessageOptions);

    /// Parses the chaddr field as a mac address.
    fn get_mac_address(&self) -> MacAddress;
}