LibC: Rewrite all the headers.
We now have more or less posix issue 2018 conforming libc headers. This was a really time consuming and boring operation but it had to be done. Now we get to actually start implementing libc :)
This commit is contained in:
25
libc/include/net/if.h
Normal file
25
libc/include/net/if.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef _NET_IF_H
|
||||
#define _NET_IF_H 1
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/net_if.h.html
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#define IF_NAMESIZE 16
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
struct if_nameindex
|
||||
{
|
||||
unsigned if_index; /* Numeric index of the interface. */
|
||||
char* if_name; /* Null-terminated name of the interface. */
|
||||
};
|
||||
|
||||
void if_freenameindex(struct if_nameindex* ptr);
|
||||
char* if_indextoname(unsigned ifindex, char* ifname);
|
||||
struct if_nameindex* if_nameindex(void);
|
||||
unsigned if_nametoindex(const char* ifname);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user