diff -r c244287035f5 -r c02ca5a6ab82 servlib/bundling/BPQBlock.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/servlib/bundling/BPQBlock.cc Wed May 04 15:44:40 2011 +0100 @@ -0,0 +1,62 @@ +/* + * Copyright 2006 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "BPQBlock.h" + +namespace dtn { + +BPQBlock::BPQBlock(BlockInfo* block) +{ + static const char* log = "/dtn/bundle/protocol"; + log_err_p(log, "BPQBlock: constructor"); + + log_err_p(log, "block->data_length(): %d",block->data_length()); + log_err_p(log, "block->data_offset(): %d",block->data_offset()); + log_err_p(log, "block->full_length(): %d",block->full_length()); + + + size_t len = block->writable_contents()->buf_len(); + u_char* buf = block->writable_contents()->buf(len); + + size_t i=0; +//, j=0, decoding_len=0; + + // BPQ-kind 1-byte + if (i