1---------------------------------------------------------------- 2-- IRONSIDES - DNS SERVER 3-- 4-- By: Martin C. Carlisle and Barry S. Fagin 5-- Department of Computer Science 6-- United States Air Force Academy 7-- 8-- This is free software; you can redistribute it and/or 9-- modify without restriction. We do ask that you please keep 10-- the original author information, and clearly indicate if the 11-- software has been modified. 12-- 13-- This software is distributed in the hope that it will be useful, 14-- but WITHOUT ANY WARRANTY; without even the implied warranty 15-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16---------------------------------------------------------------- 17 18with Unsigned_Types; 19use type Unsigned_Types.Unsigned32,Unsigned_Types.Unsigned16; 20--#inherit rr_type, unsigned_types; 21package Rr_Type.Mx_Record_Type is 22 --sufficiently below 2^16-1 that we can detect too large values without wraparound 23 MAX_PREF_VAL : constant Unsigned_Types.Unsigned16 := 2**15-1; 24 type MXRecordType is new Rr_Type.ResourceRecordType with 25 record 26 Pref : Unsigned_Types.Unsigned16; --change MAX_PREF_VAL above if this type changes 27 MailExchanger : Rr_Type.WireStringType; 28 end record; 29 30 --placeholder for empty slots in hash table 31 BlankMXRecord : constant MXRecordType := MXRecordType'( 32 TtlInSeconds => 0, 33 Class => Rr_Type.INTERNET, Pref => 0, 34 MailExchanger => "empty.MX.resource.record " & Rr_Type.Spaces32 35 & Rr_Type.Spaces32 & Rr_Type.Spaces32); 36 37 --hash table (2d array) for MX records 38 type MXRecordBucketType is array (Rr_Type.ReturnedRecordsIndexType) of MXRecordType; 39 type MXRecordHashTableType is array (Rr_Type.NumBucketsIndexType) of MXRecordBucketType; 40end Rr_Type.Mx_Record_Type; 41