• Home
  • Raw
  • Download

Lines Matching refs:opts

334 		       unsigned int *size, struct mptcp_out_options *opts)  in mptcp_syn_options()  argument
343 opts->suboptions = OPTION_MPTCP_MPC_SYN; in mptcp_syn_options()
349 opts->suboptions = OPTION_MPTCP_MPJ_SYN; in mptcp_syn_options()
350 opts->join_id = subflow->local_id; in mptcp_syn_options()
351 opts->token = subflow->remote_token; in mptcp_syn_options()
352 opts->nonce = subflow->local_nonce; in mptcp_syn_options()
353 opts->backup = subflow->request_bkup; in mptcp_syn_options()
396 struct mptcp_out_options *opts) in mptcp_established_options_mp() argument
424 opts->ext_copy.data_len = data_len; in mptcp_established_options_mp()
425 opts->suboptions = OPTION_MPTCP_MPC_ACK; in mptcp_established_options_mp()
426 opts->sndr_key = subflow->local_key; in mptcp_established_options_mp()
427 opts->rcvr_key = subflow->remote_key; in mptcp_established_options_mp()
445 opts->suboptions = OPTION_MPTCP_MPJ_ACK; in mptcp_established_options_mp()
446 memcpy(opts->hmac, subflow->hmac, MPTCPOPT_HMAC_LEN); in mptcp_established_options_mp()
487 struct mptcp_out_options *opts) in mptcp_established_options_dss() argument
508 opts->ext_copy = *mpext; in mptcp_established_options_dss()
511 mptcp_write_data_fin(subflow, skb, &opts->ext_copy); in mptcp_established_options_dss()
518 opts->ext_copy.use_ack = 0; in mptcp_established_options_dss()
526 opts->ext_copy.data_ack = READ_ONCE(msk->ack_seq); in mptcp_established_options_dss()
527 opts->ext_copy.ack64 = 1; in mptcp_established_options_dss()
530 opts->ext_copy.data_ack32 = (uint32_t)READ_ONCE(msk->ack_seq); in mptcp_established_options_dss()
531 opts->ext_copy.ack64 = 0; in mptcp_established_options_dss()
533 opts->ext_copy.use_ack = 1; in mptcp_established_options_dss()
582 struct mptcp_out_options *opts) in mptcp_established_options_add_addr() argument
599 opts->addr_id = saddr.id; in mptcp_established_options_add_addr()
601 opts->suboptions |= OPTION_MPTCP_ADD_ADDR; in mptcp_established_options_add_addr()
602 opts->addr = saddr.addr; in mptcp_established_options_add_addr()
604 opts->ahmac = add_addr_generate_hmac(msk->local_key, in mptcp_established_options_add_addr()
606 opts->addr_id, in mptcp_established_options_add_addr()
607 &opts->addr); in mptcp_established_options_add_addr()
612 opts->suboptions |= OPTION_MPTCP_ADD_ADDR6; in mptcp_established_options_add_addr()
613 opts->addr6 = saddr.addr6; in mptcp_established_options_add_addr()
615 opts->ahmac = add_addr6_generate_hmac(msk->local_key, in mptcp_established_options_add_addr()
617 opts->addr_id, in mptcp_established_options_add_addr()
618 &opts->addr6); in mptcp_established_options_add_addr()
622 pr_debug("addr_id=%d, ahmac=%llu, echo=%d", opts->addr_id, opts->ahmac, echo); in mptcp_established_options_add_addr()
630 struct mptcp_out_options *opts) in mptcp_established_options_rm_addr() argument
644 opts->suboptions |= OPTION_MPTCP_RM_ADDR; in mptcp_established_options_rm_addr()
645 opts->rm_id = rm_id; in mptcp_established_options_rm_addr()
647 pr_debug("rm_id=%d", opts->rm_id); in mptcp_established_options_rm_addr()
654 struct mptcp_out_options *opts) in mptcp_established_options() argument
659 opts->suboptions = 0; in mptcp_established_options()
670 if (mptcp_established_options_mp(sk, skb, &opt_size, remaining, opts)) in mptcp_established_options()
673 opts)) in mptcp_established_options()
684 if (mptcp_established_options_add_addr(sk, &opt_size, remaining, opts)) { in mptcp_established_options()
688 } else if (mptcp_established_options_rm_addr(sk, &opt_size, remaining, opts)) { in mptcp_established_options()
698 struct mptcp_out_options *opts) in mptcp_synack_options() argument
703 opts->suboptions = OPTION_MPTCP_MPC_SYNACK; in mptcp_synack_options()
704 opts->sndr_key = subflow_req->local_key; in mptcp_synack_options()
710 opts->suboptions = OPTION_MPTCP_MPJ_SYNACK; in mptcp_synack_options()
711 opts->backup = subflow_req->backup; in mptcp_synack_options()
712 opts->join_id = subflow_req->local_id; in mptcp_synack_options()
713 opts->thmac = subflow_req->thmac; in mptcp_synack_options()
714 opts->nonce = subflow_req->local_nonce; in mptcp_synack_options()
716 subflow_req, opts->backup, opts->join_id, in mptcp_synack_options()
717 opts->thmac, opts->nonce); in mptcp_synack_options()
981 void mptcp_write_options(__be32 *ptr, struct mptcp_out_options *opts) in mptcp_write_options() argument
984 OPTION_MPTCP_MPC_ACK) & opts->suboptions) { in mptcp_write_options()
987 if (OPTION_MPTCP_MPC_SYN & opts->suboptions) in mptcp_write_options()
989 else if (OPTION_MPTCP_MPC_SYNACK & opts->suboptions) in mptcp_write_options()
991 else if (opts->ext_copy.data_len) in mptcp_write_options()
1001 opts->suboptions)) in mptcp_write_options()
1004 put_unaligned_be64(opts->sndr_key, ptr); in mptcp_write_options()
1006 if (!((OPTION_MPTCP_MPC_ACK) & opts->suboptions)) in mptcp_write_options()
1009 put_unaligned_be64(opts->rcvr_key, ptr); in mptcp_write_options()
1011 if (!opts->ext_copy.data_len) in mptcp_write_options()
1014 put_unaligned_be32(opts->ext_copy.data_len << 16 | in mptcp_write_options()
1020 if (OPTION_MPTCP_ADD_ADDR & opts->suboptions) { in mptcp_write_options()
1021 if (opts->ahmac) in mptcp_write_options()
1024 opts->addr_id); in mptcp_write_options()
1029 opts->addr_id); in mptcp_write_options()
1030 memcpy((u8 *)ptr, (u8 *)&opts->addr.s_addr, 4); in mptcp_write_options()
1032 if (opts->ahmac) { in mptcp_write_options()
1033 put_unaligned_be64(opts->ahmac, ptr); in mptcp_write_options()
1039 if (OPTION_MPTCP_ADD_ADDR6 & opts->suboptions) { in mptcp_write_options()
1040 if (opts->ahmac) in mptcp_write_options()
1043 opts->addr_id); in mptcp_write_options()
1048 opts->addr_id); in mptcp_write_options()
1049 memcpy((u8 *)ptr, opts->addr6.s6_addr, 16); in mptcp_write_options()
1051 if (opts->ahmac) { in mptcp_write_options()
1052 put_unaligned_be64(opts->ahmac, ptr); in mptcp_write_options()
1058 if (OPTION_MPTCP_RM_ADDR & opts->suboptions) { in mptcp_write_options()
1061 0, opts->rm_id); in mptcp_write_options()
1064 if (OPTION_MPTCP_MPJ_SYN & opts->suboptions) { in mptcp_write_options()
1067 opts->backup, opts->join_id); in mptcp_write_options()
1068 put_unaligned_be32(opts->token, ptr); in mptcp_write_options()
1070 put_unaligned_be32(opts->nonce, ptr); in mptcp_write_options()
1074 if (OPTION_MPTCP_MPJ_SYNACK & opts->suboptions) { in mptcp_write_options()
1077 opts->backup, opts->join_id); in mptcp_write_options()
1078 put_unaligned_be64(opts->thmac, ptr); in mptcp_write_options()
1080 put_unaligned_be32(opts->nonce, ptr); in mptcp_write_options()
1084 if (OPTION_MPTCP_MPJ_ACK & opts->suboptions) { in mptcp_write_options()
1087 memcpy(ptr, opts->hmac, MPTCPOPT_HMAC_LEN); in mptcp_write_options()
1091 if (opts->ext_copy.use_ack || opts->ext_copy.use_map) { in mptcp_write_options()
1092 struct mptcp_ext *mpext = &opts->ext_copy; in mptcp_write_options()