aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/includes/hicn
diff options
context:
space:
mode:
authorLuca Muscariello <muscariello@ieee.org>2020-05-13 21:27:38 +0000
committerGerrit Code Review <gerrit@fd.io>2020-05-13 21:27:38 +0000
commitdc5a4297aa5b329dc2536de1f6b4a6e7edc36693 (patch)
tree150e9a386a36e219285283341e202b6373cdcdb8 /libtransport/includes/hicn
parent76c0e9a9ac88ffc3df287cfb936d23cccad79a6e (diff)
parenteb9119968cfc53f41526981924e5c8d44612f98a (diff)
Merge "[HICN-595] Bring TLS up to date"
Diffstat (limited to 'libtransport/includes/hicn')
-rw-r--r--libtransport/includes/hicn/transport/core/packet.h8
-rw-r--r--libtransport/includes/hicn/transport/interfaces/p2psecure_socket_consumer.h4
-rw-r--r--libtransport/includes/hicn/transport/interfaces/socket_consumer.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/libtransport/includes/hicn/transport/core/packet.h b/libtransport/includes/hicn/transport/core/packet.h
index e58e7962d..2efd7439d 100644
--- a/libtransport/includes/hicn/transport/core/packet.h
+++ b/libtransport/includes/hicn/transport/core/packet.h
@@ -148,15 +148,15 @@ class Packet : public std::enable_shared_from_this<Packet> {
std::pair<const uint8_t *, std::size_t> getPayloadReference() const {
int signature_size = 0;
+
if (_is_ah(format_)) {
signature_size = (uint32_t)getSignatureSize();
}
auto header_size = getHeaderSizeFromFormat(format_, signature_size);
- auto payload_length = packet_->length() - header_size;
+ auto payload_length = payloadSize();
- return std::make_pair(packet_->data() + header_size,
- payload_length);
+ return std::make_pair(packet_->data() + header_size, payload_length);
}
Packet &updateLength(std::size_t length = 0);
@@ -229,6 +229,7 @@ class Packet : public std::enable_shared_from_this<Packet> {
Packet &setTTL(uint8_t hops);
uint8_t getTTL() const;
+ void separateHeaderPayload();
void resetPayload();
private:
@@ -248,7 +249,6 @@ class Packet : public std::enable_shared_from_this<Packet> {
}
uint8_t *getSignature() const;
- void separateHeaderPayload();
protected:
Name name_;
diff --git a/libtransport/includes/hicn/transport/interfaces/p2psecure_socket_consumer.h b/libtransport/includes/hicn/transport/interfaces/p2psecure_socket_consumer.h
index 097b0a8c0..224493f00 100644
--- a/libtransport/includes/hicn/transport/interfaces/p2psecure_socket_consumer.h
+++ b/libtransport/includes/hicn/transport/interfaces/p2psecure_socket_consumer.h
@@ -23,10 +23,10 @@ namespace interface {
class P2PSecureConsumerSocket : public ConsumerSocket {
public:
- P2PSecureConsumerSocket(int handshake_protocol, int protocol);
+ P2PSecureConsumerSocket(int handshake_protocol, int transport_protocol);
~P2PSecureConsumerSocket() = default;
+ void registerPrefix(const Prefix &producer_namespace);
};
} // namespace interface
-
} // end namespace transport
diff --git a/libtransport/includes/hicn/transport/interfaces/socket_consumer.h b/libtransport/includes/hicn/transport/interfaces/socket_consumer.h
index 0a6e9a43a..73cbb78b0 100644
--- a/libtransport/includes/hicn/transport/interfaces/socket_consumer.h
+++ b/libtransport/includes/hicn/transport/interfaces/socket_consumer.h
@@ -106,7 +106,7 @@ class ConsumerSocket {
/**
* This method will be called by the transport for understanding how many
- * bytes it should read (at most) before notifying the application.
+ * bytes it should read before notifying the application.
*
* By default it reads 64 KB.
*/