Common definitions to make unix and win more compatible. More...
#include <sys/types.h>#include <sys/socket.h>#include <arpa/inet.h>#include <netinet/in.h>#include <netdb.h>

Go to the source code of this file.
Macros | |
| #define | SOURCE_PORT 0 |
| A dummy source port number. | |
| #define | SOCKET_ERROR (-1) |
| simple declaration to make code more clear and compatible with winsock. | |
| #define | INVALID_SOCKET (SOCKET)(~0) |
| simple declaration to make code more clear and compatible with winsock. | |
| #define | FALSE (0) |
| Define the bool value FALSE as 0. | |
| #define | TRUE !FALSE |
| Define the bool value TRUE as !FALSE. | |
Typedefs | |
| typedef int | bool |
| Standard boolean type, this kind of variable should be TRUE or FALSE only. | |
| typedef int | SOCKET |
| A simple declaration to make code more clear and compatible with winsock. | |
| typedef struct sockaddr_in | SOCKADDR_IN |
| A simple declaration to make code more clear and compatible with winsock. | |
| typedef struct sockaddr_in6 | SOCKADDR_IN6 |
| A simple declaration to make code more clear and compatible with winsock. | |
Functions | |
| void | closesocket (SOCKET sock) |
Common definitions to make unix and win more compatible.
Copyright (C) 2013
Andrea Florio 2013 andrea@opensuse.org
This Project is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This Project is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
| #define FALSE (0) |
Define the bool value FALSE as 0.
| #define INVALID_SOCKET (SOCKET)(~0) |
simple declaration to make code more clear and compatible with winsock.
| #define SOCKET_ERROR (-1) |
simple declaration to make code more clear and compatible with winsock.
| #define SOURCE_PORT 0 |
A dummy source port number.
| #define TRUE !FALSE |
Define the bool value TRUE as !FALSE.
| struct sockaddr_in SOCKADDR_IN |
A simple declaration to make code more clear and compatible with winsock.
| struct sockaddr_in6 SOCKADDR_IN6 |
A simple declaration to make code more clear and compatible with winsock.
| int SOCKET |
A simple declaration to make code more clear and compatible with winsock.
| void closesocket | ( | SOCKET | sock | ) |
1.8.1.2