aboutsummaryrefslogtreecommitdiffstats
path: root/apps/http-proxy
AgeCommit message (Collapse)AuthorFilesLines
2023-02-02fix(apps): fix issues reported by sonarqubeMichele Papalini11-112/+91
Ref: HICN-836 Signed-off-by: Michele Papalini <micpapal@cisco.com> Change-Id: Ie76771ca75bd224084ce3c893aba661b97064419
2022-09-21refactor(logs): use glog instead of printsEnrico Loparco (eloparco)8-117/+105
Ref: HICN-788 Signed-off-by: Enrico Loparco (eloparco) <eloparco@cisco.com> Change-Id: Iedf75e1658a335985cc2dfd7b82ae61124f2371e
2022-08-04feat: Due to the deep modifications related to names and packet format,Luca Muscariello5-18/+20
this task cover a large part of the codebase and involves several changes: - the library provides a name data structure (hicn_name_t ), which is composed of a name prefix (hicn_name_prefix_t) and a name suffix (hicn_name_suffix_t), and it has been extended to provide all support functions required for name manipulation, including common prefix computation, as required for the Longest Prefix Match (LPM)in the forwarder, in addition to Exact Prefix Match (EPM). - all code has been rewritten to use this data structure instead of having for instance the forwarder define its own name class (used to be Name and NameBitVector) the code has been refactored to minimize name allocations and copies, one remaining aspect is the difference of name storage between PIT and CS entries (respectively in the PIT entry, and in the message buffer), which causes the packet cache index to be updated when a PIT entry is converted into a CS entry. By storing the name in the PIT/CS entry everytime, we might save on this operation). - hicn-light FIB has been rewritten : code has been refactored and should now be shorter and documented; unit tests have been drafted but more would be required to cover all cases and match the algorithms to add/remove nodes, as specified in the doc. all protocol details and hICN header formats are now abstracted by the library for the forwarder (and thus header.h and  protocols/*.h have been removed from public includes, and replaced by packet.h providing protocol agnostic packet level functions, completely replacing the compat.h header that used to provide similar functions. - this works by exposing a opaque buffer to the application (a kind of socket buffer) which is used by the lib to cache the packet format and offsets of the different layers in the buffer and provider efficient operations (the packet format is either defined for packet construction, or guessed at ingress, and this structure is updated accordingly only once). Co-authored-by: Jordan Augé <jordan.auge+fdio@cisco.com> Signed-off-by: Luca Muscariello <muscariello@ieee.org> Change-Id: I31e321897f85f0267fe8ba4720363c180564492f
2022-06-30refactor(lib, hicn-light, vpp, hiperf): HICN-723Luca Muscariello3-3/+18
- move infra data structure into the shared lib - new packet cache using double hashing and lookup on prefix suffix - testing updates - authenticated requests using interest manifests Co-authored-by: Mauro Sardara <msardara@cisco.com> Co-authored-by: Jordan Augé <jordan.auge+fdio@cisco.com> Co-authored-by: Michele Papalini <micpapal@cisco.com> Co-authored-by: Olivier Roques <oroques+fdio@cisco.com> Co-authored-by: Enrico Loparco <eloparco@cisco.com> Change-Id: Iaddebfe6aa5279ea8553433b0f519578f6b9ccd9 Signed-off-by: Luca Muscariello <muscariello@ieee.org>
2022-03-31feat: boostrap hicn 22.02Luca Muscariello15-79/+88
The current patch provides several new features, improvements, bug fixes and also complete rewrite of entire components. - lib The hicn packet parser has been improved with a new packet format fully based on UDP. The TCP header is still temporarily supported but the UDP header will replace completely the new hicn packet format. Improvements have been made to make sure every packet parsing operation is made via this library. The current new header can be used as header between the payload and the UDP header or as trailer in the UDP surplus area to be tested when UDP options will start to be used. - hicn-light The portable packet forwarder has been completely rewritten from scratch with the twofold objective to improve performance and code size but also to drop dependencies such as libparc which is now removed by the current implementation. - hicn control the control library is the agent that is used to program the packet forwarders via their binary API. This component has benefited from significant improvements in terms of interaction model which is now event driven and more robust to failures. - VPP plugin has been updated to support VPP 22.02 - transport Major improvement have been made to the RTC protocol, to the support of IO modules and to the security sub system. Signed manifests are the default data authenticity and integrity framework. Confidentiality can be enabled by sharing the encryption key to the prod/cons layer. The library has been tested with group key based applications such as broadcast/multicast and real-time on-line meetings with trusted server keys or MLS. - testing Unit testing has been introduced using GoogleTest. One third of the code base is covered by unit testing with priority on critical features. Functional testing has also been introduce using Docker, linux bridging and Robot Framework to define test with Less Code techniques to facilitate the extension of the coverage. Co-authored-by: Mauro Sardara <msardara@cisco.com> Co-authored-by: Jordan Augé <jordan.auge+fdio@cisco.com> Co-authored-by: Michele Papalini <micpapal@cisco.com> Co-authored-by: Angelo Mantellini <manangel@cisco.com> Co-authored-by: Jacques Samain <jsamain@cisco.com> Co-authored-by: Olivier Roques <oroques+fdio@cisco.com> Co-authored-by: Enrico Loparco <eloparco@cisco.com> Co-authored-by: Giulio Grassi <gigrassi@cisco.com> Change-Id: I75d0ef70f86d921e3ef503c99271216ff583c215 Signed-off-by: Luca Muscariello <muscariello@ieee.org> Signed-off-by: Mauro Sardara <msardara@cisco.com>
2021-07-06[HICN-713] Transport Library Major Refactoring 2Mauro7-89/+90
Co-authored-by: Luca Muscariello <muscariello@ieee.org> Co-authored-by: Michele Papalini <micpapal@cisco.com> Co-authored-by: Olivier Roques <oroques+fdio@cisco.com> Co-authored-by: Giulio Grassi <gigrassi@cisco.com> Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I5b2c667bad66feb45abdb5effe22ed0f6c85d1c2
2021-04-27[HICN-694] Do not use prefix received by server when autoconfiguring http-proxyMauro Sardara1-1/+0
Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I3b7db1357e705e6f3c79176ad48a26284687c8a1
2021-04-15[HICN-690] Transport Library Major RefactoryLuca Muscariello3-3/+3
The current patch provides a major refactory of the transportlibrary. A summary of the different components that underwent major modifications is reported below. - Transport protocol updates The hierarchy of classes has been optimized to have common transport services across different transport protocols. This can allow to customize a transport protocol with new features. - A new real-time communication protocol The RTC protocol has been optimized in terms of algorithms to reduce consumer-producer synchronization latency. - A novel socket API The API has been reworked to be easier to consumer but also to have a more efficient integration in L4 proxies. - Several performance improvements A large number of performance improvements have been included in particular to make the entire stack zero-copy and optimize cache miss. - New memory buffer framework Memory management has been reworked entirely to provide a more efficient infra with a richer API. Buffers are now allocated in blocks and a single buffer holds the memory for (1) the shared_ptr control block, (2) the metadata of the packet (e.g. name, pointer to other buffers if buffer is chained and relevant offsets), and (3) the packet itself, as it is sent/received over the network. - A new slab allocator Dynamic memory allocation is now managed by a novel slab allocator that is optimised for packet processing and connection management. Memory is organized in pools of blocks all of the same size which are used during the processing of outgoing/incoming packets. When a memory block Is allocated is always taken from a global pool and when it is deallocated is returned to the pool, thus avoiding the cost of any heap allocation in the data path. - New transport connectors Consumer and producer end-points can communication either using an hicn packet forwarder or with direct connector based on shared memories or sockets. The usage of transport connectors typically for unit and funcitonal testing but may have additional usage. - Support for FEC/ECC for transport services FEC/ECC via reed solomon is supported by default and made available to transport services as a modular component. Reed solomon block codes is a default FEC model that can be replaced in a modular way by many other codes including RLNC not avaiable in this distribution. The current FEC framework support variable size padding and efficiently makes use of the infra memory buffers to avoid additiona copies. - Secure transport framework for signature computation and verification Crypto support is nativelty used in hICN for integrity and authenticity. Novel support that includes RTC has been implemented and made modular and reusable acrosso different transport protocols. - TLS - Transport layer security over hicn Point to point confidentiality is provided by integrating TLS on top of hICN reliable and non-reliable transport. The integration is common and makes a different use of the TLS record. - MLS - Messaging layer security over hicn MLS integration on top of hICN is made by using the MLSPP implemetation open sourced by Cisco. We have included instrumentation tools to deploy performance and functional tests of groups of end-points. - Android support The overall code has been heavily tested in Android environments and has received heavy lifting to better run natively in recent Android OS. Co-authored-by: Mauro Sardara <msardara@cisco.com> Co-authored-by: Michele Papalini <micpapal@cisco.com> Co-authored-by: Olivier Roques <oroques+fdio@cisco.com> Co-authored-by: Giulio Grassi <gigrassi@cisco.com> Change-Id: If477ba2fa686e6f47bdf96307ac60938766aef69 Signed-off-by: Luca Muscariello <muscariello@ieee.org>
2021-04-01[HICN-694] Do not use prefix received by server when autoconfiguring http-proxyMauro Sardara1-1/+0
Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: Ibe623ddffbde7679d41946c18e3381854db0b779
2021-01-13[HICN-667] http proxy does not compile on android with ndk 22Angelo Mantellini1-1/+1
Signed-off-by: Angelo Mantellini <angelo.mantellini@cisco.com> Change-Id: Ib372cdda8096083412f202377ac0310f497a950b
2021-01-08[HICN-670] -Wno-c99-designator does not existing in order clang versionsJordan Augé1-1/+11
Change-Id: Ia56f828fe086be6b01e5366f601fcd0a3066ff2f Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
2020-12-22[HICN-667] http proxy does not compile on android with ndk 22Angelo Mantellini1-0/+2
Signed-off-by: Angelo Mantellini <angelo.mantellini@cisco.com> Change-Id: Ib3f3bd89678f1b29eb25bf502a1e8bd5285d7d84
2020-06-22[HICN-630] Modify hicn-proxy file names to respect codestyle for filenamesMauro Sardara6-11/+6
Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I49d62aee60f107a4e9722ac3b671d06bdee2b349
2020-06-15[HICN-629] Add multithreading feature to hicn-http-proxy with SO_REUSEPORT ↵Mauro Sardara2-19/+24
socket option. Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I8930178ba09ca23bd593f2a4008cf0d75f502684
2020-06-15[HIC-628] Update hicn-http-proxy usage output.Mauro Sardara1-4/+20
Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I4981f866aae09952f9799bc0e85543dacdda1e6b
2020-06-09Merge "[HICN-624] http proxy proxy does not stop"Angelo Mantellini1-0/+2
2020-06-05[HICN-625] Http Proxy: listen only on local connectionsMauro Sardara1-1/+2
Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: Ida53353285633787ce96ad8d37507f15e99280b3
2020-06-04[HICN-624] http proxy proxy does not stopAngelo Mantellini1-0/+2
Signed-off-by: Angelo Mantellini <angelo.mantellini@cisco.com> Change-Id: I810a983190ca273acc4be9bc2c1895b53b9c524d
2020-06-03[HICN-622] Add stop() functionality to http proxy.Mauro Sardara15-57/+173
Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I9091cd8ef0f9da869b886541a0116adf3f30e6b9 Signed-off-by: Angelo Mantellini <angelo.mantellini@cisco.com>
2020-06-02[HICN-610] Override hicn prefix used by http-proxy with one receivedMauro Sardara3-32/+36
from configuration. Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: Ib7ec9032cf58ee1aff120ae676ce597b9428bbea Signed-off-by: Mauro Sardara <msardara@cisco.com>
2020-05-31[HICN-619] Compilation Error on AndroidAngelo Mantellini1-1/+4
Signed-off-by: Angelo Mantellini <angelo.mantellini@cisco.com> Change-Id: I96b6f50845d14a310a60287ca2680e94a55fc3d7
2020-05-29[HICH-618] HTTP proxy automatic configuration.Mauro Sardara11-76/+792
Change-Id: I6a76b31b743f155a2d9f7b88e84b838265aab6c8 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2020-05-25[HICN-616] Fix compilation issue with asio 1.16.v20.05-rc0Mauro Sardara1-1/+6
Change-Id: Id9af4820dae5ccbb9a5f41d604ede10958f30b69 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2020-05-20[HICN-614] Add client HTTP proxy (TCP->hICN)Mauro Sardara11-155/+729
Change-Id: Ieaa875edff98404676083bab91233b98ce50c8d0 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2020-02-26[HICN-534] Major rework on libtransport organizationMauro Sardara1-0/+2
Change-Id: I361b83a18b4fd59be136d5f0817fc28e17e89884 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2020-02-19[HICN-530] Add support for chunked Transfer-Encoding in higet and http-proxyMauro Sardara4-23/+109
Change-Id: Ibf954e5e886412a934542a10d94d89bb8a55a676 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2020-02-18[HICN-527] Add component for libhttpproxy.Mauro Sardara1-0/+1
Change-Id: I6396bbab63cc8d5e8c303df83240cf458b5eb8d7 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2020-02-17[HICN-524 HICN-526] Add manifest and content lifetime options to hproxy ↵Mauro Sardara3-13/+28
command line Change-Id: I565e4edb39b2c3d18fd9b2ef8b2a638a53b9eefe Signed-off-by: Mauro Sardara <msardara@cisco.com>
2020-02-14Merge "[HICN-520] Read correct number of bytes in HTTP proxy."Michele Papalini2-11/+23
2020-02-14[HICN-520] Read correct number of bytes in HTTP proxy.Mauro Sardara2-11/+23
Change-Id: If22ad9db54bae0c1bde8f8bc0895c24e9ae23d65 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2020-02-14Merge "[HICN-520] Read correct number of bytes during HTTP response ↵Michele Papalini1-1/+2
reception performed by the http-proxy."
2020-02-13[HICN-520] Read correct number of bytes during HTTP response reception ↵Mauro Sardara1-1/+2
performed by the http-proxy. Change-Id: I06879276c76aacf55715e34590afe0babc89a132 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2020-02-12[HICN-508] [HICN-509] [HICN-506] Manifest reworkMauro Sardara2-2/+14
Change-Id: I992205148910be008d66b5acb7f6f1365770f9e8 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2020-02-03[HICN-489] Add iOS support to hicn stackAngelo Mantellini1-8/+10
Signed-off-by: Angelo Mantellini <angelo.mantellini@cisco.com> Change-Id: I8fa8c4eaa3218eb4be46f713b15ab789c6930aa0
2019-11-22[HICN-412] Added option LINK_FLAGSgto build_executable to specify link flagsAlberto Compagno1-0/+2
Change-Id: I6b382abe374d896c9ea1e0ef5573ba166fafec94 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
2019-09-24[HICN-279] Added libmemif packaging.Mauro Sardara1-1/+1
Change-Id: Ie8662059163b7a01211bb18fb8f6b77bbbc07279 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-07-29[HICN-252] Add per-application policy framework to hicn-light forwarderJordan Augé1-1/+1
Change-Id: I0531cd7a7de179581295ae34766c81cd9cf3e172 Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com> Signed-off-by: Mauro Sardara <msardara@cisco.com> Co-authored-by: Mauro Sardara <msardara@cisco.com>
2019-07-26[HICN-253] Mark cmake target for library as static or shared.Mauro Sardara1-2/+3
Change-Id: I1e8a14f9255f04bddbb87f74a6d6163a02dedb22 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-06-24[HICN-224] Dismiss legacy http proxy.Mauro Sardara1-2/+0
Change-Id: Ica1c51ab5e117564ff3d49ecbcce3be6231f3afc Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-06-06[HICN-213] Fix pthread linking in appsMauro Sardara1-1/+0
Change-Id: I3ec3026c439ab7630333e24312443de16c7249cb Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-05-24[HICN-206] Customize first part of the name for HTTP.Mauro Sardara3-16/+21
Change-Id: Ic2dd9cfce5b7d4eb82bef15cc40da16ea99230d8 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-05-19[HICN-202] Compile apps in release mode if no build mode is specifiedMauro Sardara1-0/+5
Change-Id: I23680a4a4f3863e9aef396dbb9aebe7cc75c3353 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-05-19[HICN-201] Do not reply to interests requesting non-existent data.Mauro Sardara2-10/+40
Change-Id: I7acd1d86e71f3670068b102bd24cd475d8092fb1 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-05-15[HICN-196] Fix ip address parsing from command lineMauro Sardara1-1/+1
Change-Id: I8f768fdde00d96e6e15a84958c085c71def85f0a Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-05-15[HICN-196] Add mtu to command line parameters.Mauro Sardara4-9/+25
Change-Id: Ib6932c23408630be1ca98146d22ac494ad5e5077 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-1/+1
where N is defined by the application. Change-Id: Ib20309b40e43e4c0db09b9b484e18cd2e3ebf581 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-04-03[HICN-165] Http proxy: segment headers and payload in 2 different steps.Mauro Sardara3-24/+22
Change-Id: Ic4f6d1bc693d1170df02b470e8b384b51567acf3 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-03-27[HICN-149] Build packages for applications.Mauro Sardara1-10/+7
Change-Id: Ia13bc4d2711b9897c0afb9b9b43cd04667e41bac Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-03-23[HICN-6] ATS fixesMauro Sardara3-3/+6
Change-Id: I1e9a214ead9d4d9bacd98d797371783ad39909f7 Signed-off-by: Mauro Sardara <msardara@cisco.com>
2019-03-23[HICN-6] ATS Working, little refactoring of appsMauro Sardara8-0/+802
Change-Id: I174815b70bf3a9fbe99ffab7dd2914be04d364b9 Signed-off-by: Mauro Sardara <msardara@cisco.com>