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