suppressing DHCP messages

Christian Mauderer oss at c-mauderer.de
Mon Jul 19 19:22:58 UTC 2021


Hello Pete,

not entirely sure how EPICS initializes dhcpcd. But I would expect that 
your application creates a /dev/dhcpcd.conf somewhere. You can add the 
"quiet" option to that file:

https://www.freebsd.org/cgi/man.cgi?query=dhcpcd.conf&apropos=0&sektion=0&manpath=FreeBSD+13.0-RELEASE+and+Ports&arch=default&format=html

(Note: The man page is a bit newer than our dhcpcd. But the quiet should 
be the same.)

Alternatively there should be a call to rtems_dhcpcd_start() somewhere 
(maybe hidden in another call). That function allows an 
rtems_dhcpcd_config structure pointer as an argument. That structure has 
an argc and argv. Without testing: I think you could pass a "-q" or a 
"--quiet" in these to silence dhcpcd. Note that the first field in argv 
has to be the program name. So you would have to use something like

const char *argv[] = {"dhcpcd", "-q", NULL};
int argc = RTEMS_BSD_ARGC(argv);

Best regards

Christian

On 19/07/2021 18:02, Siddons, David wrote:
> Hi Heinz,
>    That statement is in there, in my setup at line 997, but I still get 
> this every few minutes:
> 
> ***** Primary Network interface : cpsw0 *****
> all out ---> interface = cpsw0
> all out ---> reason = RENEW
> all out ---> pid = 1
> all out ---> ifmetric = 201
> all out ---> ifwireless = 0
> all out ---> ifflags = 4294936643
> all out ---> ifmtu = 1500
> all out ---> interface_order = cpsw0
> all out ---> if_up = true
> all out ---> if_down = false
> all out ---> old_ip_address = 172.16.0.215
> all out ---> old_subnet_cidr = 16
> all out ---> old_network_number = 172.16.0.0
> all out ---> old_subnet_mask = 255.255.0.0
> all out ---> old_broadcast_address = 172.16.255.255
> all out ---> old_dhcp_lease_time = 600
> all out ---> old_dhcp_message_type = 5
> all out ---> old_dhcp_server_identifier = 172.16.0.201
> all out ---> new_ip_address = 172.16.0.215
> all out ---> new_subnet_cidr = 16
> all out ---> new_network_number = 172.16.0.0
> all out ---> new_subnet_mask = 255.255.0.0
> all out ---> new_broadcast_address = 172.16.255.255
> all out ---> new_dhcp_lease_time = 600
> all out ---> new_dhcp_message_type = 5
> all out ---> new_dhcp_server_identifier = 172.16.0.201
> 
> BTW, this is EPICS 7.0.6
> Pete.
> 
> 
> 
> *From:* Heinz Junkes
> *Sent:* Monday, July 19, 2021 11:42 AM
> *To:* Siddons, David
> *Cc:* rtems-users at rtems.org
> *Subject:* Re: suppressing DHCP messages
> 
> FYI,
> Pete is a EPICS - User…
> 
> Hello Pete,
> in modules/libcom/RTEMS/posix/rtems_init.c in
> line 1008 (before sc = rtems_bsd_initialize();) there is a / should be a
> line with
> rtems_bsd_set_vprintf_handler(rtems_bsd_vprintf_handler_mute);
> 
> That should suppress all output from the network intitialization? 
> Translated with www.DeepL.com/Translator 
> <http://www.DeepL.com/Translator> (free version)
> 
> Gruss Heinz
> 
> ------------------------------------------------------------------------------
> Fritz-Haber-Institut    | Phone:         (+49 30) 8413-4270
> Heinz Junkes             | Fax (G3+G4):   (+49 30) 8413-5900
> Faradayweg 4-6        | VC: 102220181216 at bjn.vc
> D - 14195 Berlin        | E-Mail:        junkes at fhi-berlin.mpg.de
> ------------------------------------------------------------------------------
> 
>> On 19. Jul 2021, at 17:30, Siddons, David <siddons at bnl.gov> wrote:
>> 
>> My application uses dhcp, and the system issues a screenfull of messages every time the lease is renewed. Is there a way to stop that?
>> Pete.
>> 
>> _______________________________________________
>> users mailing list
>> users at rtems.org
>> http://lists.rtems.org/mailman/listinfo/users 
> <http://lists.rtems.org/mailman/listinfo/users>
> 
> 
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
> 


More information about the users mailing list