mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Latest changes
- Add support for Mac OS - Add support for Raspberry Pi - Fix BoringSSL compilation: include <openssl/hmac.h> explicitly
This commit is contained in:
parent
50aadb33c7
commit
e019799402
16 changed files with 221 additions and 75 deletions
9
CHANGELOG
Normal file
9
CHANGELOG
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
2017-09-26
|
||||||
|
|
||||||
|
- Add support for Mac OS
|
||||||
|
- Add support for Raspberry Pi
|
||||||
|
- Fix BoringSSL compilation: include <openssl/hmac.h> explicitly
|
||||||
|
|
||||||
|
2017-09-22
|
||||||
|
|
||||||
|
- Initial release
|
|
@ -28,7 +28,7 @@ MESSAGE(STATUS "DEVEL_MODE: ${DEVEL_MODE}")
|
||||||
SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -Wall -Wextra -Wno-unused-parameter")
|
SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -Wall -Wextra -Wno-unused-parameter")
|
||||||
SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -fno-omit-frame-pointer")
|
SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -fno-omit-frame-pointer")
|
||||||
|
|
||||||
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
|
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9.3)
|
||||||
SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -Wno-missing-field-initializers")
|
SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -Wno-missing-field-initializers")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(DEVEL_MODE EQUAL 1)
|
IF(DEVEL_MODE EQUAL 1)
|
||||||
|
@ -58,12 +58,15 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MY_CMAKE_FLAGS} $ENV{EXTRA_CFLAGS}")
|
||||||
|
|
||||||
MESSAGE(STATUS "Compiler flags: ${CMAKE_C_FLAGS}")
|
MESSAGE(STATUS "Compiler flags: ${CMAKE_C_FLAGS}")
|
||||||
|
|
||||||
|
IF(NOT DEFINED BORINGSSL_INCLUDE)
|
||||||
|
include_directories( /usr/local/lib )
|
||||||
|
ENDIF()
|
||||||
|
IF(NOT DEFINED BORINGSSL_LIB)
|
||||||
|
link_directories( /usr/local/include )
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
include_directories( include )
|
include_directories( include )
|
||||||
include_directories( ${BORINGSSL_INCLUDE} )
|
|
||||||
|
|
||||||
link_directories( ${BORINGSSL_LIB} )
|
|
||||||
|
|
||||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||||
# Find libevent on FreeBSD:
|
# Find libevent on FreeBSD:
|
||||||
|
@ -73,7 +76,7 @@ ENDIF()
|
||||||
|
|
||||||
add_executable(http_client test/http_client.c test/prog.c test/test_common.c test/test_cert.c)
|
add_executable(http_client test/http_client.c test/prog.c test/test_common.c test/test_cert.c)
|
||||||
|
|
||||||
target_link_libraries(http_client lsquic event pthread libssl.a libcrypto.a libdecrepit.a ${FIULIB} z m)
|
target_link_libraries(http_client lsquic event pthread libssl.a libcrypto.a ${FIULIB} z m)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,10 @@ Fetch Google's home page:
|
||||||
|
|
||||||
./http_client -H www.google.com -s 74.125.22.106:443 -p /
|
./http_client -H www.google.com -s 74.125.22.106:443 -p /
|
||||||
|
|
||||||
|
or even
|
||||||
|
|
||||||
|
./http_client -H www.google.co.uk -s 2a00:1450:4009:80c::2003:443 -p /
|
||||||
|
|
||||||
In the example above, -H specifies the domain; it is also used as the value
|
In the example above, -H specifies the domain; it is also used as the value
|
||||||
of SNI paramater in the handshake.
|
of SNI paramater in the handshake.
|
||||||
|
|
||||||
|
|
95
README.md
95
README.md
|
@ -21,17 +21,100 @@ Documentation
|
||||||
|
|
||||||
The documentation for this module is admittedly sparse. The API is
|
The documentation for this module is admittedly sparse. The API is
|
||||||
documented in include/lsquic.h. If you have doxygen, you can run
|
documented in include/lsquic.h. If you have doxygen, you can run
|
||||||
`doxygen dox.cfg' or `make docs'. The example program is
|
`doxygen dox.cfg` or `make docs`. The example program is
|
||||||
test/http_client.c: a bare-bones, but working, QUIC client. Have a look
|
test/http_client.c: a bare-bones, but working, QUIC client. Have a look
|
||||||
in EXAMPLES.txt to see how it can be used.
|
in EXAMPLES.txt to see how it can be used.
|
||||||
|
|
||||||
Building
|
Requirements
|
||||||
--------
|
------------
|
||||||
|
|
||||||
To build LSQUIC, you need CMake and BoringSSL. The example program
|
To build LSQUIC, you need CMake, zlib, and BoringSSL. The example program
|
||||||
uses libevent to provide the event loop. In short:
|
uses libevent to provide the event loop.
|
||||||
|
|
||||||
cmake -DBORINGSSL_INCLUDE=/some/dir -DBORINGSSL_LIB=/some/other/dir .
|
Building BoringSSL
|
||||||
|
------------------
|
||||||
|
|
||||||
|
BoringSSL is not packaged; you have to build it yourself. The process is
|
||||||
|
straightforward. You will need `go` installed.
|
||||||
|
|
||||||
|
1. Clone BoringSSL by issuing the following command:
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://boringssl.googlesource.com/boringssl
|
||||||
|
cd boringssl
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Check out stable branch:
|
||||||
|
|
||||||
|
```
|
||||||
|
git co chromium-stable
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Compile the library
|
||||||
|
|
||||||
|
```
|
||||||
|
cmake . && make
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to turn on optimizations, do
|
||||||
|
|
||||||
|
```
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release . && make
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Install the library
|
||||||
|
|
||||||
|
This is the manual step. You will need to copy library files manually.
|
||||||
|
LSQUIC client library needs two: `ssl/libssl.a` and `crypto/libcrypto.a`.
|
||||||
|
To install these in `/usr/local/lib`, you should do the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
BORINGSSL_SOURCE=$PWD
|
||||||
|
cd /usr/local/lib
|
||||||
|
sudo cp $BORINGSSL_SOURCE/ssl/libssl.a
|
||||||
|
sudo cp $BORINGSSL_SOURCE/crypto/libcrypto.a
|
||||||
|
```
|
||||||
|
|
||||||
|
If you do not want to install the library (or do not have root), you
|
||||||
|
can do this instead:
|
||||||
|
|
||||||
|
```
|
||||||
|
BORINGSSL_SOURCE=$PWD
|
||||||
|
mkdir -p $HOME/tmp/boringssl-libs
|
||||||
|
cd $HOME/tmp/boringssl-libs
|
||||||
|
ln -s $BORINGSSL_SOURCE/ssl/libssl.a
|
||||||
|
ln -s $BORINGSSL_SOURCE/crypto/libcrypto.a
|
||||||
|
```
|
||||||
|
|
||||||
|
Building LSQUIC Client Library
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
LSQUIC's `http_client` and the tests link BoringSSL libraries statically.
|
||||||
|
Following previous section, you can build LSQUIC as follows:
|
||||||
|
|
||||||
|
```
|
||||||
|
cmake -DBORINGSSL_INCLUDE=$BORINGSSL_SOURCE/include \
|
||||||
|
-DBORINGSSL_LIB=$HOME/tmp/boringssl-libs .
|
||||||
|
make
|
||||||
|
```
|
||||||
|
|
||||||
|
Run tests:
|
||||||
|
|
||||||
|
```
|
||||||
|
make test
|
||||||
|
```
|
||||||
|
|
||||||
|
Platforms
|
||||||
|
---------
|
||||||
|
|
||||||
|
The client library has been tested on the following platforms:
|
||||||
|
- Linux
|
||||||
|
- x86_64
|
||||||
|
- ARM (Raspberry Pi 3)
|
||||||
|
- FreeBSD
|
||||||
|
- i386
|
||||||
|
- MacOS
|
||||||
|
- x86_64
|
||||||
|
|
||||||
Have fun,
|
Have fun,
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/curve25519.h>
|
#include <openssl/curve25519.h>
|
||||||
|
#include <openssl/hmac.h>
|
||||||
|
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
|
|
||||||
|
|
|
@ -1907,12 +1907,6 @@ process_stream_ready_to_send (struct full_conn *conn, lsquic_stream_t *stream,
|
||||||
{
|
{
|
||||||
if (LSQUIC_STREAM_HANDSHAKE == stream->id)
|
if (LSQUIC_STREAM_HANDSHAKE == stream->id)
|
||||||
{
|
{
|
||||||
#if LSQUIC_STREAM_HANDSHAKE
|
|
||||||
/* Full connection implies that the server has completed the
|
|
||||||
* handshake:
|
|
||||||
*/
|
|
||||||
assert(0 == (conn->fc_flags & FC_SERVER));
|
|
||||||
#endif
|
|
||||||
/* Handshake messages are sent in brand-new packets. If handshake
|
/* Handshake messages are sent in brand-new packets. If handshake
|
||||||
* is not complete, the packet is zero-padded.
|
* is not complete, the packet is zero-padded.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -13,6 +13,11 @@
|
||||||
#define bswap_16 bswap16
|
#define bswap_16 bswap16
|
||||||
#define bswap_32 bswap32
|
#define bswap_32 bswap32
|
||||||
#define bswap_64 bswap64
|
#define bswap_64 bswap64
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
#include <libkern/OSByteOrder.h>
|
||||||
|
#define bswap_16 OSSwapInt16
|
||||||
|
#define bswap_32 OSSwapInt32
|
||||||
|
#define bswap_64 OSSwapInt64
|
||||||
#else
|
#else
|
||||||
#include <byteswap.h>
|
#include <byteswap.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -498,13 +498,13 @@ lsquic_stream_write_avail (const lsquic_stream_t *stream)
|
||||||
conn_avail = lsquic_conn_cap_avail(&stream->conn_pub->conn_cap);
|
conn_avail = lsquic_conn_cap_avail(&stream->conn_pub->conn_cap);
|
||||||
if (conn_avail < stream_avail)
|
if (conn_avail < stream_avail)
|
||||||
{
|
{
|
||||||
LSQ_DEBUG("stream %u write buffer is limited by connection: %jd",
|
LSQ_DEBUG("stream %u write buffer is limited by connection: "
|
||||||
stream->id, conn_avail);
|
"%"PRIu64, stream->id, conn_avail);
|
||||||
return conn_avail;
|
return conn_avail;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LSQ_DEBUG("stream %u write buffer is limited by stream: %jd",
|
LSQ_DEBUG("stream %u write buffer is limited by stream: %"PRIu64,
|
||||||
stream->id, stream_avail);
|
stream->id, stream_avail);
|
||||||
return stream_avail;
|
return stream_avail;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,22 @@
|
||||||
# Copyright (c) 2017 LiteSpeed Technologies Inc. See LICENSE.
|
# Copyright (c) 2017 LiteSpeed Technologies Inc. See LICENSE.
|
||||||
|
|
||||||
|
INCLUDE(CheckSymbolExists)
|
||||||
|
|
||||||
|
CHECK_SYMBOL_EXISTS(
|
||||||
|
IP_MTU_DISCOVER
|
||||||
|
"netinet/in.h"
|
||||||
|
HAVE_IP_MTU_DISCOVER
|
||||||
|
)
|
||||||
|
|
||||||
|
CHECK_SYMBOL_EXISTS(
|
||||||
|
IP_DONTFRAG
|
||||||
|
"netinet/in.h"
|
||||||
|
HAVE_IP_DONTFRAG
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/test_config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/test_config.h)
|
||||||
|
|
||||||
|
|
||||||
add_subdirectory(unittests)
|
add_subdirectory(unittests)
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "../src/liblsquic/lsquic_hash.h"
|
#include "../src/liblsquic/lsquic_hash.h"
|
||||||
#include "../src/liblsquic/lsquic_logger.h"
|
#include "../src/liblsquic/lsquic_logger.h"
|
||||||
|
|
||||||
|
#include "test_config.h"
|
||||||
#include "test_cert.h"
|
#include "test_cert.h"
|
||||||
#include "test_common.h"
|
#include "test_common.h"
|
||||||
#include "prog.h"
|
#include "prog.h"
|
||||||
|
@ -86,7 +87,9 @@ prog_print_common_options (const struct prog *prog, FILE *out)
|
||||||
" is used.\n"
|
" is used.\n"
|
||||||
" -i USEC Library will `tick' every USEC microseconds. The default\n"
|
" -i USEC Library will `tick' every USEC microseconds. The default\n"
|
||||||
" is %u\n"
|
" is %u\n"
|
||||||
|
#if LSQUIC_DONTFRAG_SUPPORTED
|
||||||
" -D Set `do not fragment' flag on outgoing UDP packets\n"
|
" -D Set `do not fragment' flag on outgoing UDP packets\n"
|
||||||
|
#endif
|
||||||
" -z BYTES Maximum size of outgoing UDP packets. The default is 1370\n"
|
" -z BYTES Maximum size of outgoing UDP packets. The default is 1370\n"
|
||||||
" bytes for IPv4 socket and 1350 bytes for IPv6 socket\n"
|
" bytes for IPv4 socket and 1350 bytes for IPv6 socket\n"
|
||||||
" -L LEVEL Log level for all modules. Possible values are `debug',\n"
|
" -L LEVEL Log level for all modules. Possible values are `debug',\n"
|
||||||
|
@ -142,6 +145,7 @@ prog_set_opt (struct prog *prog, int opt, const char *arg)
|
||||||
case 'i':
|
case 'i':
|
||||||
prog->prog_period_usec = atoi(arg);
|
prog->prog_period_usec = atoi(arg);
|
||||||
return 0;
|
return 0;
|
||||||
|
#if LSQUIC_DONTFRAG_SUPPORTED
|
||||||
case 'D':
|
case 'D':
|
||||||
{
|
{
|
||||||
struct service_port *sport = TAILQ_LAST(prog->prog_sports, sport_head);
|
struct service_port *sport = TAILQ_LAST(prog->prog_sports, sport_head);
|
||||||
|
@ -150,6 +154,7 @@ prog_set_opt (struct prog *prog, int opt, const char *arg)
|
||||||
sport->sp_flags |= SPORT_DONT_FRAGMENT;
|
sport->sp_flags |= SPORT_DONT_FRAGMENT;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
case 'm':
|
case 'm':
|
||||||
prog->prog_packout_max = atoi(arg);
|
prog->prog_packout_max = atoi(arg);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -42,7 +42,13 @@ prog_init (struct prog *, unsigned lsquic_engine_flags, struct sport_head *,
|
||||||
# define SENDMMSG_FLAG ""
|
# define SENDMMSG_FLAG ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PROG_OPTS "i:Dm:c:y:L:l:o:H:s:S:z:" SENDMMSG_FLAG
|
#if LSQUIC_DONTFRAG_SUPPORTED
|
||||||
|
# define IP_DONTFRAG_FLAG "D"
|
||||||
|
#else
|
||||||
|
# define IP_DONTFRAG_FLAG ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PROG_OPTS "i:m:c:y:L:l:o:H:s:S:z:" SENDMMSG_FLAG IP_DONTFRAG_FLAG
|
||||||
|
|
||||||
/* Returns:
|
/* Returns:
|
||||||
* 0 Applied
|
* 0 Applied
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
# define __APPLE_USE_RFC_3542 1
|
||||||
|
#endif
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
|
@ -447,8 +450,7 @@ sport_init_server (struct service_port *sport, struct lsquic_engine *engine,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if __linux__
|
#if (__linux__ && !defined(IP_RECVORIGDSTADDR)) || __APPLE__
|
||||||
#if !defined(IP_RECVORIGDSTADDR)
|
|
||||||
/* Need to set IP_PKTINFO for sending */
|
/* Need to set IP_PKTINFO for sending */
|
||||||
if (AF_INET == sa_local->sa_family)
|
if (AF_INET == sa_local->sa_family)
|
||||||
{
|
{
|
||||||
|
@ -462,7 +464,6 @@ sport_init_server (struct service_port *sport, struct lsquic_engine *engine,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#elif IP_RECVDSTADDR != IP_SENDSRCADDR
|
#elif IP_RECVDSTADDR != IP_SENDSRCADDR
|
||||||
/* On FreeBSD, IP_RECVDSTADDR is the same as IP_SENDSRCADDR, but I do not
|
/* On FreeBSD, IP_RECVDSTADDR is the same as IP_SENDSRCADDR, but I do not
|
||||||
* know about other BSD systems.
|
* know about other BSD systems.
|
||||||
|
@ -505,6 +506,7 @@ sport_init_server (struct service_port *sport, struct lsquic_engine *engine,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LSQUIC_DONTFRAG_SUPPORTED
|
||||||
if (sport->sp_flags & SPORT_DONT_FRAGMENT)
|
if (sport->sp_flags & SPORT_DONT_FRAGMENT)
|
||||||
{
|
{
|
||||||
if (AF_INET == sa_local->sa_family)
|
if (AF_INET == sa_local->sa_family)
|
||||||
|
@ -526,6 +528,7 @@ sport_init_server (struct service_port *sport, struct lsquic_engine *engine,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (sport->sp_flags & SPORT_SET_SNDBUF)
|
if (sport->sp_flags & SPORT_SET_SNDBUF)
|
||||||
{
|
{
|
||||||
|
@ -592,7 +595,7 @@ sport_init_client (struct service_port *sport, struct lsquic_engine *engine,
|
||||||
struct event_base *eb)
|
struct event_base *eb)
|
||||||
{
|
{
|
||||||
const struct sockaddr *sa_peer = (struct sockaddr *) &sport->sas;
|
const struct sockaddr *sa_peer = (struct sockaddr *) &sport->sas;
|
||||||
int sockfd, saved_errno, flags, on, s;
|
int sockfd, saved_errno, flags, s;
|
||||||
socklen_t socklen;
|
socklen_t socklen;
|
||||||
union {
|
union {
|
||||||
struct sockaddr_in sin;
|
struct sockaddr_in sin;
|
||||||
|
@ -646,10 +649,12 @@ sport_init_client (struct service_port *sport, struct lsquic_engine *engine,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LSQUIC_DONTFRAG_SUPPORTED
|
||||||
if (sport->sp_flags & SPORT_DONT_FRAGMENT)
|
if (sport->sp_flags & SPORT_DONT_FRAGMENT)
|
||||||
{
|
{
|
||||||
if (AF_INET == sa_local->sa_family)
|
if (AF_INET == sa_local->sa_family)
|
||||||
{
|
{
|
||||||
|
int on;
|
||||||
#if __linux__
|
#if __linux__
|
||||||
on = IP_PMTUDISC_DO;
|
on = IP_PMTUDISC_DO;
|
||||||
s = setsockopt(sockfd, IPPROTO_IP, IP_MTU_DISCOVER, &on,
|
s = setsockopt(sockfd, IPPROTO_IP, IP_MTU_DISCOVER, &on,
|
||||||
|
@ -667,6 +672,7 @@ sport_init_client (struct service_port *sport, struct lsquic_engine *engine,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (sport->sp_flags & SPORT_SET_SNDBUF)
|
if (sport->sp_flags & SPORT_SET_SNDBUF)
|
||||||
{
|
{
|
||||||
|
@ -733,7 +739,7 @@ setup_control_msg (struct msghdr *msg, const struct lsquic_out_spec *spec,
|
||||||
struct cmsghdr *cmsg;
|
struct cmsghdr *cmsg;
|
||||||
struct sockaddr_in *local_sa;
|
struct sockaddr_in *local_sa;
|
||||||
struct sockaddr_in6 *local_sa6;
|
struct sockaddr_in6 *local_sa6;
|
||||||
#if __linux__
|
#if __linux__ || __APPLE__
|
||||||
struct in_pktinfo info;
|
struct in_pktinfo info;
|
||||||
#endif
|
#endif
|
||||||
struct in6_pktinfo info6;
|
struct in6_pktinfo info6;
|
||||||
|
@ -745,7 +751,7 @@ setup_control_msg (struct msghdr *msg, const struct lsquic_out_spec *spec,
|
||||||
if (AF_INET == spec->dest_sa->sa_family)
|
if (AF_INET == spec->dest_sa->sa_family)
|
||||||
{
|
{
|
||||||
local_sa = (struct sockaddr_in *) spec->local_sa;
|
local_sa = (struct sockaddr_in *) spec->local_sa;
|
||||||
#if __linux__
|
#if __linux__ || __APPLE__
|
||||||
memset(&info, 0, sizeof(info));
|
memset(&info, 0, sizeof(info));
|
||||||
info.ipi_spec_dst = local_sa->sin_addr;
|
info.ipi_spec_dst = local_sa->sin_addr;
|
||||||
cmsg->cmsg_level = IPPROTO_IP;
|
cmsg->cmsg_level = IPPROTO_IP;
|
||||||
|
|
|
@ -21,7 +21,9 @@ struct prog;
|
||||||
|
|
||||||
enum sport_flags
|
enum sport_flags
|
||||||
{
|
{
|
||||||
|
#if LSQUIC_DONTFRAG_SUPPORTED
|
||||||
SPORT_DONT_FRAGMENT = (1 << 0),
|
SPORT_DONT_FRAGMENT = (1 << 0),
|
||||||
|
#endif
|
||||||
SPORT_SET_SNDBUF = (1 << 1), /* SO_SNDBUF */
|
SPORT_SET_SNDBUF = (1 << 1), /* SO_SNDBUF */
|
||||||
SPORT_SET_RCVBUF = (1 << 2), /* SO_RCVBUF */
|
SPORT_SET_RCVBUF = (1 << 2), /* SO_RCVBUF */
|
||||||
SPORT_SERVER = (1 << 3),
|
SPORT_SERVER = (1 << 3),
|
||||||
|
|
9
test/test_config.h.in
Normal file
9
test/test_config.h.in
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#ifndef LSQUIC_CONFIG_H
|
||||||
|
#define LSQUIC_CONFIG_H
|
||||||
|
|
||||||
|
#cmakedefine HAVE_IP_DONTFRAG 1
|
||||||
|
#cmakedefine HAVE_IP_MTU_DISCOVER 1
|
||||||
|
|
||||||
|
#define LSQUIC_DONTFRAG_SUPPORTED (HAVE_IP_DONTFRAG || HAVE_IP_MTU_DISCOVER)
|
||||||
|
|
||||||
|
#endif
|
|
@ -9,11 +9,11 @@ enable_testing()
|
||||||
|
|
||||||
|
|
||||||
add_executable(test_rechist test_rechist.c)
|
add_executable(test_rechist test_rechist.c)
|
||||||
target_link_libraries(test_rechist lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_rechist lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(rechist test_rechist)
|
add_test(rechist test_rechist)
|
||||||
|
|
||||||
add_executable(test_senhist test_senhist.c)
|
add_executable(test_senhist test_senhist.c)
|
||||||
target_link_libraries(test_senhist lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_senhist lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(senhist test_senhist)
|
add_test(senhist test_senhist)
|
||||||
|
|
||||||
add_executable(test_rtt test_rtt.c)
|
add_executable(test_rtt test_rtt.c)
|
||||||
|
@ -26,12 +26,12 @@ add_test(set test_set)
|
||||||
|
|
||||||
|
|
||||||
add_executable(test_engine_ctor test_engine_ctor.c)
|
add_executable(test_engine_ctor test_engine_ctor.c)
|
||||||
target_link_libraries(test_engine_ctor lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_engine_ctor lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(engine_ctor test_engine_ctor)
|
add_test(engine_ctor test_engine_ctor)
|
||||||
|
|
||||||
|
|
||||||
add_executable(test_stream test_stream.c)
|
add_executable(test_stream test_stream.c)
|
||||||
target_link_libraries(test_stream lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_stream lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(stream test_stream)
|
add_test(stream test_stream)
|
||||||
add_test(stream_hash test_stream -h)
|
add_test(stream_hash test_stream -h)
|
||||||
add_test(stream_write_file test_stream -w Makefile)
|
add_test(stream_write_file test_stream -w Makefile)
|
||||||
|
@ -42,7 +42,7 @@ add_test(stream_write_file_A test_stream -A -w Makefile)
|
||||||
add_test(stream_hash_write_file_A test_stream -A -h -w Makefile)
|
add_test(stream_hash_write_file_A test_stream -A -h -w Makefile)
|
||||||
|
|
||||||
add_executable(test_spi test_spi.c)
|
add_executable(test_spi test_spi.c)
|
||||||
target_link_libraries(test_spi lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_spi lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(spi test_spi)
|
add_test(spi test_spi)
|
||||||
|
|
||||||
add_executable(test_malo test_malo.c)
|
add_executable(test_malo test_malo.c)
|
||||||
|
@ -58,71 +58,71 @@ target_link_libraries(test_lsquic_hash lsquic m ${FIULIB})
|
||||||
add_test(lsquic_hash test_lsquic_hash)
|
add_test(lsquic_hash test_lsquic_hash)
|
||||||
|
|
||||||
add_executable(test_blocked_gquic_le test_blocked_gquic_le.c)
|
add_executable(test_blocked_gquic_le test_blocked_gquic_le.c)
|
||||||
target_link_libraries(test_blocked_gquic_le lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_blocked_gquic_le lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(blocked_gquic_le test_blocked_gquic_le)
|
add_test(blocked_gquic_le test_blocked_gquic_le)
|
||||||
|
|
||||||
add_executable(test_blocked_gquic_be test_blocked_gquic_be.c)
|
add_executable(test_blocked_gquic_be test_blocked_gquic_be.c)
|
||||||
target_link_libraries(test_blocked_gquic_be lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_blocked_gquic_be lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(blocked_gquic_be test_blocked_gquic_be)
|
add_test(blocked_gquic_be test_blocked_gquic_be)
|
||||||
|
|
||||||
add_executable(test_rst_stream_gquic_le test_rst_stream_gquic_le.c)
|
add_executable(test_rst_stream_gquic_le test_rst_stream_gquic_le.c)
|
||||||
target_link_libraries(test_rst_stream_gquic_le lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_rst_stream_gquic_le lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(rst_stream_gquic_le test_rst_stream_gquic_le)
|
add_test(rst_stream_gquic_le test_rst_stream_gquic_le)
|
||||||
|
|
||||||
add_executable(test_rst_stream_gquic_be test_rst_stream_gquic_be.c)
|
add_executable(test_rst_stream_gquic_be test_rst_stream_gquic_be.c)
|
||||||
target_link_libraries(test_rst_stream_gquic_be lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_rst_stream_gquic_be lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(rst_stream_gquic_be test_rst_stream_gquic_be)
|
add_test(rst_stream_gquic_be test_rst_stream_gquic_be)
|
||||||
|
|
||||||
add_executable(test_rst_stream_ietf test_rst_stream_ietf.c)
|
add_executable(test_rst_stream_ietf test_rst_stream_ietf.c)
|
||||||
target_link_libraries(test_rst_stream_ietf lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_rst_stream_ietf lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(rst_stream_ietf test_rst_stream_ietf)
|
add_test(rst_stream_ietf test_rst_stream_ietf)
|
||||||
|
|
||||||
add_executable(test_conn_close_gquic_le test_conn_close_gquic_le.c)
|
add_executable(test_conn_close_gquic_le test_conn_close_gquic_le.c)
|
||||||
target_link_libraries(test_conn_close_gquic_le lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_conn_close_gquic_le lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(conn_close_gquic_le test_conn_close_gquic_le)
|
add_test(conn_close_gquic_le test_conn_close_gquic_le)
|
||||||
|
|
||||||
add_executable(test_conn_close_gquic_be test_conn_close_gquic_be.c)
|
add_executable(test_conn_close_gquic_be test_conn_close_gquic_be.c)
|
||||||
target_link_libraries(test_conn_close_gquic_be lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_conn_close_gquic_be lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(conn_close_gquic_be test_conn_close_gquic_be)
|
add_test(conn_close_gquic_be test_conn_close_gquic_be)
|
||||||
|
|
||||||
add_executable(test_goaway_gquic_le test_goaway_gquic_le.c)
|
add_executable(test_goaway_gquic_le test_goaway_gquic_le.c)
|
||||||
target_link_libraries(test_goaway_gquic_le lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_goaway_gquic_le lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(goaway_gquic_le test_goaway_gquic_le)
|
add_test(goaway_gquic_le test_goaway_gquic_le)
|
||||||
|
|
||||||
add_executable(test_goaway_gquic_be test_goaway_gquic_be.c)
|
add_executable(test_goaway_gquic_be test_goaway_gquic_be.c)
|
||||||
target_link_libraries(test_goaway_gquic_be lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_goaway_gquic_be lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(goaway_gquic_be test_goaway_gquic_be)
|
add_test(goaway_gquic_be test_goaway_gquic_be)
|
||||||
|
|
||||||
add_executable(test_wuf_gquic_le test_wuf_gquic_le.c)
|
add_executable(test_wuf_gquic_le test_wuf_gquic_le.c)
|
||||||
target_link_libraries(test_wuf_gquic_le lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_wuf_gquic_le lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(wuf_gquic_le test_wuf_gquic_le)
|
add_test(wuf_gquic_le test_wuf_gquic_le)
|
||||||
|
|
||||||
add_executable(test_wuf_gquic_be test_wuf_gquic_be.c)
|
add_executable(test_wuf_gquic_be test_wuf_gquic_be.c)
|
||||||
target_link_libraries(test_wuf_gquic_be lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_wuf_gquic_be lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(wuf_gquic_be test_wuf_gquic_be)
|
add_test(wuf_gquic_be test_wuf_gquic_be)
|
||||||
|
|
||||||
add_executable(test_ackparse_gquic_le test_ackparse_gquic_le.c)
|
add_executable(test_ackparse_gquic_le test_ackparse_gquic_le.c)
|
||||||
target_link_libraries(test_ackparse_gquic_le lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_ackparse_gquic_le lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(ackparse_gquic_le test_ackparse_gquic_le)
|
add_test(ackparse_gquic_le test_ackparse_gquic_le)
|
||||||
|
|
||||||
add_executable(test_ackparse_gquic_be test_ackparse_gquic_be.c)
|
add_executable(test_ackparse_gquic_be test_ackparse_gquic_be.c)
|
||||||
target_link_libraries(test_ackparse_gquic_be lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_ackparse_gquic_be lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(ackparse_gquic_be test_ackparse_gquic_be)
|
add_test(ackparse_gquic_be test_ackparse_gquic_be)
|
||||||
|
|
||||||
add_executable(test_ackparse_gquic_ietf test_ackparse_gquic_ietf.c)
|
add_executable(test_ackparse_gquic_ietf test_ackparse_gquic_ietf.c)
|
||||||
target_link_libraries(test_ackparse_gquic_ietf lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_ackparse_gquic_ietf lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(ackparse_gquic_ietf test_ackparse_gquic_ietf)
|
add_test(ackparse_gquic_ietf test_ackparse_gquic_ietf)
|
||||||
|
|
||||||
add_executable(test_ackgen_gquic_le test_ackgen_gquic_le.c)
|
add_executable(test_ackgen_gquic_le test_ackgen_gquic_le.c)
|
||||||
target_link_libraries(test_ackgen_gquic_le lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_ackgen_gquic_le lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(ackgen_gquic_le test_ackgen_gquic_le)
|
add_test(ackgen_gquic_le test_ackgen_gquic_le)
|
||||||
|
|
||||||
add_executable(test_ackgen_gquic_be test_ackgen_gquic_be.c)
|
add_executable(test_ackgen_gquic_be test_ackgen_gquic_be.c)
|
||||||
target_link_libraries(test_ackgen_gquic_be lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_ackgen_gquic_be lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(ackgen_gquic_be test_ackgen_gquic_be)
|
add_test(ackgen_gquic_be test_ackgen_gquic_be)
|
||||||
|
|
||||||
add_executable(test_ackgen_gquic_ietf test_ackgen_gquic_ietf.c)
|
add_executable(test_ackgen_gquic_ietf test_ackgen_gquic_ietf.c)
|
||||||
target_link_libraries(test_ackgen_gquic_ietf lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_ackgen_gquic_ietf lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(ackgen_gquic_ietf test_ackgen_gquic_ietf)
|
add_test(ackgen_gquic_ietf test_ackgen_gquic_ietf)
|
||||||
|
|
||||||
add_executable(test_sfcw test_sfcw.c)
|
add_executable(test_sfcw test_sfcw.c)
|
||||||
|
@ -138,100 +138,102 @@ target_link_libraries(graph_cubic lsquic m ${FIULIB})
|
||||||
|
|
||||||
|
|
||||||
add_executable(test_streamparse test_streamparse.c)
|
add_executable(test_streamparse test_streamparse.c)
|
||||||
target_link_libraries(test_streamparse lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_streamparse lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(streamparse test_streamparse)
|
add_test(streamparse test_streamparse)
|
||||||
|
|
||||||
add_executable(test_packet_out test_packet_out.c)
|
add_executable(test_packet_out test_packet_out.c)
|
||||||
target_link_libraries(test_packet_out lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_packet_out lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(packet_out test_packet_out)
|
add_test(packet_out test_packet_out)
|
||||||
|
|
||||||
add_executable(test_reg_pkt_headergen test_reg_pkt_headergen.c)
|
add_executable(test_reg_pkt_headergen test_reg_pkt_headergen.c)
|
||||||
target_link_libraries(test_reg_pkt_headergen lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_reg_pkt_headergen lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(reg_pkt_headergen test_reg_pkt_headergen)
|
add_test(reg_pkt_headergen test_reg_pkt_headergen)
|
||||||
|
|
||||||
add_executable(test_ver_nego test_ver_nego.c)
|
add_executable(test_ver_nego test_ver_nego.c)
|
||||||
target_link_libraries(test_ver_nego lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_ver_nego lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(ver_nego test_ver_nego)
|
add_test(ver_nego test_ver_nego)
|
||||||
|
|
||||||
add_executable(test_packno_len test_packno_len.c)
|
add_executable(test_packno_len test_packno_len.c)
|
||||||
target_link_libraries(test_packno_len lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_packno_len lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(packno_len test_packno_len)
|
add_test(packno_len test_packno_len)
|
||||||
|
|
||||||
|
|
||||||
add_executable(test_streamgen test_streamgen.c)
|
add_executable(test_streamgen test_streamgen.c)
|
||||||
target_link_libraries(test_streamgen lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_streamgen lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(streamgen test_streamgen)
|
add_test(streamgen test_streamgen)
|
||||||
|
|
||||||
add_executable(test_some_packets test_some_packets.c)
|
add_executable(test_some_packets test_some_packets.c)
|
||||||
target_link_libraries(test_some_packets lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_some_packets lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(some_packets test_some_packets)
|
add_test(some_packets test_some_packets)
|
||||||
|
|
||||||
|
|
||||||
add_executable(test_elision test_elision.c)
|
add_executable(test_elision test_elision.c)
|
||||||
target_link_libraries(test_elision lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_elision lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(elision test_elision)
|
add_test(elision test_elision)
|
||||||
|
|
||||||
add_executable(test_stop_waiting_gquic_le test_stop_waiting_gquic_le.c)
|
add_executable(test_stop_waiting_gquic_le test_stop_waiting_gquic_le.c)
|
||||||
target_link_libraries(test_stop_waiting_gquic_le lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_stop_waiting_gquic_le lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(stop_waiting_gquic_le test_stop_waiting_gquic_le)
|
add_test(stop_waiting_gquic_le test_stop_waiting_gquic_le)
|
||||||
|
|
||||||
add_executable(test_stop_waiting_gquic_be test_stop_waiting_gquic_be.c)
|
add_executable(test_stop_waiting_gquic_be test_stop_waiting_gquic_be.c)
|
||||||
target_link_libraries(test_stop_waiting_gquic_be lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_stop_waiting_gquic_be lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(stop_waiting_gquic_be test_stop_waiting_gquic_be)
|
add_test(stop_waiting_gquic_be test_stop_waiting_gquic_be)
|
||||||
|
|
||||||
add_executable(test_parse_packet_in test_parse_packet_in.c)
|
add_executable(test_parse_packet_in test_parse_packet_in.c)
|
||||||
target_link_libraries(test_parse_packet_in lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_parse_packet_in lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(parse_packet_in test_parse_packet_in)
|
add_test(parse_packet_in test_parse_packet_in)
|
||||||
|
|
||||||
add_executable(test_quic_le_floats test_quic_le_floats.c)
|
add_executable(test_quic_le_floats test_quic_le_floats.c)
|
||||||
target_link_libraries(test_quic_le_floats lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_quic_le_floats lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(quic_le_floats test_quic_le_floats)
|
add_test(quic_le_floats test_quic_le_floats)
|
||||||
|
|
||||||
add_executable(test_quic_be_floats test_quic_be_floats.c)
|
add_executable(test_quic_be_floats test_quic_be_floats.c)
|
||||||
target_link_libraries(test_quic_be_floats lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_quic_be_floats lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(quic_be_floats test_quic_be_floats)
|
add_test(quic_be_floats test_quic_be_floats)
|
||||||
|
|
||||||
add_executable(test_export_key test_export_key.c)
|
add_executable(test_export_key test_export_key.c)
|
||||||
target_link_libraries(test_export_key lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_export_key lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(export_key test_export_key)
|
add_test(export_key test_export_key)
|
||||||
|
|
||||||
add_executable(test_frame_reader test_frame_reader.c)
|
add_executable(test_frame_reader test_frame_reader.c)
|
||||||
target_link_libraries(test_frame_reader lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_frame_reader lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(frame_reader test_frame_reader)
|
add_test(frame_reader test_frame_reader)
|
||||||
|
|
||||||
add_executable(test_frame_writer test_frame_writer.c)
|
add_executable(test_frame_writer test_frame_writer.c)
|
||||||
target_link_libraries(test_frame_writer lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_frame_writer lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(frame_writer test_frame_writer)
|
add_test(frame_writer test_frame_writer)
|
||||||
|
|
||||||
add_executable(test_frame_chop test_frame_chop.c)
|
add_executable(test_frame_chop test_frame_chop.c)
|
||||||
target_link_libraries(test_frame_chop lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
target_link_libraries(test_frame_chop lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
add_test(frame_chop test_frame_chop)
|
add_test(frame_chop test_frame_chop)
|
||||||
|
|
||||||
add_executable(test_frame_rw test_frame_rw.c)
|
IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
target_link_libraries(test_frame_rw lsquic pthread libssl.a libcrypto.a libdecrepit.a z m ${FIULIB})
|
add_executable(test_frame_rw test_frame_rw.c)
|
||||||
add_test(frame_rw test_frame_rw)
|
target_link_libraries(test_frame_rw lsquic pthread libssl.a libcrypto.a z m ${FIULIB})
|
||||||
|
add_test(frame_rw test_frame_rw)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
add_executable(test_hpack test_hpack.c)
|
add_executable(test_hpack test_hpack.c)
|
||||||
target_link_libraries(test_hpack lsquic m ${FIULIB})
|
target_link_libraries(test_hpack lsquic m ${FIULIB})
|
||||||
add_test(hpack test_hpack)
|
add_test(hpack test_hpack)
|
||||||
|
|
||||||
add_executable(test_hkdf test_hkdf.c)
|
add_executable(test_hkdf test_hkdf.c)
|
||||||
target_link_libraries(test_hkdf lsquic pthread libssl.a libcrypto.a libdecrepit.a m ${FIULIB})
|
target_link_libraries(test_hkdf lsquic pthread libssl.a libcrypto.a m ${FIULIB})
|
||||||
add_test(hkdf test_hkdf)
|
add_test(hkdf test_hkdf)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
add_executable(test_attq test_attq.c)
|
add_executable(test_attq test_attq.c)
|
||||||
target_link_libraries(test_attq lsquic pthread libssl.a libcrypto.a libdecrepit.a m ${FIULIB})
|
target_link_libraries(test_attq lsquic pthread libssl.a libcrypto.a m ${FIULIB})
|
||||||
add_test(attq test_attq)
|
add_test(attq test_attq)
|
||||||
|
|
||||||
add_executable(test_arr test_arr.c)
|
add_executable(test_arr test_arr.c)
|
||||||
target_link_libraries(test_arr lsquic pthread libssl.a libcrypto.a libdecrepit.a m ${FIULIB})
|
target_link_libraries(test_arr lsquic pthread libssl.a libcrypto.a m ${FIULIB})
|
||||||
add_test(arr test_arr)
|
add_test(arr test_arr)
|
||||||
|
|
||||||
add_executable(test_buf test_buf.c)
|
add_executable(test_buf test_buf.c)
|
||||||
target_link_libraries(test_buf lsquic pthread libssl.a libcrypto.a libdecrepit.a m ${FIULIB})
|
target_link_libraries(test_buf lsquic pthread libssl.a libcrypto.a m ${FIULIB})
|
||||||
add_test(buf test_buf)
|
add_test(buf test_buf)
|
||||||
|
|
||||||
add_executable(test_dec test_dec.c)
|
add_executable(test_dec test_dec.c)
|
||||||
target_link_libraries(test_dec libssl.a libcrypto.a libdecrepit.a z m pthread ${FIULIB})
|
target_link_libraries(test_dec libssl.a libcrypto.a z m pthread ${FIULIB})
|
||||||
|
|
|
@ -191,7 +191,7 @@ static const struct packno_bits_test pb_tests[] = {
|
||||||
{ .pbt_lineno = __LINE__,
|
{ .pbt_lineno = __LINE__,
|
||||||
.pbt_packno = 2,
|
.pbt_packno = 2,
|
||||||
.pbt_least_unacked = 1,
|
.pbt_least_unacked = 1,
|
||||||
.pbt_n_in_flight = 3181457256,
|
.pbt_n_in_flight = 3181457256ULL,
|
||||||
.pbt_packno_bits = PACKNO_LEN_6,
|
.pbt_packno_bits = PACKNO_LEN_6,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue