QUANT is a BSD-licensed C11 implementation of the emerging IETF QUIC standard for a new transport protocol over UDP, intending to support the new HTTP/3 standard. QUANT uses the warpcore zero-copy userspace UDP/IPv4 stack on top of the netmap packet I/O framework. It can also operate over the regular Socket API.
The quant repository is on GitHub, as is the (limited) documentation.
quant uses picotls for its TLS 1.3 implementation. quant also uses klib for some data structures and functions. These dependencies will be built automatically.
quant uses the cmake build system and Doxygen to generate the documentation.
quant uses libev as a basis for the event loop that underlies this implementation, and http-parser for the example HTTP/0.9 client and server.
So you need to install some dependencies. On the Mac, the easiest way is via Homebrew, so install that first. Then, do
brew install cmake libev http-parser doxygen
On Debian-based Linux systems, do
apt install libev-dev libssl-dev libhttp-parser-dev libbsd-dev
On Darwin, you must also install the Xcode command line tools first:
xcode-select --install
To do an
out-of-source build of quant (best practice with cmake
), do the following
to build with make
as a generator:
git submodule update --init --recursive
mkdir Debug
cd Debug
cmake ..
make
The default build (per above) is without optimizations and with extensive debug logging enabled. In order to build an optimized build, do this:
git submodule update --init --recursive
mkdir Release
cd Release
cmake -DCMAKE_BUILD_TYPE=Release ..
make
Instead of building quant for yourself, you can also obtain a [pre-built Docker container] (https://cloud.docker.com/u/ntap/repository/docker/ntap/quant/). For example,
docker pull ntap/quant:latest
should download the latest build on the master
branch. The docker container by default exposes a QUIC server on port 4433 that can serve /index.html
and possibly other resources.
To map the upd port, run the docker container with
docker run -p4433:4433/udp ntap/quant
The libquant
library will be in lib
. There are client
and server
examples in bin
. They explain their usage when called with a -h
argument.
The current interop status of quant against other stacks is captured in this spreadsheet.
At the moment, development happens in branches other than master
, which are
numbered according to the IETF Internet Drafts they
implement. The master
branch is updated whenever such a per-draft branch is
stable.
I'm happy to merge contributions that fix bugs or add features. Please send pull requests.
(Contributions to the underlying warpcore stack are also very welcome.)
Copyright (c) 2016-2019, NetApp, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software has received funding from the European Union's Horizon 2020 research and innovation program 2014-2018 under grant agreement 644866 ("SSICLOPS"). The European Commission is not responsible for any use that may be made of this software.