/linux-4.1.27/net/ipv4/ |
H A D | tcp_fastopen.c | 76 struct tcp_fastopen_cookie *foc) __tcp_fastopen_cookie_gen() 84 crypto_cipher_encrypt_one(ctx->tfm, foc->val, path); __tcp_fastopen_cookie_gen() 85 foc->len = TCP_FASTOPEN_COOKIE_SIZE; __tcp_fastopen_cookie_gen() 100 struct tcp_fastopen_cookie *foc) tcp_fastopen_cookie_gen() 106 return __tcp_fastopen_cookie_gen(path, foc); tcp_fastopen_cookie_gen() 120 return __tcp_fastopen_cookie_gen(buf, foc); tcp_fastopen_cookie_gen() 260 /* Returns true if we should perform Fast Open on the SYN. The cookie (foc) 262 * cookie request (foc->len == 0). 266 struct tcp_fastopen_cookie *foc, tcp_try_fastopen() 272 if (foc->len == 0) /* Client requests a cookie */ tcp_try_fastopen() 276 (syn_data || foc->len >= 0) && tcp_try_fastopen() 278 foc->len = -1; tcp_try_fastopen() 285 if (foc->len >= 0 && /* Client presents or requests a cookie */ tcp_try_fastopen() 287 foc->len == TCP_FASTOPEN_COOKIE_SIZE && tcp_try_fastopen() 288 foc->len == valid_foc.len && tcp_try_fastopen() 289 !memcmp(foc->val, valid_foc.val, foc->len)) { tcp_try_fastopen() 300 foc->len = -1; tcp_try_fastopen() 306 } else if (foc->len > 0) /* Client presents an invalid cookie */ tcp_try_fastopen() 309 valid_foc.exp = foc->exp; tcp_try_fastopen() 310 *foc = valid_foc; tcp_try_fastopen() 75 __tcp_fastopen_cookie_gen(const void *path, struct tcp_fastopen_cookie *foc) __tcp_fastopen_cookie_gen() argument 98 tcp_fastopen_cookie_gen(struct request_sock *req, struct sk_buff *syn, struct tcp_fastopen_cookie *foc) tcp_fastopen_cookie_gen() argument 264 tcp_try_fastopen(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct tcp_fastopen_cookie *foc, struct dst_entry *dst) tcp_try_fastopen() argument
|
H A D | tcp_output.c | 520 struct tcp_fastopen_cookie *foc = opts->fastopen_cookie; tcp_options_write() local 524 if (foc->exp) { tcp_options_write() 525 len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len; tcp_options_write() 530 len = TCPOLEN_FASTOPEN_BASE + foc->len; tcp_options_write() 535 memcpy(p, foc->val, foc->len); tcp_options_write() 537 p[foc->len] = TCPOPT_NOP; tcp_options_write() 538 p[foc->len + 1] = TCPOPT_NOP; tcp_options_write() 618 struct tcp_fastopen_cookie *foc) tcp_synack_options() 657 if (foc != NULL && foc->len >= 0) { tcp_synack_options() 658 u32 need = foc->len; tcp_synack_options() 660 need += foc->exp ? TCPOLEN_EXP_FASTOPEN_BASE : tcp_synack_options() 665 opts->fastopen_cookie = foc; tcp_synack_options() 2950 struct tcp_fastopen_cookie *foc) tcp_make_synack() 2988 foc) + sizeof(*th); tcp_make_synack() 613 tcp_synack_options(struct sock *sk, struct request_sock *req, unsigned int mss, struct sk_buff *skb, struct tcp_out_options *opts, const struct tcp_md5sig_key *md5, struct tcp_fastopen_cookie *foc) tcp_synack_options() argument 2948 tcp_make_synack(struct sock *sk, struct dst_entry *dst, struct request_sock *req, struct tcp_fastopen_cookie *foc) tcp_make_synack() argument
|
H A D | tcp_input.c | 3628 bool syn, struct tcp_fastopen_cookie *foc, tcp_parse_fastopen_option() 3632 if (!foc || !syn || len < 0 || (len & 1)) tcp_parse_fastopen_option() 3637 memcpy(foc->val, cookie, len); tcp_parse_fastopen_option() 3640 foc->len = len; tcp_parse_fastopen_option() 3641 foc->exp = exp_opt; tcp_parse_fastopen_option() 3650 struct tcp_fastopen_cookie *foc) tcp_parse_options() 3736 ptr, th->syn, foc, false); tcp_parse_options() 3748 ptr + 2, th->syn, foc, true); tcp_parse_options() 5474 struct tcp_fastopen_cookie foc = { .len = -1 }; tcp_rcv_synsent_state_process() local 5477 tcp_parse_options(skb, &tp->rx_opt, 0, &foc); tcp_rcv_synsent_state_process() 5579 tcp_rcv_fastopen_synack(sk, skb, &foc)) tcp_rcv_synsent_state_process() 6098 struct tcp_fastopen_cookie foc = { .len = -1 }; tcp_conn_request() local 6133 tcp_parse_options(skb, &tmp_opt, 0, want_cookie ? NULL : &foc); tcp_conn_request() 6209 tcp_try_fastopen(sk, skb, req, &foc, dst); tcp_conn_request() 6211 skb_get_queue_mapping(skb), &foc); tcp_conn_request() 3627 tcp_parse_fastopen_option(int len, const unsigned char *cookie, bool syn, struct tcp_fastopen_cookie *foc, bool exp_opt) tcp_parse_fastopen_option() argument 3648 tcp_parse_options(const struct sk_buff *skb, struct tcp_options_received *opt_rx, int estab, struct tcp_fastopen_cookie *foc) tcp_parse_options() argument
|
H A D | tcp_ipv4.c | 828 struct tcp_fastopen_cookie *foc) tcp_v4_send_synack() 839 skb = tcp_make_synack(sk, dst, req, foc); tcp_v4_send_synack() 824 tcp_v4_send_synack(struct sock *sk, struct dst_entry *dst, struct flowi *fl, struct request_sock *req, u16 queue_mapping, struct tcp_fastopen_cookie *foc) tcp_v4_send_synack() argument
|
/linux-4.1.27/include/net/ |
H A D | tcp.h | 443 int estab, struct tcp_fastopen_cookie *foc); 466 struct tcp_fastopen_cookie *foc); 1360 struct tcp_fastopen_cookie *foc, 1654 u16 queue_mapping, struct tcp_fastopen_cookie *foc);
|
/linux-4.1.27/net/ipv6/ |
H A D | tcp_ipv6.c | 445 struct tcp_fastopen_cookie *foc) tcp_v6_send_synack() 457 skb = tcp_make_synack(sk, dst, req, foc); tcp_v6_send_synack() 441 tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst, struct flowi *fl, struct request_sock *req, u16 queue_mapping, struct tcp_fastopen_cookie *foc) tcp_v6_send_synack() argument
|