Lines Matching defs:ptr

22 			       const unsigned char *ptr, int opsize,
25 u8 subtype = *ptr >> 4;
48 version = *ptr++ & MPTCP_VERSION_MASK;
56 flags = *ptr++;
79 mp_opt->sndr_key = get_unaligned_be64(ptr);
80 ptr += 8;
83 mp_opt->rcvr_key = get_unaligned_be64(ptr);
84 ptr += 8;
96 mp_opt->data_len = get_unaligned_be16(ptr);
97 ptr += 2;
107 mp_opt->backup = *ptr++ & MPTCPOPT_BACKUP;
108 mp_opt->join_id = *ptr++;
109 mp_opt->token = get_unaligned_be32(ptr);
110 ptr += 4;
111 mp_opt->nonce = get_unaligned_be32(ptr);
112 ptr += 4;
117 mp_opt->backup = *ptr++ & MPTCPOPT_BACKUP;
118 mp_opt->join_id = *ptr++;
119 mp_opt->thmac = get_unaligned_be64(ptr);
120 ptr += 8;
121 mp_opt->nonce = get_unaligned_be32(ptr);
122 ptr += 4;
127 ptr += 2;
128 memcpy(mp_opt->hmac, ptr, MPTCPOPT_HMAC_LEN);
137 ptr++;
144 flags = (*ptr++) & MPTCP_DSS_FLAG_MASK;
185 mp_opt->data_ack = get_unaligned_be64(ptr);
186 ptr += 8;
188 mp_opt->data_ack = get_unaligned_be32(ptr);
189 ptr += 4;
197 mp_opt->data_seq = get_unaligned_be64(ptr);
198 ptr += 8;
200 mp_opt->data_seq = get_unaligned_be32(ptr);
201 ptr += 4;
204 mp_opt->subflow_seq = get_unaligned_be32(ptr);
205 ptr += 4;
207 mp_opt->data_len = get_unaligned_be16(ptr);
208 ptr += 2;
218 mp_opt->echo = (*ptr++) & MPTCP_ADDR_ECHO;
244 mp_opt->addr_id = *ptr++;
247 memcpy((u8 *)&mp_opt->addr.s_addr, (u8 *)ptr, 4);
248 ptr += 4;
251 mp_opt->port = get_unaligned_be16(ptr);
252 ptr += 2;
257 memcpy(mp_opt->addr6.s6_addr, (u8 *)ptr, 16);
258 ptr += 16;
261 mp_opt->port = get_unaligned_be16(ptr);
262 ptr += 2;
267 mp_opt->ahmac = get_unaligned_be64(ptr);
268 ptr += 8;
276 ptr++;
279 mp_opt->rm_id = *ptr++;
292 const unsigned char *ptr;
305 ptr = (const unsigned char *)(th + 1);
308 int opcode = *ptr++;
320 opsize = *ptr++;
326 mptcp_parse_option(skb, ptr, opsize, mp_opt);
327 ptr += opsize - 2;
981 void mptcp_write_options(__be32 *ptr, struct mptcp_out_options *opts)
996 *ptr++ = mptcp_option(MPTCPOPT_MP_CAPABLE, len,
1004 put_unaligned_be64(opts->sndr_key, ptr);
1005 ptr += 2;
1009 put_unaligned_be64(opts->rcvr_key, ptr);
1010 ptr += 2;
1015 TCPOPT_NOP << 8 | TCPOPT_NOP, ptr);
1016 ptr += 1;
1022 *ptr++ = mptcp_option(MPTCPOPT_ADD_ADDR,
1026 *ptr++ = mptcp_option(MPTCPOPT_ADD_ADDR,
1030 memcpy((u8 *)ptr, (u8 *)&opts->addr.s_addr, 4);
1031 ptr += 1;
1033 put_unaligned_be64(opts->ahmac, ptr);
1034 ptr += 2;
1041 *ptr++ = mptcp_option(MPTCPOPT_ADD_ADDR,
1045 *ptr++ = mptcp_option(MPTCPOPT_ADD_ADDR,
1049 memcpy((u8 *)ptr, opts->addr6.s6_addr, 16);
1050 ptr += 4;
1052 put_unaligned_be64(opts->ahmac, ptr);
1053 ptr += 2;
1059 *ptr++ = mptcp_option(MPTCPOPT_RM_ADDR,
1065 *ptr++ = mptcp_option(MPTCPOPT_MP_JOIN,
1068 put_unaligned_be32(opts->token, ptr);
1069 ptr += 1;
1070 put_unaligned_be32(opts->nonce, ptr);
1071 ptr += 1;
1075 *ptr++ = mptcp_option(MPTCPOPT_MP_JOIN,
1078 put_unaligned_be64(opts->thmac, ptr);
1079 ptr += 2;
1080 put_unaligned_be32(opts->nonce, ptr);
1081 ptr += 1;
1085 *ptr++ = mptcp_option(MPTCPOPT_MP_JOIN,
1087 memcpy(ptr, opts->hmac, MPTCPOPT_HMAC_LEN);
1088 ptr += 5;
1117 *ptr++ = mptcp_option(MPTCPOPT_DSS, len, 0, flags);
1121 put_unaligned_be64(mpext->data_ack, ptr);
1122 ptr += 2;
1124 put_unaligned_be32(mpext->data_ack32, ptr);
1125 ptr += 1;
1130 put_unaligned_be64(mpext->data_seq, ptr);
1131 ptr += 2;
1132 put_unaligned_be32(mpext->subflow_seq, ptr);
1133 ptr += 1;
1135 TCPOPT_NOP << 8 | TCPOPT_NOP, ptr);