IP client interface implementation. More...
#include <errno.h>
#include <sys/types.h>
#include "../../include/ip_client.h"
#include "../../include/socket_errno.h"
#include "../../structures/packet/packet.h"
#include "../../structures/packet/packet_client.h"
#include "ip_header.h"
Functions | |
size_t | ip_client_header_length (packet_t packet) |
Returns the IP header length. | |
int | ip_client_get_pseudo_header (ip_protocol_t protocol, struct sockaddr *src, socklen_t srclen, struct sockaddr *dest, socklen_t destlen, size_t data_length, ip_pseudo_header_ref *header, size_t *headerlen) |
Constructs the IPv4 pseudo header. | |
int | ip_client_prepare_packet (packet_t packet, ip_protocol_t protocol, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, size_t ipopt_length) |
Prepares the packet to be transfered via IP. | |
int | ip_client_process_packet (packet_t packet, ip_protocol_t *protocol, ip_ttl_t *ttl, ip_tos_t *tos, int *dont_fragment, size_t *ipopt_length) |
Processes the received IP packet. | |
int | ip_client_set_pseudo_header_data_length (ip_pseudo_header_ref header, size_t headerlen, size_t data_length) |
Updates the IPv4 pseudo header data length field. |
IP client interface implementation.