|
OpenVPN
|
#include "syshead.h"#include <stdio.h>#include <stdlib.h>#include <stdarg.h>#include <string.h>#include <setjmp.h>#include <cmocka.h>#include "test_common.h"#include "mock_msg.h"#include "dhcp.c"
Go to the source code of this file.
Macros | |
| #define | LONGDOMAIN "a-reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaally-long-domain" |
Functions | |
| uint16_t | ip_checksum (const sa_family_t af, const uint8_t *payload, const int len_payload, const uint8_t *src_addr, const uint8_t *dest_addr, const int proto) |
| Calculates an IP or IPv6 checksum with a pseudo header as required by TCP, UDP and ICMPv6. | |
| const char * | print_in_addr_t (in_addr_t addr, unsigned int flags, struct gc_arena *gc) |
| static void | test_write_dhcp_search_str (void **state) |
| int | main (void) |
| #define LONGDOMAIN "a-reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaally-long-domain" |
| uint16_t ip_checksum | ( | const sa_family_t | af, |
| const uint8_t * | payload, | ||
| const int | len_payload, | ||
| const uint8_t * | src_addr, | ||
| const uint8_t * | dest_addr, | ||
| const int | proto | ||
| ) |
Calculates an IP or IPv6 checksum with a pseudo header as required by TCP, UDP and ICMPv6.
| af | - Address family for which the checksum is calculated AF_INET or AF_INET6 |
| payload | - the TCP, ICMPv6 or UDP packet |
| len_payload | - length of payload |
| src_addr | - Source address of the packet |
| dest_addr | - Destination address of the packet |
| proto | next - header or IP protocol of the packet |
Definition at line 42 of file test_dhcp.c.
| int main | ( | void | ) |
Definition at line 127 of file test_dhcp.c.
References test_write_dhcp_search_str().
| const char * print_in_addr_t | ( | in_addr_t | addr, |
| unsigned int | flags, | ||
| struct gc_arena * | gc | ||
| ) |
Definition at line 48 of file test_dhcp.c.
|
static |
Definition at line 54 of file test_dhcp.c.
References alloc_buf_gc(), BPTR, buf_clear(), buf_forward_capacity_total(), clear_buf(), DHCP_DOMAIN_SEARCH, gc, gc_free(), gc_new(), buffer::len, LONGDOMAIN, and write_dhcp_search_str().
Referenced by main().