[Javanetsim-cvs] IceScan/icesockets iceregex.h, 1.4, 1.5 sock_name.h, 1.6, 1.7
Status: Beta
Brought to you by:
darkkey
From: Alexander B. <da...@us...> - 2006-12-13 09:08:36
|
Update of /cvsroot/javanetsim/IceScan/icesockets In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv22688/icesockets Modified Files: iceregex.h sock_name.h Log Message: no message Index: iceregex.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/iceregex.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** iceregex.h 13 Dec 2006 02:27:18 -0000 1.4 --- iceregex.h 13 Dec 2006 09:08:33 -0000 1.5 *************** *** 120,123 **** --- 120,124 ---- return true; } + private: bool find(icestring const& s, std::vector<icestring> &v, int start){ Index: sock_name.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_name.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sock_name.h 13 Dec 2006 08:34:27 -0000 1.6 --- sock_name.h 13 Dec 2006 09:08:33 -0000 1.7 *************** *** 49,52 **** --- 49,58 ---- } + bool is_domainname(icestring &nisname){ + IceRegex re("\\d+\\.\\d+\\.\\d+\\.\\d+"); + return ! (re.match(nisname.c_str())); + } + + short int get_ip_byhost(const char * nisname, char * retname, int retlen){ struct hostent *h; *************** *** 102,106 **** } ! short int get_host_byip(icestring &nisname, icestring &retname, int retlen){ int rc; char hbuf[ICEMAXHOSTNAME]; --- 108,112 ---- } ! short int get_host_byip(icestring &nisname, icestring &retname){ int rc; char hbuf[ICEMAXHOSTNAME]; *************** *** 113,119 **** return -1; } ! ! //retlen = (retlen >= strlen(hbuf) + 1) ? strlen(hbuf) + 1 : retlen; ! retname.assign(hbuf); --- 119,123 ---- return -1; } ! retname.assign(hbuf); |