aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmessage/message.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:04 -0500
committerJacek Antonelli2008-08-15 23:45:04 -0500
commit117e22047c5752352342d64e3fb7ce00a4eb8113 (patch)
treee32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/llmessage/message.h
parentSecond Life viewer sources 1.18.0.6 (diff)
downloadmeta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.zip
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.gz
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.bz2
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.xz
Second Life viewer sources 1.18.1.2
Diffstat (limited to 'linden/indra/llmessage/message.h')
-rw-r--r--linden/indra/llmessage/message.h103
1 files changed, 55 insertions, 48 deletions
diff --git a/linden/indra/llmessage/message.h b/linden/indra/llmessage/message.h
index 6c834f7..d18bd09 100644
--- a/linden/indra/llmessage/message.h
+++ b/linden/indra/llmessage/message.h
@@ -39,6 +39,10 @@
39#include <netinet/in.h> 39#include <netinet/in.h>
40#endif 40#endif
41 41
42#if LL_SOLARIS
43#include <netinet/in.h>
44#endif
45
42#if LL_WINDOWS 46#if LL_WINDOWS
43#include "winsock2.h" // htons etc. 47#include "winsock2.h" // htons etc.
44#endif 48#endif
@@ -204,14 +208,14 @@ public:
204class LLMessageSystem 208class LLMessageSystem
205{ 209{
206 private: 210 private:
207 U8 mSendBuffer[MAX_BUFFER_SIZE]; 211 U8 mSendBuffer[MAX_BUFFER_SIZE];
208 S32 mSendSize; 212 S32 mSendSize;
209 213
210 public: 214 public:
211 LLPacketRing mPacketRing; 215 LLPacketRing mPacketRing;
212 LLReliablePacketParams mReliablePacketParams; 216 LLReliablePacketParams mReliablePacketParams;
213 217
214 //LLLinkedList<LLPacketAck> mAckList; 218 //LLLinkedList<LLPacketAck> mAckList;
215 219
216 // Set this flag to TRUE when you want *very* verbose logs. 220 // Set this flag to TRUE when you want *very* verbose logs.
217 BOOL mVerboseLog; 221 BOOL mVerboseLog;
@@ -222,36 +226,35 @@ class LLMessageSystem
222 typedef std::map<U32, LLMessageTemplate*> message_template_number_map_t; 226 typedef std::map<U32, LLMessageTemplate*> message_template_number_map_t;
223 227
224private: 228private:
225 message_template_name_map_t mMessageTemplates; 229 message_template_name_map_t mMessageTemplates;
226 message_template_number_map_t mMessageNumbers; 230 message_template_number_map_t mMessageNumbers;
227 231
228public: 232public:
229 S32 mSystemVersionMajor; 233 S32 mSystemVersionMajor;
230 S32 mSystemVersionMinor; 234 S32 mSystemVersionMinor;
231 S32 mSystemVersionPatch; 235 S32 mSystemVersionPatch;
232 S32 mSystemVersionServer; 236 S32 mSystemVersionServer;
233 U32 mVersionFlags; 237 U32 mVersionFlags;
234 238
239 BOOL mbProtected;
235 240
236 BOOL mbProtected; 241 U32 mNumberHighFreqMessages;
242 U32 mNumberMediumFreqMessages;
243 U32 mNumberLowFreqMessages;
244 S32 mPort;
245 S32 mSocket;
237 246
238 U32 mNumberHighFreqMessages; 247 U32 mPacketsIn; // total packets in, including compressed and uncompressed
239 U32 mNumberMediumFreqMessages; 248 U32 mPacketsOut; // total packets out, including compressed and uncompressed
240 U32 mNumberLowFreqMessages;
241 S32 mPort;
242 S32 mSocket;
243 249
244 U32 mPacketsIn; // total packets in, including compressed and uncompressed 250 U64 mBytesIn; // total bytes in, including compressed and uncompressed
245 U32 mPacketsOut; // total packets out, including compressed and uncompressed 251 U64 mBytesOut; // total bytes out, including compressed and uncompressed
246
247 U64 mBytesIn; // total bytes in, including compressed and uncompressed
248 U64 mBytesOut; // total bytes out, including compressed and uncompressed
249 252
250 U32 mCompressedPacketsIn; // total compressed packets in 253 U32 mCompressedPacketsIn; // total compressed packets in
251 U32 mCompressedPacketsOut; // total compressed packets out 254 U32 mCompressedPacketsOut; // total compressed packets out
252 255
253 U32 mReliablePacketsIn; // total reliable packets in 256 U32 mReliablePacketsIn; // total reliable packets in
254 U32 mReliablePacketsOut; // total reliable packets out 257 U32 mReliablePacketsOut; // total reliable packets out
255 258
256 U32 mDroppedPackets; // total dropped packets in 259 U32 mDroppedPackets; // total dropped packets in
257 U32 mResentPackets; // total resent packets out 260 U32 mResentPackets; // total resent packets out
@@ -259,26 +262,26 @@ public:
259 U32 mOffCircuitPackets; // total # of off-circuit packets rejected 262 U32 mOffCircuitPackets; // total # of off-circuit packets rejected
260 U32 mInvalidOnCircuitPackets; // total # of on-circuit but invalid packets rejected 263 U32 mInvalidOnCircuitPackets; // total # of on-circuit but invalid packets rejected
261 264
262 S64 mUncompressedBytesIn; // total uncompressed size of compressed packets in 265 S64 mUncompressedBytesIn; // total uncompressed size of compressed packets in
263 S64 mUncompressedBytesOut; // total uncompressed size of compressed packets out 266 S64 mUncompressedBytesOut; // total uncompressed size of compressed packets out
264 S64 mCompressedBytesIn; // total compressed size of compressed packets in 267 S64 mCompressedBytesIn; // total compressed size of compressed packets in
265 S64 mCompressedBytesOut; // total compressed size of compressed packets out 268 S64 mCompressedBytesOut; // total compressed size of compressed packets out
266 S64 mTotalBytesIn; // total size of all uncompressed packets in 269 S64 mTotalBytesIn; // total size of all uncompressed packets in
267 S64 mTotalBytesOut; // total size of all uncompressed packets out 270 S64 mTotalBytesOut; // total size of all uncompressed packets out
268 271
269 BOOL mSendReliable; // does the outgoing message require a pos ack? 272 BOOL mSendReliable; // does the outgoing message require a pos ack?
270 273
271 LLCircuit mCircuitInfo; 274 LLCircuit mCircuitInfo;
272 F64 mCircuitPrintTime; // used to print circuit debug info every couple minutes 275 F64 mCircuitPrintTime; // used to print circuit debug info every couple minutes
273 F32 mCircuitPrintFreq; // seconds 276 F32 mCircuitPrintFreq; // seconds
274 277
275 std::map<U64, U32> mIPPortToCircuitCode; 278 std::map<U64, U32> mIPPortToCircuitCode;
276 std::map<U32, U64> mCircuitCodeToIPPort; 279 std::map<U32, U64> mCircuitCodeToIPPort;
277 U32 mOurCircuitCode; 280 U32 mOurCircuitCode;
278 S32 mSendPacketFailureCount; 281 S32 mSendPacketFailureCount;
279 S32 mUnackedListDepth; 282 S32 mUnackedListDepth;
280 S32 mUnackedListSize; 283 S32 mUnackedListSize;
281 S32 mDSMaxListDepth; 284 S32 mDSMaxListDepth;
282 285
283public: 286public:
284 // Read file and build message templates 287 // Read file and build message templates
@@ -693,14 +696,14 @@ private:
693 696
694 LLMessagePollInfo *mPollInfop; 697 LLMessagePollInfo *mPollInfop;
695 698
696 U8 mEncodedRecvBuffer[MAX_BUFFER_SIZE]; 699 U8 mEncodedRecvBuffer[MAX_BUFFER_SIZE];
697 U8 mTrueReceiveBuffer[MAX_BUFFER_SIZE]; 700 U8 mTrueReceiveBuffer[MAX_BUFFER_SIZE];
698 S32 mTrueReceiveSize; 701 S32 mTrueReceiveSize;
699 702
700 // Must be valid during decode 703 // Must be valid during decode
701 704
702 BOOL mbError; 705 BOOL mbError;
703 S32 mErrorCode; 706 S32 mErrorCode;
704 707
705 F64 mResendDumpTime; // The last time we dumped resends 708 F64 mResendDumpTime; // The last time we dumped resends
706 709
@@ -775,6 +778,10 @@ void null_message_callback(LLMessageSystem *msg, void **data);
775// Inlines 778// Inlines
776// 779//
777 780
781#if !defined( LL_BIG_ENDIAN ) && !defined( LL_LITTLE_ENDIAN )
782#error Unknown endianness for htonmemcpy. Did you miss a common include?
783#endif
784
778static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, size_t n) 785static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, size_t n)
779{ 786{
780 char *s = (char *)vs; 787 char *s = (char *)vs;