FreeBSD kernel IPv4 code
|
Go to the source code of this file.
Data Structures | |
struct | syncache |
struct | syncache_head |
struct | syncookie_secret |
struct | tcp_syncache |
union | syncookie |
Macros | |
#define | SCF_NOOPT 0x01 /* no TCP options */ |
#define | SCF_WINSCALE 0x02 /* negotiated window scaling */ |
#define | SCF_TIMESTAMP 0x04 /* negotiated timestamps */ |
#define | SCF_UNREACH 0x10 /* icmp unreachable received */ |
#define | SCF_SIGNATURE 0x20 /* send MD5 digests */ |
#define | SCF_SACK 0x80 /* send SACK option */ |
#define | SCF_ECN_MASK 0x700 /* ECN codepoint mask */ |
#define | SCF_ECN 0x100 /* send ECN setup packet */ |
#define | SCF_ACE_N 0x400 /* send ACE non-ECT setup */ |
#define | SCF_ACE_0 0x500 /* send ACE ECT0 setup */ |
#define | SCF_ACE_1 0x600 /* send ACE ECT1 setup */ |
#define | SCF_ACE_CE 0x700 /* send ACE CE setup */ |
#define | SYNCOOKIE_SECRET_SIZE 16 |
#define | SYNCOOKIE_LIFETIME 15 /* seconds */ |
#define | TCP_SYNCACHE_PAUSE_TIME SYNCOOKIE_LIFETIME |
#define | TCP_SYNCACHE_MAX_BACKOFF 6 /* 16 minutes */ |
Functions | |
void | syncache_init (void) |
void | syncache_unreach (struct in_conninfo *, tcp_seq, uint16_t) |
int | syncache_expand (struct in_conninfo *, struct tcpopt *, struct tcphdr *, struct socket **, struct mbuf *, uint16_t) |
struct socket * | syncache_add (struct in_conninfo *, struct tcpopt *, struct tcphdr *, struct inpcb *, struct socket *, struct mbuf *, void *, void *, uint8_t, uint16_t) |
void | syncache_chkrst (struct in_conninfo *, struct tcphdr *, struct mbuf *, uint16_t) |
void | syncache_badack (struct in_conninfo *, uint16_t) |
int | syncache_pcblist (struct sysctl_req *) |
#define SCF_ACE_0 0x500 /* send ACE ECT0 setup */ |
Definition at line 97 of file tcp_syncache.h.
#define SCF_ACE_1 0x600 /* send ACE ECT1 setup */ |
Definition at line 98 of file tcp_syncache.h.
#define SCF_ACE_CE 0x700 /* send ACE CE setup */ |
Definition at line 99 of file tcp_syncache.h.
#define SCF_ACE_N 0x400 /* send ACE non-ECT setup */ |
Definition at line 96 of file tcp_syncache.h.
#define SCF_ECN 0x100 /* send ECN setup packet */ |
Definition at line 95 of file tcp_syncache.h.
#define SCF_ECN_MASK 0x700 /* ECN codepoint mask */ |
Definition at line 94 of file tcp_syncache.h.
#define SCF_NOOPT 0x01 /* no TCP options */ |
Definition at line 87 of file tcp_syncache.h.
#define SCF_SACK 0x80 /* send SACK option */ |
Definition at line 93 of file tcp_syncache.h.
#define SCF_SIGNATURE 0x20 /* send MD5 digests */ |
Definition at line 92 of file tcp_syncache.h.
#define SCF_TIMESTAMP 0x04 /* negotiated timestamps */ |
Definition at line 89 of file tcp_syncache.h.
#define SCF_UNREACH 0x10 /* icmp unreachable received */ |
Definition at line 91 of file tcp_syncache.h.
#define SCF_WINSCALE 0x02 /* negotiated window scaling */ |
Definition at line 88 of file tcp_syncache.h.
#define SYNCOOKIE_LIFETIME 15 /* seconds */ |
Definition at line 112 of file tcp_syncache.h.
#define SYNCOOKIE_SECRET_SIZE 16 |
Definition at line 111 of file tcp_syncache.h.
#define TCP_SYNCACHE_MAX_BACKOFF 6 /* 16 minutes */ |
Definition at line 122 of file tcp_syncache.h.
#define TCP_SYNCACHE_PAUSE_TIME SYNCOOKIE_LIFETIME |
Definition at line 121 of file tcp_syncache.h.
struct socket * syncache_add | ( | struct in_conninfo * | inc, |
struct tcpopt * | to, | ||
struct tcphdr * | th, | ||
struct inpcb * | inp, | ||
struct socket * | so, | ||
struct mbuf * | m, | ||
void * | tod, | ||
void * | todctx, | ||
uint8_t | iptos, | ||
uint16_t | port | ||
) |
Definition at line 1402 of file tcp_syncache.c.
References IN6P_AUTOFLOWLABEL, inpcb::in6p_outputopts, in_conninfo::inc_flags, INC_ISIPV6, inpcb::inp_flags, inpcb::inp_ip_tos, inpcb::inp_ip_ttl, INP_RLOCK_ASSERT, INP_RUNLOCK, ip_srcroute(), ip_tos, ip_ttl, IPV6_FLOWLABEL_MASK, IS_FASTOPEN, syncache::sc_cred, syncache::sc_flags, syncache::sc_flowlabel, syncache::sc_inc, syncache::sc_ip_tos, syncache::sc_ip_ttl, syncache::sc_ipopts, syncache::sc_irs, syncache::sc_iss, syncache::sc_label, syncache::sc_peer_mss, syncache::sc_port, syncache::sc_requested_r_scale, syncache::sc_requested_s_scale, syncache::sc_rxmits, syncache::sc_tfo_cookie, syncache::sc_tod, syncache::sc_todctx, syncache::sc_tsoff, syncache::sc_tsreflect, syncache::sc_wnd, SCF_ECN, SCF_NOOPT, SCF_SACK, SCF_SIGNATURE, SCF_TIMESTAMP, SCF_WINSCALE, syncache_head::sch_last_overflow, SCH_LOCK_ASSERT, SCH_UNLOCK, sototcpcb, syncache_cookiesonly(), syncache_drop(), syncache_free(), syncache_hashbucket(), syncache_insert(), syncache_lookup(), syncache_pause(), syncache_respond(), syncache_tfo_expand(), syncache_timeout(), syncookie_generate(), tcpcb::t_flags, tcpcb::t_tfo_pending, tcp_ecn_syncache_add(), tcp_fastopen_check_cookie(), tcp_fastopen_decrement_counter(), tcp_get_flags(), tcp_log_addrs(), tcp_new_ts_offset(), TCP_PROBE5, TCPSTAT_INC, TF_NOOPT, TF_SIGNATURE, tcpopt::to_flags, tcpopt::to_mss, tcpopt::to_signature, tcpopt::to_tfo_cookie, tcpopt::to_tfo_len, tcpopt::to_tsval, tcpopt::to_wscale, TOF_FASTOPEN, TOF_MSS, TOF_SACKPERM, TOF_SCALE, TOF_SIGNATURE, TOF_TS, V_tcp_do_ecn, V_tcp_do_rfc1323, V_tcp_fastopen_server_enable, V_tcp_syncache, V_tcp_syncookies, and V_tcp_syncookiesonly.
Referenced by tcp_input_with_port(), and toe_syncache_add().
void syncache_badack | ( | struct in_conninfo * | inc, |
uint16_t | port | ||
) |
Definition at line 732 of file tcp_syncache.c.
References syncache::sc_port, SCH_LOCK_ASSERT, SCH_UNLOCK, syncache_cookiesonly(), syncache_drop(), syncache_lookup(), and TCPSTAT_INC.
Referenced by tcp_input_with_port().
void syncache_chkrst | ( | struct in_conninfo * | inc, |
struct tcphdr * | th, | ||
struct mbuf * | m, | ||
uint16_t | port | ||
) |
Definition at line 615 of file tcp_syncache.c.
References syncache::sc_irs, syncache::sc_port, syncache::sc_wnd, SCH_LOCK_ASSERT, SCH_UNLOCK, SEQ_GEQ, SEQ_LT, syncache_cookiesonly(), syncache_drop(), syncache_lookup(), syncache_respond(), tcp_get_flags(), tcp_log_addrs(), TCPSTAT_INC, and V_tcp_insecure_rst.
Referenced by tcp_input_with_port().
int syncache_expand | ( | struct in_conninfo * | inc, |
struct tcpopt * | to, | ||
struct tcphdr * | th, | ||
struct socket ** | lsop, | ||
struct mbuf * | m, | ||
uint16_t | port | ||
) |
Definition at line 1090 of file tcp_syncache.c.
References syncache::sc_flags, syncache::sc_irs, syncache::sc_iss, syncache::sc_port, syncache::sc_tod, syncache::sc_todctx, syncache::sc_tsreflect, syncache::sc_wnd, SCF_SIGNATURE, SCF_TIMESTAMP, syncache_head::sch_last_overflow, syncache_head::sch_length, SCH_LOCK_ASSERT, SCH_UNLOCK, SEQ_GT, SEQ_LEQ, syncache_cookiesonly(), syncache_free(), syncache_hashbucket(), syncache_lookup(), syncache_socket(), SYNCOOKIE_LIFETIME, syncookie_lookup(), tcp_get_flags(), tcp_log_addrs(), TCPS_SYN_RECEIVED, TCPSTAT_INC, TCPSTATES_DEC, tcpopt::to_flags, tcpopt::to_signature, tcpopt::to_tsval, toedev::tod_syncache_removed, TOF_SIGNATURE, TOF_TS, TSTMP_LT, V_tcp_syncookies, V_tcp_syncookiesonly, and V_tcp_tolerate_missing_ts.
Referenced by tcp_input_with_port(), and toe_syncache_expand().
void syncache_init | ( | void | ) |
Definition at line 254 of file tcp_syncache.c.
References SYNCACHE_MAXREXMTS, SYNCOOKIE_LIFETIME, syncookie_reseed(), SYNCOOKIE_SECRET_SIZE, TCP_SYNCACHE_BUCKETLIMIT, TCP_SYNCACHE_HASHSIZE, TCP_SYNCACHE_PAUSE_TIME, and V_tcp_syncache.
Referenced by tcp_vnet_init().
int syncache_pcblist | ( | struct sysctl_req * | req | ) |
Definition at line 2554 of file tcp_syncache.c.
References in_conninfo::inc_flags, INC_ISIPV6, INP_IPV4, INP_IPV6, IPPROTO_TCP, syncache::sc_cred, syncache::sc_inc, syncache::sc_port, SCH_LOCK, SCH_UNLOCK, TCPS_SYN_RECEIVED, and V_tcp_syncache.
Referenced by tcp_pcblist().
void syncache_unreach | ( | struct in_conninfo * | inc, |
tcp_seq | th_seq, | ||
uint16_t | port | ||
) |
Definition at line 749 of file tcp_syncache.c.
References syncache::sc_flags, syncache::sc_iss, syncache::sc_port, syncache::sc_rxmits, SCF_UNREACH, SCH_LOCK_ASSERT, SCH_UNLOCK, syncache_cookiesonly(), syncache_drop(), syncache_lookup(), and TCPSTAT_INC.