Seastar
High performance C++ framework for concurrent servers
Classes | Typedefs | Enumerations | Functions | Variables
seastar::net Namespace Reference

Detailed Description

C-ares based dns query support. Handles name- and ip-based resolution.

Classes

struct  tcp_keepalive_params
 
struct  sctp_keepalive_params
 
class  datagram_impl
 
class  datagram
 
class  datagram_channel
 
class  arp_for
 
class  arp_for_protocol
 
class  arp
 
class  arp_error
 
class  arp_timeout_error
 
class  arp_queue_full_error
 
struct  ipv4_config
 
struct  hw_config
 
struct  device_config
 
class  config_exception
 
class  dhcp
 
struct  hostent
 
struct  srv_record
 
class  dns_resolver
 
struct  dpdk_options
 DPDK configuration. More...
 
struct  ethernet_address
 
struct  ethernet
 
struct  eth_hdr
 
class  unknown_host
 
class  inet_address
 
class  ipv4_l4
 
class  tcp
 
struct  ipv4_traits
 
class  ip_protocol
 
struct  l4connid
 
class  ipv4_tcp
 
struct  icmp_hdr
 
class  icmp
 
class  ipv4_icmp
 
class  ipv4_udp
 
struct  ip_packet_filter
 
struct  ipv4_frag_id
 
struct  ipv4_tag
 
class  ipv4
 
struct  ip_hdr
 
struct  checksummer
 
struct  ipv4_address
 
struct  ipv6_address
 
struct  native_stack_options
 Native stack configuration. More...
 
class  forward_hash
 
struct  hw_features
 
class  l3_protocol
 
class  interface
 
struct  qp_stats_good
 
struct  qp_stats
 
class  qp
 
class  device
 
class  packet_data_source
 
class  packet_merger
 
struct  fragment
 
struct  offload_info
 
class  packet
 
class  conntrack
 
class  posix_data_source_impl
 
class  posix_data_sink_impl
 
class  posix_ap_server_socket_impl
 
class  posix_server_socket_impl
 
class  posix_reuseport_server_socket_impl
 
class  posix_network_stack
 
class  posix_ap_network_stack
 
struct  tcp_option
 
struct  tcp_seq
 
struct  tcp_hdr
 
struct  tcp_tag
 
struct  udp_hdr
 
struct  udp_channel_state
 
struct  virtio_options
 Virtio configuration. More...
 
struct  qp_stats.rx
 
struct  qp_stats.rx.bad
 
struct  qp_stats.tx
 

Typedefs

using udp_channel = class datagram_channel
 
using keepalive_params = std::variant< tcp_keepalive_params, sctp_keepalive_params >
 
using udp_datagram_impl = datagram_impl
 
using udp_datagram = datagram
 
template<typename T >
using packed = unaligned< T >
 
typedef std::optional< inet_address::family > opt_family
 
using ipv4_packet_merger = packet_merger< uint32_t, ipv4_tag >
 
using tcp_packet_merger = packet_merger< tcp_seq, tcp_tag >
 

Enumerations

enum class  ip_protocol_num : uint8_t { icmp = 1 , tcp = 6 , udp = 17 , unused = 255 }
 
enum class  eth_protocol_num : uint16_t { ipv4 = 0x0800 , arp = 0x0806 , ipv6 = 0x86dd }
 
enum class  tcp_state : uint16_t {
  CLOSED = (1 << 0) , LISTEN = (1 << 1) , SYN_SENT = (1 << 2) , SYN_RECEIVED = (1 << 3) ,
  ESTABLISHED = (1 << 4) , FIN_WAIT_1 = (1 << 5) , FIN_WAIT_2 = (1 << 6) , CLOSE_WAIT = (1 << 7) ,
  CLOSING = (1 << 8) , LAST_ACK = (1 << 9) , TIME_WAIT = (1 << 10)
}
 

Functions

void ntoh ()
 
void hton ()
 
uint8_t ntoh (uint8_t x)
 
uint8_t hton (uint8_t x)
 
uint16_t ntoh (uint16_t x)
 
uint16_t hton (uint16_t x)
 
uint32_t ntoh (uint32_t x)
 
uint32_t hton (uint32_t x)
 
uint64_t ntoh (uint64_t x)
 
uint64_t hton (uint64_t x)
 
int8_t ntoh (int8_t x)
 
int8_t hton (int8_t x)
 
int16_t ntoh (int16_t x)
 
int16_t hton (int16_t x)
 
int32_t ntoh (int32_t x)
 
int32_t hton (int32_t x)
 
int64_t ntoh (int64_t x)
 
int64_t hton (int64_t x)
 
template<typename T >
ntoh (const packed< T > &x)
 
template<typename T >
hton (const packed< T > &x)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const packed< T > &v)
 
void ntoh_inplace ()
 
void hton_inplace ()
 
template<typename First , typename... Rest>
void ntoh_inplace (First &first, Rest &... rest)
 
template<typename First , typename... Rest>
void hton_inplace (First &first, Rest &... rest)
 
template<class T >
ntoh (const T &x)
 
template<class T >
hton (const T &x)
 
std::unordered_map< std::string, device_configparse_config (std::istream &input)
 
struct seastar::net::ethernet_address __attribute__ ((packed))
 
std::ostream & operator<< (std::ostream &os, ethernet_address ea)
 
ethernet_address parse_ethernet_address (std::string addr)
 
std::ostream & operator<< (std::ostream &, const inet_address &)
 
std::ostream & operator<< (std::ostream &, const inet_address::family &)
 
void arp_learn (ethernet_address l2, ipv4_address l3)
 
uint16_t ip_checksum (const void *data, size_t len)
 
bool is_unspecified (ipv4_address addr) noexcept
 
std::ostream & operator<< (std::ostream &os, const ipv4_address &a)
 
std::ostream & operator<< (std::ostream &, const ipv6_address &)
 
void create_native_stack (const native_stack_options &opts, std::shared_ptr< device > dev)
 
network_stack_entry register_native_stack ()
 
static input_stream< char > as_input_stream (packet &&p)
 
std::ostream & operator<< (std::ostream &os, const packet &p)
 
network_stack_entry register_posix_stack ()
 
std::unique_ptr< qpcreate_proxy_net_device (unsigned master_cpu, device *dev)
 
server_socket tcpv4_listen (tcp< ipv4_traits > &tcpv4, uint16_t port, listen_options opts)
 
seastar::socket tcpv4_socket (tcp< ipv4_traits > &tcpv4)
 
auto tcp_error (int err)
 
auto tcp_reset_error ()
 
auto tcp_connect_error ()
 
auto tcp_refused_error ()
 
tcp_state operator| (tcp_state s1, tcp_state s2)
 
template<typename... Args>
void tcp_debug (const char *fmt, Args &&... args)
 
char *& operator+= (char *&x, tcp_option::option_len len)
 
const char *& operator+= (const char *&x, tcp_option::option_len len)
 
uint8_t & operator+= (uint8_t &x, tcp_option::option_len len)
 
tcp_seq ntoh (tcp_seq s)
 
tcp_seq hton (tcp_seq s)
 
std::ostream & operator<< (std::ostream &os, tcp_seq s)
 
tcp_seq make_seq (uint32_t raw)
 
tcp_seqoperator+= (tcp_seq &s, int32_t n)
 
tcp_seqoperator-= (tcp_seq &s, int32_t n)
 
tcp_seq operator+ (tcp_seq s, int32_t n)
 
tcp_seq operator- (tcp_seq s, int32_t n)
 
int32_t operator- (tcp_seq s, tcp_seq q)
 
bool operator== (tcp_seq s, tcp_seq q)
 
bool operator!= (tcp_seq s, tcp_seq q)
 
bool operator< (tcp_seq s, tcp_seq q)
 
bool operator> (tcp_seq s, tcp_seq q)
 
bool operator<= (tcp_seq s, tcp_seq q)
 
bool operator>= (tcp_seq s, tcp_seq q)
 

Variables

const uint8_t eth_hdr_len = 14
 
const uint8_t tcp_hdr_len_min = 20
 
const uint8_t ipv4_hdr_len_min = 20
 
const uint8_t ipv6_hdr_len_min = 40
 
const uint16_t ip_packet_len_max = 65535
 
struct seastar::net::ethernet __attribute__
 

Class Documentation

◆ seastar::net::tcp_keepalive_params

struct seastar::net::tcp_keepalive_params
Class Members
unsigned count
seconds idle
seconds interval

◆ seastar::net::sctp_keepalive_params

struct seastar::net::sctp_keepalive_params
Class Members
unsigned count
seconds interval

◆ seastar::net::ipv4_config

struct seastar::net::ipv4_config
Class Members
bool dhcp
string gateway
string ip
string netmask

◆ seastar::net::hw_config

struct seastar::net::hw_config
Class Members
bool csum_offload
bool event_index
bool hw_fc
bool lro
string pci_address
optional< unsigned > port_index
optional< unsigned > ring_size
bool tso
bool ufo

◆ seastar::net::device_config

struct seastar::net::device_config
Class Members
hw_config hw_cfg
ipv4_config ip_cfg

◆ seastar::net::hostent

struct seastar::net::hostent
Class Members
vector< inet_address > addr_list
vector< sstring > names

◆ seastar::net::srv_record

struct seastar::net::srv_record
Class Members
unsigned short port
unsigned short priority
sstring target
unsigned short weight

◆ seastar::net::ipv4_tag

struct seastar::net::ipv4_tag

◆ seastar::net::hw_features

struct seastar::net::hw_features
Class Members
uint16_t max_packet_len
uint16_t mtu
bool rx_csum_offload
bool rx_lro
bool tx_csum_ip_offload
bool tx_csum_l4_offload
bool tx_tso
bool tx_ufo

◆ seastar::net::fragment

struct seastar::net::fragment
Class Members
char * base
size_t size

◆ seastar::net::offload_info

struct seastar::net::offload_info
Class Members
uint8_t ip_hdr_len
bool needs_csum
bool needs_ip_csum
ip_protocol_num protocol
bool reassembled
uint8_t tcp_hdr_len
uint16_t tso_seg_size
uint8_t udp_hdr_len
optional< uint16_t > vlan_tci

◆ seastar::net::tcp_seq

struct seastar::net::tcp_seq
Class Members
uint32_t raw

◆ seastar::net::tcp_tag

struct seastar::net::tcp_tag

◆ seastar::net::qp_stats.rx

struct seastar::net::qp_stats.rx
Class Members
rx bad
struct qp_stats_good good

◆ seastar::net::qp_stats.rx.bad

struct seastar::net::qp_stats.rx.bad
Class Members
uint64_t csum
uint64_t no_mem
uint64_t total

◆ seastar::net::qp_stats.tx

struct seastar::net::qp_stats.tx
Class Members
struct qp_stats_good good
uint64_t linearized