From ff5a775b94465b30897964630af600fe5915fc51 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Tue, 2 Apr 2013 13:54:21 +0000 Subject: VypressChat added (not adopted) git-svn-id: http://svn.miranda-ng.org/main/trunk@4285 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/!NotAdopted/VypressChat/libvqproto/link.h | 106 ++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 plugins/!NotAdopted/VypressChat/libvqproto/link.h (limited to 'plugins/!NotAdopted/VypressChat/libvqproto/link.h') diff --git a/plugins/!NotAdopted/VypressChat/libvqproto/link.h b/plugins/!NotAdopted/VypressChat/libvqproto/link.h new file mode 100644 index 0000000000..d7ee7bcbed --- /dev/null +++ b/plugins/!NotAdopted/VypressChat/libvqproto/link.h @@ -0,0 +1,106 @@ +/* + * libvqproto: Vypress/QChat protocol interface library + * (c) Saulius Menkevicius 2005 + * + * This program 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 2 of the License, or + * (at your option) any later version. + * + * This program 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: link.h,v 1.11 2005/03/08 17:21:36 bobas Exp $ + */ + +#ifndef __LINK_H +#define __LINK_H + +/* header stuff */ +#include +#include +#include +#include +#include + +#ifdef _WIN32 +/* Win32 system */ +# include +# include +# include +# include +#else +/* UNIX system */ +# include +# include +# include +# include +# include +# include +#endif + +/* windows compatibility hacks + */ +#ifdef WIN32 +#define ENETUNREACH ENOENT +#define ENOMSG ENOENT +#else +/* unix system */ +#define closesocket close +#endif + +/* link structure + */ +#define VQP_LINK_SEEN_SIGS_NUM 20 +#define VQP_LINK_SIG_LEN 9 + +struct vqp_link_struct { + /* link info */ + enum vqp_protocol_type protocol; + enum vqp_protocol_options options; + enum vqp_protocol_connection connection; + unsigned short port; + + /* connection-specific data */ + union vqp_link_conndata_union { + struct vqp_link_conndata_udp_struct { + unsigned long local_address; + unsigned long * p_broadcast_addresses; + unsigned long multicast_address; + } udp; + + struct vqp_link_conndata_ipx_struct { + unsigned char netnum[4]; + unsigned char nodenum[6]; + } ipx; + } conndata; + + + /* link sockets */ + int rx_socket, tx_socket; + + /* keeps track packet sigs already seen */ + unsigned int seen_sig_inc; + char seen_sigs[VQP_LINK_SEEN_SIGS_NUM][VQP_LINK_SIG_LEN]; +}; +#define P_VQP_LINK_STRUCT(p) ((struct vqp_link_struct *) p) + +/* global data */ + +#ifdef MEMWATCH +# include "../contrib/memwatch.h" +# define vqp_mmi_malloc(s) malloc(s) +# define vqp_mmi_free(p) free(p) +#else +extern void * (* vqp_mmi_malloc)(size_t); +extern void (* vqp_mmi_free)(void *); +#endif + +#endif /* __LINK_H */ + -- cgit v1.2.3