suppressing DHCP messages

Siddons, David siddons at bnl.gov
Mon Jul 19 19:31:06 UTC 2021


...sorry, that file is an EPICS file. Talking to two lists simultaneously is confusing!
Pete.


________________________________
From: Siddons, David <siddons at bnl.gov>
Sent: Monday, July 19, 2021 3:26 PM
To: Christian Mauderer <oss at c-mauderer.de>; Heinz Junkes <junkes at fhi-berlin.mpg.de>
Cc: rtems-users at rtems.org <users at rtems.org>
Subject: Re: suppressing DHCP messages

Hi Christian,
   Turns out that was left-over test code in rtems_init.c. I commented them out and all is now well. I believe the latest version has them removed.
Pete.


________________________________
From: Christian Mauderer <oss at c-mauderer.de>
Sent: Monday, July 19, 2021 3:22 PM
To: Siddons, David <siddons at bnl.gov>; Heinz Junkes <junkes at fhi-berlin.mpg.de>
Cc: rtems-users at rtems.org <users at rtems.org>
Subject: Re: suppressing DHCP messages

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://urldefense.com/v3/__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__;Kysr!!P4SdNyxKAPE!XPuMFkMEYBezuIigrxyh13AlgkwIGuLGASXR88ZX4xai51nloC0B_Qsw5x2dgZw$

(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 https://urldefense.com/v3/__http://www.DeepL.com/Translator__;!!P4SdNyxKAPE!XPuMFkMEYBezuIigrxyh13AlgkwIGuLGASXR88ZX4xai51nloC0B_Qsw905eIOM$
> <https://urldefense.com/v3/__http://www.DeepL.com/Translator__;!!P4SdNyxKAPE!XPuMFkMEYBezuIigrxyh13AlgkwIGuLGASXR88ZX4xai51nloC0B_Qsw905eIOM$ > (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
>> https://urldefense.com/v3/__http://lists.rtems.org/mailman/listinfo/users__;!!P4SdNyxKAPE!XPuMFkMEYBezuIigrxyh13AlgkwIGuLGASXR88ZX4xai51nloC0B_QswVfYcyBg$
> <https://urldefense.com/v3/__http://lists.rtems.org/mailman/listinfo/users__;!!P4SdNyxKAPE!XPuMFkMEYBezuIigrxyh13AlgkwIGuLGASXR88ZX4xai51nloC0B_QswVfYcyBg$ >
>
>
> _______________________________________________
> users mailing list
> users at rtems.org
> https://urldefense.com/v3/__http://lists.rtems.org/mailman/listinfo/users__;!!P4SdNyxKAPE!XPuMFkMEYBezuIigrxyh13AlgkwIGuLGASXR88ZX4xai51nloC0B_QswVfYcyBg$
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20210719/72cb8c4f/attachment.html>


More information about the users mailing list