summaryrefslogtreecommitdiff
path: root/src/plain_packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plain_packet.c')
-rw-r--r--src/plain_packet.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plain_packet.c b/src/plain_packet.c
index 1ef05fe..e3fe4c5 100644
--- a/src/plain_packet.c
+++ b/src/plain_packet.c
@@ -52,7 +52,7 @@ u_int8_t* plain_packet_get_packet(plain_packet_t* packet)
if(!packet)
return NULL;
- return packet->data.buf_;
+ return packet->data_.buf_;
}
u_int32_t plain_packet_get_length(plain_packet_t* packet)
@@ -68,7 +68,7 @@ u_int8_t* plain_packet_get_payload(plain_packet_t* packet)
if(!packet)
return NULL;
- return (packet->data.buf_ + sizeof(payload_type_t));
+ return (packet->data_.buf_ + sizeof(payload_type_t));
}
u_int32_t plain_packet_get_payload_length(plain_packet_t* packet)
@@ -94,8 +94,8 @@ payload_type_t plain_packet_get_type(plain_packet_t* packet)
{
if(!packet)
return 0;
-
- return packet->data.payload_type_;
+
+ return PAYLOAD_TYPE_T_NTOH(packet->data_.payload_type_);
}
void plain_packet_set_type(plain_packet_t* packet, payload_type_t type)
@@ -103,5 +103,5 @@ void plain_packet_set_type(plain_packet_t* packet, payload_type_t type)
if(!packet)
return;
- packet->data.payload_type_ = type;
+ packet->data_.payload_type_ = PAYLOAD_TYPE_T_HTON(type);
}