Lines Matching refs:rdbx
132 …f -purN -x CVS -x '*~' -x '.*' -x 'obj-*' srtp-lin/crypto/include/rdbx.h srtp/crypto/include/rdbx.h
133 --- srtp-lin/crypto/include/rdbx.h 2007-06-15 14:17:40.000000000 -0400
134 +++ srtp/crypto/include/rdbx.h 2009-04-22 19:03:15.000000000 -0400
148 - * initializes the rdbx pointed to by its argument, setting the
150 + * initializes the rdbx pointed to by its argument with the window size ws,
155 -rdbx_init(rdbx_t *rdbx);
156 +rdbx_init(rdbx_t *rdbx, unsigned long ws);
162 + * frees memory associated with the rdbx
166 +rdbx_uninit(rdbx_t *rdbx);
170 @@ -127,6 +137,15 @@ rdbx_get_packet_index(const rdbx_t *rdbx
177 + * gets the window size which was used to initialize the rdbx
181 +rdbx_get_window_size(const rdbx_t *rdbx);
491 diff -purN -x CVS -x '*~' -x '.*' -x 'obj-*' srtp-lin/crypto/replay/rdbx.c srtp/crypto/replay/rdbx.c
492 --- srtp-lin/crypto/replay/rdbx.c 2007-06-15 14:17:40.000000000 -0400
493 +++ srtp/crypto/replay/rdbx.c 2009-04-22 19:03:15.000000000 -0400
496 #include "rdbx.h"
511 -rdbx_init(rdbx_t *rdbx) {
512 - v128_set_to_zero(&rdbx->bitmask);
513 +rdbx_init(rdbx_t *rdbx, unsigned long ws) {
517 + if (bitvector_alloc(&rdbx->bitmask, ws) != 0)
520 index_init(&rdbx->index);
530 +rdbx_uninit(rdbx_t *rdbx) {
531 + bitvector_dealloc(&rdbx->bitmask);
537 * rdbx_set_roc(rdbx, roc) initalizes the rdbx_t at the location rdbx
538 @@ -202,7 +216,7 @@ rdbx_init(rdbx_t *rdbx) {
541 rdbx_set_roc(rdbx_t *rdbx, uint32_t roc) {
542 - v128_set_to_zero(&rdbx->bitmask);
543 + bitvector_set_to_zero(&rdbx->bitmask);
547 @@ -231,6 +245,17 @@ rdbx_get_packet_index(const rdbx_t *rdbx
551 + * rdbx_get_window_size(rdbx) returns the value of the window size
552 + * for the rdbx_t pointed to by rdbx
557 +rdbx_get_window_size(const rdbx_t *rdbx) {
558 + return bitvector_get_length(&rdbx->bitmask);
563 * which is at rdbx->index + delta is in the rdb
565 @@ -240,11 +265,11 @@ rdbx_check(const rdbx_t *rdbx, int delta
570 + } else if ((int)(bitvector_get_length(&rdbx->bitmask) - 1) + delta < 0) {
573 - } else if (v128_get_bit(&rdbx->bitmask,
575 + } else if (bitvector_get_bit(&rdbx->bitmask,
576 + (int)(bitvector_get_length(&rdbx->bitmask) - 1) + delta) == 1) {
580 @@ -268,11 +293,11 @@ rdbx_add_index(rdbx_t *rdbx, int delta)
583 index_advance(&rdbx->index, delta);
584 - v128_left_shift(&rdbx->bitmask, delta);
585 - v128_set_bit(&rdbx->bitmask, 127);
586 + bitvector_left_shift(&rdbx->bitmask, delta);
587 + bitvector_set_bit(&rdbx->bitmask, bitvector_get_length(&rdbx->bitmask) - 1);
590 - v128_set_bit(&rdbx->bitmask, -delta);
591 + bitvector_set_bit(&rdbx->bitmask, -delta);
719 print_rdbx(rdbx_t *rdbx) {
721 printf("rdbx: {%llu, %s}\n",
722 - (unsigned long long)(rdbx->index), v128_bit_string(&rdbx->bitmask));
723 + (unsigned long long)(rdbx->index),
724 + bitvector_bit_string(&rdbx->bitmask, buf, sizeof(buf))
729 @@ -194,17 +208,15 @@ rdbx_check_unordered(rdbx_t *rdbx, uint3
738 rdbx_t rdbx;
744 - status = rdbx_init(&rdbx);
745 + status = rdbx_init(&rdbx, ws);
753 - if (rdbx_init(&rdbx) != err_status_ok) {
754 + rdbx_uninit(&rdbx);
756 + if (rdbx_init(&rdbx, ws) != err_status_ok) {
764 + rdbx_uninit(&rdbx);
777 rdbx_t rdbx;
782 - if (rdbx_init(&rdbx) != err_status_ok) {
783 + if (rdbx_init(&rdbx, ws) != err_status_ok) {
791 + rdbx_uninit(&rdbx);