1/* 2 * Copyright (c) 1999-2010 Apple Inc. All rights reserved. 3 * 4 * @APPLE_LICENSE_HEADER_START@ 5 * 6 * This file contains Original Code and/or Modifications of Original Code 7 * as defined in and that are subject to the Apple Public Source License 8 * Version 2.0 (the 'License'). You may not use this file except in 9 * compliance with the License. Please obtain a copy of the License at 10 * http://www.opensource.apple.com/apsl/ and read it before using this 11 * file. 12 * 13 * The Original Code and all software distributed under the License are 14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 * Please see the License for the specific language governing rights and 19 * limitations under the License. 20 * 21 * @APPLE_LICENSE_HEADER_END@ 22 */ 23 24/* 25 * NICachePrivate.h 26 */ 27 28#ifndef _S_NICACHE_PRIVATE_H 29#define _S_NICACHE_PRIVATE_H 30 31#include <stdint.h> 32 33PLCacheEntry_t *PLCacheEntry_create(ni_proplist pl); 34void PLCacheEntry_free(PLCacheEntry_t * ent); 35 36void PLCache_init(PLCache_t * cache); 37void PLCache_free(PLCache_t * cache); 38int PLCache_count(PLCache_t * c); 39boolean_t PLCache_read(PLCache_t * cache, const char * filename); 40boolean_t PLCache_write(PLCache_t * cache, const char * filename); 41void PLCache_add(PLCache_t * cache, PLCacheEntry_t * entry); 42void PLCache_append(PLCache_t * cache, PLCacheEntry_t * entry); 43void PLCache_remove(PLCache_t * cache, PLCacheEntry_t * entry); 44void PLCache_set_max(PLCache_t * c, int m); 45PLCacheEntry_t *PLCache_lookup_prop(PLCache_t * PLCache, 46 char * prop, char * value, boolean_t make_head); 47PLCacheEntry_t *PLCache_lookup_hw(PLCache_t * PLCache, 48 uint8_t hwtype, void * hwaddr, int hwlen, 49 NICacheFunc_t * func, void * arg, 50 struct in_addr * client_ip, 51 boolean_t * has_binding); 52PLCacheEntry_t *PLCache_lookup_identifier(PLCache_t * PLCache, 53 char * idstr, 54 NICacheFunc_t * func, void * arg, 55 struct in_addr * client_ip, 56 boolean_t * has_binding); 57PLCacheEntry_t *PLCache_lookup_ip(PLCache_t * PLCache, struct in_addr iaddr); 58void PLCache_make_head(PLCache_t * cache, PLCacheEntry_t * entry); 59void PLCache_print(PLCache_t * cache); 60 61#endif /* _S_NICACHE_PRIVATE_H */ 62