summaryrefslogtreecommitdiff
path: root/proto_lib/utilities.cpp
diff options
context:
space:
mode:
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;
}
+
+};