0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCopyright (C) 1999-2001, 2004, 2016 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsThis Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsLicense, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrewsfile, You can obtain one at http://mozilla.org/MPL/2.0/.
b22332fc28297c3851d8dd118af08a693339d56bBob Halley
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews$Id: rdataset,v 1.6 2004/03/05 05:04:46 marka Exp $
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence
b22332fc28297c3851d8dd118af08a693339d56bBob HalleyNeed way to "dup" an rdataset (i.e. different rdataset handle, same underlying
b22332fc28297c3851d8dd118af08a693339d56bBob Halleydata).
b22332fc28297c3851d8dd118af08a693339d56bBob Halley
b22332fc28297c3851d8dd118af08a693339d56bBob HalleyDB addnode routine should take an rdataset *, which, if non-NULL, would be
b22332fc28297c3851d8dd118af08a693339d56bBob Halleyattached to the added rdataset.
b22332fc28297c3851d8dd118af08a693339d56bBob Halley
b22332fc28297c3851d8dd118af08a693339d56bBob HalleyNeed credibility, security status.
b22332fc28297c3851d8dd118af08a693339d56bBob Halley
b22332fc28297c3851d8dd118af08a693339d56bBob HalleyCache security status in rdataset. Have rdataset supply methods to get/set
b22332fc28297c3851d8dd118af08a693339d56bBob Halleythe security status. For RBTDB, it goes something like this:
b22332fc28297c3851d8dd118af08a693339d56bBob Halley
b22332fc28297c3851d8dd118af08a693339d56bBob Halley get:
b22332fc28297c3851d8dd118af08a693339d56bBob Halley if (cached status == pending)
b22332fc28297c3851d8dd118af08a693339d56bBob Halley lock node lock
b22332fc28297c3851d8dd118af08a693339d56bBob Halley read rdataset's status
b22332fc28297c3851d8dd118af08a693339d56bBob Halley unlock node lock
b22332fc28297c3851d8dd118af08a693339d56bBob Halley update cached status
b22332fc28297c3851d8dd118af08a693339d56bBob Halley return (cached status)
b22332fc28297c3851d8dd118af08a693339d56bBob Halley
b22332fc28297c3851d8dd118af08a693339d56bBob Halley set:
b22332fc28297c3851d8dd118af08a693339d56bBob Halley require that status cannot go backwards (e.g. OK to pending)
b22332fc28297c3851d8dd118af08a693339d56bBob Halley lock node lock
b22332fc28297c3851d8dd118af08a693339d56bBob Halley write rdataset's status
b22332fc28297c3851d8dd118af08a693339d56bBob Halley unlock node lock
b22332fc28297c3851d8dd118af08a693339d56bBob Halley update cached status