Re: Using libbsd dhcpcd options

2021-08-20 Thread Peter Dufault
This stored as "/etc/dhcpcd.conf" might not be completely correct but it works. In the call-back hook you'll get a "new_root_path=" entry with what is set on the DHCP host. Thanks! static const char* dhcpcd_conf_text = \ "debug\n" "clientid\n" "nodhcp6\n"

Re: Using libbsd dhcpcd options

2021-08-20 Thread Peter Dufault
> On Aug 19, 2021, at 20:02 , Chris Johns wrote: > > On 20/8/21 1:45 am, junkes wrote: >> Hallo Peter, >> I do not know if this is best practice but I run the following code: >> >> static void >> default_network_dhcpcd(void) >> { >> static const char default_cfg[] = "clientid test

Re: Using libbsd dhcpcd options

2021-08-19 Thread Chris Johns
On 20/8/21 1:45 am, junkes wrote: > Hallo Peter, > I do not know if this is best practice but I run the following code: > > static void > default_network_dhcpcd(void) > { >     static const char default_cfg[] = "clientid test client\n"; >     rtems_status_code sc; >     int fd; >     int rv; >    

Re: Using libbsd dhcpcd options

2021-08-19 Thread junkes
Hallo Peter, I do not know if this is best practice but I run the following code: static void default_network_dhcpcd(void) { static const char default_cfg[] = "clientid test client\n"; rtems_status_code sc; int fd; int rv; ssize_t n; struct stat statbuf; if (ENOENT

Using libbsd dhcpcd options

2021-08-19 Thread Peter Dufault
I'd like to use the DHCP option 17 (Root Path) to get a mount point for NFS from the DHCP server. I'm starting dhcp with "rtems_dhcpcd_start(NULL)" so it's starting with only the argv array of {"dhcpcd", NULL }. I *think* I need to start it with a customized rtems_dhcpcd_config that would