00001 /* 00002 * Copyright (C) 2006, Jose Renato Santos. 00003 * 00004 * This file may be distributed under the terms of the Q Public License 00005 * as defined by Trolltech AS of Norway and appearing in the file 00006 * LICENSE.QPL included in the packaging of this file. 00007 * 00008 * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING 00009 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00010 * PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, 00011 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 00012 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 00013 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 00014 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00015 * 00016 */ 00017 00018 #ifndef __NETMGR_PKT_ 00019 #define __NETMGR_PKT_ 00020 00021 /* -- NetMgr.pkt -- NetMgr wire packet formats 00022 00023 This describes the "wire" format of the command packets 00024 used by NetMgr for commands to a reqid. These are prefixed 00025 by RioNeti with other fields which NetMgr never sees. This 00026 is just the NetMgr part of packets... 00027 00028 It assumes no padding in the structure and that the types sizes are 00029 "correct". 00030 00031 All fields are ordered to be aligned on natural boundries. 00032 Explicit pad fields are added if needed (there should not 00033 be any implicid padding). 00034 00035 Multibyte binary fields are usually in network byte order 00036 except for fields which are only local to one system 00037 (like the requestid field which is opaque everywhere 00038 except on the system which picks it). 00039 00040 commands: 00041 - tellid (cmd, ip, port, reqid, seq# ) 00042 00043 each value is packaged in a u32 (for now)... 00044 00045 -- */ 00046 00047 class RioPktC { 00048 00049 public: 00050 00051 #ifdef WINDOWS 00052 // Windows implementation 00053 static const int CMD_TELLID; 00054 #else 00055 // Linux implementation 00056 static const int CMD_TELLID = 1; 00057 #endif 00058 00059 /* ------------------------------- */ 00060 00061 }; // end of class RioPktC 00062 00063 #ifdef WINDOWS 00064 // Windows implementation 00065 const int RioPktC::CMD_TELLID =1; 00066 #else 00067 // Linux implementation 00068 #endif 00069 00070 /* ----------------------------------- */ 00071 00072 #endif /* __NETMGR_PKT_ */