• Home
  • Raw
  • Download

Lines Matching refs:opts

333 		       unsigned int *size, struct mptcp_out_options *opts)  in mptcp_syn_options()  argument
342 opts->suboptions = OPTION_MPTCP_MPC_SYN; in mptcp_syn_options()
348 opts->suboptions = OPTION_MPTCP_MPJ_SYN; in mptcp_syn_options()
349 opts->join_id = subflow->local_id; in mptcp_syn_options()
350 opts->token = subflow->remote_token; in mptcp_syn_options()
351 opts->nonce = subflow->local_nonce; in mptcp_syn_options()
352 opts->backup = subflow->request_bkup; in mptcp_syn_options()
395 struct mptcp_out_options *opts) in mptcp_established_options_mp() argument
423 opts->ext_copy.data_len = data_len; in mptcp_established_options_mp()
424 opts->suboptions = OPTION_MPTCP_MPC_ACK; in mptcp_established_options_mp()
425 opts->sndr_key = subflow->local_key; in mptcp_established_options_mp()
426 opts->rcvr_key = subflow->remote_key; in mptcp_established_options_mp()
444 opts->suboptions = OPTION_MPTCP_MPJ_ACK; in mptcp_established_options_mp()
445 memcpy(opts->hmac, subflow->hmac, MPTCPOPT_HMAC_LEN); in mptcp_established_options_mp()
486 struct mptcp_out_options *opts) in mptcp_established_options_dss() argument
507 opts->ext_copy = *mpext; in mptcp_established_options_dss()
510 mptcp_write_data_fin(subflow, skb, &opts->ext_copy); in mptcp_established_options_dss()
517 opts->ext_copy.use_ack = 0; in mptcp_established_options_dss()
525 opts->ext_copy.data_ack = READ_ONCE(msk->ack_seq); in mptcp_established_options_dss()
526 opts->ext_copy.ack64 = 1; in mptcp_established_options_dss()
529 opts->ext_copy.data_ack32 = (uint32_t)READ_ONCE(msk->ack_seq); in mptcp_established_options_dss()
530 opts->ext_copy.ack64 = 0; in mptcp_established_options_dss()
532 opts->ext_copy.use_ack = 1; in mptcp_established_options_dss()
581 struct mptcp_out_options *opts) in mptcp_established_options_add_addr() argument
598 opts->addr_id = saddr.id; in mptcp_established_options_add_addr()
600 opts->suboptions |= OPTION_MPTCP_ADD_ADDR; in mptcp_established_options_add_addr()
601 opts->addr = saddr.addr; in mptcp_established_options_add_addr()
603 opts->ahmac = add_addr_generate_hmac(msk->local_key, in mptcp_established_options_add_addr()
605 opts->addr_id, in mptcp_established_options_add_addr()
606 &opts->addr); in mptcp_established_options_add_addr()
611 opts->suboptions |= OPTION_MPTCP_ADD_ADDR6; in mptcp_established_options_add_addr()
612 opts->addr6 = saddr.addr6; in mptcp_established_options_add_addr()
614 opts->ahmac = add_addr6_generate_hmac(msk->local_key, in mptcp_established_options_add_addr()
616 opts->addr_id, in mptcp_established_options_add_addr()
617 &opts->addr6); in mptcp_established_options_add_addr()
621 pr_debug("addr_id=%d, ahmac=%llu, echo=%d", opts->addr_id, opts->ahmac, echo); in mptcp_established_options_add_addr()
629 struct mptcp_out_options *opts) in mptcp_established_options_rm_addr() argument
643 opts->suboptions |= OPTION_MPTCP_RM_ADDR; in mptcp_established_options_rm_addr()
644 opts->rm_id = rm_id; in mptcp_established_options_rm_addr()
646 pr_debug("rm_id=%d", opts->rm_id); in mptcp_established_options_rm_addr()
653 struct mptcp_out_options *opts) in mptcp_established_options() argument
658 opts->suboptions = 0; in mptcp_established_options()
669 if (mptcp_established_options_mp(sk, skb, &opt_size, remaining, opts)) in mptcp_established_options()
672 opts)) in mptcp_established_options()
683 if (mptcp_established_options_add_addr(sk, &opt_size, remaining, opts)) { in mptcp_established_options()
687 } else if (mptcp_established_options_rm_addr(sk, &opt_size, remaining, opts)) { in mptcp_established_options()
697 struct mptcp_out_options *opts) in mptcp_synack_options() argument
702 opts->suboptions = OPTION_MPTCP_MPC_SYNACK; in mptcp_synack_options()
703 opts->sndr_key = subflow_req->local_key; in mptcp_synack_options()
709 opts->suboptions = OPTION_MPTCP_MPJ_SYNACK; in mptcp_synack_options()
710 opts->backup = subflow_req->backup; in mptcp_synack_options()
711 opts->join_id = subflow_req->local_id; in mptcp_synack_options()
712 opts->thmac = subflow_req->thmac; in mptcp_synack_options()
713 opts->nonce = subflow_req->local_nonce; in mptcp_synack_options()
715 subflow_req, opts->backup, opts->join_id, in mptcp_synack_options()
716 opts->thmac, opts->nonce); in mptcp_synack_options()
980 void mptcp_write_options(__be32 *ptr, struct mptcp_out_options *opts) in mptcp_write_options() argument
983 OPTION_MPTCP_MPC_ACK) & opts->suboptions) { in mptcp_write_options()
986 if (OPTION_MPTCP_MPC_SYN & opts->suboptions) in mptcp_write_options()
988 else if (OPTION_MPTCP_MPC_SYNACK & opts->suboptions) in mptcp_write_options()
990 else if (opts->ext_copy.data_len) in mptcp_write_options()
1000 opts->suboptions)) in mptcp_write_options()
1003 put_unaligned_be64(opts->sndr_key, ptr); in mptcp_write_options()
1005 if (!((OPTION_MPTCP_MPC_ACK) & opts->suboptions)) in mptcp_write_options()
1008 put_unaligned_be64(opts->rcvr_key, ptr); in mptcp_write_options()
1010 if (!opts->ext_copy.data_len) in mptcp_write_options()
1013 put_unaligned_be32(opts->ext_copy.data_len << 16 | in mptcp_write_options()
1019 if (OPTION_MPTCP_ADD_ADDR & opts->suboptions) { in mptcp_write_options()
1020 if (opts->ahmac) in mptcp_write_options()
1023 opts->addr_id); in mptcp_write_options()
1028 opts->addr_id); in mptcp_write_options()
1029 memcpy((u8 *)ptr, (u8 *)&opts->addr.s_addr, 4); in mptcp_write_options()
1031 if (opts->ahmac) { in mptcp_write_options()
1032 put_unaligned_be64(opts->ahmac, ptr); in mptcp_write_options()
1038 if (OPTION_MPTCP_ADD_ADDR6 & opts->suboptions) { in mptcp_write_options()
1039 if (opts->ahmac) in mptcp_write_options()
1042 opts->addr_id); in mptcp_write_options()
1047 opts->addr_id); in mptcp_write_options()
1048 memcpy((u8 *)ptr, opts->addr6.s6_addr, 16); in mptcp_write_options()
1050 if (opts->ahmac) { in mptcp_write_options()
1051 put_unaligned_be64(opts->ahmac, ptr); in mptcp_write_options()
1057 if (OPTION_MPTCP_RM_ADDR & opts->suboptions) { in mptcp_write_options()
1060 0, opts->rm_id); in mptcp_write_options()
1063 if (OPTION_MPTCP_MPJ_SYN & opts->suboptions) { in mptcp_write_options()
1066 opts->backup, opts->join_id); in mptcp_write_options()
1067 put_unaligned_be32(opts->token, ptr); in mptcp_write_options()
1069 put_unaligned_be32(opts->nonce, ptr); in mptcp_write_options()
1073 if (OPTION_MPTCP_MPJ_SYNACK & opts->suboptions) { in mptcp_write_options()
1076 opts->backup, opts->join_id); in mptcp_write_options()
1077 put_unaligned_be64(opts->thmac, ptr); in mptcp_write_options()
1079 put_unaligned_be32(opts->nonce, ptr); in mptcp_write_options()
1083 if (OPTION_MPTCP_MPJ_ACK & opts->suboptions) { in mptcp_write_options()
1086 memcpy(ptr, opts->hmac, MPTCPOPT_HMAC_LEN); in mptcp_write_options()
1090 if (opts->ext_copy.use_ack || opts->ext_copy.use_map) { in mptcp_write_options()
1091 struct mptcp_ext *mpext = &opts->ext_copy; in mptcp_write_options()