Lines Matching refs:optlen
200 int len, data_off, extrah_len, optlen; in dccp_input() local
583 optlen = data_off - (sizeof(struct dccplhdr) + extrah_len); in dccp_input()
585 optlen = data_off - (sizeof(struct dccphdr) + extrah_len); in dccp_input()
587 if (optlen < 0) { in dccp_input()
588 …optlen = %i data_off = %i, m_len = %i, iphlen = %i extrah_len = %i !\n", optlen, data_off, m->m_le… in dccp_input()
593 if (optlen > 0) { in dccp_input()
594 if (optlen > DCCP_MAX_OPTIONS) { in dccp_input()
595 DCCP_DEBUG((LOG_INFO, "Error, more options (%i) then DCCP_MAX_OPTIONS options!\n", optlen)); in dccp_input()
600 DCCP_DEBUG((LOG_INFO, "Parsing DCCP options, optlen = %i\n", optlen)); in dccp_input()
601 memcpy(options, optp, optlen); in dccp_input()
602 dccp_parse_options(dp, options, optlen); in dccp_input()
722 (*cc_sw[dp->cc_in_use[1]].cc_recv_packet_recv)(dp->cc_state[1], options, optlen); in dccp_input()
750 (*cc_sw[dp->cc_in_use[1]].cc_recv_packet_recv)(dp->cc_state[1], options, optlen); in dccp_input()
767 (*cc_sw[dp->cc_in_use[1]].cc_recv_packet_recv)(dp->cc_state[1], options, optlen); in dccp_input()
784 (*cc_sw[dp->cc_in_use[1]].cc_recv_packet_recv)(dp->cc_state[1], options, optlen); in dccp_input()
877 (*cc_sw[dp->cc_in_use[0]].cc_send_packet_recv)(dp->cc_state[0],options, optlen); in dccp_input()
1125 u_int32_t hdrlen, optlen, extrah_len, cslen; in dccp_output() local
1178 optlen = 0; in dccp_output()
1254 if (dp->optlen) { in dccp_output()
1255 DCCP_DEBUG((LOG_INFO, "Copying options from dp->options! %u\n", dp->optlen)); in dccp_output()
1256 memcpy(options, dp->options, dp->optlen); in dccp_output()
1257 optlen = dp->optlen; in dccp_output()
1258 dp->optlen = 0; in dccp_output()
1261 if (dp->featlen && (optlen + dp->featlen < DCCP_MAX_OPTIONS)) { in dccp_output()
1263 memcpy(options + optlen, dp->features, dp->featlen); in dccp_output()
1264 optlen += dp->featlen; in dccp_output()
1267 t = optlen % 4; in dccp_output()
1272 options[optlen] = 0; in dccp_output()
1273 optlen++; in dccp_output()
1282 extrah_len + optlen; in dccp_output()
1285 extrah_len + optlen; in dccp_output()
1291 extrah_len + optlen; in dccp_output()
1294 extrah_len + optlen; in dccp_output()
1298 if (len > (dp->d_maxseg - extrah_len - optlen)) { in dccp_output()
1299 len = dp->d_maxseg - extrah_len - optlen; in dccp_output()
1378 dh->dh_off = 4 + (extrah_len / 4) + (optlen / 4); in dccp_output()
1380 dh->dh_off = 3 + (extrah_len / 4) + (optlen / 4); in dccp_output()
1445 if (optlen) in dccp_output()
1446 memcpy(optp, options, optlen); in dccp_output()
2105 dp->optlen = 0; in dccp_newdccpcb()
2154 …"Entering dccp_add_feature_option, opt = %u, val_len = %u optlen %u\n", opt, val_len, dp->optlen)); in dccp_add_feature_option()
2156 if (DCCP_MAX_OPTIONS > (dp->optlen + val_len + 2)) { in dccp_add_feature_option()
2157 dp->options[dp->optlen] = opt; in dccp_add_feature_option()
2159 dp->optlen++; in dccp_add_feature_option()
2162 dp->options[dp->optlen + 1] = val_len + 3; in dccp_add_feature_option()
2163 dp->options[dp->optlen +2] = feature; in dccp_add_feature_option()
2164 dp->optlen += 3; in dccp_add_feature_option()
2166 dp->options[dp->optlen + 1] = val_len + 2; in dccp_add_feature_option()
2167 dp->optlen += 2; in dccp_add_feature_option()
2171 dp->options[dp->optlen] = val[i]; in dccp_add_feature_option()
2172 dp->optlen++; in dccp_add_feature_option()
2176 DCCP_DEBUG((LOG_INFO, "No room for more options, optlen = %u\n", dp->optlen)); in dccp_add_feature_option()
2189 dccp_get_option(char *options, int optlen, int type, char *buffer, int buflen) in dccp_get_option() argument
2194 for (i=0; i < optlen;) { in dccp_get_option()
2214 dccp_parse_options(struct dccpcb *dp, char *options, int optlen) in dccp_parse_options() argument
2219 for (i = 0; i < optlen; i++) { in dccp_parse_options()
3041 dccp_nocc_packet_recv(void *ccb, char* options ,int optlen) in dccp_nocc_packet_recv() argument