OpenVPN
test_probe.c File Reference
#include "syshead.h"
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include "control_msg.h"
#include "probe.h"
#include "test_common.h"
#include "test_probe.h"
Include dependency graph for test_probe.c:

Go to the source code of this file.

Functions

void test_probe_request_roundtrip (void **state)
void test_probe_request_wire_format (void **state)
void test_probe_reply_roundtrip (void **state)
void test_probe_reply_wire_format (void **state)
void test_probe_request_forward_compat (void **state)
void test_probe_request_too_short (void **state)
void test_probe_reply_too_short (void **state)
void test_probe_reply_flags_contradict (void **state)
void test_find_tlv_value_truncated (void **state)
void test_find_tlv_trailing_bytes (void **state)
void test_find_tlv_skips_optional_after_wanted (void **state)
void test_find_tlv_rejects_unknown_mandatory (void **state)
void test_find_tlv_rejects_duplicate (void **state)
void test_find_tlv_empty_payload (void **state)

Function Documentation

◆ test_find_tlv_empty_payload()

void test_find_tlv_empty_payload ( void ** state)

Definition at line 416 of file test_probe.c.

References alloc_buf_gc(), ctrl_msg_find_tlv(), gc, gc_free(), gc_new(), and TLV_TYPE_PROBE_REQUEST.

Referenced by main().

◆ test_find_tlv_rejects_duplicate()

void test_find_tlv_rejects_duplicate ( void ** state)

◆ test_find_tlv_rejects_unknown_mandatory()

void test_find_tlv_rejects_unknown_mandatory ( void ** state)

◆ test_find_tlv_skips_optional_after_wanted()

void test_find_tlv_skips_optional_after_wanted ( void ** state)

◆ test_find_tlv_trailing_bytes()

void test_find_tlv_trailing_bytes ( void ** state)

◆ test_find_tlv_value_truncated()

void test_find_tlv_value_truncated ( void ** state)

◆ test_probe_reply_flags_contradict()

◆ test_probe_reply_roundtrip()

◆ test_probe_reply_too_short()

void test_probe_reply_too_short ( void ** state)

Definition at line 235 of file test_probe.c.

References alloc_buf_gc(), buf_write_u16(), buf_write_u64(), gc, gc_free(), gc_new(), and probe_reply_read().

Referenced by main().

◆ test_probe_reply_wire_format()

void test_probe_reply_wire_format ( void ** state)

Definition at line 151 of file test_probe.c.

References alloc_buf_gc(), BLEN, BPTR, gc, gc_free(), gc_new(), PROBE_REPLY_FLAG_RESEND_WKC, and probe_reply_write().

Referenced by main().

◆ test_probe_request_forward_compat()

◆ test_probe_request_roundtrip()

◆ test_probe_request_too_short()

void test_probe_request_too_short ( void ** state)

Definition at line 219 of file test_probe.c.

References alloc_buf_gc(), buf_write_u64(), gc, gc_free(), gc_new(), and probe_request_read().

Referenced by main().

◆ test_probe_request_wire_format()

void test_probe_request_wire_format ( void ** state)

Definition at line 79 of file test_probe.c.

References alloc_buf_gc(), BLEN, BPTR, gc, gc_free(), gc_new(), and probe_request_write().

Referenced by main().