dhcp_hash.h

来自「wimax bs模拟器」· C头文件 代码 · 共 72 行

H
72
字号
/******************************************************************************\


			Copyright  (c)	2007,  UTStarcom,Inc. (ShenZhen R&D Center)
			All Rights Reserved.

			Subsystem		: WIMAX
			Group			: GW/AnchorEP/DHCP
			File				: dhcp_hash.h
			Version			: 
			Build			: 
			Author			: kevin.shi
			Maintained by		: kevin.shi
			Create Date		: 2007-01-01
			Last Modify		: 
			Description		: DHCP server include file for hash table functions
																			  
\******************************************************************************/
/*
-----------------------------------------------------------
Software Develop CodeName :

Module Reference :
	
-----------------------------------------------------------
Change History:

07-01.01	kevin.shi	create file.
*/

#ifndef _DHCP_HASH_H_
#define _DHCP_HASH_H_

#ifdef __cplusplus
extern "C" {
#endif


#define HASHTBL_SIZE            127     /* this is a prime number */

/*
 * Define "hash_datum" as a universal data type
 */
#ifdef __STDC__
	typedef void hash_datum;
#else
	typedef char hash_datum;
#endif


struct hash_member {
	struct hash_member *next;
	hash_datum  *data;
};

struct hash_tbl {
    struct hash_member *head[HASHTBL_SIZE];
};

extern unsigned int hash_func(char *string,FAST unsigned int len);
extern int  hash_exst();
extern int  hash_ins();
extern int  hash_del();
extern hash_datum  *hash_pickup();
extern hash_datum  *hash_find();

#ifdef __cplusplus
}
#endif

#endif /*_DHCP_HASH_H_*/

⌨️ 快捷键说明

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