Lines Matching defs:map

56  * INPUTS:	Map control structure for an open map
65 has_entry_expired(map_ctrl *map, datum *key)
73 if ((map == NULL) || (map->ttl == NULL))
77 ttl = dbm_fetch(map->ttl, *key);
81 * If we failed to get a map expiry key, which must always be
83 * the map.
88 "for map %s. Will attempt to recreate map",
89 MAP_EXPIRY_KEY, map->map_name);
96 * service other than NIS. Check if the entire map has expired.
100 if (has_map_expired(map)) {
101 /* Kick of a map update */
102 update_map_if_required(map, FALSE);
116 "Invalid TTL key in map %s. error %d",
117 map->map_name, dbm_error(map->ttl));
150 * DESCRIPTION: Determines if an entire map has expire
152 * INPUTS: Map control structure for an open map
159 has_map_expired(map_ctrl *map)
167 /* Call has_entry_expired() with magic map expiry key */
168 return (has_entry_expired(map, &key));
174 * DESCRIPTION: Updates the TTL for one map entry
176 * INPUTS: Map control structure for an open map
186 update_entry_ttl(map_ctrl *map, datum *key, TTL_TYPE type)
196 ttl = get_ttl_value(map, type);
207 if (0 > dbm_store(map->ttl, *key, expire, DBM_REPLACE)) {
219 * DESCRIPTION: Updates the TTL for entire map. This can be called either with
220 * the map open (map_ctrl DBM pointer set up) or the map closed
222 * when we have just created a new map.
224 * This function must open the TTL map but, in either case, must
227 * INPUTS: Map control structure for an open map
234 update_map_ttl(map_ctrl *map)
245 if (NULL == map->ttl) {
246 map->ttl = dbm_open(map->ttl_path, O_RDWR, 0644);
247 if (NULL == map->ttl)
252 /* Call update_entry_ttl() with magic map expiry key */
253 ret = update_entry_ttl(map, &key, TTL_MIN);
257 dbm_close(map->ttl);
258 map->ttl_path = NULL;