#include "default_config.h"
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include "pcp.h"
#include "unp.h"
#include "pcp_utils.h"
#include "pcp_socket.h"
Go to the source code of this file.
|
void | pcp_fill_in6_addr (struct in6_addr *dst_ip6, uint16_t *dst_port, struct sockaddr *src) |
|
void | pcp_fill_sockaddr (struct sockaddr *dst, struct in6_addr *sip, uint16_t sport, int ret_ipv6_mapped_ipv4, uint32_t scope_id) |
|
PCP_SOCKET | pcp_socket_create (struct pcp_ctx_s *ctx, int domain, int type, int protocol) |
|
ssize_t | pcp_socket_recvfrom (struct pcp_ctx_s *ctx, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen) |
|
ssize_t | pcp_socket_sendto (struct pcp_ctx_s *ctx, const void *buf, size_t len, int flags, struct sockaddr *dest_addr, socklen_t addrlen) |
|
int | pcp_socket_close (struct pcp_ctx_s *ctx) |
|
◆ pcp_fill_in6_addr()
void pcp_fill_in6_addr |
( |
struct in6_addr * |
dst_ip6, |
|
|
uint16_t * |
dst_port, |
|
|
struct sockaddr * |
src |
|
) |
| |
◆ pcp_fill_sockaddr()
void pcp_fill_sockaddr |
( |
struct sockaddr * |
dst, |
|
|
struct in6_addr * |
sip, |
|
|
uint16_t |
sport, |
|
|
int |
ret_ipv6_mapped_ipv4, |
|
|
uint32_t |
scope_id |
|
) |
| |
◆ pcp_socket_close()
int pcp_socket_close |
( |
struct pcp_ctx_s * |
ctx | ) |
|
◆ pcp_socket_create()
◆ pcp_socket_recvfrom()
ssize_t pcp_socket_recvfrom |
( |
struct pcp_ctx_s * |
ctx, |
|
|
void * |
buf, |
|
|
size_t |
len, |
|
|
int |
flags, |
|
|
struct sockaddr * |
src_addr, |
|
|
socklen_t * |
addrlen |
|
) |
| |
◆ pcp_socket_sendto()
ssize_t pcp_socket_sendto |
( |
struct pcp_ctx_s * |
ctx, |
|
|
const void * |
buf, |
|
|
size_t |
len, |
|
|
int |
flags, |
|
|
struct sockaddr * |
dest_addr, |
|
|
socklen_t |
addrlen |
|
) |
| |
◆ default_socket_vt
Initial value:={
pcp_socket_create_impl,
pcp_socket_recvfrom_impl,
pcp_socket_sendto_impl,
pcp_socket_close_impl
}
Definition at line 58 of file pcp_socket.c.