#include <stdint.h>
Go to the source code of this file.
Data Structures | |
| struct | sockaddr |
| Generalized socket address structure. More... | |
Defines | |
| #define | TCP_SOCK_STREAM 0x1 |
| #define | SOCK_STREAM tcp_sock_stream |
| #define | UDP_SOCK_DGRAM 0x2 |
| #define | SOCK_DGRAM udp_sock_dgram |
| #define | AF_INET 1 |
| IPv4 Internet addresses. | |
| #define | AF_INET6 2 |
| IPv6 Internet addresses. | |
| #define | SA_LEN 32 |
Length of a struct sockaddr. | |
Typedefs | |
| typedef uint16_t | sa_family_t |
| A socket address family. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| static | __attribute__ ((always_inline)) const char *socket_semantics_name(int semantics) |
| Name communication semantics. | |
Variables | |
| int | tcp_sock_stream |
| Connection-based, reliable streams. | |
| int | udp_sock_dgram |
| Connectionless, unreliable streams. | |
| struct sockaddr | may_alias |
| Generalized socket address structure. | |
Definition in file socket.h.
| typedef uint16_t sa_family_t |
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
| static __attribute__ | ( | (always_inline) | ) | const [inline, static] |
Name communication semantics.
Name address family.
| semantics | Communication semantics (e.g. SOCK_STREAM) |
| name | Name of communication semantics |
| family | Address family (e.g. AF_INET) |
| name | Name of address family |
Definition at line 38 of file socket.h.
References SOCK_DGRAM, and SOCK_STREAM.
00039 { 00040 /* Cannot use a switch() because of the {TCP_UDP}_SOCK_XXX hack */ 00041 if ( semantics == SOCK_STREAM ) { 00042 return "SOCK_STREAM"; 00043 } else if ( semantics == SOCK_DGRAM ) { 00044 return "SOCK_DGRAM"; 00045 } else { 00046 return "SOCK_UNKNOWN"; 00047 } 00048 }
Generalized socket address structure.
This contains the fields common to socket addresses for all address families.
1.5.7.1