rtems-libbsd-5.0.0 , Extension of the dhcp response with option 129 (rtems-cmdline)

Chris Johns chrisj at rtems.org
Wed Jan 22 02:08:37 UTC 2020


On 22/1/20 1:13 am, Heinz Junkes wrote:
> I am trying to add an option (129) to the dhcp-request in rtems-libbsd.
> My attempts to add the option in 
> 
> ./freebsd/sbin/dhclient/tables.c 
> ({ "rtems-cmdline", "t",	&dhcp_universe, 129 },)
> ./dhcpcd/dhcpcd-embedded.c
> ("define 129 string rtems_cmdline”,)
> ./dhcpcd/dhcpcd-definitions.conf
> (define 129      string                  rtems_cmdline)
> ./freebsd/sbin/dhclient/dhcp.h
> (#define DHO_RTEMS_CMDLINE               129)
> 
>> 
> didn't help. Can I find somewhere a guide on how to add this option to the
> dhcp-request and this is then added to the variable is assigned to “new_rtems_cmdline"?

I suggest you have a look at https://www.freebsd.org/cgi/man.cgi?query=dhcpcd
and the --options option. I have not tested if this is works and is what you need.

I use the RTEMS rc.conf method to initialise libbsd and you can:

ifconfig_xyz0="DHCP"
dhcpcd_priority=100
dhcpcd_options="--nobackground --timeout 10 --options 129"

I am not sure how you would get the result out of dhcpcd. I suspect there is no
/usr/local/libexec/dhcpcd-run-hooks support.

Chris


More information about the users mailing list