simple-multicast  0.2.1
 All Files Functions Typedefs Macros Pages
Macros | Typedefs | Functions
compatibility.h File Reference

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>
Include dependency graph for compatibility.h:
This graph shows which files directly or indirectly include this file:

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)

Detailed Description

Common definitions to make unix and win more compatible.

Author
Andrea Florio andre.nosp@m.a@op.nosp@m.ensus.nosp@m.e.or.nosp@m.g
Version
0.1
Date
2013

License

Copyright (C) 2013
Andrea Florio 2013 andre.nosp@m.a@op.nosp@m.ensus.nosp@m.e.or.nosp@m.g

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/.

Macro Definition Documentation

#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.

Typedef Documentation

int bool

Standard boolean type, this kind of variable should be TRUE or FALSE only.

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.

Function Documentation

void closesocket ( SOCKET  sock)