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

Heinz Junkes junkes at fhi-berlin.mpg.de
Wed Apr 1 12:14:25 UTC 2020


Okay, I got it now. It wasn't that hard ;-)
You just have to take your time to read all the docs several times. 
Now with a qemu-simulator it was also much easier than with my VMEbus hardware.

I must enter the definition of custom option 129 here:

diff --git a/dhcpcd/dhcpcd-definitions.conf b/dhcpcd/dhcpcd-definitions.conf
index 84260861..3d21881e 100644
--- a/dhcpcd/dhcpcd-definitions.conf
+++ b/dhcpcd/dhcpcd-definitions.conf
@@ -160,6 +160,8 @@ encap 8             byte                    provisioning_timer
 define 124     binhex                  vivco
 define 125     embed                   vivso
 embed          uint32                  enterprise_number
+# RTEMS cmdline used by EPICS
+define 129     string                  rtems_cmdline
 # Vendor options are shared between DHCP/DHCPv6
 # Their code is matched to the enterprise number defined above
 # see the end of this file for an example

and (although I haven't figured out if it should be entered in both) here

diff --git a/dhcpcd/dhcpcd-embedded.c b/dhcpcd/dhcpcd-embedded.c
index 068a8dfd..11377ed6 100644
--- a/dhcpcd/dhcpcd-embedded.c
+++ b/dhcpcd/dhcpcd-embedded.c
@@ -153,6 +153,7 @@ const char *dhcpcd_embedded_conf[] = {
 "encap 8 byte provisioning_timer",
 "define 124 binhex vivco",
 "define 125 embed vivso",
+"define 129 string rtems_cmdline",
 "embed uint32 enterprise_number",
 "define 212 rfc5969 sixrd",
 "define6 1 binhex client_id",


Now, if you put to /etc/dhcp.conf the line
option rtems_cmdline
this is requested from the DHCP server.

For example, you can also request the time server address, with
option ntp_servers

I got a bit confused because the freebsd dhcpcd has the option for e.g. the 
TimeServer is called "ntp_servers" and for the dhcp-servers I know (e.g. isc-dhcpd-server)
the option "ntp-servers" is designated.

But I did not manage to define the option in dhcpcd.conf itself.

Viele Grüße
Heinz Junkes
--
Experience directly varies with equipment ruined.



> On 21. Jan 2020, at 15:13, Heinz Junkes <junkes at fhi-berlin.mpg.de> 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"?
> 
> Danke Heinz
> ------------------------------------------------------------------------------
> Fritz-Haber-Institut    | Phone:         (+49 30) 8413-4270
> Heinz Junkes             | VC: 1022 2018 1216 @ bjn.vc
> Faradayweg 4-6        | Fax (G3+G4):   (+49 30) 8413-5900
> D - 14195 Berlin        | E-Mail:        junkes at fhi-berlin.mpg.de
> ------------------------------------------------------------------------------
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5300 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20200401/a3a57190/attachment.bin>


More information about the users mailing list