1//=========================================================================
2// FILENAME	: misc.h
3// DESCRIPTION	: Header for misc.c
4//=========================================================================
5// Copyright (c) 2008- NETGEAR, Inc. All Rights Reserved.
6//=========================================================================
7
8/* This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21 */
22
23#ifndef _SCANNER_MISC_H
24#define _SCANNER_MISC_H
25
26typedef unsigned char __u8;
27typedef signed char __s8;
28typedef unsigned short __u16;
29typedef signed short __s16;
30typedef unsigned int __u32;
31typedef signed int __s32;
32#if __WORDSIZE == 64
33typedef unsigned long __u64;
34typedef signed long __s64;
35#else
36typedef unsigned long long __u64;
37typedef signed long long __s64;
38#endif
39
40
41inline __u16 le16_to_cpu(__u16 le16);
42inline __u32 le32_to_cpu(__u32 le32);
43inline __u64 le64_to_cpu(__u64 le64);
44inline __u8 fget_byte(FILE *fp);
45inline __u16 fget_le16(FILE *fp);
46inline __u32 fget_le32(FILE *fp);
47
48inline __u32 cpu_to_be32(__u32 cpu32);
49
50extern char * sha1_hex(char *key);
51
52#endif
53