You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem Statement:
Adoption of Coap-RD into legacy applications utilizing getaddrinfo(), getnameinfo(), gethostbyname(), gethostbyaddr(), getservbyname(), or getservbyport() requires refactoring of legacy code base of those applications.
Description of suggested solution:
Creation of a libnss_coaprd.so.2 library with implementations of:
enum nss_status _nss_coaprd_gethostbyname_r (const char *name,
struct hostent *result_buf,
char *buf, size_t buflen,
int *errnop, int *h_errnop);
enum nss_status _nss_coaprd_gethostbyaddr_r(const void* addr, int len, int af,
struct hostent* result, char* buffer,
size_t buflen, int* errnop,
int* h_errnop);
This would allow any legacy applications to utilize coap-rd without any modification to their code base. The administrator would reconfigure the /etc/nsswitch.conf file to something like the following:
hosts: files coaprd dns
services: db files coaprd
which would allow the names services switch to utilize the implemented functions above contained within the installed libnss_coaprd.so.2 library to provide querying the hosts and services database services via coaprd.
The text was updated successfully, but these errors were encountered:
@dgtlrift A good idea and I have used this NSS concept elsewhere (not for name resolution though). Someone needs to create this as a project, a part of which needs to specify how the information is stored / accessed / updated in coap-rd so that the NSS modules know how to access this data and return the appropriate information.
Problem Statement:
Adoption of Coap-RD into legacy applications utilizing
getaddrinfo()
,getnameinfo()
,gethostbyname()
,gethostbyaddr()
,getservbyname()
, orgetservbyport()
requires refactoring of legacy code base of those applications.Description of suggested solution:
Creation of a
libnss_coaprd.so.2
library with implementations of:and
as documented in https://www.gnu.org/software/libc/manual/html_node/NSS-Modules-Interface.html and there is also reference implementation of this concept with mDNS/SD via the Avahi project https://github.com/avahi/nss-mdns
This would allow any legacy applications to utilize coap-rd without any modification to their code base. The administrator would reconfigure the
/etc/nsswitch.conf
file to something like the following:which would allow the names services switch to utilize the implemented functions above contained within the installed
libnss_coaprd.so.2
library to provide querying thehosts
andservices
database services via coaprd.The text was updated successfully, but these errors were encountered: