Lines Matching refs:source
40 get_from_filesource(isc_entropysource_t *source, isc_uint32_t desired) {
41 isc_entropy_t *ent = source->ent;
43 HCRYPTPROV hcryptprov = source->sources.file.handle;
47 if (source->bad)
57 source->bad = ISC_TRUE;
73 * Poll each source, trying to get data from it to stuff into the entropy
82 isc_entropysource_t *source;
136 * Poll each file source to see if we can read anything useful from
150 source = ent->nextsource;
152 * Remember the first source so we can break if we have looped back to
155 firstsource = source;
165 if (source->type == ENTROPY_SOURCETYPE_FILE)
166 got = get_from_filesource(source, remaining);
172 source = ISC_LIST_NEXT(source, link);
173 if (source == NULL)
174 source = ISC_LIST_HEAD(ent->sources);
176 ent->nextsource = source;
190 * check to see if we have a callback source. If so, call them.
192 source = ISC_LIST_HEAD(ent->sources);
193 while ((remaining != 0) && (source != NULL)) {
198 if (source->type == ENTROPY_SOURCETYPE_CALLBACK)
199 got = get_from_callback(source, remaining, blocking);
207 source = ISC_LIST_NEXT(source, link);
223 destroyfilesource(isc_entropyfilesource_t *source) {
224 CryptReleaseContext(source->handle, 0);
228 destroyusocketsource(isc_entropyusocketsource_t *source) {
229 UNUSED(source);
236 isc_entropysource_t *source;
245 source = NULL;
258 source = isc_mem_get(ent->mctx, sizeof(isc_entropysource_t));
259 if (source == NULL) {
267 source->magic = SOURCE_MAGIC;
268 source->type = ENTROPY_SOURCETYPE_FILE;
269 source->ent = ent;
270 source->total = 0;
271 source->bad = ISC_FALSE;
272 memset(source->name, 0, sizeof(source->name));
273 ISC_LINK_INIT(source, link);
274 source->sources.file.handle = hcryptprov;
279 ISC_LIST_APPEND(ent->sources, source, link);
289 if (source != NULL)
290 isc_mem_put(ent->mctx, source, sizeof(isc_entropysource_t));