Socket-like API.
More...
#include "enso/socket.h"
#include <enso/config.h>
#include <enso/helpers.h>
#include <cstring>
#include <iostream>
#include "../pcie.h"
Go to the source code of this file.
|
void | enso::set_bdf (uint16_t bdf_) |
|
int | enso::socket (int domain, int type, int protocol, bool fallback) noexcept |
|
int | enso::bind (int sockfd, const struct sockaddr *addr, socklen_t addrlen) noexcept |
|
uint64_t | enso::get_socket_phys_addr (int sockfd) |
|
void * | enso::get_socket_virt_addr (int sockfd) |
|
uint64_t | enso::convert_buf_addr_to_phys (int sockfd, void *addr) |
|
ssize_t | enso::recv (int sockfd, void *buf, size_t len, int flags) |
|
ssize_t | enso::recv_zc (int sockfd, void **buf, size_t len, int flags) |
|
ssize_t | enso::recv_select (int ref_sockfd, int *sockfd, void **buf, size_t len, int flags) |
|
ssize_t | enso::send (int sockfd, uint64_t phys_addr, size_t len, int flags) |
|
uint32_t | enso::get_completions (int ref_sockfd) |
|
void | enso::free_enso_pipe (int sockfd, size_t len) |
|
int | enso::enable_device_timestamp (int ref_sockfd, uint8_t offset=kDefaultRttOffset) |
|
int | enso::disable_device_timestamp (int ref_sockfd) |
|
int | enso::enable_device_rate_limit (int ref_sockfd, uint16_t num, uint16_t den) |
|
int | enso::disable_device_rate_limit (int ref_sockfd) |
|
int | enso::enable_device_round_robin (int ref_sockfd) |
|
int | enso::disable_device_round_robin (int ref_sockfd) |
|
int | enso::shutdown (int sockfd, int how __attribute__((unused))) noexcept |
|
void | enso::print_sock_stats (int sockfd) |
|
Socket-like API.
- Deprecated:
- Use the API defined in
pipe.h
instead.
- Author
- Hugo Sadok sadok.nosp@m.@cmu.nosp@m..edu
Definition in file socket.cpp.
◆ bind()
int enso::bind |
( |
int |
sockfd, |
|
|
const struct sockaddr * |
addr, |
|
|
socklen_t |
addrlen |
|
) |
| |
|
noexcept |
◆ convert_buf_addr_to_phys()
uint64_t enso::convert_buf_addr_to_phys |
( |
int |
sockfd, |
|
|
void * |
addr |
|
) |
| |
◆ disable_device_rate_limit()
int enso::disable_device_rate_limit |
( |
int |
ref_sockfd | ) |
|
◆ disable_device_round_robin()
int enso::disable_device_round_robin |
( |
int |
ref_sockfd | ) |
|
◆ disable_device_timestamp()
int enso::disable_device_timestamp |
( |
int |
ref_sockfd | ) |
|
◆ enable_device_rate_limit()
int enso::enable_device_rate_limit |
( |
int |
ref_sockfd, |
|
|
uint16_t |
num, |
|
|
uint16_t |
den |
|
) |
| |
◆ enable_device_round_robin()
int enso::enable_device_round_robin |
( |
int |
ref_sockfd | ) |
|
◆ enable_device_timestamp()
int enso::enable_device_timestamp |
( |
int |
ref_sockfd, |
|
|
uint8_t |
offset = kDefaultRttOffset |
|
) |
| |
◆ free_enso_pipe()
void enso::free_enso_pipe |
( |
int |
sockfd, |
|
|
size_t |
len |
|
) |
| |
◆ get_completions()
uint32_t enso::get_completions |
( |
int |
ref_sockfd | ) |
|
◆ get_socket_phys_addr()
uint64_t enso::get_socket_phys_addr |
( |
int |
sockfd | ) |
|
◆ get_socket_virt_addr()
void * enso::get_socket_virt_addr |
( |
int |
sockfd | ) |
|
◆ print_sock_stats()
void enso::print_sock_stats |
( |
int |
sockfd | ) |
|
◆ recv()
ssize_t enso::recv |
( |
int |
sockfd, |
|
|
void * |
buf, |
|
|
size_t |
len, |
|
|
int |
flags |
|
) |
| |
◆ recv_select()
ssize_t enso::recv_select |
( |
int |
ref_sockfd, |
|
|
int * |
sockfd, |
|
|
void ** |
buf, |
|
|
size_t |
len, |
|
|
int |
flags |
|
) |
| |
◆ recv_zc()
ssize_t enso::recv_zc |
( |
int |
sockfd, |
|
|
void ** |
buf, |
|
|
size_t |
len, |
|
|
int |
flags |
|
) |
| |
◆ send()
ssize_t enso::send |
( |
int |
sockfd, |
|
|
uint64_t |
phys_addr, |
|
|
size_t |
len, |
|
|
int |
flags |
|
) |
| |
◆ set_bdf()
void enso::set_bdf |
( |
uint16_t |
bdf_ | ) |
|
◆ shutdown()
int enso::shutdown |
( |
int |
sockfd, |
|
|
int how |
__attribute__(unused) |
|
) |
| |
|
noexcept |
◆ socket()
int enso::socket |
( |
int |
domain, |
|
|
int |
type, |
|
|
int |
protocol, |
|
|
bool |
fallback |
|
) |
| |
|
noexcept |