⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hashtable.h

📁 mobile ip 在linux下的一种实现
💻 H
字号:
/* $Id: hashtable.h,v 1.17 2000/04/06 07:26:53 jm Exp $ * This file defines the interface of a generic hashtable. * * Dynamic hierarchial IP tunnel * Copyright (C) 1998-2000, Dynamics group * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. See README and COPYING for * more details. */#ifndef HASHTABLE_H#define HASHTABLE_H#include "list.h"/* structures */struct hashtable {	int hashtablesize;	struct list *hasharray; /* An array of collision lists. */};/* prototypes */struct hashtable *hashtable_init(int size);int hashtable_destroy(struct hashtable *table);int hashtable_add(struct hashtable *table,		  int (*hashfunc)(void *key, const int hashsize),		  void *key, struct node *entry);struct node *hashtable_fetch(struct hashtable *table,			     int (*hashfunc)(void *key, const int hashsize),			     void *key,			     int (*cmpfunc)(void *key, struct node *cmprd));int hashtable_find_and_remove(struct hashtable *table,			      int (*hashfunc)(void *key, const int hashsize),			      void *key,			      int (*cmpfunc)(void *key, struct node *cmprd));void hashtable_remove(struct node *entry);int hashtable_iterator(struct hashtable *table,		       int (*iterfunc)(struct node *node, void *data),		       void *data);int hashtable_find_prime(int n);#endif /* HASHTABLE_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -