summaryrefslogtreecommitdiff
path: root/lib/server/ProtocolWire.h
diff options
context:
space:
mode:
authorBen Summers <ben@fluffy.co.uk>2005-10-14 08:50:54 +0000
committerBen Summers <ben@fluffy.co.uk>2005-10-14 08:50:54 +0000
commit99f8ce096bc5569adbfea1911dbcda24c28d8d8b (patch)
tree049c302161fea1f2f6223e1e8f3c40d9e8aadc8b /lib/server/ProtocolWire.h
Box Backup 0.09 with a few tweeks
Diffstat (limited to 'lib/server/ProtocolWire.h')
-rwxr-xr-xlib/server/ProtocolWire.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/server/ProtocolWire.h b/lib/server/ProtocolWire.h
new file mode 100755
index 00000000..b6d3bd37
--- /dev/null
+++ b/lib/server/ProtocolWire.h
@@ -0,0 +1,43 @@
+// --------------------------------------------------------------------------
+//
+// File
+// Name: ProtocolWire.h
+// Purpose: On the wire structures for Protocol
+// Created: 2003/08/19
+//
+// --------------------------------------------------------------------------
+
+#ifndef PROTOCOLWIRE__H
+#define PROTOCOLWIRE__H
+
+#include <sys/types.h>
+
+// set packing to one byte
+#ifdef STRUCTURE_PATCKING_FOR_WIRE_USE_HEADERS
+#include "BeginStructPackForWire.h"
+#else
+BEGIN_STRUCTURE_PACKING_FOR_WIRE
+#endif
+
+typedef struct
+{
+ char mIdent[32];
+} PW_Handshake;
+
+typedef struct
+{
+ u_int32_t mObjSize;
+ u_int32_t mObjType;
+} PW_ObjectHeader;
+
+#define SPECIAL_STREAM_OBJECT_TYPE 0xffffffff
+
+// Use default packing
+#ifdef STRUCTURE_PATCKING_FOR_WIRE_USE_HEADERS
+#include "EndStructPackForWire.h"
+#else
+END_STRUCTURE_PACKING_FOR_WIRE
+#endif
+
+#endif // PROTOCOLWIRE__H
+