Luna/libc/include/bits/socket.h

31 lines
452 B
C
Raw Normal View History

/* bits/socket.h: Socket-related types and structures. */
#ifndef _BITS_SOCKET_H
#define _BITS_SOCKET_H
typedef int socklen_t;
typedef unsigned sa_family_t;
struct sockaddr
{
sa_family_t sa_family;
char sa_data[4];
};
struct sockaddr_storage
{
sa_family_t ss_family;
union {
char _sun_path[108]; // AF_UNIX
};
};
#define SOCK_STREAM 0
#define AF_UNSPEC 0
#define AF_UNIX 1
#define AF_INET 2
#define AF_INET6 3
#endif