summaryrefslogtreecommitdiff
path: root/proto_lib/utilities.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2013-02-12 20:36:08 +0200
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2013-02-12 20:36:08 +0200
commit1d41574c6e8e7bbf3705645feb429df6281ccb83 (patch)
treed0bf256321aef49dd386a9c459104c2fb019ca64 /proto_lib/utilities.cpp
parentc98a83a1591b1bcb58b3ed29bdbfb1446948f466 (diff)
working on service support
Diffstat (limited to 'proto_lib/utilities.cpp')
-rw-r--r--proto_lib/utilities.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/proto_lib/utilities.cpp b/proto_lib/utilities.cpp
index befa203..64f69bb 100644
--- a/proto_lib/utilities.cpp
+++ b/proto_lib/utilities.cpp
@@ -21,6 +21,9 @@
#include <string.h>
#include "utilities.h"
+namespace proto
+{
+
void pack_cli_header(std::vector<unsigned char> &v)
{
pack_buffer(proto_header, sizeof(proto_header), v);
@@ -63,17 +66,19 @@ const unsigned char *to_internal_type(packet_type t)
const unsigned char *type = NULL;
switch(t)
{
- case AUTH_REPLY: case AUTH_REQUEST:
+ case TYPE_AUTH_REPLY: case TYPE_AUTH_REQUEST:
type = type_auth;
break;
- case SERVICES_REPLY: case SERVICES_REQUEST:
+ case TYPE_SERVICES_REPLY: case TYPE_SERVICES_REQUEST:
type = type_services;
break;
- case COMMAND_REPLY: case COMMAND_REQUEST:
+ case TYPE_COMMAND_REPLY: case TYPE_COMMAND_REQUEST:
type = type_command;
break;
- case UNKNOWN: default:
+ case TYPE_UNKNOWN: default:
break;
};
return type;
}
+
+};