DIRECTORY BasicTime USING [GMT], Rope USING [ROPE], IPDefs USING [Address, nullAddress]; IPNameCache: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; ZapWholeCache: PROC; NameEntry: TYPE = REF NameRecord; NameRecord: TYPE = RECORD [ loaded: BasicTime.GMT, referenced: BasicTime.GMT, expires: BasicTime.GMT, ttl: INT, source: IPDefs.Address, authoritative: BOOL, rejuvinations: INT _ 0, nameCacheLoad: INT _ 0, nameToAddress: INT _ 0, normalizeName: INT _ 0, name: ROPE _ NIL, addresses: LIST OF IPDefs.Address _ NIL ]; GetNames: PROC RETURNS [LIST OF NameEntry]; NameLookup: PROC [ROPE] RETURNS [NameEntry]; UpdateName: PROC [ name: ROPE, source: IPDefs.Address, ttl: INT, authoritative: BOOL] RETURNS [entry: NameEntry]; AddAddressToName: PROC [entry: NameEntry, address: IPDefs.Address]; AliasEntry: TYPE = REF AliasRecord; AliasRecord: TYPE = RECORD [ loaded: BasicTime.GMT, referenced: BasicTime.GMT, expires: BasicTime.GMT, ttl: INT, source: IPDefs.Address, authoritative: BOOL, rejuvinations: INT _ 0, aliasToName: INT _ 0, alias: ROPE, name: ROPE ]; GetAliases: PROC RETURNS [LIST OF AliasEntry]; AliasLookup: PROC [ROPE] RETURNS [AliasEntry]; UpdateAlias: PROC [ alias: ROPE, source: IPDefs.Address, ttl: INT, authoritative: BOOL] RETURNS [entry: AliasEntry]; AddNameToAlias: PROC [entry: AliasEntry, name: ROPE]; MXEntry: TYPE = REF MXRecord; MXRecord: TYPE = RECORD [ loaded: BasicTime.GMT, referenced: BasicTime.GMT, expires: BasicTime.GMT, ttl: INT, source: IPDefs.Address, authoritative: BOOL, rejuvinations: INT _ 0, nameToMX: INT _ 0, name: ROPE, mxHosts: LIST OF MXHostInfo]; MXHostInfo: TYPE = RECORD [ host: ROPE, preference: INT _ 0]; GetMXList: PROC RETURNS [LIST OF MXEntry]; MXLookup: PROC [ROPE] RETURNS [MXEntry]; UpdateMX: PROC [ name: ROPE, source: IPDefs.Address, ttl: INT, authoritative: BOOL] RETURNS [entry: MXEntry]; AddHostToMX: PROC [entry: MXEntry, hostInfo: MXHostInfo]; BogusNameEntry: TYPE = REF BogusNameRecord; BogusNameRecord: TYPE = RECORD [ loaded: BasicTime.GMT, referenced: BasicTime.GMT, expires: BasicTime.GMT, ttl: INT, source: IPDefs.Address, authoritative: BOOL, rejuvinations: INT _ 0, nameToBogus: INT _ 0, bogus: ROPE ]; GetBogusNames: PROC RETURNS [LIST OF BogusNameEntry]; BogusNameLookup: PROC [ROPE] RETURNS [BogusNameEntry]; UpdateBogusName: PROC [ bogus: ROPE, source: IPDefs.Address, ttl: INT, authoritative: BOOL] RETURNS [entry: BogusNameEntry]; DownNameEntry: TYPE = REF DownNameRecord; DownNameRecord: TYPE = RECORD [ loaded: BasicTime.GMT, referenced: BasicTime.GMT, expires: BasicTime.GMT, ttl: INT, nameToDown: INT _ 0, name: ROPE ]; GetDownNames: PROC RETURNS [LIST OF DownNameEntry]; DownNameLookup: PROC [ROPE] RETURNS [DownNameEntry]; UpdateDownName: PROC [name: ROPE, ttl: INT] RETURNS [DownNameEntry]; AddressEntry: TYPE = REF AddressRecord; AddressRecord: TYPE = RECORD [ loaded: BasicTime.GMT, referenced: BasicTime.GMT, expires: BasicTime.GMT, ttl: INT, source: IPDefs.Address, authoritative: BOOL, rejuvinations: INT _ 0, addressCacheLoad: INT _ 0, addressToName: INT _ 0, address: IPDefs.Address _ IPDefs.nullAddress, names: LIST OF ROPE _ NIL ]; GetAddresses: PROC RETURNS [LIST OF AddressEntry]; AddressLookup: PROC [IPDefs.Address] RETURNS [AddressEntry]; UpdateAddress: PROC [ address: IPDefs.Address, source: IPDefs.Address, ttl: INT, authoritative: BOOL] RETURNS [entry: AddressEntry]; AddNameToAddress: PROC [entry: AddressEntry, name: ROPE]; BogusAddressEntry: TYPE = REF BogusAddressRecord; BogusAddressRecord: TYPE = RECORD [ loaded: BasicTime.GMT, referenced: BasicTime.GMT, expires: BasicTime.GMT, ttl: INT, source: IPDefs.Address, authoritative: BOOL, rejuvinations: INT _ 0, addressToBogus: INT _ 0, bogus: IPDefs.Address ]; GetBogusAddresses: PROC RETURNS [LIST OF BogusAddressEntry]; BogusAddressLookup: PROC [IPDefs.Address] RETURNS [BogusAddressEntry]; UpdateBogusAddress: PROC [ bogus: IPDefs.Address, source: IPDefs.Address, ttl: INT, authoritative: BOOL] RETURNS [entry: BogusAddressEntry]; DownAddressEntry: TYPE = REF DownAddressRecord; DownAddressRecord: TYPE = RECORD [ loaded: BasicTime.GMT, referenced: BasicTime.GMT, expires: BasicTime.GMT, ttl: INT, addressToDown: INT _ 0, address: IPDefs.Address ]; GetDownAddresses: PROC RETURNS [LIST OF DownAddressEntry]; DownAddressLookup: PROC [IPDefs.Address] RETURNS [DownAddressEntry]; UpdateDownAddress: PROC [address: IPDefs.Address, ttl: INT] RETURNS [DownAddressEntry]; DownServerEntry: TYPE = REF DownServerRecord; DownServerRecord: TYPE = RECORD [ loaded: BasicTime.GMT, referenced: BasicTime.GMT, expires: BasicTime.GMT, ttl: INT, serverToDown: INT _ 0, address: IPDefs.Address ]; GetDownServers: PROC RETURNS [LIST OF DownServerEntry]; DownServerLookup: PROC [address: IPDefs.Address] RETURNS [DownServerEntry]; UpdateDownServer: PROC [address: IPDefs.Address, ttl: INT] RETURNS [DownServerEntry]; ZoneEntry: TYPE = REF ZoneRecord; ZoneRecord: TYPE = RECORD [ loaded: BasicTime.GMT, referenced: BasicTime.GMT, expires: BasicTime.GMT, ttl: INT, source: IPDefs.Address, authoritative: BOOL, rejuvinations: INT _ 0, zoneLookup: INT _ 0, zone: ROPE _ NIL, servers: LIST OF ROPE _ NIL ]; GetZones: PROC RETURNS [LIST OF ZoneEntry]; GetZone: PROC[name: ROPE] RETURNS [entry: ZoneEntry]; -- Get best zone for name ZoneLookup: PROC[zone: ROPE] RETURNS [entry: ZoneEntry]; -- Lookup zone in cache UpdateZone: PROC [ name: ROPE, source: IPDefs.Address, ttl: INT, authoritative: BOOL] RETURNS [entry: ZoneEntry]; AddServer: PROC [entry: ZoneEntry, server: ROPE]; CacheType: TYPE = {name, alias, mx, bogusName, address, bogusAddress, zone}; ProbeType: TYPE = {name, mx, nameRejuvination, aliasRejuvination, mxRejuvination, bogusNameRejuvination, address, addressRejuvination, bogusAddressRejuvination, newZone, zoneRejuvination, newServer}; histogramSlots: INT = 250; histogramSlotSize: INT = 100; -- ms/slot HistogramEntry: TYPE = REF HistogramRecord; HistogramRecord: TYPE = RECORD [ server: IPDefs.Address, cacheHits: ARRAY CacheType OF INT _ ALL[0], probes: ARRAY ProbeType OF INT _ ALL[0], lost: INT _ 0, counters: ARRAY [0..histogramSlots) OF INT _ ALL[0] ]; GetHistograms: PROC RETURNS [LIST OF HistogramEntry]; AddToCacheHits: PROC [server: IPDefs.Address, type: CacheType]; AddToProbes: PROC [server: IPDefs.Address, type: ProbeType]; AddToLost: PROC [server: IPDefs.Address]; AddToCounter: PROC [server: IPDefs.Address, ms: INT]; END. xIPNameCache.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Hal Murray June 19, 1985 8:43:40 pm PDT John Larson, June 14, 1987 2:33:33 am PDT Name Cache Alias Cache MX Cache (mail forwarding hosts) Bogus Name Cache Down Name Cache Address Cache Bogus Address Cache Down Address Cache Down Server Cache Zone Cache Usage and Response Time Histograms Κ ο˜šœ™Icodešœ Οmœ1™