C Lanuage WhoIs Library
Our C Library contains the following functions:
#ifndef WHOIS_H
#define WHOIS_H
struct ip_list_array {
struct in_addr ipaddr[1024];
int asn[1024];
char netName[1024][32];
char orgName[1024][100];
char application[1024];
int numItems;
};
/* must be called BEFORE making any queries */
void w_init(void);
/* return the origin-asn according to the RADB in "3356" format */
int w_lookup_as(char *);
/* return the origin-asn according to Cyrmu in "3356" format */
int w_lookup_as_cymru(char *);
/* return the origin-asn according to the RIPE RIS in "3356" format */
int w_lookup_as_riswhois(char *);
/* return the origin-asn according to pwhois in "3356" format */
int w_lookup_as_pwhois(char *);
/* return the network name from the registrar in a string */
char *w_lookup_netname(char *);
/* return the organization name from the registrar in a string */
char *w_lookup_orgname(char *);
/* return a pointer to an ip_list_array (see above) containing
an 'asn' to each corresponding 'ipaddr' according to Cymru */
int w_lookup_as_cymru_bulk(struct ip_list_array*);
/* return a pointer to an ip_list_array (see above) containing
all ip_list_array vars to each corresponding 'ipaddr' according to pwhois */
int w_lookup_all_pwhois_bulk(struct ip_list_array*);
/* return a pointer to an ip_list_array (see above) containing
all ip_list_array vars to each corresponding 'ipaddr' according to RIS whois */
int w_lookup_all_riswhois_bulk(struct ip_list_array*);
#endif
Currently Aug 1st 2010, 4:13am GMT