Commit e8a778ce authored by Andreas Schmidt's avatar Andreas Schmidt

~= reorder headers

parent 5fdc3229
Pipeline #3956 failed with stages
in 2 minutes and 58 seconds
......@@ -21,17 +21,17 @@ local pf_idx = ProtoField.uint8("prrt.index", "Index")
local pf_seqN = ProtoField.uint16("prrt.sequenceNumber", "Sequence Number")
local pf_data = ProtoField.new("Data", "prrt.data", ftypes.BYTES, base.NONE)
local pf_data_length = ProtoField.uint32("prrt.data.length", "Length")
local pf_data_btl_pace = ProtoField.uint32("prrt.data.btl_pace", "Bottleneck Pace")
local pf_data_timestamp = ProtoField.uint32("prrt.data.timestamp", "Timestamp")
local pf_data_btl_pace = ProtoField.uint32("prrt.data.btl_pace", "Bottleneck Pace")
local pf_data_length = ProtoField.uint32("prrt.data.length", "Length")
local pf_data_RTprop = ProtoField.uint32("prrt.data.RTprop", "RTprop")
local pf_data_packettimeout = ProtoField.uint32("prrt.data.packettimeout", "Packet Timeout")
local pf_data_btlDatarate = ProtoField.uint32("prrt.data.btl_datarate", "Bottleneck Datarate")
local pf_red = ProtoField.new("Redundancy", "prrt.redundancy", ftypes.BYTES, base.NONE)
local pf_red_baseSeqN = ProtoField.uint16("prrt.redundancy.baseSequenceNumber", "Base Sequence Number", base.DEC)
local pf_red_timestamp = ProtoField.uint32("prrt.redundancy.timestamp", "Timestamp")
local pf_red_btl_pace = ProtoField.uint32("prrt.redundancy.btl_pace", "Bottleneck Pace")
local pf_red_baseSeqN = ProtoField.uint16("prrt.redundancy.baseSequenceNumber", "Base Sequence Number", base.DEC)
local pf_red_n = ProtoField.uint8("prrt.redundancy.n", "n")
local pf_red_k = ProtoField.uint8("prrt.redundancy.k", "k")
......@@ -55,17 +55,17 @@ prrt_proto.fields = {
pf_seqN,
pf_data,
pf_data_length,
pf_data_btl_pace,
pf_data_timestamp,
pf_data_btl_pace,
pf_data_length,
pf_data_RTprop,
pf_data_packettimeout,
pf_data_btlDatarate,
pf_red,
pf_red_baseSeqN,
pf_red_timestamp,
pf_red_btl_pace,
pf_red_baseSeqN,
pf_red_n,
pf_red_k,
......@@ -117,9 +117,9 @@ local PRRT_MIN_SIZE = 8
-- create sub-dissectors for different types
local function dissect_data(buffer, pinfo, root)
local tree = root:add(pf_data, buffer:range(0))
tree:add(pf_data_btl_pace, buffer:range(0,4))
tree:add(pf_data_length, buffer:range(4,4))
tree:add(pf_data_timestamp, buffer:range(8,4))
tree:add(pf_data_timestamp, buffer:range(0,4))
tree:add(pf_data_btl_pace, buffer:range(4,4))
tree:add(pf_data_length, buffer:range(8,4))
tree:add(pf_data_RTprop, buffer:range(12,4))
tree:add(pf_data_packettimeout, buffer:range(16,4))
tree:add(pf_data_btlDatarate, buffer:range(20,4))
......@@ -131,9 +131,9 @@ end
local function dissect_redundancy(buffer, pinfo, root)
local tree = root:add(pf_red, buffer:range(0))
tree:add(pf_red_baseSeqN, buffer:range(0,2))
tree:add(pf_red_timestamp, buffer:range(2,4))
tree:add(pf_red_btl_pace, buffer:range(6,4))
tree:add(pf_red_timestamp, buffer:range(0,4))
tree:add(pf_red_btl_pace, buffer:range(4,4))
tree:add(pf_red_baseSeqN, buffer:range(8,2))
tree:add(pf_red_n, buffer:range(10,1))
tree:add(pf_red_k, buffer:range(11,1))
......
......@@ -168,9 +168,9 @@ bool PrrtPacket_encode(void *buf_ptr, uint16_t buf_size, PrrtPacket *packet_ptr)
void *encode_redundancy_header(void *buf_ptr, const void *payload) {
const PrrtPacketRedundancyPayload *redundancyPayload = payload;
PrrtPacketField_encode(redundancyPayload, buf_ptr, prrtSequenceNumber_t, baseSequenceNumber, htons);
PrrtPacketField_encode(redundancyPayload, buf_ptr, prrtTimestamp_t, timestamp, htonl);
PrrtPacketField_encode(redundancyPayload, buf_ptr, prrtTimedelta_t , btl_pace, htonl);
PrrtPacketField_encode(redundancyPayload, buf_ptr, prrtSequenceNumber_t, baseSequenceNumber, htons);
PrrtPacketField_encode(redundancyPayload, buf_ptr, uint8_t, n, identity);
PrrtPacketField_encode(redundancyPayload, buf_ptr, uint8_t, k, identity);
......@@ -197,9 +197,9 @@ void *encode_feedback_header(void *buf_ptr, const void *payload) {
void *encode_data_header(void *buf_ptr, const void *payload) {
const PrrtPacketDataPayload *data_payload = payload;
PrrtPacketField_encode(data_payload, buf_ptr, prrtTimestamp_t, timestamp, htonl);
PrrtPacketField_encode(data_payload, buf_ptr, prrtTimedelta_t, btl_pace, htonl);
PrrtPacketField_encode(data_payload, buf_ptr, prrtPacketLength_t, dataLength, htonl);
PrrtPacketField_encode(data_payload, buf_ptr, prrtTimestamp_t, timestamp, htonl);
PrrtPacketField_encode(data_payload, buf_ptr, prrtTimedelta_t, RTprop_us, htonl);
PrrtPacketField_encode(data_payload, buf_ptr, prrtTimestamp_t, packetTimeout_us, htonl);
PrrtPacketField_encode(data_payload, buf_ptr, prrtDeliveryRate_t, btl_datarate, htonl);
......@@ -268,9 +268,9 @@ bool PrrtPacket_decode(void *srcBuffer, uint16_t srcBufferSize, PrrtPacket *targ
void *decode_redundancy_header(void *dstBuffer, const void *srcBuffer) {
PrrtPacketRedundancyPayload *redundancyPayload = (PrrtPacketRedundancyPayload *) srcBuffer;
PrrtPacketField_decode(redundancyPayload, dstBuffer, prrtSequenceNumber_t, baseSequenceNumber, ntohs);
PrrtPacketField_decode(redundancyPayload, dstBuffer, prrtTimestamp_t, timestamp, ntohl);
PrrtPacketField_decode(redundancyPayload, dstBuffer, prrtTimedelta_t , btl_pace, ntohl);
PrrtPacketField_decode(redundancyPayload, dstBuffer, prrtSequenceNumber_t, baseSequenceNumber, ntohs);
PrrtPacketField_decode(redundancyPayload, dstBuffer, uint8_t, n, identity);
PrrtPacketField_decode(redundancyPayload, dstBuffer, uint8_t, k, identity);
......@@ -297,9 +297,9 @@ void *decode_feedback_header(void *dstBuffer, const void *srcBuffer) {
void *decode_data_header(void *dstBuffer, const void *srcBuffer) {
PrrtPacketDataPayload *data_payload = (PrrtPacketDataPayload *) srcBuffer;
PrrtPacketField_decode(data_payload, dstBuffer, prrtTimestamp_t, timestamp, ntohl);
PrrtPacketField_decode(data_payload, dstBuffer, prrtTimedelta_t, btl_pace, ntohl);
PrrtPacketField_decode(data_payload, dstBuffer, prrtPacketLength_t, dataLength, ntohl);
PrrtPacketField_decode(data_payload, dstBuffer, prrtTimestamp_t, timestamp, ntohl);
PrrtPacketField_decode(data_payload, dstBuffer, prrtTimedelta_t, RTprop_us, ntohl);
PrrtPacketField_decode(data_payload, dstBuffer, prrtTimedelta_t, packetTimeout_us, ntohl);
PrrtPacketField_decode(data_payload, dstBuffer, prrtDeliveryRate_t, btl_datarate, ntohl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment