-
Notifications
You must be signed in to change notification settings - Fork 0
/
util.h
executable file
·40 lines (30 loc) · 1.04 KB
/
util.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
UTIL.H
the common utilities of all files are saved in this file.
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\*/
#ifndef _UTIL_H_
#define _UTIL_H_
#ifdef __cplusplus
extern "C" {
#endif
/*----------------------------------------------------
* TTY_PRINT() macro
*---------------------------------------------------*/
#define TTY_PRINT OSS_PRINT
STATUS get_local_ip(char *ip_str, char *sif);
STATUS set_local_ip(char *ip_str, char *sif);
extern char *GetStrTok(char **cpp, char *delimiters);
extern U8 *DECODE_U16(U16 *val, U8 *mp);
extern U8 *DECODE_U24(U32 *val, U8 *mp);
extern U8 *DECODE_U32(U32 *val, U8 *mp);
extern U8 *ENCODE_U16(U8 *mp, U16 val);
extern U8 *ENCODE_U24(U8 *mp, U32 val);
extern U8 *ENCODE_U32(U8 *mp, U32 val);
extern void PRINT_MESSAGE(unsigned char*, int);
extern U16 ADD_CARRY_FOR_CHKSUM(U32 sum);
extern U16 CHECK_SUM(U32);
extern void OSS_PRINT(const char *, ...);
#ifdef __cplusplus
}
#endif
#endif