Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

gnutella.h

Go to the documentation of this file.
00001 /*
00002  * $Id: gnutella.h,v 1.3 2005/06/25 01:37:42 daichik Exp $
00003  *
00004  * Copyright (c) 2001-2003, Raphael Manfredi
00005  *
00006  *----------------------------------------------------------------------
00007  * This file is part of gtk-gnutella.
00008  *
00009  *  gtk-gnutella is free software; you can redistribute it and/or modify
00010  *  it under the terms of the GNU General Public License as published by
00011  *  the Free Software Foundation; either version 2 of the License, or
00012  *  (at your option) any later version.
00013  *
00014  *  gtk-gnutella is distributed in the hope that it will be useful,
00015  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  *  GNU General Public License for more details.
00018  *
00019  *  You should have received a copy of the GNU General Public License
00020  *  along with gtk-gnutella; if not, write to the Free Software
00021  *  Foundation, Inc.:
00022  *      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *----------------------------------------------------------------------
00024  */
00025 
00026 #ifndef _if_core_gnutella_h_
00027 #define _if_core_gnutella_h_
00028 
00029 /*
00030  * Constants
00031  */
00032 
00033 #define GTA_MSG_INIT                    0x00
00034 #define GTA_MSG_INIT_RESPONSE           0x01
00035 #define GTA_MSG_BYE                     0x02
00036 #define GTA_MSG_QRP                     0x30
00037 #define GTA_MSG_VENDOR                  0x31    
00038 #define GTA_MSG_STANDARD                0x32    
00039 #define GTA_MSG_PUSH_REQUEST            0x40
00040 #define GTA_MSG_SEARCH                  0x80
00041 #define GTA_MSG_SEARCH_RESULTS          0x81
00042 #define GTA_MSG_HSEP_DATA               0xcd
00043 
00044 /*
00045  * Structures
00046  */
00047 
00048 #if !defined(__GNUC__) && !defined(__attribute__)
00049 #define __attribute__(p)
00050 #endif
00051 
00056 struct gnutella_header {
00057     gchar muid[16];
00058     guchar function;
00059     guchar ttl;
00060     guchar hops;
00061     guchar size[4];
00062 } __attribute__((__packed__));
00063 
00064 #define GTA_HEADER_SIZE     sizeof(struct gnutella_header)
00065 
00066 #endif /* _if_core_gnutella_h_ */
00067 
00068 /* vi: set ts=4 sw=4 cindent: */

Generated on Sun Feb 12 10:49:56 2006 for Gtk-Gnutella by doxygen 1.3.6