Commit graph

5 commits

Author SHA1 Message Date
Read H ee5816b9c8 LibC: getprotoent() family of functions
This commit implements the getprotoent() family of functions, including

getprotoent()
getprotobyname()
getprotobynumber()
setprotoent()
endprotoent()

This implementation is very similar to the getservent family of functions,
which is what led to the discovery of a bug in the process of reading the aliases.
The ByteBuffer for the alias strings didn't include a null terminating character,
this was fixed for both the protoent and servent family of functions by appending a
null character to the end of them before adding them to the alias lists.
2020-04-18 10:11:55 +02:00
Read H 844e5faf84 LibC: Service entry API
This commit implements the getservent family of functions:
getservent()
setservent()
endservent()
getservbyname()
getservbyport()

for accessing the /etc/services file.

This commit has addressed the issues identified by utilizing more C++ structures,
addressing unchecked error possibilities, strncpy bounds checking, and other issues
found in the initial pull request
2020-04-16 15:55:45 +02:00
Andreas Kling c3b09c7242 LibC: Add h_errno and stub out getservbyname() 2020-02-20 06:58:16 +01:00
Andreas Kling 94ca55cefd Meta: Add license header to source files
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.

For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.

Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01:00
Andreas Kling 04b9dc2d30 Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch
moves the Lib*/ directories into Libraries/.
2019-07-04 16:16:50 +02:00
Renamed from LibC/netdb.h (Browse further)