Ejemplo n.º 1
0
void aspc_dump_blk(MemBlk *blk)
{
	char ptr_s[30];
	char blk_s[30];
	char sz_s[30];
	
	puts("MemBlk:");
	dump_ptr(blk,ptr_s);
	puts(ptr_s);
	puts("Addr:");
	dump_ptr(blk->addr,blk_s);
	puts(blk_s);
	puts("Size:");
	dump_sz(blk->b_sz,sz_s);
	puts(sz_s);
	puts("Used:");
	dump_sz(blk->used,sz_s);
	puts(sz_s);
	
}
Ejemplo n.º 2
0
        /*!
         Used to dump out a record to a std::ostream object.
         \param strm std::ostream to write to
         \param ptr Resource base object to dump
         */
        static void
        dump_record ( std::ostream& strm, dns::resource_base_t * ptr )
        {
          switch( ptr->rtype() )
          {
          case dns::type_a:
            dump_a(strm, ptr);
            break;

          case dns::type_ns:
            dump_ns(strm, ptr);
            break;

          case dns::type_cname:
            dump_cname(strm, ptr);
            break;

          case dns::type_soa:
            dump_soa(strm, ptr);
            break;

          case dns::type_ptr:
            dump_ptr(strm, ptr);
            break;

          case dns::type_hinfo:
            dump_hinfo(strm, ptr);
            break;

          case dns::type_mx:
            dump_mx(strm, ptr);
            break;

          case dns::type_txt:
            dump_text(strm, ptr);
            break;

          case dns::type_a6:
            dump_a6(strm, ptr);
            break;

          case dns::type_srv:
            dump_srv(strm, ptr);
            break;

          default:
            strm << "Unhandled record type!" << std::endl;
            break;
          }
        }