Lines Matching refs:len
231 static const char *msg_type( unsigned char *msg, size_t len ) in msg_type() argument
233 if( len < 1 ) return( "Invalid" ); in msg_type()
243 if( len < 13 + 12 ) return( "Invalid handshake" ); in msg_type()
296 unsigned len; member
305 ellapsed_time(), p->way, p->type, p->len ); in print_packet()
308 p->way, p->type, p->len, why ); in print_packet()
322 memcpy( buf, p->buf, p->len ); in send_packet()
323 ++buf[p->len - 1]; in send_packet()
326 if( ( ret = mbedtls_net_send( dst, buf, p->len ) ) <= 0 ) in send_packet()
334 if( ( ret = mbedtls_net_send( dst, p->buf, p->len ) ) <= 0 ) in send_packet()
347 if( ( ret = mbedtls_net_send( dst, p->buf, p->len ) ) <= 0 ) in send_packet()
379 size_t id = p->len % sizeof( dropped ); in update_dropped()
380 const unsigned char *end = p->buf + p->len; in update_dropped()
382 size_t len = ( ( cur[11] << 8 ) | cur[12] ) + 13; in update_dropped() local
387 if( len == p->len ) in update_dropped()
392 len = ( ( cur[11] << 8 ) | cur[12] ) + 13; in update_dropped()
394 id = len % sizeof( dropped ); in update_dropped()
397 cur += len; in update_dropped()
416 cur.len = ret; in handle_message()
417 cur.type = msg_type( cur.buf, cur.len ); in handle_message()
422 id = cur.len % sizeof( dropped ); in handle_message()
426 cur.len > (unsigned) opt.mtu ) || in handle_message()
431 cur.len != (size_t) opt.protect_len && in handle_message()
444 cur.len != (size_t) opt.protect_len && in handle_message()