aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/hicn/transport/interfaces/socket_producer.cc
AgeCommit message (Collapse)AuthorFilesLines
2020-02-26[HICN-534] Major rework on libtransport organizationMauro Sardara1-909/+0
Change-Id: I361b83a18b4fd59be136d5f0817fc28e17e89884 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2020-02-21[HICN-2] Added P2P confidential communication on hICNAlberto Compagno1-58/+90
P2P confidential communications exploit the TLS 1.3 protocol to let a consumer to establish a secure communication on an hICN name. Currently we don't support the consumer authentication (mutual authentication in TLS) and the 0-rtt session establishment. Change-Id: I2be073847c08a17f28c837d444081920c5e57a07 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com> Signed-off-by: Olivier Roques <oroques+fdio@cisco.com> Signed-off-by: Mauro Sardara <msardara@cisco.com>
2020-02-12[HICN-508] [HICN-509] [HICN-506] Manifest reworkMauro Sardara1-42/+33
Change-Id: I992205148910be008d66b5acb7f6f1365770f9e8 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2020-02-04[HICN-501] Change calculation of next reassembly segment when manifests are ↵Olivier Roques1-12/+0
enabled When manifests are enabled, the current way of computing the next reassembly segment is broken: if manifests are received out of order, which can happen if a interest for a manifest timeouts, reassembly will also be out of order. This patch makes uses of the SuffixContent class introduced in HICN-392 to correctly compute the index of the next segment to reassemble. Change-Id: I2784f3da544fef7b48a110dd6c233657610f44b8 Signed-off-by: Olivier Roques <oroques+fdio@cisco.com>
2019-11-14[HICN-393] Fix various issues related to manifestsOlivier Roques1-3/+16
The current manifest implementation is broken: 1. ManifestIndexingManager, responsible for validating manifests and segments and retrieving the next ones, assumes that all manifests have the same size. This assumption affects the retrieval of next manifests which is based on the number of segments the current manifest contains. Therefore when a non-full manifests arrives, the computed suffix of the next manifest is wrong and refer to a content instead, which results in an error. 2. Manifests are used to update a suffix queue which stores all the segments listed in manifests. This queue is used to retrieve content sequentially via a pointer indicating the next content to fetch. When the pointer reaches the end of the suffix queue, the consumer stops sending interests. The correct behavior would be to wait for a new manifest which would update the queue. This patch fixes these two issues: 1. Issue 1 was fixed by using SuffixManifest (HICN-392). This allows to set the capacity of a manifest at the start of the consumption instead of checking each time the size of the current manifest and then using that (non-constant) value to retrieve the next manifests. 2. Issue 2 was fixed by passing to ManifestIndexingManager a reference to an object capable of calling the scheduleNextInterest function, which is then called after a new manifest is retrieved to make sure interests for content kept being sent. This is not an optimal solution but rather a temporary one, until the retrieval of manifests is done at the transport level rather than in ManifestIndexingManager. This patch also changes the order of production: manifests are now sent before content. To do so, contents are added into a queue until the manifest is complete. Signed-off-by: Olivier Roques <olvrqs@gmail.com> Change-Id: I1a1bb92ca1cf2d3c745c1b65f6c7376f916c679b
2019-11-14[HICN-392] Assign independent suffixes for manifests/contentsOlivier Roques1-34/+36
This patch introduces a new class, SuffixStrategy and two sub-classes, SuffixContent and SuffixManifest which allow to independently assign suffixes to contents and manifests respectively. The produce() function in socket_producer.cc has also been changed to use them. Given a strategy and an offset (and optionally the capacity of a manifest), these classes automatically compute the correct next suffixes for both type of data (manifest or content). This removes the burden of having to manage suffixes for instance when producing or when retrieving content, and could be expanded to add more strategy in the future. Currently the only existing strategy is "INCREMENTAL": manifests with capacity N have a suffix multiple of N+1: 0, N+1, 2(N+1) etc. Contents have a suffix incremented by 1 except when it conflicts with a manifest: 1, 2, ..., N, N+2, N+3, ..., 2N+1, 2N+3... Signed-off-by: Olivier Roques <olvrqs@gmail.com> Change-Id: Ia7692d7325240de7bea6e38b668077042e5f8758 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
2019-10-31[HICN-354] Fixed bug on raaqm when reassemblying packetsAlberto Compagno1-64/+0
Moved rescheduleOnIOService in the header file to allow its usage together with inheritance Change-Id: I15e4b92535e1478d0dd09828d2d13e2b77e000b3 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
2019-10-22[HICN-342] No need to take a lock on the hash entry if the lookup forAlberto Compagno1-2/+2
a data hit the CS. Data packets coming from the network are dropped, data packets coming from an application face are either dropped or sent to the push node (which does not require a lock on the hash entry) Change-Id: Icf662dffa33b9dda2e2a69fc2104a69a82ef19fd Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
2019-10-22[HICN-328] Reworking setSocketOption and getSocketOption to be thread-safeAlberto Compagno1-45/+614
Change-Id: Ie22572822b9ac1e6c300fd7982035c799546bd76 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
2019-07-08[HICN-242] Perform only one allocation for the whole buffer passed to produce()Mauro Sardara1-9/+18
Change-Id: Ib4628d0a7711e2d7175b3dbb5c152dd22616ff32 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-04-18[HICN-178] Sync send of control messages.v19.04Mauro Sardara1-1/+1
Change-Id: I9a07c6c806ceba10f80a5f67337dce2eee76120d Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-04-15[HICN-155] Consumer socket allows now to read N bytes from the network, ↵Mauro Sardara1-10/+1
where N is defined by the application. Change-Id: Ib20309b40e43e4c0db09b9b484e18cd2e3ebf581 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-03-20[HICN-133] Fix return of number of produced packet of produce().Mauro Sardara1-1/+1
Change-Id: I157d858ce2d7eeaa16f404fcfee9f51a9e6b777b Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-03-18[HICN-103] Manifest retransmissions.Mauro Sardara1-0/+4
Change-Id: I1b61c79e99bb8da471d1e284ea2a629d48b9f308 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-03-08[HICN-99] Destroy in the correct order and in the correct event loop the ↵Mauro Sardara1-34/+13
attributes of connectors and sockets. Cleanup of prints. Change-Id: Ie7eef1d186e581aa950f47df20d57681dc33be55 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-03-05[HICN-11] Rework on transport protocols improving components modularityMauro Sardara1-551/+3
Change-Id: I6683ec5b494238dc93591c103d25275e89b9f267 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-02-11[HICN-46] Remove warnings libtransport on windowsAngelo Mantellini1-5/+5
Change-Id: I09456770dcbca979491cdcadb310eab95a0dea17 Signed-off-by: Angelo Mantellini <manangel@cisco.com>
2019-02-07[HICN-39] Added api that return a pointer to the signature hold in a packetAlberto Compagno1-1/+1
[HICN-40] Fixed signature calculation by allocating a contiguous portion of memory that holds the entire hICN header (IP+TCP+AH) Change-Id: I9d40bab0e3ecb82949b8b3a00e2cc1214457e4e3 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
2019-01-30[HICN-18] first commit of libtransport for windowsAngelo Mantellini1-4/+1
Change-Id: I3a43b22194aa13ae5de1746e3d4bd9a275070261 Signed-off-by: Angelo Mantellini <manangel@cisco.com>
2019-01-29[HICN-17] Add possibility to destroy connection directly from stopEventsLoop ↵Mauro Sardara1-4/+2
with an additional parameter. Change-Id: I869a079a7b2f436768a62de66fd9281a7d1243cd Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-01-17This is the first commit of the hicn projectv19.01Luca Muscariello1-0/+948
Change-Id: I6f2544ad9b9f8891c88cc4bcce3cf19bd3cc863f Signed-off-by: Luca Muscariello <lumuscar+fdio@cisco.com>