Lines Matching defs:map

59  * INPUTS:	Map control structure for an open map
68 has_entry_expired(map_ctrl *map, datum *key)
76 if ((map == NULL) || (map->ttl == NULL))
80 ttl = dbm_fetch(map->ttl, *key);
84 * If we failed to get a map expiry key, which must always be
86 * the map.
91 "for map %s. Will attempt to recreate map",
92 MAP_EXPIRY_KEY, map->map_name);
99 * service other than NIS. Check if the entire map has expired.
103 if (has_map_expired(map)) {
104 /* Kick of a map update */
105 update_map_if_required(map, FALSE);
119 "Invalid TTL key in map %s. error %d",
120 map->map_name, dbm_error(map->ttl));
153 * DESCRIPTION: Determines if an entire map has expire
155 * INPUTS: Map control structure for an open map
162 has_map_expired(map_ctrl *map)
170 /* Call has_entry_expired() with magic map expiry key */
171 return (has_entry_expired(map, &key));
177 * DESCRIPTION: Updates the TTL for one map entry
179 * INPUTS: Map control structure for an open map
189 update_entry_ttl(map_ctrl *map, datum *key, TTL_TYPE type)
199 ttl = get_ttl_value(map, type);
210 if (0 > dbm_store(map->ttl, *key, expire, DBM_REPLACE)) {
222 * DESCRIPTION: Updates the TTL for entire map. This can be called either with
223 * the map open (map_ctrl DBM pointer set up) or the map closed
225 * when we have just created a new map.
227 * This function must open the TTL map but, in either case, must
230 * INPUTS: Map control structure for an open map
237 update_map_ttl(map_ctrl *map)
248 if (NULL == map->ttl) {
249 map->ttl = dbm_open(map->ttl_path, O_RDWR, 0644);
250 if (NULL == map->ttl)
255 /* Call update_entry_ttl() with magic map expiry key */
256 ret = update_entry_ttl(map, &key, TTL_MIN);
260 dbm_close(map->ttl);
261 map->ttl_path = NULL;