lwIP | gethostid() and gethostname() not supported by lwIP network (#8)

Chris Johns (@chris) gitlab at rtems.org
Sun Aug 10 01:11:33 UTC 2025




Chris Johns commented on a discussion: https://gitlab.rtems.org/rtems/pkg/rtems-lwip/-/issues/8#note_128471


`gethostname()` in `libbsd` is a kernel MIB variable accessed using `sysctl`. It should be easy to wrap `gethostname()` for lwip however I think you will need to provide `sethostname()` to set it and the `namelen` becomes hard to manage when you are a user of these calls, ie CFS, because that part of the interface does not seem to be standardizes from what I can see. Maybe following the advice in Linux's man page about 255 bytes as a length is reasonable? Libbsd is defined to be 256.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/pkg/rtems-lwip/-/issues/8#note_128471
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250810/097d4064/attachment.htm>


More information about the bugs mailing list