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

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

Typedefs

using keepalive_params = std::variant< tcp_keepalive_params, sctp_keepalive_params >
 
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  ip_protocol_num : uint8_t { icmp = 1, tcp = 6, udp = 17, unused = 255 }
 
enum  eth_protocol_num : uint16_t { ipv4 = 0x0800, arp = 0x0806, ipv6 = 0x86dd }
 
enum  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 &)
 
static 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 arp_learn (ethernet_address l2, ipv4_address l3)
 
uint16_t ip_checksum (const void *data, size_t len)
 
void create_native_stack (boost::program_options::variables_map opts, std::shared_ptr< device > dev)
 
void register_native_stack ()
 
static input_stream< char > as_input_stream (packet &&p)
 
std::ostream & operator<< (std::ostream &os, const packet &p)
 
void 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::device_config

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

◆ seastar::net::fragment

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

◆ seastar::net::hostent

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

◆ 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::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::ipv4_config

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

◆ seastar::net::ipv4_tag

struct seastar::net::ipv4_tag

◆ 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::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

◆ seastar::net::sctp_keepalive_params

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

◆ seastar::net::srv_record

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

◆ seastar::net::tcp_keepalive_params

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

◆ seastar::net::tcp_seq

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

◆ seastar::net::tcp_tag

struct seastar::net::tcp_tag