           {*******************************************************}
                               {FDL Declarations}
                             {Examiner GPL Edition}

           {*******************************************************}


              {procedure Process_Dns_Request.Set_TTL_Data_NSEC}


title procedure set_ttl_data_nsec;

  function round__(real) : integer;
  type character = integer;
  type positive = integer;
  type dns_types__packet_length_range = integer;
  type dns_types__packet_bytes_range = integer;
  type dns_types__byte = integer;
  type dns_types__query_type = (dns_types__a, dns_types__ns, 
     dns_types__cname, dns_types__soa, dns_types__wks, 
     dns_types__ptr, dns_types__mx, dns_types__aaaa, 
     dns_types__srv, dns_types__a6, dns_types__opt, dns_types__ds, 
     dns_types__rrsig, dns_types__nsec, dns_types__dnskey, 
     dns_types__any, dns_types__caa, dns_types__error, 
     dns_types__unimplemented);
  type unsigned_types__unsigned16 = integer;
  type unsigned_types__unsigned32 = integer;
  type rr_type__classtype = (rr_type__internet, rr_type__cs, 
     rr_type__ch, rr_type__hs);
  type rr_type__linelengthindex = integer;
  type rr_type__wirestringtypeindex = integer;
  type rr_type__nsec_record_type__recordtypeindexvalue = integer;
  type rr_type__nsec_record_type__recordtypearrayindex = integer;
  type rr_type__nsec_record_type__blocknumbervalue = integer;
  type rr_type__nsec_record_type__blocknumberarrayindex = integer;
  type rr_type__nsec_record_type__blocklengthvalue = integer;
  type rr_type__nsec_record_type__bitmapindex = integer;
  type string = array [positive] of character;
  const null__string : string = pending;
  type dns_types__bytes_array_type = array [
     dns_types__packet_bytes_range] of dns_types__byte;
  type rr_type__resourcerecordtype = record
        ttlinseconds : unsigned_types__unsigned32;
        class : rr_type__classtype
     end;
  type rr_type__nsec_record_type__recordtypearraytype = array [
     rr_type__nsec_record_type__recordtypearrayindex] of 
     dns_types__query_type;
  type rr_type__nsec_record_type__blocknumberarraytype = array [
     rr_type__nsec_record_type__blocknumberarrayindex] of 
     dns_types__byte;
  type rr_type__nsec_record_type__blocklengtharraytype = array [
     rr_type__nsec_record_type__blocknumberarrayindex] of 
     rr_type__nsec_record_type__blocklengthvalue;
  type rr_type__nsec_record_type__bitmaparraytype = array [
     rr_type__nsec_record_type__bitmapindex] of dns_types__byte;
  type rr_type__nsec_record_type__bitmapsarrayarraytype = array [
     rr_type__nsec_record_type__blocknumberarrayindex] of 
     rr_type__nsec_record_type__bitmaparraytype;
  type rr_type__nsec_record_type__nsecrecordtype = record
        inherit : rr_type__resourcerecordtype;
        nextdomainname : string;
        recordlist : string;
        numberofrecordtypes : 
     rr_type__nsec_record_type__recordtypeindexvalue;
        recordtypes : 
     rr_type__nsec_record_type__recordtypearraytype;
        numberofblocks : 
     rr_type__nsec_record_type__blocknumbervalue;
        blocknumbers : 
     rr_type__nsec_record_type__blocknumberarraytype;
        blocklengths : 
     rr_type__nsec_record_type__blocklengtharraytype;
        bitmaps : 
     rr_type__nsec_record_type__bitmapsarrayarraytype
     end;
  const rr_type__maxdomainnamelength : integer = pending;
  const rr_type__nsec_record_type__maxrrdatalength : integer = pending;
  const rr_type__nsec_record_type__bitmapindex__base__first : 
     integer = pending; 
  const rr_type__nsec_record_type__bitmapindex__base__last : 
     integer = pending; 
  const rr_type__nsec_record_type__blocklengthvalue__base__first : 
     integer = pending; 
  const rr_type__nsec_record_type__blocklengthvalue__base__last : 
     integer = pending; 
  const rr_type__nsec_record_type__blocknumberarrayindex__base__first : 
     integer = pending; 
  const rr_type__nsec_record_type__blocknumberarrayindex__base__last : 
     integer = pending; 
  const rr_type__nsec_record_type__blocknumbervalue__base__first : 
     integer = pending; 
  const rr_type__nsec_record_type__blocknumbervalue__base__last : 
     integer = pending; 
  const rr_type__nsec_record_type__recordtypearrayindex__base__first : 
     integer = pending; 
  const rr_type__nsec_record_type__recordtypearrayindex__base__last : 
     integer = pending; 
  const rr_type__nsec_record_type__recordtypeindexvalue__base__first : 
     integer = pending; 
  const rr_type__nsec_record_type__recordtypeindexvalue__base__last : 
     integer = pending; 
  const rr_type__wirestringtypeindex__base__first : integer = pending; 
  const rr_type__wirestringtypeindex__base__last : integer = pending; 
  const rr_type__linelengthindex__base__first : integer = pending; 
  const rr_type__linelengthindex__base__last : integer = pending; 
  const rr_type__classtype__base__first : rr_type__classtype = pending; 
  const rr_type__classtype__base__last : rr_type__classtype = pending; 
  const unsigned_types__unsigned32__base__first : 
     unsigned_types__unsigned32 = pending; 
  const unsigned_types__unsigned32__base__last : 
     unsigned_types__unsigned32 = pending; 
  const unsigned_types__unsigned16__base__first : 
     unsigned_types__unsigned16 = pending; 
  const unsigned_types__unsigned16__base__last : 
     unsigned_types__unsigned16 = pending; 
  const dns_types__query_type__base__first : 
     dns_types__query_type = pending; 
  const dns_types__query_type__base__last : dns_types__query_type = pending; 
  const dns_types__byte__base__first : dns_types__byte = pending; 
  const dns_types__byte__base__last : dns_types__byte = pending; 
  const dns_types__packet_bytes_range__base__first : 
     dns_types__packet_bytes_range = pending; 
  const dns_types__packet_bytes_range__base__last : 
     dns_types__packet_bytes_range = pending; 
  const dns_types__packet_length_range__base__first : 
     dns_types__packet_length_range = pending; 
  const dns_types__packet_length_range__base__last : 
     dns_types__packet_length_range = pending; 
  const positive__base__first : integer = pending; 
  const positive__base__last : integer = pending; 
  const character__base__first : character = pending; 
  const character__base__last : character = pending; 
  const integer__base__first : integer = pending; 
  const integer__base__last : integer = pending; 
  const rr_type__nsec_record_type__nsecrecordtype__size : integer = pending; 
  const rr_type__nsec_record_type__bitmapindex__first : integer = pending; 
  const rr_type__nsec_record_type__bitmapindex__last : integer = pending; 
  const rr_type__nsec_record_type__bitmapindex__size : integer = pending; 
  const rr_type__nsec_record_type__blocklengthvalue__first : 
     integer = pending; 
  const rr_type__nsec_record_type__blocklengthvalue__last : 
     integer = pending; 
  const rr_type__nsec_record_type__blocklengthvalue__size : integer = pending; 
  const rr_type__nsec_record_type__blocknumberarrayindex__first : 
     integer = pending; 
  const rr_type__nsec_record_type__blocknumberarrayindex__last : 
     integer = pending; 
  const rr_type__nsec_record_type__blocknumberarrayindex__size : integer = pending; 
  const rr_type__nsec_record_type__blocknumbervalue__first : 
     integer = pending; 
  const rr_type__nsec_record_type__blocknumbervalue__last : 
     integer = pending; 
  const rr_type__nsec_record_type__blocknumbervalue__size : integer = pending; 
  const rr_type__nsec_record_type__recordtypearrayindex__first : 
     integer = pending; 
  const rr_type__nsec_record_type__recordtypearrayindex__last : 
     integer = pending; 
  const rr_type__nsec_record_type__recordtypearrayindex__size : integer = pending; 
  const rr_type__nsec_record_type__recordtypeindexvalue__first : 
     integer = pending; 
  const rr_type__nsec_record_type__recordtypeindexvalue__last : 
     integer = pending; 
  const rr_type__nsec_record_type__recordtypeindexvalue__size : integer = pending; 
  const rr_type__resourcerecordtype__size : integer = pending; 
  const rr_type__wirestringtype__size : integer = pending; 
  const rr_type__wirestringtypeindex__first : integer = pending; 
  const rr_type__wirestringtypeindex__last : integer = pending; 
  const rr_type__wirestringtypeindex__size : integer = pending; 
  const rr_type__linefromfiletype__size : integer = pending; 
  const rr_type__linelengthindex__first : integer = pending; 
  const rr_type__linelengthindex__last : integer = pending; 
  const rr_type__linelengthindex__size : integer = pending; 
  const rr_type__classtype__first : rr_type__classtype = pending; 
  const rr_type__classtype__last : rr_type__classtype = pending; 
  const rr_type__classtype__size : integer = pending; 
  const unsigned_types__unsigned32__first : 
     unsigned_types__unsigned32 = pending; 
  const unsigned_types__unsigned32__last : 
     unsigned_types__unsigned32 = pending; 
  const unsigned_types__unsigned32__modulus : integer = pending; 
  const unsigned_types__unsigned32__size : integer = pending; 
  const unsigned_types__unsigned16__first : 
     unsigned_types__unsigned16 = pending; 
  const unsigned_types__unsigned16__last : 
     unsigned_types__unsigned16 = pending; 
  const unsigned_types__unsigned16__modulus : integer = pending; 
  const unsigned_types__unsigned16__size : integer = pending; 
  const dns_types__query_type__first : dns_types__query_type = pending; 
  const dns_types__query_type__last : dns_types__query_type = pending; 
  const dns_types__query_type__size : integer = pending; 
  const dns_types__byte__first : dns_types__byte = pending; 
  const dns_types__byte__last : dns_types__byte = pending; 
  const dns_types__byte__modulus : integer = pending; 
  const dns_types__byte__size : integer = pending; 
  const dns_types__packet_bytes_range__first : 
     dns_types__packet_bytes_range = pending; 
  const dns_types__packet_bytes_range__last : 
     dns_types__packet_bytes_range = pending; 
  const dns_types__packet_bytes_range__size : integer = pending; 
  const dns_types__packet_length_range__first : 
     dns_types__packet_length_range = pending; 
  const dns_types__packet_length_range__last : 
     dns_types__packet_length_range = pending; 
  const dns_types__packet_length_range__size : integer = pending; 
  const positive__first : integer = pending; 
  const positive__last : integer = pending; 
  const positive__size : integer = pending; 
  const character__first : character = pending; 
  const character__last : character = pending; 
  const character__size : integer = pending; 
  const integer__first : integer = pending; 
  const integer__last : integer = pending; 
  const integer__size : integer = pending; 
  var bytes : dns_types__bytes_array_type;
  var start_byte : dns_types__packet_bytes_range;
  var nsec_record : rr_type__nsec_record_type__nsecrecordtype;
  var dstbytes : dns_types__packet_length_range;
  var current_name_length : integer;
  var blockoffset : dns_types__packet_bytes_range;
  var loop__1__i : integer;
  var loop__2__block : integer;
  var loop__3__byte : integer;
  var current_name_length__entry__loop__1 : integer;
  var loop__2__block__entry__loop__3 : integer;
  function rr_type__wirenamelength(string) : integer;
  var bytes__3 : dns_types__bytes_array_type;
  var bytes__2 : dns_types__bytes_array_type;
  var bytes__1 : dns_types__bytes_array_type;

end;
