impl the search by string
This commit is contained in:
parent
f5d0c216c2
commit
080942fc68
|
|
@ -54,8 +54,14 @@ XDB_PUBLIC(int) xdb_search(unsigned int ip, char *buffer) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
XDB_PUBLIC(int) xdb_search_by_string(const char *ip, char *buffer) {
|
XDB_PUBLIC(int) xdb_search_by_string(const char *str_ip, char *buffer) {
|
||||||
return 0;
|
unsigned int ip = 0;
|
||||||
|
int errcode = check_ip(str_ip, &ip);
|
||||||
|
if (errcode != 0) {
|
||||||
|
return 10 + errcode;
|
||||||
|
} else {
|
||||||
|
return xdb_search(ip, buffer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// get unsigned long (4bytes) from a specified buffer start from the specified offset
|
// get unsigned long (4bytes) from a specified buffer start from the specified offset
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue