LibC: Add and cleanup some networking structures and definitions

This commit is contained in:
Bananymous 2024-08-22 14:30:00 +03:00
parent 45b4b33a3d
commit 1cbba113fd
3 changed files with 10 additions and 4 deletions

View File

@ -28,6 +28,9 @@ __BEGIN_DECLS
#define NI_NUMERICSCOPE 0x10 #define NI_NUMERICSCOPE 0x10
#define NI_DGRAM 0x20 #define NI_DGRAM 0x20
#define NI_MAXHOST 1025
#define NI_MAXSERV 32
#define EAI_AGAIN 1 #define EAI_AGAIN 1
#define EAI_BADFLAGS 2 #define EAI_BADFLAGS 2
#define EAI_FAIL 3 #define EAI_FAIL 3
@ -107,6 +110,8 @@ void setnetent(int stayopen);
void setprotoent(int stayopen); void setprotoent(int stayopen);
void setservent(int stayopen); void setservent(int stayopen);
extern int h_errno;
__END_DECLS __END_DECLS
#endif #endif

View File

@ -67,10 +67,10 @@ struct linger
int l_linger; /* Linger time, in seconds. */ int l_linger; /* Linger time, in seconds. */
}; };
#define SOCK_DGRAM 0 #define SOCK_DGRAM 1
#define SOCK_RAW 1 #define SOCK_RAW 2
#define SOCK_SEQPACKET 2 #define SOCK_SEQPACKET 3
#define SOCK_STREAM 3 #define SOCK_STREAM 4
#define SOL_SOCKET 1 #define SOL_SOCKET 1

View File

@ -20,6 +20,7 @@ struct utmpx
pid_t ut_pid; /* Process ID. */ pid_t ut_pid; /* Process ID. */
short ut_type; /* Type of entry. */ short ut_type; /* Type of entry. */
struct timeval ut_tv; /* Time entry was made. */ struct timeval ut_tv; /* Time entry was made. */
char ut_host[32];
}; };
#define EMPTY 0 #define EMPTY 0