File: ip2name.h

package info (click to toggle)
sarg 2.4.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,456 kB
  • sloc: ansic: 17,692; sh: 4,581; xml: 371; javascript: 352; php: 205; makefile: 183; sed: 16; pascal: 2
file content (29 lines) | stat: -rw-r--r-- 705 bytes parent folder | download | duplicates (4)
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
#ifndef IP2NAME_HEADER
#define IP2NAME_HEADER

//! The possible return code of ip2name subfunctions.
enum ip2name_retcode
{
	//! Error encountered during the processing.
	INRC_Error=-1,
	//! No match found.
	INRC_NotFound,
	//! A match was found.
	INRC_Found,
};


//! Entry points of the ip2name modules
struct Ip2NameProcess
{
	//! The real name of the module.
	const char *Name;
	//! The link to the next module to try if this one fails.
	struct Ip2NameProcess *Next;
	//! The function to configure the module.
	void (*Configure)(const char *name,const char *param);
	//! Function to resolve an IP address into a name.
	enum ip2name_retcode (*Resolve)(char *ip,int ip_len);
};

#endif //IP2NAME_HEADER