Example #1
0
func (dp DhcpPacket) GetOption(specOpt option.SpecificOption) (bool, error) {
	genOpt, found := option.GetRawOption(dp.Options, specOpt.GetNum())
	if found {
		err := specOpt.Parse(genOpt)
		if err != nil {
			return false, err
		}
		return true, nil
	}
	return false, nil
}
Example #2
0
func (dp DhcpPacket) GetRawOption(typeOpt byte) (option.RawOption, bool) {
	return option.GetRawOption(dp.Options, typeOpt)
}