From 393110a4edc3dc87d063f7ea62544bd61cec468e Mon Sep 17 00:00:00 2001 From: drbob Date: Wed, 12 Dec 2007 00:56:46 +0000 Subject: [PATCH] Addition of a util platform independent networking header file. (mainly for the serialiser's benefit) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@271 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/util/rsnet.h | 53 ++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 libretroshare/src/util/rsnet.h diff --git a/libretroshare/src/util/rsnet.h b/libretroshare/src/util/rsnet.h new file mode 100644 index 000000000..0568b6cf6 --- /dev/null +++ b/libretroshare/src/util/rsnet.h @@ -0,0 +1,53 @@ +/* + * libretroshare/src/util: rsnet.h + * + * Universal Networking Header for RetroShare. + * + * Copyright 2004-2006 by Robert Fernie. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License Version 2 as published by the Free Software Foundation. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + * + * Please report all bugs and problems to "retroshare@lunamutt.com". + * + */ + +#ifndef RS_UNIVERSAL_NETWORK_HEADER +#define RS_UNIVERSAL_NETWORK_HEADER + +#include + +/********************************** WINDOWS/UNIX SPECIFIC PART ******************/ +#ifndef WINDOWS_SYS + +#include +#include +#include + +#include +#include + +#else + +#include +#include + +#include /* for ssize_t */ +typedef uint32_t socklen_t; +typedef uint32_t in_addr_t; + +#endif +/********************************** WINDOWS/UNIX SPECIFIC PART ******************/ + +#endif /* RS_UNIVERSAL_NETWORK_HEADER */