Re: [Kea-users] Option 60 vendor class

2018-04-13 Thread Marcin Siodelski
On 13.04.2018 14:03, Francis Dupont wrote:
> vendor-class-identifier (code 60) is a string so you should dynamic cast
> the result of getOption() with DHO_VENDOR_CLASS_IDENTIFIER to
> an OptionString. There are a lot of examples in unit tests and
> as far as I can remember at least a post in this list as you are not
> the first asking this.
> 
> Regards
> 
> Francis Dupont 
> 
> PS: look at src/lib/dhcp/std_option_defs.h for definitions of standard
> options. getData works only on unknown options or options which are not
> defined to a specific content type (i.e, binary).
> ___
> Kea-users mailing list
> Kea-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
> 

Francis,

The OptionString actually using data_ member (setData, getData) to
storing string values, so it should not be a reason to crash. I think it
is going to be hard to rootcause the problem without seeing the actual code.

Marcin Siodelski
ISC
___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


Re: [Kea-users] Option 60 vendor class

2018-04-13 Thread Francis Dupont
vendor-class-identifier (code 60) is a string so you should dynamic cast
the result of getOption() with DHO_VENDOR_CLASS_IDENTIFIER to
an OptionString. There are a lot of examples in unit tests and
as far as I can remember at least a post in this list as you are not
the first asking this.

Regards

Francis Dupont 

PS: look at src/lib/dhcp/std_option_defs.h for definitions of standard
options. getData works only on unknown options or options which are not
defined to a specific content type (i.e, binary).
___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users