icescan-cvs Mailing List for IceScan
Status: Alpha
Brought to you by:
darkkey
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(132) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(18) |
Apr
(23) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Alexander B. <da...@us...> - 2009-04-15 12:19:17
|
Update of /cvsroot/icescan/IceScan/icesockets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv18086/icesockets Modified Files: cdnsresolve.cc cdnsresolve.h packet_tracer.h sock_name.cc sock_name.h sock_types.h Log Message: * fixed INSTALL && INSTALL.win32 files. + add PacketTracing for DNS queries * fixed rawsockets recieve conflict with pcap recieve (now either/either) * fixed udp scan window * fixed icmp processing thet recieved through pcap. Index: cdnsresolve.h =================================================================== RCS file: /cvsroot/icescan/IceScan/icesockets/cdnsresolve.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cdnsresolve.h 9 Mar 2009 15:02:54 -0000 1.1 --- cdnsresolve.h 15 Apr 2009 12:18:59 -0000 1.2 *************** *** 5,11 **** #include "csocket.h" ! bool send_dns_req(csocket*, u16, u16, icestring, std::vector<dns_server>&); ! u16 recv_dns_rpl(csocket*, u32, std::vector<icestring>&); #endif --- 5,11 ---- #include "csocket.h" ! bool send_dns_req(csocket*, u16, u16, icestring, std::vector<dns_server>&, bool); ! u16 recv_dns_rpl(csocket*, u32, std::vector<icestring>&, bool); #endif Index: sock_types.h =================================================================== RCS file: /cvsroot/icescan/IceScan/icesockets/sock_types.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** sock_types.h 14 Apr 2009 15:43:35 -0000 1.20 --- sock_types.h 15 Apr 2009 12:18:59 -0000 1.21 *************** *** 493,496 **** --- 493,517 ---- struct udphdr ui_u; /* udp header */ }; + + // DNS Header and flags + // + + typedef struct { + u16 id; + u16 flags; + u16 qrcnt; + u16 rrcnt; + u16 nscnt; + u16 arcnt; + } dnshdr; + + #define DNS_A 1 + #define DNS_PTR 12 + #define DNS_INIP 1 + + typedef struct{ + u16 qtype; + u16 qclass; + } dnsq; #endif Index: packet_tracer.h =================================================================== RCS file: /cvsroot/icescan/IceScan/icesockets/packet_tracer.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** packet_tracer.h 17 Mar 2009 16:09:13 -0000 1.13 --- packet_tracer.h 15 Apr 2009 12:18:59 -0000 1.14 *************** *** 893,897 **** --- 893,998 ---- } + static void TraceDNSPacket(icestring action, char *buffer, u32 len, struct timeval& tv_f){ + std::ostringstream os; + + dnshdr *dhdr = (dnshdr*) buffer; + int cur = len; + + u16 id = htons(dhdr->id); + u16 flags = htons(dhdr->flags); + u16 qcnt = htons(dhdr->qrcnt); + u16 acnt = htons(dhdr->rrcnt); + + os << action << " DNS" << " with id=" << id << " flags=" << flags << " q=" << qcnt << " a=" << acnt; + + // check if this is answer; + /*if(!(flags & 0x8000)) + return -1; + + u8 rcode = flags & 0x000F; + + if(rcode) + return rcode; + + buffer += sizeof(dnshdr); + cur -= sizeof(dnshdr); + + //print_buffer(buffer, len - sizeof(dnshdr)); + + // skip buffer + for(int i = 0; i < qcnt && cur > 0; i++){ + int j = 0; + while(buffer[j] != '\0'){ + buffer++; + cur--; + } + buffer += 1; cur -= 1; + + u16 qtype = GET16(buffer); + buffer += 4; + cur -= 4; + } + + //print_buffer(buffer, cur); + + for(int i = 0; i < acnt && cur > 0; i++){ + // ref + buffer += 2; cur -= 2; + + // type + u16 qtype = GET16(buffer); + buffer += 2; cur -= 2; + + // class + u16 qclass = GET16(buffer); + buffer += 2; cur -= 2; + + buffer += 4; cur -= 4; + + // len + int ln = GET16(buffer); + buffer += 2; cur -= 2; + + if(qtype == 12){ + + char *ans = new char[ln]; + + memcpy(ans, buffer, ln); + buffer += ln; + cur -= ln; + + int tmp = 0; + for(int j = 0; j < ln; j++){ + tmp = ans[j]; + if(ans[j] != '\0' && j != 0) + ans[j] = '.'; + if(tmp) + j += tmp; + } + + icestring s_ans(ans); + + answers.push_back(s_ans.substr(1, s_ans.size())); + + delete[] ans; + + // we need only first PTR, no more + break; + + }else if(qtype == 1){ + u32 addr = 0; + + memcpy((void*) &addr, buffer, 4); + buffer += 4; + cur -= 4; + + answers.push_back(ip_to_str(ntohl(addr))); + + }else{ + CERR(1, "Hmm, strange dns reply code: " << qtype << "."); + }*/ + std::cout << os.str() << std::endl; + } }; Index: cdnsresolve.cc =================================================================== RCS file: /cvsroot/icescan/IceScan/icesockets/cdnsresolve.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cdnsresolve.cc 15 Mar 2009 18:59:19 -0000 1.2 --- cdnsresolve.cc 15 Apr 2009 12:18:59 -0000 1.3 *************** *** 4,8 **** // ! bool send_dns_req(csocket *cudp, u16 id, u16 qtype, icestring name, std::vector<dns_server>& servers){ int ds = get_dns_server(servers); --- 4,8 ---- // ! bool send_dns_req(csocket *cudp, u16 id, u16 qtype, icestring name, std::vector<dns_server>& servers, bool packet_trace){ int ds = get_dns_server(servers); *************** *** 15,19 **** names.push_back(name); ! buf = form_dns_query(id, qtype, names, len); cudp->sendto(servers[ds].host.c_str(), 53, buf, len, 0); --- 15,19 ---- names.push_back(name); ! buf = form_dns_query(id, qtype, names, len, packet_trace); cudp->sendto(servers[ds].host.c_str(), 53, buf, len, 0); *************** *** 23,27 **** } ! u16 recv_dns_rpl(csocket* cudp, u32 timeout, std::vector<icestring>& answers){ struct timeval tv1, tv2; gettimeofday(&tv1, NULL); --- 23,27 ---- } ! u16 recv_dns_rpl(csocket* cudp, u32 timeout, std::vector<icestring>& answers, bool packet_trace){ struct timeval tv1, tv2; gettimeofday(&tv1, NULL); *************** *** 44,48 **** } ! parse_dns_query(buf, len, answers, id); return id; --- 44,48 ---- } ! parse_dns_query(buf, len, answers, id, packet_trace, tv2); return id; Index: sock_name.h =================================================================== RCS file: /cvsroot/icescan/IceScan/icesockets/sock_name.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** sock_name.h 9 Mar 2009 15:02:54 -0000 1.10 --- sock_name.h 15 Apr 2009 12:18:59 -0000 1.11 *************** *** 19,40 **** #endif - typedef struct { - u16 id; - u16 flags; - u16 qrcnt; - u16 rrcnt; - u16 nscnt; - u16 arcnt; - } dnshdr; - - #define DNS_A 1 - #define DNS_PTR 12 - #define DNS_INIP 1 - - typedef struct{ - u16 qtype; - u16 qclass; - } dnsq; - class dns_server{ public: --- 19,22 ---- *************** *** 89,95 **** icestring ip_to_str(u32); ! char* form_dns_query(u16, u16, std::vector<icestring>&, int&); ! int parse_dns_query(char*, int, std::vector<icestring>&, u16&); int get_system_dns_server(std::vector<icestring>&); --- 71,77 ---- icestring ip_to_str(u32); ! char* form_dns_query(u16, u16, std::vector<icestring>&, int&, bool); ! int parse_dns_query(char*, int, std::vector<icestring>&, u16&, bool, struct timeval&); int get_system_dns_server(std::vector<icestring>&); Index: sock_name.cc =================================================================== RCS file: /cvsroot/icescan/IceScan/icesockets/sock_name.cc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** sock_name.cc 17 Mar 2009 16:09:14 -0000 1.13 --- sock_name.cc 15 Apr 2009 12:18:59 -0000 1.14 *************** *** 343,351 **** } ! char* form_dns_query(u16 id, u16 qtype, std::vector<icestring>& objects, int& len){ char hdr[512]; Bzero(hdr, 512); len = 0; u16 flags = 0; dnshdr *dhdr = (dnshdr*) hdr; --- 343,353 ---- } ! char* form_dns_query(u16 id, u16 qtype, std::vector<icestring>& objects, int& len, bool packet_trace){ char hdr[512]; Bzero(hdr, 512); len = 0; u16 flags = 0; + + struct timeval tv; dnshdr *dhdr = (dnshdr*) hdr; *************** *** 408,415 **** memcpy(response, hdr, len); return response; } ! int parse_dns_query(char *buffer, int len, std::vector<icestring>& answers, u16& id){ dnshdr *dhdr = (dnshdr*) buffer; int cur = len; --- 410,425 ---- memcpy(response, hdr, len); + gettimeofday(&tv, NULL); + + if(packet_trace) + PacketTracer::TraceDNSPacket("SENT", response, len, tv); + return response; } ! int parse_dns_query(char *buffer, int len, std::vector<icestring>& answers, u16& id, bool packet_trace, struct timeval &tv){ ! if(packet_trace) ! PacketTracer::TraceDNSPacket("RCVD", buffer, len, tv); ! dnshdr *dhdr = (dnshdr*) buffer; int cur = len; |
From: Alexander B. <da...@us...> - 2009-04-15 12:19:12
|
Update of /cvsroot/icescan/IceScan In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv18086 Modified Files: ChangeLog INSTALL INSTALL.win32 TODO caengine2.h cpengine.cc ctarget.h iceparams.h Log Message: * fixed INSTALL && INSTALL.win32 files. + add PacketTracing for DNS queries * fixed rawsockets recieve conflict with pcap recieve (now either/either) * fixed udp scan window * fixed icmp processing thet recieved through pcap. Index: caengine2.h =================================================================== RCS file: /cvsroot/icescan/IceScan/caengine2.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** caengine2.h 7 Apr 2009 13:39:55 -0000 1.13 --- caengine2.h 15 Apr 2009 12:18:58 -0000 1.14 *************** *** 290,298 **** caengine2(iceoutput &o, iceparams &p, std::map <icestring, ctarget *> &sts) : subtargets(sts), out(o), par(p) { ! icescript_vm::Instance()->init(&p, &o, this); // this should depend on max/min_parallelism value // but now it's only some bogus value ! if(par.scan_type == TCP_CONNECT_SCAN) cwnd = 254; else --- 290,298 ---- caengine2(iceoutput &o, iceparams &p, std::map <icestring, ctarget *> &sts) : subtargets(sts), out(o), par(p) { ! icescript_vm::Instance()->init(&p, &o, this); // this should depend on max/min_parallelism value // but now it's only some bogus value ! if(par.scan_type == TCP_CONNECT_SCAN) cwnd = 254; else *************** *** 304,308 **** rtt = 0; up_hosts = 0; ! //nothing to do yet } --- 304,308 ---- rtt = 0; up_hosts = 0; ! //nothing to do yet } *************** *** 471,480 **** } ! int fill_host_probes(ctarget* c, int max_probes){ int i = 0; - /*for(int t = 0; t < c->progress_scan_probes.size(); t++){ - DBGOUTPUT(c->progress_scan_probes[t].done); - }*/ if(max_probes > c->cwnd) max_probes = c->cwnd; --- 471,477 ---- } ! int fill_host_probes(ctarget* c, int max_probes){ int i = 0; if(max_probes > c->cwnd) max_probes = c->cwnd; *************** *** 489,505 **** int k = 0; ! struct remove { ! static bool if_probe_done(const scan_probe& sp){ ! /*if(sp.done) ! DBGOUTPUT(sp.c->hostname << ":" << sp.port << " done, removing...");*/ ! return sp.done; ! } ! }; ! std::vector<scan_probe>::iterator it = ! std::remove_if( c->progress_scan_probes.begin(), c->progress_scan_probes.end(), remove::if_probe_done ); ! c->progress_scan_probes.erase( ! it, c->progress_scan_probes.end() ); /*for(std::vector<scan_probe>::iterator it = c->progress_scan_probes.begin(); it != c->progress_scan_probes.end(); ++it){ --- 486,499 ---- int k = 0; ! struct remove { ! static bool if_probe_done(const scan_probe& sp){ ! return sp.done; ! } ! }; ! std::vector<scan_probe>::iterator it = ! std::remove_if( c->progress_scan_probes.begin(), c->progress_scan_probes.end(), remove::if_probe_done ); ! c->progress_scan_probes.erase(it, c->progress_scan_probes.end() ); /*for(std::vector<scan_probe>::iterator it = c->progress_scan_probes.begin(); it != c->progress_scan_probes.end(); ++it){ *************** *** 521,525 **** }*/ ! check_host_finished(c); for(k = 0; k < MIN(c->progress_scan_probes.size(), max_old_probes); k++){ --- 515,519 ---- }*/ ! check_host_finished(c); for(k = 0; k < MIN(c->progress_scan_probes.size(), max_old_probes); k++){ *************** *** 585,588 **** --- 579,584 ---- } + (*i).second->udp_sent = 0; + // ^^ this should depend on max/min_parallelism value // but now it's only some bogus value *************** *** 816,820 **** // send all attempts to host ! bool send_targets_attempts(){ bool stop = true; bool result = false; --- 812,816 ---- // send all attempts to host ! bool send_targets_attempts(){ bool stop = true; bool result = false; *************** *** 1115,1119 **** } ! buf = form_dns_query(c->id, qtype, names, len); cde.cdns->sendto(par.dns_servers[ds].host.c_str(), 53, buf, len, 0); gettimeofday(&(p.tv_send), NULL); --- 1111,1115 ---- } ! buf = form_dns_query(c->id, qtype, names, len, par.packet_trace); cde.cdns->sendto(par.dns_servers[ds].host.c_str(), 53, buf, len, 0); gettimeofday(&(p.tv_send), NULL); *************** *** 1244,1249 **** --- 1240,1251 ---- // send raw UDP probe, return true, if success bool send_udp_probe(ctarget *c, scan_probe &p){ + + if(c->udp_sent >= UDP_CWND) + return false; + cde.r2->send_udp_raw(c->source_ip.c_str(), c->hostname.c_str(), csocket::getMagicPort(), p.port, par.ttl, 0, 0, 0); + c->udp_sent++; + // setting last sent time for probe gettimeofday(&(p.tv_send), NULL); *************** *** 1461,1468 **** void parse_icmp_recv(icestring addr, char *response, int len, struct iphdr *ip, struct timeval &tv, int offset){ std::vector<scan_probe>::iterator p; ! struct icmp *icmp = (struct icmp *) (response + 4 * ip->ihl); ! ! //if(par.packet_trace) PacketTracer::TraceIPPacket("RCVD", response + offset, len, tv); if (icmp->icmp_type == 3){ /// Get the right information from the icmp payload --- 1463,1473 ---- void parse_icmp_recv(icestring addr, char *response, int len, struct iphdr *ip, struct timeval &tv, int offset){ std::vector<scan_probe>::iterator p; ! int hdrlen = ip->ihl << 2; ! struct icmp *icmp = (struct icmp *) (response + offset + hdrlen); ! int icmplen = len - hdrlen - offset; // fixme! + //if(par.packet_trace) PacketTracer::TraceIPPacket("RCVD2", response + offset, len, tv); + // + if (icmp->icmp_type == 3){ /// Get the right information from the icmp payload *************** *** 1476,1480 **** iceinet_ntoa(*addr_src,addr_temp); - // if we have such target and it's packet to us if (subtargets.find(addr_temp) != subtargets.end()){ --- 1481,1484 ---- *************** *** 1539,1542 **** --- 1543,1602 ---- } /// subtarget in list } /// Type 3 + else if(icmp->icmp_id == getpid() && icmplen > 16){ + bool discovered = false; + icestring ssource = addr; + if(subtargets.find(ssource) != subtargets.end()){ + if(par.icmp_echo_ping_discovery && icmp -> icmp_type == ICMP_ECHOREPLY){ + discovered = true; + std::vector <scan_probe>::iterator j = + subtargets[ssource]->find_probe(0, ICMP_RECHO, ICMP_RECHO); + + if(j != subtargets[ssource]->progress_scan_probes.end()){ + if((*j).attempt < 2) subtargets[ssource]->recalc_rtt((*j).tv_send,tv); + subtargets[ssource]->recalc_cwnd(true, (*j).attempt); + subtargets[ssource]->delete_probe(0, ICMP_RECHO); + } + + }else if(par.icmp_timestamp_ping_discovery && icmp -> icmp_type == ICMP_TSTAMPREPLY){ + discovered = true; + if(par.verbose>1){ + uint32_t t = ntohl(icmp->icmp_rtime); + out << "Recieved icmp timestamp host discovery reply: " << make_uptime(t) << ".\n"; + } + + std::vector <scan_probe>::iterator j = + subtargets[ssource]->find_probe(0, ICMP_RTSTAMP, ICMP_RTSTAMP); + + if(j != subtargets[ssource]->progress_scan_probes.end()){ + if((*j).attempt < 2) subtargets[ssource]->recalc_rtt((*j).tv_send,tv); + subtargets[ssource]->recalc_cwnd(true, (*j).attempt); + subtargets[ssource]->delete_probe(0, ICMP_RTSTAMP); + } + + }else if(par.icmp_mask_ping_discovery && icmp -> icmp_type == ICMP_MASKREPLY){ + discovered = true; + if(par.verbose>1){ + char netmask[24]; + sprintf(netmask, "%08x", ntohl(icmp->icmp_mask)); + out << "Recieved icmp netmask host discovery reply: " << netmask << ".\n"; + } + + std::vector <scan_probe>::iterator j = + subtargets[ssource]->find_probe(0, ICMP_RMASK, ICMP_RMASK); + + if(j != subtargets[ssource]->progress_scan_probes.end()){ + if((*j).attempt < 2) subtargets[ssource]->recalc_rtt((*j).tv_send,tv); + subtargets[ssource]->recalc_cwnd(true, (*j).attempt); + subtargets[ssource]->delete_probe(0, ICMP_RMASK); + } + + } + + if(discovered) + if(subtargets[ssource]->discovering) + set_host_up(subtargets[ssource]); + } + + } // other types } *************** *** 1627,1631 **** sock_recieve_connect(tv, i); }else if(cde.scan_socks[i].type == ICMP_ALL){ ! sock_recieve_icmp(tv, i); }else if(cde.scan_socks[i].type == CONNECT_NBT){ sock_recieve_netbios(tv, i); --- 1687,1692 ---- sock_recieve_connect(tv, i); }else if(cde.scan_socks[i].type == ICMP_ALL){ ! if(!cde.pcaps.size()) ! sock_recieve_icmp(tv, i); }else if(cde.scan_socks[i].type == CONNECT_NBT){ sock_recieve_netbios(tv, i); *************** *** 1863,1867 **** ctarget *c = NULL; ! parse_dns_query(message, size, answers, id); // FIXME: add here packet tracing --- 1924,1928 ---- ctarget *c = NULL; ! parse_dns_query(message, size, answers, id, par.packet_trace, tv); // FIXME: add here packet tracing *************** *** 1936,1998 **** icestring ssource(inet_ntoa(source.sin_addr)); ! struct icmp *icmp = (struct icmp *) (buf + hdrlen); ! ! int icmplen = len - hdrlen; ! ! bool discovered = false; ! ! if(icmp->icmp_id == getpid() && icmplen > 16){ ! if(subtargets.find(ssource) != subtargets.end()){ ! if(par.icmp_echo_ping_discovery && icmp -> icmp_type == ICMP_ECHOREPLY){ ! discovered = true; ! std::vector <scan_probe>::iterator j = ! subtargets[ssource]->find_probe(0, ICMP_RECHO, ICMP_RECHO); ! ! if(j != subtargets[ssource]->progress_scan_probes.end()){ ! if((*j).attempt < 2) subtargets[ssource]->recalc_rtt((*j).tv_send,tv); ! subtargets[ssource]->recalc_cwnd(true, (*j).attempt); ! subtargets[ssource]->delete_probe(0, ICMP_RECHO); ! } ! ! }else if(par.icmp_timestamp_ping_discovery && icmp -> icmp_type == ICMP_TSTAMPREPLY){ ! discovered = true; ! if(par.verbose>1){ ! uint32_t t = ntohl(icmp->icmp_rtime); ! out << "Recieved icmp timestamp host discovery reply: " << make_uptime(t) << ".\n"; ! } ! ! std::vector <scan_probe>::iterator j = ! subtargets[ssource]->find_probe(0, ICMP_RTSTAMP, ICMP_RTSTAMP); ! ! if(j != subtargets[ssource]->progress_scan_probes.end()){ ! if((*j).attempt < 2) subtargets[ssource]->recalc_rtt((*j).tv_send,tv); ! subtargets[ssource]->recalc_cwnd(true, (*j).attempt); ! subtargets[ssource]->delete_probe(0, ICMP_RTSTAMP); ! } ! ! }else if(par.icmp_mask_ping_discovery && icmp -> icmp_type == ICMP_MASKREPLY){ ! discovered = true; ! if(par.verbose>1){ ! char netmask[24]; ! sprintf(netmask, "%08x", ntohl(icmp->icmp_mask)); ! out << "Recieved icmp netmask host discovery reply: " << netmask << ".\n"; ! } ! ! std::vector <scan_probe>::iterator j = ! subtargets[ssource]->find_probe(0, ICMP_RMASK, ICMP_RMASK); ! ! if(j != subtargets[ssource]->progress_scan_probes.end()){ ! if((*j).attempt < 2) subtargets[ssource]->recalc_rtt((*j).tv_send,tv); ! subtargets[ssource]->recalc_cwnd(true, (*j).attempt); ! subtargets[ssource]->delete_probe(0, ICMP_RMASK); ! } ! } - if(discovered) - if(subtargets[ssource]->discovering) - set_host_up(subtargets[ssource]); - } - } } } --- 1997,2004 ---- icestring ssource(inet_ntoa(source.sin_addr)); ! //struct icmp *icmp = (struct icmp *) (buf + hdrlen); ! parse_icmp_recv(ssource, buf, len, ip, tv, 0); } } Index: ChangeLog =================================================================== RCS file: /cvsroot/icescan/IceScan/ChangeLog,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** ChangeLog 13 Apr 2009 13:24:47 -0000 1.39 --- ChangeLog 15 Apr 2009 12:18:58 -0000 1.40 *************** *** 37,40 **** --- 37,47 ---- * manpage fixes * fixed ports dublication check in -p option + + libdnet library stripped down and included into distribution, vcproj for building is + added too. + * fixed INSTALL && INSTALL.win32 files. + + add PacketTracing for DNS queries + * fixed rawsockets recieve conflict with pcap recieve (now either/either) + * fixed udp scan window + * fixed icmp processing thet recieved through pcap. *** IceScan v. 0.0.6, 12 Jan 2007 *** Index: iceparams.h =================================================================== RCS file: /cvsroot/icescan/IceScan/iceparams.h,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** iceparams.h 7 Apr 2009 13:39:55 -0000 1.51 --- iceparams.h 15 Apr 2009 12:18:58 -0000 1.52 *************** *** 17,20 **** --- 17,22 ---- #define MAX_HOSTS 25 + #define UDP_CWND 1 + struct port_range{ int lower_port; Index: INSTALL =================================================================== RCS file: /cvsroot/icescan/IceScan/INSTALL,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** INSTALL 4 Mar 2009 12:10:23 -0000 1.4 --- INSTALL 15 Apr 2009 12:18:58 -0000 1.5 *************** *** 30,45 **** If you installed libpcre from a binary package, you may have to install a "development" package: e.g. libpcre-dev or something ! simular. ! ! 3. For advanced functionality of IceScan it's recommened to install ! Dug Song's excellent libdnet. You can get "official" version at ! http://libdnet.sourceforge.net/ ! If you installed libdnet from a binary package, you may have to ! install a "development" package: e.g. libdnet-dev (or libdumbnet-dev in ! Ubuntu) or something simular. ! 4. If you want to use IceScan scripting engine, you should install Lua. It can be found at http://www.lua.org 5. Run './configure' in the IceScan distribution directory. --- 30,44 ---- If you installed libpcre from a binary package, you may have to install a "development" package: e.g. libpcre-dev or something ! simular (for example libpcre-devel in Ubuntu). ! 3. If you want to use IceScan scripting engine, you should install Lua. It can be found at http://www.lua.org + May be your distro have the binary package (e.g. liblua-dev or lua-devel + or smth. simular), but we recommend to use original package from lua.org. + + 4. If you have get sources from CVS and they don't contain configure file + in the root directory, run 'autoconf && automake' to create it. For + source snapshots you don't need to do it. 5. Run './configure' in the IceScan distribution directory. *************** *** 77,80 **** If you have trouble with the build or installation process, you can ! find assistance on the icescan-users an icescan-dev mailing lists. See http://sourceforge.net/mail/?group_id=185109 for details. --- 76,79 ---- If you have trouble with the build or installation process, you can ! find assistance on the icescan-dev mailing list. See http://sourceforge.net/mail/?group_id=185109 for details. Index: ctarget.h =================================================================== RCS file: /cvsroot/icescan/IceScan/ctarget.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ctarget.h 16 Mar 2009 16:41:04 -0000 1.11 --- ctarget.h 15 Apr 2009 12:18:58 -0000 1.12 *************** *** 231,234 **** --- 231,235 ---- int max_retries; int sent_packets; + int udp_sent; // UGLY HACK for udp disable // Congestion Window parameters Index: INSTALL.win32 =================================================================== RCS file: /cvsroot/icescan/IceScan/INSTALL.win32,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** INSTALL.win32 8 Mar 2009 22:44:52 -0000 1.4 --- INSTALL.win32 15 Apr 2009 12:18:58 -0000 1.5 *************** *** 1,13 **** IceScan Win32 building instructions draft. ! To compile them under VC2008 you'll need: ! - WinPCAP (http://www.winpcap.org/install/bin/WinPcap_3_1.exe) ! - WinPCAP developers pack (http://www.winpcap.org/install/bin/WpdPack_3_1.zip) ! - Latest compiled LibPcre package (get sources at pcre.org). ! - Latest compiled dnet package (you can get dnet-strpped from ! sources of Nmap (insecure.org/nmap ; download sources and extract libdnet-strpped ! folder from them). ! - Lua 5.1.4 (get it from http://www.lua.org) ! Project solution is in vccproject folder. --- 1,48 ---- + Binary distribution + ------------------- + + If you've got IceScan in binary win32 distribution, installation is simple. + + 1. Install WinPcap. ( download it from + http://www.winpcap.org/install/default.htm ) + + 2. Unpack distribution archive into suitable directory and run icescan.exe. + + Source distribution + ------------------- + + If you've obtained IceScan from CVS or in source snapshot, here are IceScan Win32 building instructions draft. ! IceScan can be successfully built on Win32 platform. All you need is Visual Studio 2008 ! (or freeware Visual C++ 2008 Express, get it from ! http://www.microsoft.com/express/download/default.aspx ). ! Step-by-step building instruction: ! 0. Install Visual C++ 2008 (express or full). ! ! 1. Download latest WinPcap windows binaries from ! http://www.winpcap.org/install/default.htm . Install. ! ! 2. Download latest WinPcap developers pack from ! http://www.winpcap.org/devel.htm . Install. ! ! 3. Download latest LibPcre source package from http://www.pcre.org/ . ! Unpack and build. See NON-UNIX-USE file in pcre distro for Win32-building ! instructions. ! ! 4. Download LUA fro windows devpack from http://lua.org and ! http://luaforwindows.luaforge.net/ . ! ! 5. Make sure, that include and lib path's of you VS enviroment contains include ! and lib directories of libpcre, lua and winpcap dev pack's include and lib places. ! ! 6. Go to the directory with IceScan sources. ! ! 7. Compile dnet-exported library (use dnet-exported/dnet-exported.vcproj) for ! it. ! ! 8. Compile IceScan, use vccproject/IceScan.vcproj for it. ! ! 9. Enjoy! ;) Index: TODO =================================================================== RCS file: /cvsroot/icescan/IceScan/TODO,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** TODO 13 Apr 2009 13:24:47 -0000 1.69 --- TODO 15 Apr 2009 12:18:58 -0000 1.70 *************** *** 44,52 **** I4 * standartize all error messages. - I5 * PACKET TRACE messages engine: add UDP send/(rcv in pcap_recieve) handling - I6 * PACKET TRACE messages engine: add ARP rcv(from arp_cache) handling I70 + PACKET TRACE should show TCP and IP options. I71 + PACKET TRACE options. (--trace-options) ! I104 + PACKET TRACE messages engine: add user UDP and DNS handling -- Discovering -- --- 44,50 ---- I4 * standartize all error messages. I70 + PACKET TRACE should show TCP and IP options. I71 + PACKET TRACE options. (--trace-options) ! I104 + PACKET TRACE messages engine: add DNS advanced handling: print queries and answers (see PacketTracer::TraceDNSPacket(...) -- Discovering -- *************** *** 75,85 **** I26 * fix bind(): address already in use (clear, when hitting ctrl+c) I28 * timeouts for connect() scan inheritance from discover... - I29 * fix connect() scan invalid port status if ports count > 1000 - I31 * fix too many duplicate sents with TCP RAW scan. I33 + Decoys (-D) I67 + IP options (T, U, S, L) I79 * very *slow* tcp raw scanning on fast lines (FE or loopback). I85 + dynamic change of max_retries. ! I86 * rewrite Congestion Windows (cwnd) changing engine. I105 + channel level scanner (CDP, OSPF, STP etc) I110 + connect() scan + uid0 = strange behaviour (sending RA???) --- 73,81 ---- I26 * fix bind(): address already in use (clear, when hitting ctrl+c) I28 * timeouts for connect() scan inheritance from discover... I33 + Decoys (-D) I67 + IP options (T, U, S, L) I79 * very *slow* tcp raw scanning on fast lines (FE or loopback). I85 + dynamic change of max_retries. ! I86 * rewrite Congestion Window (cwnd) changing engine. I105 + channel level scanner (CDP, OSPF, STP etc) I110 + connect() scan + uid0 = strange behaviour (sending RA???) *************** *** 122,126 **** -- Cygwin-specific -- ! I47 + add pceudo-classes in Cygwin (cos of no libdnet). I48 + make it build under cygwin --- 118,122 ---- -- Cygwin-specific -- ! I47 + fix dnet building in cygwin I48 + make it build under cygwin *************** *** 141,151 **** I57 * print library versions on icescan -V. I58 * replace all u_char, u_short and etc with u16,u32,u8 - I59 * add own platworm-independent packet headers and standartize all fuctions that working with 'em. I60 * add text headers to all source files. -- Docs -- ! I61 + Man page (related links, diagram of IceScan work and etc) ! I62 + Web Site I63 + Completely rewrite and append INSTALL.win32 I108 + IceScan HACKING guide --- 137,145 ---- I57 * print library versions on icescan -V. I58 * replace all u_char, u_short and etc with u16,u32,u8 I60 * add text headers to all source files. -- Docs -- ! I62 + Normal Web Site I63 + Completely rewrite and append INSTALL.win32 I108 + IceScan HACKING guide Index: cpengine.cc =================================================================== RCS file: /cvsroot/icescan/IceScan/cpengine.cc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** cpengine.cc 7 Apr 2009 13:39:55 -0000 1.14 --- cpengine.cc 15 Apr 2009 12:18:58 -0000 1.15 *************** *** 191,197 **** for(int d = 0; d < 3; d++){ ! dnsr = send_dns_req(cudp, id, DNS_PTR, (*i).second->hostname, par.dns_servers); ! rid = recv_dns_rpl(cudp, DNS_TIMEOUT, answers); if(rid == id){ --- 191,197 ---- for(int d = 0; d < 3; d++){ ! dnsr = send_dns_req(cudp, id, DNS_PTR, (*i).second->hostname, par.dns_servers, par.packet_trace); ! rid = recv_dns_rpl(cudp, DNS_TIMEOUT, answers, par.packet_trace); if(rid == id){ |
Update of /cvsroot/icescan/IceScan/dnet-exported/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31421/dnet-exported/src Added Files: Makefile Makefile.am Makefile.in addr-util.c addr.c arp-bsd.c arp-ioctl.c arp-none.c arp-win32.c err.c eth-bsd.c eth-dlpi.c eth-linux.c eth-ndd.c eth-none.c eth-pfilt.c eth-snoop.c eth-win32.c intf-win32.c intf.c ip-cooked.c ip-util.c ip-win32.c ip.c ip6.c memcmp.c route-bsd.c route-hpux.c route-linux.c route-none.c route-win32.c strlcat.c strlcpy.c strsep.c Log Message: Initial libDnet import to repository. --- NEW FILE: addr.c --- /* * addr.c * * Network address operations. * * Copyright (c) 2000 Dug Song <du...@mo...> * * $Id: addr.c,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #ifdef _WIN32 #include "winconfig.h" #else #include "config.h" #endif #include <sys/types.h> #ifdef HAVE_NET_IF_H # include <sys/socket.h> # include <net/if.h> #endif #ifdef HAVE_NET_IF_DL_H # include <net/if_dl.h> #endif #ifdef HAVE_NET_RAW_H # include <net/raw.h> #endif #include <ctype.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "dnet.h" #ifndef MAXHOSTNAMELEN # define MAXHOSTNAMELEN 256 #endif union sockunion { #ifdef HAVE_NET_IF_DL_H struct sockaddr_dl sdl; #endif struct sockaddr_in sin; #ifdef HAVE_SOCKADDR_IN6 struct sockaddr_in6 sin6; #endif struct sockaddr sa; #ifdef AF_RAW struct sockaddr_raw sr; #endif }; int addr_cmp(const struct addr *a, const struct addr *b) { int i, j, k; /* XXX */ if ((i = a->addr_type - b->addr_type) != 0) return (i); /* XXX - 10.0.0.1 is "smaller" than 10.0.0.0/8? */ if ((i = a->addr_bits - b->addr_bits) != 0) return (i); j = b->addr_bits / 8; for (i = 0; i < j; i++) { if ((k = a->addr_data8[i] - b->addr_data8[i]) != 0) return (k); } if ((k = b->addr_bits % 8) == 0) return (0); k = ~0 << (8 - k); i = b->addr_data8[j] & k; j = a->addr_data8[j] & k; return (j - i); } int addr_net(const struct addr *a, struct addr *b) { uint32_t mask; int i, j; if (a->addr_type == ADDR_TYPE_IP) { addr_btom(a->addr_bits, &mask, IP_ADDR_LEN); b->addr_type = ADDR_TYPE_IP; b->addr_bits = IP_ADDR_BITS; b->addr_ip = a->addr_ip & mask; } else if (a->addr_type == ADDR_TYPE_ETH) { memcpy(b, a, sizeof(*b)); if (a->addr_data8[0] & 0x1) memset(b->addr_data8 + 3, 0, 3); b->addr_bits = ETH_ADDR_BITS; } else if (a->addr_type == ADDR_TYPE_IP6) { b->addr_type = ADDR_TYPE_IP6; b->addr_bits = IP6_ADDR_BITS; memset(&b->addr_ip6, 0, IP6_ADDR_LEN); switch ((i = a->addr_bits / 32)) { case 4: b->addr_data32[3] = a->addr_data32[3]; case 3: b->addr_data32[2] = a->addr_data32[2]; case 2: b->addr_data32[1] = a->addr_data32[1]; case 1: b->addr_data32[0] = a->addr_data32[0]; } if ((j = a->addr_bits % 32) > 0) { addr_btom(j, &mask, sizeof(mask)); b->addr_data32[i] = a->addr_data32[i] & mask; } } else return (-1); return (0); } int addr_bcast(const struct addr *a, struct addr *b) { struct addr mask; if (a->addr_type == ADDR_TYPE_IP) { addr_btom(a->addr_bits, &mask.addr_ip, IP_ADDR_LEN); b->addr_type = ADDR_TYPE_IP; b->addr_bits = IP_ADDR_BITS; b->addr_ip = (a->addr_ip & mask.addr_ip) | (~0L & ~mask.addr_ip); } else if (a->addr_type == ADDR_TYPE_ETH) { b->addr_type = ADDR_TYPE_ETH; b->addr_bits = ETH_ADDR_BITS; memcpy(&b->addr_eth, ETH_ADDR_BROADCAST, ETH_ADDR_LEN); } else { /* XXX - no broadcast addresses in IPv6 */ errno = EINVAL; return (-1); } return (0); } char * addr_ntop(const struct addr *src, char *dst, size_t size) { if (src->addr_type == ADDR_TYPE_IP && size >= 20) { if (ip_ntop(&src->addr_ip, dst, size) != NULL) { if (src->addr_bits != IP_ADDR_BITS) sprintf(dst + strlen(dst), "/%d", src->addr_bits); return (dst); } } else if (src->addr_type == ADDR_TYPE_IP6 && size >= 42) { if (ip6_ntop(&src->addr_ip6, dst, size) != NULL) { if (src->addr_bits != IP6_ADDR_BITS) sprintf(dst + strlen(dst), "/%d", src->addr_bits); return (dst); } } else if (src->addr_type == ADDR_TYPE_ETH && size >= 18) { if (src->addr_bits == ETH_ADDR_BITS) return (eth_ntop(&src->addr_eth, dst, size)); } errno = EINVAL; return (NULL); } int addr_pton(const char *src, struct addr *dst) { struct hostent *hp; char *ep, tmp[300]; long bits = -1; int i; for (i = 0; i < (int)sizeof(tmp) - 1; i++) { if (src[i] == '/') { tmp[i] = '\0'; if (strchr(&src[i + 1], '.')) { uint32_t m; uint16_t b; /* XXX - mask is specified like /255.0.0.0 */ if (ip_pton(&src[i + 1], &m) != 0) { errno = EINVAL; return (-1); } addr_mtob(&m, sizeof(m), &b); bits = b; } else { bits = strtol(&src[i + 1], &ep, 10); if (ep == src || *ep != '\0' || bits < 0) { errno = EINVAL; return (-1); } } break; } else if ((tmp[i] = src[i]) == '\0') break; } if (ip_pton(tmp, &dst->addr_ip) == 0) { dst->addr_type = ADDR_TYPE_IP; dst->addr_bits = IP_ADDR_BITS; } else if (eth_pton(tmp, &dst->addr_eth) == 0) { dst->addr_type = ADDR_TYPE_ETH; dst->addr_bits = ETH_ADDR_BITS; } else if (ip6_pton(tmp, &dst->addr_ip6) == 0) { dst->addr_type = ADDR_TYPE_IP6; dst->addr_bits = IP6_ADDR_BITS; } else if ((hp = gethostbyname(tmp)) != NULL) { memcpy(&dst->addr_ip, hp->h_addr, IP_ADDR_LEN); dst->addr_type = ADDR_TYPE_IP; dst->addr_bits = IP_ADDR_BITS; } else { errno = EINVAL; return (-1); } if (bits >= 0) { if (bits > dst->addr_bits) { errno = EINVAL; return (-1); } dst->addr_bits = (uint16_t)bits; } return (0); } char * addr_ntoa(const struct addr *a) { static char *p, buf[BUFSIZ]; char *q = NULL; if (p == NULL || p > buf + sizeof(buf) - 64 /* XXX */) p = buf; if (addr_ntop(a, p, (buf + sizeof(buf)) - p) != NULL) { q = p; p += strlen(p) + 1; } return (q); } int addr_ntos(const struct addr *a, struct sockaddr *sa) { union sockunion *so = (union sockunion *)sa; switch (a->addr_type) { case ADDR_TYPE_ETH: #ifdef HAVE_NET_IF_DL_H memset(&so->sdl, 0, sizeof(so->sdl)); # ifdef HAVE_SOCKADDR_SA_LEN so->sdl.sdl_len = sizeof(so->sdl); # endif so->sdl.sdl_family = AF_LINK; so->sdl.sdl_alen = ETH_ADDR_LEN; memcpy(LLADDR(&so->sdl), &a->addr_eth, ETH_ADDR_LEN); #else memset(sa, 0, sizeof(*sa)); # ifdef AF_LINK sa->sa_family = AF_LINK; # else sa->sa_family = AF_UNSPEC; # endif memcpy(sa->sa_data, &a->addr_eth, ETH_ADDR_LEN); #endif break; #ifdef HAVE_SOCKADDR_IN6 case ADDR_TYPE_IP6: memset(&so->sin6, 0, sizeof(so->sin6)); #ifdef HAVE_SOCKADDR_SA_LEN so->sin6.sin6_len = sizeof(so->sin6); #endif so->sin6.sin6_family = AF_INET6; memcpy(&so->sin6.sin6_addr, &a->addr_ip6, IP6_ADDR_LEN); break; #endif case ADDR_TYPE_IP: memset(&so->sin, 0, sizeof(so->sin)); #ifdef HAVE_SOCKADDR_SA_LEN so->sin.sin_len = sizeof(so->sin); #endif so->sin.sin_family = AF_INET; so->sin.sin_addr.s_addr = a->addr_ip; break; default: errno = EINVAL; return (-1); } return (0); } int addr_ston(const struct sockaddr *sa, struct addr *a) { union sockunion *so = (union sockunion *)sa; memset(a, 0, sizeof(*a)); switch (sa->sa_family) { #ifdef HAVE_NET_IF_DL_H case AF_LINK: if (so->sdl.sdl_alen != ETH_ADDR_LEN) { errno = EINVAL; return (-1); } a->addr_type = ADDR_TYPE_ETH; a->addr_bits = ETH_ADDR_BITS; memcpy(&a->addr_eth, LLADDR(&so->sdl), ETH_ADDR_LEN); break; #endif case AF_UNSPEC: case ARP_HRD_ETH: /* XXX- Linux arp(7) */ a->addr_type = ADDR_TYPE_ETH; a->addr_bits = ETH_ADDR_BITS; memcpy(&a->addr_eth, sa->sa_data, ETH_ADDR_LEN); break; #ifdef AF_RAW case AF_RAW: /* XXX - IRIX raw(7f) */ a->addr_type = ADDR_TYPE_ETH; a->addr_bits = ETH_ADDR_BITS; memcpy(&a->addr_eth, so->sr.sr_addr, ETH_ADDR_LEN); break; #endif #ifdef HAVE_SOCKADDR_IN6 case AF_INET6: a->addr_type = ADDR_TYPE_IP6; a->addr_bits = IP6_ADDR_BITS; memcpy(&a->addr_ip6, &so->sin6.sin6_addr, IP6_ADDR_LEN); break; #endif case AF_INET: a->addr_type = ADDR_TYPE_IP; a->addr_bits = IP_ADDR_BITS; a->addr_ip = so->sin.sin_addr.s_addr; break; default: errno = EINVAL; return (-1); } return (0); } int addr_btos(uint16_t bits, struct sockaddr *sa) { union sockunion *so = (union sockunion *)sa; #ifdef HAVE_SOCKADDR_IN6 if (bits > IP_ADDR_BITS && bits <= IP6_ADDR_BITS) { memset(&so->sin6, 0, sizeof(so->sin6)); #ifdef HAVE_SOCKADDR_SA_LEN so->sin6.sin6_len = IP6_ADDR_LEN + (bits / 8) + (bits % 8); #endif so->sin6.sin6_family = AF_INET6; return (addr_btom(bits, &so->sin6.sin6_addr, IP6_ADDR_LEN)); } else #endif if (bits <= IP_ADDR_BITS) { memset(&so->sin, 0, sizeof(so->sin)); #ifdef HAVE_SOCKADDR_SA_LEN so->sin.sin_len = IP_ADDR_LEN + (bits / 8) + (bits % 8); #endif so->sin.sin_family = AF_INET; return (addr_btom(bits, &so->sin.sin_addr, IP_ADDR_LEN)); } errno = EINVAL; return (-1); } int addr_stob(const struct sockaddr *sa, uint16_t *bits) { union sockunion *so = (union sockunion *)sa; int i, j, len; uint16_t n; u_char *p; #ifdef HAVE_SOCKADDR_IN6 if (sa->sa_family == AF_INET6) { len = IP6_ADDR_LEN; p = (u_char *)&so->sin6.sin6_addr; } else #endif { #ifdef HAVE_SOCKADDR_SA_LEN if ((len = sa->sa_len - IP_ADDR_LEN) > IP_ADDR_LEN) #endif len = IP_ADDR_LEN; p = (u_char *)&so->sin.sin_addr.s_addr; } for (n = i = 0; i < len; i++, n += 8) { if (p[i] != 0xff) break; } if (i != len && p[i]) { for (j = 7; j > 0; j--, n++) { if ((p[i] & (1 << j)) == 0) break; } } *bits = n; return (0); } int addr_btom(uint16_t bits, void *mask, size_t size) { int net, host; u_char *p; if (size == IP_ADDR_LEN) { if (bits > IP_ADDR_BITS) { errno = EINVAL; return (-1); } *(uint32_t *)mask = bits ? htonl(~0 << (IP_ADDR_BITS - bits)) : 0; } else { if (size * 8 < bits) { errno = EINVAL; return (-1); } p = (u_char *)mask; if ((net = bits / 8) > 0) memset(p, 0xff, net); if ((host = bits % 8) > 0) { p[net] = 0xff << (8 - host); memset(&p[net + 1], 0, size - net - 1); } else memset(&p[net], 0, size - net); } return (0); } int addr_mtob(const void *mask, size_t size, uint16_t *bits) { uint16_t n; u_char *p; int i, j; p = (u_char *)mask; for (n = i = 0; i < (int)size; i++, n += 8) { if (p[i] != 0xff) break; } if (i != (int)size && p[i]) { for (j = 7; j > 0; j--, n++) { if ((p[i] & (1 << j)) == 0) break; } } *bits = n; return (0); } --- NEW FILE: intf-win32.c --- /* * intf-win32.c * * Copyright (c) 2002 Dug Song <du...@mo...> * * $Id: intf-win32.c,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #ifdef _WIN32 #include "winconfig.h" #else #include "config.h" #endif #include <iphlpapi.h> #include <ctype.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "dnet.h" struct ifcombo { DWORD *idx; int cnt; int max; }; #define MIB_IF_TYPE_MAX 32 /* XXX - ipifcons.h */ struct intf_handle { struct ifcombo ifcombo[MIB_IF_TYPE_MAX]; MIB_IFTABLE *iftable; MIB_IPADDRTABLE *iptable; }; static char * _ifcombo_name(int type) { char *name = "net"; /* XXX */ if (type == MIB_IF_TYPE_ETHERNET) { name = "eth"; } else if (type == MIB_IF_TYPE_TOKENRING) { name = "tr"; } else if (type == MIB_IF_TYPE_FDDI) { name = "fddi"; } else if (type == MIB_IF_TYPE_PPP) { name = "ppp"; } else if (type == MIB_IF_TYPE_LOOPBACK) { name = "lo"; } else if (type == MIB_IF_TYPE_SLIP) { name = "sl"; } return (name); } static int _ifcombo_type(const char *device) { int type = INTF_TYPE_OTHER; if (strncmp(device, "eth", 3) == 0) { type = INTF_TYPE_ETH; } else if (strncmp(device, "tr", 2) == 0) { type = INTF_TYPE_TOKENRING; } else if (strncmp(device, "fd", 2) == 0) { type = INTF_TYPE_FDDI; } else if (strncmp(device, "ppp", 3) == 0) { type = INTF_TYPE_PPP; } else if (strncmp(device, "lo", 2) == 0) { type = INTF_TYPE_LOOPBACK; } else if (strncmp(device, "sl", 2) == 0) { type = INTF_TYPE_SLIP; } return (type); } static void _ifcombo_add(struct ifcombo *ifc, DWORD idx) { if (ifc->cnt == ifc->max) { if (ifc->idx) { ifc->max *= 2; ifc->idx = realloc(ifc->idx, sizeof(ifc->idx[0] * ifc->max)); } else { ifc->max = 8; ifc->idx = malloc(sizeof(ifc->idx[0] * ifc->max)); } } ifc->idx[ifc->cnt++] = idx; } static void _ifrow_to_entry(intf_t *intf, MIB_IFROW *ifrow, struct intf_entry *entry) { struct addr *ap, *lap; int i; memset(entry, 0, sizeof(*entry)); for (i = 0; i < intf->ifcombo[ifrow->dwType].cnt; i++) { if (intf->ifcombo[ifrow->dwType].idx[i] == ifrow->dwIndex) break; } /* XXX - dwType matches MIB-II ifType. */ snprintf(entry->intf_name, sizeof(entry->intf_name), "%s%lu", _ifcombo_name(ifrow->dwType), i); entry->intf_type = (uint16_t)ifrow->dwType; /* Get interface flags. */ entry->intf_flags = 0; if (ifrow->dwAdminStatus == MIB_IF_ADMIN_STATUS_UP) entry->intf_flags |= INTF_FLAG_UP; if (ifrow->dwType == MIB_IF_TYPE_LOOPBACK) entry->intf_flags |= INTF_FLAG_LOOPBACK; else entry->intf_flags |= INTF_FLAG_MULTICAST; /* Get interface MTU. */ entry->intf_mtu = ifrow->dwMtu; /* Get hardware address. */ if (ifrow->dwPhysAddrLen == ETH_ADDR_LEN) { entry->intf_link_addr.addr_type = ADDR_TYPE_ETH; entry->intf_link_addr.addr_bits = ETH_ADDR_BITS; memcpy(&entry->intf_link_addr.addr_eth, ifrow->bPhysAddr, ETH_ADDR_LEN); } /* Get addresses. */ ap = entry->intf_alias_addrs; lap = ap + ((entry->intf_len - sizeof(*entry)) / sizeof(entry->intf_alias_addrs[0])); for (i = 0; i < (int)intf->iptable->dwNumEntries; i++) { if (intf->iptable->table[i].dwIndex == ifrow->dwIndex && intf->iptable->table[i].dwAddr != 0) { if (entry->intf_addr.addr_type == ADDR_TYPE_NONE) { /* Set primary address if unset. */ entry->intf_addr.addr_type = ADDR_TYPE_IP; entry->intf_addr.addr_ip = intf->iptable->table[i].dwAddr; addr_mtob(&intf->iptable->table[i].dwMask, IP_ADDR_LEN, &entry->intf_addr.addr_bits); } else if (ap < lap) { /* Set aliases. */ ap->addr_type = ADDR_TYPE_IP; ap->addr_ip = intf->iptable->table[i].dwAddr; addr_mtob(&intf->iptable->table[i].dwMask, IP_ADDR_LEN, &ap->addr_bits); ap++, entry->intf_alias_num++; } } } entry->intf_len = (u_char *)ap - (u_char *)entry; } static int _refresh_tables(intf_t *intf) { MIB_IFROW *ifrow; ULONG len; u_int i, ret; /* Get interface table. */ for (len = sizeof(intf->iftable[0]); ; ) { if (intf->iftable) free(intf->iftable); intf->iftable = malloc(len); ret = GetIfTable(intf->iftable, &len, FALSE); if (ret == NO_ERROR) break; else if (ret != ERROR_INSUFFICIENT_BUFFER) return (-1); } /* Get IP address table. */ for (len = sizeof(intf->iptable[0]); ; ) { if (intf->iptable) free(intf->iptable); intf->iptable = malloc(len); ret = GetIpAddrTable(intf->iptable, &len, FALSE); if (ret == NO_ERROR) break; else if (ret != ERROR_INSUFFICIENT_BUFFER) return (-1); } /* * Map "unfriendly" win32 interface indices to ours. * XXX - like IP_ADAPTER_INFO ComboIndex */ for (i = 0; i < intf->iftable->dwNumEntries; i++) { ifrow = &intf->iftable->table[i]; if (ifrow->dwType < MIB_IF_TYPE_MAX) { _ifcombo_add(&intf->ifcombo[ifrow->dwType], ifrow->dwIndex); } else return (-1); } return (0); } static int _find_ifindex(intf_t *intf, const char *device) { char *p = (char *)device; int n, type = _ifcombo_type(device); while (isalpha(*p)) p++; n = atoi(p); return (intf->ifcombo[type].idx[n]); } intf_t * intf_open(void) { return (calloc(1, sizeof(intf_t))); } int intf_get(intf_t *intf, struct intf_entry *entry) { MIB_IFROW ifrow; if (_refresh_tables(intf) < 0) return (-1); ifrow.dwIndex = _find_ifindex(intf, entry->intf_name); if (GetIfEntry(&ifrow) != NO_ERROR) return (-1); _ifrow_to_entry(intf, &ifrow, entry); return (0); } int intf_get_src(intf_t *intf, struct intf_entry *entry, struct addr *src) { MIB_IFROW ifrow; MIB_IPADDRROW *iprow; int i; if (src->addr_type != ADDR_TYPE_IP) { errno = EINVAL; return (-1); } if (_refresh_tables(intf) < 0) return (-1); for (i = 0; i < (int)intf->iptable->dwNumEntries; i++) { iprow = &intf->iptable->table[i]; if (iprow->dwAddr == src->addr_ip) { ifrow.dwIndex = iprow->dwIndex; if (GetIfEntry(&ifrow) != NO_ERROR) return (-1); _ifrow_to_entry(intf, &ifrow, entry); return (0); } } errno = ENXIO; return (-1); } int intf_get_dst(intf_t *intf, struct intf_entry *entry, struct addr *dst) { MIB_IFROW ifrow; if (dst->addr_type != ADDR_TYPE_IP) { errno = EINVAL; return (-1); } if (GetBestInterface(dst->addr_ip, &ifrow.dwIndex) != NO_ERROR) return (-1); if (GetIfEntry(&ifrow) != NO_ERROR) return (-1); if (_refresh_tables(intf) < 0) return (-1); _ifrow_to_entry(intf, &ifrow, entry); return (0); } int intf_set(intf_t *intf, const struct intf_entry *entry) { /* * XXX - could set interface up/down via SetIfEntry(), * but what about the rest of the configuration? :-( * {Add,Delete}IPAddress for 2000/XP only */ #if 0 /* Set interface address. XXX - 2000/XP only? */ if (entry->intf_addr.addr_type == ADDR_TYPE_IP) { ULONG ctx = 0, inst = 0; UINT ip, mask; memcpy(&ip, &entry->intf_addr.addr_ip, IP_ADDR_LEN); addr_btom(entry->intf_addr.addr_bits, &mask, IP_ADDR_LEN); if (AddIPAddress(ip, mask, _find_ifindex(intf, entry->intf_name), &ctx, &inst) != NO_ERROR) { return (-1); } return (0); } #endif errno = ENOSYS; SetLastError(ERROR_NOT_SUPPORTED); return (-1); } int intf_loop(intf_t *intf, intf_handler callback, void *arg) { struct intf_entry *entry; u_char ebuf[1024]; int i, ret = 0; if (_refresh_tables(intf) < 0) return (-1); entry = (struct intf_entry *)ebuf; for (i = 0; i < (int)intf->iftable->dwNumEntries; i++) { entry->intf_len = sizeof(ebuf); _ifrow_to_entry(intf, &intf->iftable->table[i], entry); if ((ret = (*callback)(entry, arg)) != 0) break; } return (ret); } intf_t * intf_close(intf_t *intf) { int i; if (intf != NULL) { for (i = 0; i < MIB_IF_TYPE_MAX; i++) { if (intf->ifcombo[i].idx) free(intf->ifcombo[i].idx); } if (intf->iftable) free(intf->iftable); if (intf->iptable) free(intf->iptable); free(intf); } return (NULL); } --- NEW FILE: Makefile.in --- # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/Makefile.am.common arp-bsd.c arp-ioctl.c \ arp-none.c arp-win32.c err.c eth-bsd.c eth-dlpi.c eth-linux.c \ eth-ndd.c eth-none.c eth-pfilt.c eth-snoop.c eth-win32.c \ intf-win32.c intf.c ip-cooked.c ip-win32.c ip.c memcmp.c \ route-bsd.c route-hpux.c route-linux.c route-none.c \ route-win32.c strlcat.c strlcpy.c strsep.c subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libdnet_la_DEPENDENCIES = @LTLIBOBJS@ am_libdnet_la_OBJECTS = addr-util.lo addr.lo ip-util.lo ip6.lo libdnet_la_OBJECTS = $(am_libdnet_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include depcomp = am__depfiles_maybe = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libdnet_la_SOURCES) DIST_SOURCES = $(libdnet_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECKINC = @CHECKINC@ CHECKLIB = @CHECKLIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_CHECK_FALSE = @HAVE_CHECK_FALSE@ HAVE_CHECK_TRUE = @HAVE_CHECK_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_aux_dir = @ac_aux_dir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AUTOMAKE_OPTIONS = foreign no-dependencies AM_CPPFLAGS = -I$(top_srcdir)/include lib_LTLIBRARIES = libdnet.la libdnet_la_SOURCES = addr-util.c addr.c ip-util.c ip6.c libdnet_la_LIBADD = @LTLIBOBJS@ libdnet_la_LDFLAGS = -version-info 1:1:0 all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libdnet.la: $(libdnet_la_OBJECTS) $(libdnet_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libdnet_la_LDFLAGS) $(libdnet_la_OBJECTS) $(libdnet_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .c.o: $(COMPILE) -c $< .c.obj: $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(mkdir_p) $(distdir)/.. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE: arp-none.c --- /* * arp-none.c * * Copyright (c) 2000 Dug Song <du...@mo...> * * $Id: arp-none.c,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #include "config.h" #include <sys/types.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include "dnet.h" arp_t * arp_open(void) { errno = ENOSYS; return (NULL); } int arp_add(arp_t *a, const struct arp_entry *entry) { errno = ENOSYS; return (-1); } int arp_delete(arp_t *a, const struct arp_entry *entry) { errno = ENOSYS; return (-1); } int arp_get(arp_t *a, struct arp_entry *entry) { errno = ENOSYS; return (-1); } int arp_loop(arp_t *a, arp_handler callback, void *arg) { errno = ENOSYS; return (-1); } arp_t * arp_close(arp_t *a) { return (NULL); } --- NEW FILE: Makefile --- # Makefile.in generated by automake 1.9.6 from Makefile.am. # src/Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. srcdir = . top_srcdir = .. pkgdatadir = $(datadir)/libdnet pkglibdir = $(libdir)/libdnet pkgincludedir = $(includedir)/libdnet top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = /usr/bin/install -c install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = i386-unknown-openbsd4.4 host_triplet = i386-unknown-openbsd4.4 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/Makefile.am.common arp-bsd.c arp-ioctl.c \ arp-none.c arp-win32.c err.c eth-bsd.c eth-dlpi.c eth-linux.c \ eth-ndd.c eth-none.c eth-pfilt.c eth-snoop.c eth-win32.c \ intf-win32.c intf.c ip-cooked.c ip-win32.c ip.c memcmp.c \ route-bsd.c route-hpux.c route-linux.c route-none.c \ route-win32.c strlcat.c strlcpy.c strsep.c subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libdnet_la_DEPENDENCIES = ${LIBOBJDIR}arp-bsd$U.lo ${LIBOBJDIR}eth-bsd$U.lo ${LIBOBJDIR}intf$U.lo ${LIBOBJDIR}ip$U.lo ${LIBOBJDIR}route-bsd$U.lo am_libdnet_la_OBJECTS = addr-util.lo addr.lo ip-util.lo ip6.lo libdnet_la_OBJECTS = $(am_libdnet_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include depcomp = am__depfiles_maybe = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libdnet_la_SOURCES) DIST_SOURCES = $(libdnet_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run aclocal-1.6 AMDEP_FALSE = # AMDEP_TRUE = AMTAR = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run tar AR = ar AUTOCONF = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run autoconf AUTOHEADER = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run autoheader AUTOMAKE = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run automake-1.6 AWK = nawk CC = gcc CCDEPMODE = depmode=none CFLAGS = -I/usr/local/include -Wall CHECKINC = CHECKLIB = CPP = gcc -E CPPFLAGS = CXX = g++ CXXCPP = g++ -E CXXDEPMODE = depmode=none CXXFLAGS = -I/usr/local/include CYGPATH_W = @CYGPATH_W@ DEFS = -DHAVE_CONFIG_H DEPDIR = .deps DSYMUTIL = @DSYMUTIL@ ECHO = /bin/echo ECHO_C = ECHO_N = -n ECHO_T = EGREP = /usr/bin/grep -E EXEEXT = F77 = g77 FFLAGS = -g -O2 GREP = /usr/bin/grep HAVE_CHECK_FALSE = HAVE_CHECK_TRUE = # INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s LDFLAGS = -L/usr/local/lib LIBOBJS = ${LIBOBJDIR}arp-bsd$U.o ${LIBOBJDIR}eth-bsd$U.o ${LIBOBJDIR}intf$U.o ${LIBOBJDIR}ip$U.o ${LIBOBJDIR}route-bsd$U.o LIBS = LIBTOOL = $(SHELL) $(top_builddir)/libtool LN_S = ln -s LTLIBOBJS = ${LIBOBJDIR}arp-bsd$U.lo ${LIBOBJDIR}eth-bsd$U.lo ${LIBOBJDIR}intf$U.lo ${LIBOBJDIR}ip$U.lo ${LIBOBJDIR}route-bsd$U.lo MAINT = # MAINTAINER_MODE_FALSE = MAINTAINER_MODE_TRUE = # MAKEINFO = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run makeinfo NMEDIT = @NMEDIT@ OBJEXT = o PACKAGE = libdnet PACKAGE_BUGREPORT = PACKAGE_NAME = PACKAGE_STRING = PACKAGE_TARNAME = PACKAGE_VERSION = PATH_SEPARATOR = : RANLIB = ranlib SED = @SED@ SET_MAKE = SHELL = /bin/sh STRIP = strip VERSION = 1.11 ac_aux_dir = config ac_ct_CC = gcc ac_ct_CXX = g++ ac_ct_F77 = g77 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = include am__leading_dot = @am__leading_dot@ am__quote = am__tar = @am__tar@ am__untar = @am__untar@ bindir = ${exec_prefix}/bin build = i386-unknown-openbsd4.4 build_alias = build_cpu = i386 build_os = openbsd4.4 build_vendor = unknown datadir = ${datarootdir} datarootdir = ${prefix}/share docdir = ${datarootdir}/doc/${PACKAGE} dvidir = ${docdir} exec_prefix = ${prefix} host = i386-unknown-openbsd4.4 host_alias = host_cpu = i386 host_os = openbsd4.4 host_vendor = unknown htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info install_sh = /home/key/IceScan/dnet-exported/config/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale localstatedir = ${prefix}/var mandir = ${datarootdir}/man mkdir_p = @mkdir_p@ oldincludedir = /usr/include pdfdir = ${docdir} prefix = /usr/local program_transform_name = s,x,x, psdir = ${docdir} sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com sysconfdir = ${prefix}/etc target_alias = AUTOMAKE_OPTIONS = foreign no-dependencies AM_CPPFLAGS = -I$(top_srcdir)/include lib_LTLIBRARIES = libdnet.la libdnet_la_SOURCES = addr-util.c addr.c ip-util.c ip6.c libdnet_la_LIBADD = ${LIBOBJDIR}arp-bsd$U.lo ${LIBOBJDIR}eth-bsd$U.lo ${LIBOBJDIR}intf$U.lo ${LIBOBJDIR}ip$U.lo ${LIBOBJDIR}route-bsd$U.lo libdnet_la_LDFLAGS = -version-info 1:1:0 all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: # $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): # $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libdnet.la: $(libdnet_la_OBJECTS) $(libdnet_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libdnet_la_LDFLAGS) $(libdnet_la_OBJECTS) $(libdnet_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .c.o: $(COMPILE) -c $< .c.obj: $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(mkdir_p) $(distdir)/.. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE: ip-util.c --- /* * ip-util.c * * Copyright (c) 2002 Dug Song <du...@mo...> * * $Id: ip-util.c,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #ifdef _WIN32 #include "winconfig.h" #else #include "config.h" #endif #include <errno.h> #include <stdlib.h> #include <string.h> #include "dnet.h" ssize_t ip_add_option(void *buf, size_t len, int proto, const void *optbuf, size_t optlen) { struct ip_hdr *ip; struct tcp_hdr *tcp = NULL; u_char *p; int hl, datalen, padlen; if (proto != IP_PROTO_IP && proto != IP_PROTO_TCP) { errno = EINVAL; return (-1); } ip = (struct ip_hdr *)buf; hl = ip->ip_hl << 2; p = (u_char *)buf + hl; if (proto == IP_PROTO_TCP) { tcp = (struct tcp_hdr *)p; hl = tcp->th_off << 2; p = (u_char *)tcp + hl; } datalen = ntohs(ip->ip_len) - (p - (u_char *)buf); /* Compute padding to next word boundary. */ if ((padlen = 4 - (optlen % 4)) == 4) padlen = 0; /* XXX - IP_HDR_LEN_MAX == TCP_HDR_LEN_MAX */ if (hl + optlen + padlen > IP_HDR_LEN_MAX || ntohs(ip->ip_len) + optlen + padlen > len) { errno = EINVAL; return (-1); } /* XXX - IP_OPT_TYPEONLY() == TCP_OPT_TYPEONLY */ if (IP_OPT_TYPEONLY(((struct ip_opt *)optbuf)->opt_type)) optlen = 1; /* Shift any existing data. */ if (datalen) { memmove(p + optlen + padlen, p, datalen); } /* XXX - IP_OPT_NOP == TCP_OPT_NOP */ if (padlen) { memset(p, IP_OPT_NOP, padlen); p += padlen; } memmove(p, optbuf, optlen); p += optlen; optlen += padlen; if (proto == IP_PROTO_IP) ip->ip_hl = (p - (u_char *)ip) >> 2; else if (proto == IP_PROTO_TCP) tcp->th_off = (p - (u_char *)tcp) >> 2; ip->ip_len = htons(ntohs(ip->ip_len) + optlen); return (optlen); } void ip_checksum(void *buf, size_t len) { struct ip_hdr *ip; int hl, off, sum; if (len < IP_HDR_LEN) return; ip = (struct ip_hdr *)buf; hl = ip->ip_hl << 2; ip->ip_sum = 0; sum = ip_cksum_add(ip, hl, 0); ip->ip_sum = ip_cksum_carry(sum); off = htons(ip->ip_off); if ((off & IP_OFFMASK) != 0 || (off & IP_MF) != 0) return; len -= hl; if (ip->ip_p == IP_PROTO_TCP) { struct tcp_hdr *tcp = (struct tcp_hdr *)((u_char *)ip + hl); if (len >= TCP_HDR_LEN) { tcp->th_sum = 0; sum = ip_cksum_add(tcp, len, 0) + htons(ip->ip_p + len); sum = ip_cksum_add(&ip->ip_src, 8, sum); tcp->th_sum = ip_cksum_carry(sum); } } else if (ip->ip_p == IP_PROTO_UDP) { struct udp_hdr *udp = (struct udp_hdr *)((u_char *)ip + hl); if (len >= UDP_HDR_LEN) { udp->uh_sum = 0; sum = ip_cksum_add(udp, len, 0) + htons(ip->ip_p + len); sum = ip_cksum_add(&ip->ip_src, 8, sum); udp->uh_sum = ip_cksum_carry(sum); if (!udp->uh_sum) udp->uh_sum = 0xffff; /* RFC 768 */ } } else if (ip->ip_p == IP_PROTO_ICMP || ip->ip_p == IP_PROTO_IGMP) { struct icmp_hdr *icmp = (struct icmp_hdr *)((u_char *)ip + hl); if (len >= ICMP_HDR_LEN) { icmp->icmp_cksum = 0; sum = ip_cksum_add(icmp, len, 0); icmp->icmp_cksum = ip_cksum_carry(sum); } } } int ip_cksum_add(const void *buf, size_t len, int cksum) { uint16_t *sp = (uint16_t *)buf; int n, sn; sn = len / 2; n = (sn + 15) / 16; /* XXX - unroll loop using Duff's device. */ switch (sn % 16) { case 0: do { cksum += *sp++; case 15: cksum += *sp++; case 14: cksum += *sp++; case 13: cksum += *sp++; case 12: cksum += *sp++; case 11: cksum += *sp++; case 10: cksum += *sp++; case 9: cksum += *sp++; case 8: cksum += *sp++; case 7: cksum += *sp++; case 6: cksum += *sp++; case 5: cksum += *sp++; case 4: cksum += *sp++; case 3: cksum += *sp++; case 2: cksum += *sp++; case 1: cksum += *sp++; } while (--n > 0); } if (len & 1) cksum += htons(*(u_char *)sp << 8); return (cksum); } --- NEW FILE: eth-snoop.c --- /* * eth-snoop.c * * Copyright (c) 2000 Dug Song <du...@mo...> * * $Id: eth-snoop.c,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #include "config.h" #include <sys/types.h> #include <sys/ioctl.h> #include <sys/socket.h> #include <net/if.h> #include <net/raw.h> #include <assert.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include "dnet.h" struct eth_handle { int fd; struct ifreq ifr; }; eth_t * eth_open(const char *device) { struct sockaddr_raw sr; eth_t *e; int n; if ((e = calloc(1, sizeof(*e))) == NULL) return (NULL); if ((e->fd = socket(PF_RAW, SOCK_RAW, RAWPROTO_SNOOP)) < 0) return (eth_close(e)); memset(&sr, 0, sizeof(sr)); sr.sr_family = AF_RAW; strlcpy(sr.sr_ifname, device, sizeof(sr.sr_ifname)); if (bind(e->fd, (struct sockaddr *)&sr, sizeof(sr)) < 0) return (eth_close(e)); n = 60000; if (setsockopt(e->fd, SOL_SOCKET, SO_SNDBUF, &n, sizeof(n)) < 0) return (eth_close(e)); strlcpy(e->ifr.ifr_name, device, sizeof(e->ifr.ifr_name)); return (e); } int eth_get(eth_t *e, eth_addr_t *ea) { struct addr ha; if (ioctl(e->fd, SIOCGIFADDR, &e->ifr) < 0) return (-1); if (addr_ston(&e->ifr.ifr_addr, &ha) < 0) return (-1); if (ha.addr_type != ADDR_TYPE_ETH) { errno = EINVAL; return (-1); } memcpy(ea, &ha.addr_eth, sizeof(*ea)); return (0); } int eth_set(eth_t *e, const eth_addr_t *ea) { struct addr ha; ha.addr_type = ADDR_TYPE_ETH; ha.addr_bits = ETH_ADDR_BITS; memcpy(&ha.addr_eth, ea, ETH_ADDR_LEN); if (addr_ntos(&ha, &e->ifr.ifr_addr) < 0) return (-1); return (ioctl(e->fd, SIOCSIFADDR, &e->ifr)); } ssize_t eth_send(eth_t *e, const void *buf, size_t len) { return (write(e->fd, buf, len)); } eth_t * eth_close(eth_t *e) { if (e != NULL) { if (e->fd >= 0) close(e->fd); free(e); } return (NULL); } --- NEW FILE: eth-ndd.c --- /* * eth-ndd.c * * Copyright (c) 2001 Dug Song <du...@mo...> * * $Id: eth-ndd.c,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #include "config.h" #include <sys/types.h> #include <sys/socket.h> #include <sys/ndd_var.h> #include <sys/kinfo.h> #include <assert.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "dnet.h" struct eth_handle { char device[16]; int fd; }; eth_t * eth_open(const char *device) { struct sockaddr_ndd_8022 sa; eth_t *e; if ((e = calloc(1, sizeof(*e))) == NULL) return (NULL); if ((e->fd = socket(AF_NDD, SOCK_DGRAM, NDD_PROT_ETHER)) < 0) return (eth_close(e)); sa.sndd_8022_family = AF_NDD; sa.sndd_8022_len = sizeof(sa); sa.sndd_8022_filtertype = NS_ETHERTYPE; sa.sndd_8022_ethertype = ETH_TYPE_IP; sa.sndd_8022_filterlen = sizeof(struct ns_8022); strlcpy(sa.sndd_8022_nddname, device, sizeof(sa.sndd_8022_nddname)); if (bind(e->fd, (struct sockaddr *)&sa, sizeof(sa)) < 0) return (eth_close(e)); if (connect(e->fd, (struct sockaddr *)&sa, sizeof(sa)) < 0) return (eth_close(e)); /* XXX - SO_BROADCAST needed? */ return (e); } ssize_t eth_send(eth_t *e, const void *buf, size_t len) { return (write(e->fd, buf, len)); } eth_t * eth_close(eth_t *e) { if (e != NULL) { if (e->fd >= 0) close(e->fd); free(e); } return (NULL); } int eth_get(eth_t *e, eth_addr_t *ea) { struct kinfo_ndd *nddp; int size; void *end; if ((size = getkerninfo(KINFO_NDD, 0, 0, 0)) == 0) { errno = ENOENT; return (-1); } else if (size < 0) return (-1); if ((nddp = malloc(size)) == NULL) return (-1); if (getkerninfo(KINFO_NDD, nddp, &size, 0) < 0) { free(nddp); return (-1); } for (end = (void *)nddp + size; (void *)nddp < end; nddp++) { if (strcmp(nddp->ndd_alias, e->device) == 0 || strcmp(nddp->ndd_name, e->device) == 0) { memcpy(ea, nddp->ndd_addr, sizeof(*ea)); } } free(nddp); if ((void *)nddp >= end) { errno = ESRCH; return (-1); } return (0); } int eth_set(eth_t *e, const eth_addr_t *ea) { errno = ENOSYS; return (-1); } --- NEW FILE: eth-none.c --- /* * eth-none.c * * Copyright (c) 2000 Dug Song <du...@mo...> * * $Id: eth-none.c,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #include "config.h" #include <sys/types.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include "dnet.h" eth_t * eth_open(const char *device) { errno = ENOSYS; return (NULL); } ssize_t eth_send(eth_t *e, const void *buf, size_t len) { errno = ENOSYS; return (-1); } eth_t * eth_close(eth_t *e) { return (NULL); } int eth_get(eth_t *e, eth_addr_t *ea) { errno = ENOSYS; return (-1); } int eth_set(eth_t *e, const eth_addr_t *ea) { errno = ENOSYS; return (-1); } --- NEW FILE: eth-bsd.c --- /* * eth-bsd.c * * Copyright (c) 2001 Dug Song <du...@mo...> * * $Id: eth-bsd.c,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #include "config.h" #include <sys/param.h> #include <sys/types.h> #include <sys/ioctl.h> #include <sys/socket.h> #include <sys/time.h> #if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_ROUTE_RT_MSGHDR) #include <sys/sysctl.h> #include <net/route.h> #include <net/if_dl.h> #endif #include <net/bpf.h> #include <net/if.h> #include <assert.h> #include <errno.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "dnet.h" struct eth_handle { int fd; char device[16]; }; eth_t * eth_open(const char *device) { struct ifreq ifr; char file[32]; eth_t *e; int i; if ((e = calloc(1, sizeof(*e))) != NULL) { for (i = 0; i < 32; i++) { snprintf(file, sizeof(file), "/dev/bpf%d", i); e->fd = open(file, O_WRONLY); if (e->fd != -1 || errno != EBUSY) break; } if (e->fd < 0) return (eth_close(e)); memset(&ifr, 0, sizeof(ifr)); strlcpy(ifr.ifr_name, device, sizeof(ifr.ifr_name)); if (ioctl(e->fd, BIOCSETIF, (char *)&ifr) < 0) return (eth_close(e)); #ifdef BIOCSHDRCMPLT i = 1; if (ioctl(e->fd, BIOCSHDRCMPLT, &i) < 0) return (eth_close(e)); #endif strlcpy(e->device, device, sizeof(e->device)); } return (e); } ssize_t eth_send(eth_t *e, const void *buf, size_t len) { return (write(e->fd, buf, len)); } eth_t * eth_close(eth_t *e) { if (e != NULL) { if (e->fd >= 0) close(e->fd); free(e); } return (NULL); } #if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_ROUTE_RT_MSGHDR) int eth_get(eth_t *e, eth_addr_t *ea) { struct if_msghdr *ifm; struct sockaddr_dl *sdl; struct addr ha; u_char *p, *buf; size_t len; int mib[] = { CTL_NET, AF_ROUTE, 0, AF_LINK, NET_RT_IFLIST, 0 }; if (sysctl(mib, 6, NULL, &len, NULL, 0) < 0) return (-1); if ((buf = malloc(len)) == NULL) return (-1); if (sysctl(mib, 6, buf, &len, NULL, 0) < 0) { free(buf); return (-1); } for (p = buf; p < buf + len; p += ifm->ifm_msglen) { ifm = (struct if_msghdr *)p; sdl = (struct sockaddr_dl *)(ifm + 1); if (ifm->ifm_type != RTM_IFINFO || (ifm->ifm_addrs & RTA_IFP) == 0) continue; if (sdl->sdl_family != AF_LINK || sdl->sdl_nlen == 0 || memcmp(sdl->sdl_data, e->device, sdl->sdl_nlen) != 0) continue; if (addr_ston((struct sockaddr *)sdl, &ha) == 0) break; } free(buf); if (p >= buf + len) { errno = ESRCH; return (-1); } memcpy(ea, &ha.addr_eth, sizeof(*ea)); return (0); } #else int eth_get(eth_t *e, eth_addr_t *ea) { errno = ENOSYS; return (-1); } #endif #if defined(SIOCSIFLLADDR) int eth_set(eth_t *e, const eth_addr_t *ea) { struct ifreq ifr; struct addr ha; ha.addr_type = ADDR_TYPE_ETH; ha.addr_bits = ETH_ADDR_BITS; memcpy(&ha.addr_eth, ea, ETH_ADDR_LEN); memset(&ifr, 0, sizeof(ifr)); strlcpy(ifr.ifr_name, e->device, sizeof(ifr.ifr_name)); addr_ntos(&ha, &ifr.ifr_addr); return (ioctl(e->fd, SIOCSIFLLADDR, &ifr)); } #else int eth_set(eth_t *e, const eth_addr_t *ea) { errno = ENOSYS; return (-1); } #endif --- NEW FILE: Makefile.am --- ## $Id: Makefile.am,v 1.1 2009/04/14 15:43:35 darkkey Exp $ include $(top_srcdir)/Makefile.am.common lib_LTLIBRARIES = libdnet.la libdnet_la_SOURCES = addr-util.c addr.c ip-util.c ip6.c libdnet_la_LIBADD = @LTLIBOBJS@ libdnet_la_LDFLAGS = -version-info 1:1:0 --- NEW FILE: eth-dlpi.c --- /* * eth-dlpi.c * * Based on Neal Nuckolls' 1992 "How to Use DLPI" paper. * * Copyright (c) 2001 Dug Song <du...@mo...> * * $Id: eth-dlpi.c,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #include "config.h" #include <sys/types.h> #ifdef HAVE_SYS_BUFMOD_H #include <sys/bufmod.h> #endif #ifdef HAVE_SYS_DLPI_H #include <sys/dlpi.h> #elif defined(HAVE_SYS_DLPIHDR_H) #include <sys/dlpihdr.h> #endif #ifdef HAVE_SYS_DLPI_EXT_H #include <sys/dlpi_ext.h> #endif #include <sys/stream.h> #include <assert.h> #include <errno.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stropts.h> #include <unistd.h> #include "dnet.h" #ifndef INFTIM #define INFTIM -1 #endif struct eth_handle { int fd; int sap_len; }; static int dlpi_msg(int fd, union DL_primitives *dlp, int rlen, int flags, int ack, int alen, int size) { struct strbuf ctl; ctl.maxlen = 0; ctl.len = rlen; ctl.buf = (caddr_t)dlp; if (putmsg(fd, &ctl, NULL, flags) < 0) return (-1); ctl.maxlen = size; ctl.len = 0; flags = 0; if (getmsg(fd, &ctl, NULL, &flags) < 0) return (-1); if (dlp->dl_primitive != ack || ctl.len < alen) return (-1); return (0); } #if defined(DLIOCRAW) |... [truncated message content] |
From: Alexander B. <da...@us...> - 2009-04-14 15:43:41
|
Update of /cvsroot/icescan/IceScan/dnet-exported/config In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31421/dnet-exported/config Added Files: acinclude.m4 config.guess config.sub install-sh ltmain.sh missing mkinstalldirs Log Message: Initial libDnet import to repository. --- NEW FILE: mkinstalldirs --- #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman <fri...@pr...> # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case "${1}" in -h | --help | --h* ) # -h for help echo "${usage}" 1>&2; exit 0 ;; -m ) # -m PERM arg shift test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } dirmode="${1}" shift ;; -- ) shift; break ;; # stop option processing -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option * ) break ;; # first non-opt arg esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 3 # End: # mkinstalldirs ends here --- NEW FILE: missing --- #! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pi...@ir...>, 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 --- NEW FILE: config.guess --- #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002 Free Software Foundation, Inc. timestamp='2002-07-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software [...1315 lines suppressed...] /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: --- NEW FILE: config.sub --- #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002 Free Software Foundation, Inc. timestamp='2002-07-03' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [...1421 lines suppressed...] -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: --- NEW FILE: ltmain.sh --- # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit <go...@gn...>, 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software [...6383 lines suppressed...] # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: --- NEW FILE: acinclude.m4 --- dnl dnl Check for 4.4 BSD sa_len member in sockaddr struct dnl dnl usage: AC_DNET_SOCKADDR_SA_LEN dnl results: HAVE_SOCKADDR_SA_LEN (defined) dnl AC_DEFUN(AC_DNET_SOCKADDR_SA_LEN, [AC_MSG_CHECKING(for sa_len in sockaddr struct) AC_CACHE_VAL(ac_cv_dnet_sockaddr_has_sa_len, AC_TRY_COMPILE([ # ifndef _SOCKADDR_LEN # define _SOCKADDR_LEN 1 # endif # include <sys/types.h> # include <sys/socket.h>], [u_int i = sizeof(((struct sockaddr *)0)->sa_len)], ac_cv_dnet_sockaddr_has_sa_len=yes, ac_cv_dnet_sockaddr_has_sa_len=no)) AC_MSG_RESULT($ac_cv_dnet_sockaddr_has_sa_len) if test $ac_cv_dnet_sockaddr_has_sa_len = yes ; then AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if sockaddr struct has sa_len.]) fi]) dnl dnl Check for sockaddr_in6 struct in <netinet/in.h> dnl dnl usage: AC_DNET_SOCKADDR_IN6 dnl results: HAVE_SOCKADDR_IN6 dnl AC_DEFUN(AC_DNET_SOCKADDR_IN6, [AC_MSG_CHECKING(for sockaddr_in6 struct in <netinet/in.h>) AC_CACHE_VAL(ac_cv_dnet_netinet_in_h_has_sockaddr_in6, AC_TRY_COMPILE([ # include <sys/types.h> # include <sys/socket.h> # include <netinet/in.h>], [struct sockaddr_in6 sin6; sin6.sin6_family = AF_INET6;], ac_cv_dnet_netinet_in_h_has_sockaddr_in6=yes, ac_cv_dnet_netinet_in_h_has_sockaddr_in6=no)) AC_MSG_RESULT($ac_cv_dnet_netinet_in_h_has_sockaddr_in6) if test $ac_cv_dnet_netinet_in_h_has_sockaddr_in6 = yes ; then AC_DEFINE(HAVE_SOCKADDR_IN6, 1, [Define if <netinet/in.h> has sockaddr_in6 struct.]) fi]) dnl dnl Check for arp_dev member in arpreq struct dnl dnl usage: AC_DNET_ARPREQ_ARP_DEV dnl results: HAVE_ARPREQ_ARP_DEV (defined) dnl AC_DEFUN(AC_DNET_ARPREQ_ARP_DEV, [AC_MSG_CHECKING(for arp_dev in arpreq struct) AC_CACHE_VAL(ac_cv_dnet_arpreq_has_arp_dev, AC_TRY_COMPILE([ # include <sys/types.h> # include <sys/socket.h> # include <net/if_arp.h>], [void *p = ((struct arpreq *)0)->arp_dev], ac_cv_dnet_arpreq_has_arp_dev=yes, ac_cv_dnet_arpreq_has_arp_dev=no)) AC_MSG_RESULT($ac_cv_dnet_arpreq_has_arp_dev) if test $ac_cv_dnet_arpreq_has_arp_dev = yes ; then AC_DEFINE(HAVE_ARPREQ_ARP_DEV, 1, [Define if arpreq struct has arp_dev.]) fi]) dnl dnl Check for rt_msghdr struct in <net/route.h> dnl dnl usage: AC_DNET_ROUTE_RT_MSGHDR dnl results: HAVE_ROUTE_RT_MSGHDR dnl AC_DEFUN(AC_DNET_ROUTE_RT_MSGHDR, [AC_MSG_CHECKING(for rt_msghdr struct in <net/route.h>) AC_CACHE_VAL(ac_cv_dnet_route_h_has_rt_msghdr, AC_TRY_COMPILE([ # include <sys/types.h> # include <sys/socket.h> # include <net/if.h> # include <net/route.h>], [struct rt_msghdr rtm; rtm.rtm_msglen = 0;], ac_cv_dnet_route_h_has_rt_msghdr=yes, ac_cv_dnet_route_h_has_rt_msghdr=no)) AC_MSG_RESULT($ac_cv_dnet_route_h_has_rt_msghdr) if test $ac_cv_dnet_route_h_has_rt_msghdr = yes ; then AC_DEFINE(HAVE_ROUTE_RT_MSGHDR, 1, [Define if <net/route.h> has rt_msghdr struct.]) fi]) dnl dnl Check for the Berkeley Packet Filter dnl dnl usage: AC_DNET_BSD_BPF dnl results: HAVE_BSD_BPF dnl AC_DEFUN(AC_DNET_BSD_BPF, [AC_MSG_CHECKING(for Berkeley Packet Filter) AC_CACHE_VAL(ac_cv_dnet_bsd_bpf, if test -c /dev/bpf0 ; then ac_cv_dnet_bsd_bpf=yes else ac_cv_dnet_bsd_bpf=no fi) AC_MSG_RESULT($ac_cv_dnet_bsd_bpf) if test $ac_cv_dnet_bsd_bpf = yes ; then AC_DEFINE(HAVE_BSD_BPF, 1, [Define if you have the Berkeley Packet Filter.]) fi]) dnl dnl Check for the Linux /proc filesystem dnl dnl usage: AC_DNET_LINUX_PROCFS dnl results: HAVE_LINUX_PROCFS dnl AC_DEFUN(AC_DNET_LINUX_PROCFS, [AC_MSG_CHECKING(for Linux proc filesystem) AC_CACHE_VAL(ac_cv_dnet_linux_procfs, if test "x`cat /proc/sys/kernel/ostype 2>&-`" = "xLinux" ; then ac_cv_dnet_linux_procfs=yes else ac_cv_dnet_linux_procfs=no fi) AC_MSG_RESULT($ac_cv_dnet_linux_procfs) if test $ac_cv_dnet_linux_procfs = yes ; then AC_DEFINE(HAVE_LINUX_PROCFS, 1, [Define if you have the Linux /proc filesystem.]) fi]) dnl dnl Check for Linux PF_PACKET sockets dnl dnl usage: AC_DNET_LINUX_PF_PACKET dnl results: HAVE_LINUX_PF_PACKET dnl AC_DEFUN(AC_DNET_LINUX_PF_PACKET, [AC_MSG_CHECKING(for Linux PF_PACKET sockets) AC_CACHE_VAL(ac_cv_dnet_linux_pf_packet, if test -f /usr/include/netpacket/packet.h ; then ac_cv_dnet_linux_pf_packet=yes else ac_cv_dnet_linux_pf_packet=no fi) AC_MSG_RESULT($ac_cv_dnet_linux_pf_packet) if test $ac_cv_dnet_linux_pf_packet = yes ; then AC_DEFINE(HAVE_LINUX_PF_PACKET, 1, [Define if you have Linux PF_PACKET sockets.]) fi]) dnl dnl Check for SNMP MIB2 STREAMS (Solaris only?) dnl dnl usage: AC_DNET_STREAMS_MIB2 dnl results: HAVE_STREAMS_MIB2 dnl AC_DEFUN(AC_DNET_STREAMS_MIB2, [AC_MSG_CHECKING(for SNMP MIB2 STREAMS) AC_CACHE_VAL(ac_cv_dnet_streams_mib2, if test -f /usr/include/inet/mib2.h -a -c /dev/ip ; then ac_cv_dnet_streams_mib2=yes else ac_cv_dnet_streams_mib2=no fi) AC_MSG_RESULT($ac_cv_dnet_streams_mib2) if test $ac_cv_dnet_streams_mib2 = yes ; then AC_DEFINE(HAVE_STREAMS_MIB2, 1, [Define if you have SNMP MIB2 STREAMS.]) fi]) dnl dnl Check for route(7) STREAMS (UnixWare only?) dnl dnl usage: AC_DNET_STREAMS_ROUTE dnl results: HAVE_STREAMS_ROUTE dnl AC_DEFUN(AC_DNET_STREAMS_ROUTE, [AC_MSG_CHECKING(for route(7) STREAMS) AC_CACHE_VAL(ac_cv_dnet_streams_route, if grep RTSTR_SEND /usr/include/net/route.h >/dev/null 2>&1 ; then ac_cv_dnet_streams_route=yes else ac_cv_dnet_streams_route=no fi) AC_MSG_RESULT($ac_cv_dnet_streams_route) if test $ac_cv_dnet_streams_route = yes ; then AC_DEFINE(HAVE_STREAMS_ROUTE, 1, [Define if you have route(7) STREAMS.]) fi]) dnl dnl Check for arp(7) ioctls dnl dnl usage: AC_DNET_IOCTL_ARP dnl results: HAVE_IOCTL_ARP dnl AC_DEFUN(AC_DNET_IOCTL_ARP, [AC_MSG_CHECKING(for arp(7) ioctls) AC_CACHE_VAL(ac_cv_dnet_ioctl_arp, AC_EGREP_CPP(werd, [ # include <sys/types.h> # define BSD_COMP # include <sys/ioctl.h> # ifdef SIOCGARP werd # endif], ac_cv_dnet_ioctl_arp=yes, ac_cv_dnet_ioctl_arp=no)) case "$host_os" in irix*) ac_cv_dnet_ioctl_arp=no ;; esac AC_MSG_RESULT($ac_cv_dnet_ioctl_arp) if test $ac_cv_dnet_ioctl_arp = yes ; then AC_DEFINE(HAVE_IOCTL_ARP, 1, [Define if you have arp(7) ioctls.]) fi]) dnl dnl Check for raw IP sockets ip_{len,off} host byte ordering dnl dnl usage: AC_DNET_RAWIP_HOST_OFFLEN dnl results: HAVE_RAWIP_HOST_OFFLEN dnl AC_DEFUN(AC_DNET_RAWIP_HOST_OFFLEN, [AC_MSG_CHECKING([for raw IP sockets ip_{len,off} host byte ordering]) AC_CACHE_VAL(ac_cv_dnet_rawip_host_offlen, [ case "$host_os" in *openbsd*) ac_cv_dnet_rawip_host_offlen=no ;; *bsd*|*osf*|*unixware*) ac_cv_dnet_rawip_host_offlen=yes ;; *) ac_cv_dnet_rawip_host_offlen=no ;; esac]) AC_MSG_RESULT($ac_cv_dnet_rawip_host_offlen) if test $ac_cv_dnet_rawip_host_offlen = yes ; then AC_DEFINE(HAVE_RAWIP_HOST_OFFLEN, 1, [Define if raw IP sockets require host byte ordering for ip_off, ip_len.]) fi]) dnl dnl Check for cooked raw IP sockets dnl dnl usage: AC_DNET_RAWIP_COOKED dnl results: HAVE_RAWIP_COOKED dnl AC_DEFUN(AC_DNET_RAWIP_COOKED, [AC_MSG_CHECKING(for cooked raw IP sockets) AC_CACHE_VAL(ac_cv_dnet_rawip_cooked, [ case "$host_os" in solaris*|irix*) ac_cv_dnet_rawip_cooked=yes ;; *) ac_cv_dnet_rawip_cooked=no ;; esac]) AC_MSG_RESULT($ac_cv_dnet_rawip_cooked) if test $ac_cv_dnet_rawip_cooked = yes ; then AC_DEFINE(HAVE_RAWIP_COOKED, 1, [Define if you have cooked raw IP sockets.]) fi]) dnl dnl AC_LBL_LIBRARY_NET dnl dnl This test is for network applications that need socket() and dnl gethostbyname() -ish functions. Under Solaris, those applications dnl need to link with "-lsocket -lnsl". Under IRIX, they need to link dnl with "-lnsl" but should *not* link with "-lsocket" because dnl libsocket.a breaks a number of things (for instance: dnl gethostbyname() under IRIX 5.2, and snoop sockets under most dnl versions of IRIX). dnl dnl Unfortunately, many application developers are not aware of this, dnl and mistakenly write tests that cause -lsocket to be used under dnl IRIX. It is also easy to write tests that cause -lnsl to be used dnl under operating systems where neither are necessary (or useful), dnl such as SunOS 4.1.4, which uses -lnsl for TLI. dnl dnl This test exists so that every application developer does not test dnl this in a different, and subtly broken fashion. dnl It has been argued that this test should be broken up into two dnl seperate tests, one for the resolver libraries, and one for the dnl libraries necessary for using Sockets API. Unfortunately, the two dnl are carefully intertwined and allowing the autoconf user to use dnl them independantly potentially results in unfortunate ordering dnl dependancies -- as such, such component macros would have to dnl carefully use indirection and be aware if the other components were dnl executed. Since other autoconf macros do not go to this trouble, dnl and almost no applications use sockets without the resolver, this dnl complexity has not been implemented. dnl dnl The check for libresolv is in case you are attempting to link dnl statically and happen to have a libresolv.a lying around (and no dnl libnsl.a). dnl AC_DEFUN(AC_LBL_LIBRARY_NET, [ # Most operating systems have gethostbyname() in the default searched # libraries (i.e. libc): AC_CHECK_FUNC(gethostbyname, , # Some OSes (eg. Solaris) place it in libnsl: AC_CHECK_LIB(nsl, gethostbyname, , # Some strange OSes (SINIX) have it in libsocket: AC_CHECK_LIB(socket, gethostbyname, , # Unfortunately libsocket sometimes depends on libnsl. # AC_CHECK_LIB's API is essentially broken so the # following ugliness is necessary: AC_CHECK_LIB(socket, gethostbyname, LIBS="-lsocket -lnsl $LIBS", AC_CHECK_LIB(resolv, gethostbyname), -lnsl)))) AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket, , AC_CHECK_LIB(socket, socket, LIBS="-lsocket -lnsl $LIBS", , -lnsl))) # DLPI needs putmsg under HPUX so test for -lstr while we're at it AC_CHECK_LIB(str, putmsg) ]) --- NEW FILE: install-sh --- #!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f "$src" ] || [ -d "$src" ] then : else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else : fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else : fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else : fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 |
From: Alexander B. <da...@us...> - 2009-04-14 15:43:41
|
Update of /cvsroot/icescan/IceScan/dnet-exported In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31421/dnet-exported Added Files: ICESCAN-CHANGES INSTALL LICENSE Makefile Makefile.am Makefile.am.common Makefile.in README THANKS TODO acconfig.h aclocal.m4 configure configure.in dnet-config.in dnet-exported.sln dnet-exported.vcproj libtool Log Message: Initial libDnet import to repository. --- NEW FILE: dnet-exported.sln --- (This appears to be a binary file; contents omitted.) --- NEW FILE: acconfig.h --- @BOTTOM@ #include <sys/types.h> #ifdef HAVE_WINSOCK2_H # include <winsock2.h> # include <windows.h> #endif #ifdef __svr4__ # define BSD_COMP 1 #endif #if defined(__osf__) && !defined(_SOCKADDR_LEN) # define _SOCKADDR_LEN 1 #endif #ifndef HAVE_INET_PTON int inet_pton(int, const char *, void *); #endif #ifndef HAVE_STRLCAT int strlcat(char *, const char *, int); #endif #ifndef HAVE_STRLCPY int strlcpy(char *, const char *, int); #endif #ifndef HAVE_STRSEP char *strsep(char **, const char *); #endif --- NEW FILE: Makefile.am.common --- ## $Id: Makefile.am.common,v 1.1 2009/04/14 15:43:35 darkkey Exp $ AUTOMAKE_OPTIONS = foreign no-dependencies AM_CPPFLAGS = -I$(top_srcdir)/include --- NEW FILE: configure --- #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. [...23986 lines suppressed...] # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi --- NEW FILE: LICENSE --- Copyright (c) 2000-2006 Dug Song <du...@mo...> All rights reserved, all wrongs reversed. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of the authors and copyright holders may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- NEW FILE: dnet-config.in --- #!/bin/sh # # $Id: dnet-config.in,v 1.1 2009/04/14 15:43:35 darkkey Exp $ prefix=@prefix@ exec_prefix=@prefix@ usage() { cat <<EOF Usage: dnet-config [OPTIONS] Options: [--version] [--libs] [--cflags] EOF exit $1 } if test $# -eq 0; then usage 1 1>&2 fi while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --version) echo @VERSION@ ;; --cflags) echo_cflags=yes ;; --libs) echo_libs=yes ;; *) usage 1 1>&2 ;; esac shift done if test "$echo_cflags" = "yes"; then echo -I@includedir@ fi if test "$echo_libs" = "yes"; then echo -L@libdir@ -ldnet @LIBS@ fi --- NEW FILE: Makefile.in --- # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/dnet-config.in \ $(top_srcdir)/Makefile.am.common $(top_srcdir)/configure \ INSTALL THANKS TODO acconfig.h config/config.guess \ config/config.sub config/install-sh config/ltmain.sh \ config/missing config/mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = dnet-config am__installdirs = "$(DESTDIR)$(bindir)" binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECKINC = @CHECKINC@ CHECKLIB = @CHECKLIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_CHECK_FALSE = @HAVE_CHECK_FALSE@ HAVE_CHECK_TRUE = @HAVE_CHECK_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_aux_dir = @ac_aux_dir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AUTOMAKE_OPTIONS = foreign no-dependencies AM_CPPFLAGS = -I$(top_srcdir)/include SUBDIRS = include src bin_SCRIPTS = dnet-config EXTRA_DIST = LICENSE Makefile.am.common acconfig.h CLEANFILES = dnet-config AUX_DIST = $(ac_aux_dir)/acinclude.m4 \ $(ac_aux_dir)/config.guess \ $(ac_aux_dir)/config.sub \ $(ac_aux_dir)/install-sh \ $(ac_aux_dir)/ltmain.sh \ $(ac_aux_dir)/missing \ $(ac_aux_dir)/mkinstalldirs all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) dnet-config: $(top_builddir)/config.status $(srcdir)/dnet-config.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/. $(distdir)/config @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(SCRIPTS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-binSCRIPTS install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-libtool clean-recursive \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-libtool distclean-recursive \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE: configure.in --- dnl dnl configure.in dnl dnl Copyright (c) 2000 Dug Song <du...@mo...> dnl dnl $Id: configure.in,v 1.1 2009/04/14 15:43:35 darkkey Exp $ AC_INIT(include/dnet.h) AC_CONFIG_AUX_DIR(config) AC_SUBST(ac_aux_dir) AM_INIT_AUTOMAKE(libdnet, 1.11) AM_CONFIG_HEADER(include/config.h) dnl XXX - stop the insanity!@#$ AM_MAINTAINER_MODE dnl Check for system type. dnl XXX - we do this to qualify our later feature checks, since some dnl systems claim to support multiple features, but are quite b0rked. AC_CANONICAL_HOST dnl XXX - spoof AC_CYGWIN case "$host_os" in *cygwin*) CYGWIN=yes;; *) CYGWIN=no;; esac dnl Initialize prefix. if test "$prefix" = "NONE"; then prefix="/usr/local" fi dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_LIBTOOL_DLOPEN AM_PROG_LIBTOOL dnl XXX - stupid IRIX cpp if test -r /usr/include/sgidefs.h ; then CPPFLAGS="$CPPFLAGS -D__sgi" fi dnl XXX - we need MingW32 under Cygwin for win32 if test "$CYGWIN" = yes ; then if test -d /usr/include/mingw ; then CPPFLAGS="$CPPFLAGS -mno-cygwin" CFLAGS="$CFLAGS -mno-cygwin" AC_DEFINE(WIN32_LEAN_AND_MEAN, 1, [Define for faster code generation.]) AC_CHECK_LIB(ws2_32, main) AC_CHECK_LIB(iphlpapi, main) AC_DEFINE(snprintf, _snprintf, [Use MingW32's internal snprintf]) else AC_MSG_ERROR([need MingW32 package to build under Cygwin]) fi AC_MSG_CHECKING(for WinPcap developer's pack) AC_ARG_WITH(wpdpack, [ --with-wpdpack=DIR use WinPcap developer's pack in DIR], [ AC_MSG_RESULT($withval) if test -f $withval/include/packet32.h -a -f $withval/lib/packet.lib; then owd=`pwd` if cd $withval; then withval=`pwd`; cd $owd; fi CFLAGS="$CFLAGS -I$withval/include" LIBS="$LIBS -L$withval/lib -lpacket" else AC_MSG_ERROR(packet32.h or packet.lib not found in $withval) fi ], [ for dir in ${prefix} ${HOME}/WPdpack ; do if test -f ${dir}/include/packet32.h -a -f ${dir}/lib/packet.lib; then CFLAGS="$CFLAGS -I${dir}/include" LIBS="$LIBS -L${dir}/lib -lpacket" have_pcap=yes break; fi done if test "$have_pcap" != yes; then AC_MSG_ERROR(WinPcap developer's pack not found) fi AC_MSG_RESULT(yes) ]) fi dnl Checks for libraries. if test "$CYGWIN" != yes ; then AC_LBL_LIBRARY_NET AC_CHECK_LIB(nm, open_mib) fi dnl Checks for Check. AC_MSG_CHECKING(for Check) AC_ARG_WITH(check, [ --with-check=DIR use Check (http://check.sf.net) in DIR], [ case "$withval" in yes|no) AC_MSG_RESULT(no) ;; *) AC_MSG_RESULT($withval) if test -f $withval/include/check.h -a -f $withval/lib/libcheck.a; then owd=`pwd` if cd $withval; then withval=`pwd`; cd $owd; fi CHECKINC="-I$withval/include" CHECKLIB="-L$withval/lib -lcheck" elif test -f $withval/src/check.h -a -f $withval/src/libcheck.a; then owd=`pwd` if cd $withval; then withval=`pwd`; cd $owd; fi CHECKINC="-I$withval/src" CHECKLIB="-L$withval/src -lcheck" else AC_ERROR(check.h or libcheck.a not found in $withval) fi ;; esac ], [ if test -f ${prefix}/include/check.h -a -f ${prefix}/lib/libcheck.a; then CHECKINC="-I${prefix}/include" CHECKLIB="-L${prefix}/lib -lcheck" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi ]) AC_SUBST(CHECKINC) AC_SUBST(CHECKLIB) AM_CONDITIONAL(HAVE_CHECK, test "x$CHECKLIB" != "x") dnl Checks for header files. AC_HEADER_STDC if test "$CYGWIN" = yes ; then AC_CHECK_HEADERS(Iphlpapi.h winsock2.h) else AC_CHECK_HEADERS(fcntl.h unistd.h) AC_CHECK_HEADERS(sys/bufmod.h sys/dlpi.h sys/dlpihdr.h sys/dlpi_ext.h \ sys/ioctl.h sys/mib.h sys/ndd_var.h sys/socket.h sys/sockio.h \ sys/sysctl.h sys/time.h) AC_CHECK_HEADERS(net/bpf.h net/if.h net/if_var.h \ net/if_arp.h net/if_dl.h net/pfilt.h \ net/pfvar.h net/radix.h net/raw.h net/route.h netinet/in_var.h \ net/if_tun.h linux/if_tun.h netinet/ip_fw.h linux/ip_fw.h \ linux/ip_fwchains.h linux/netfilter_ipv4/ipchains_core.h) AC_CHECK_HEADERS(ip_fil_compat.h netinet/ip_fil_compat.h ip_compat.h \ netinet/ip_compat.h ip_fil.h netinet/ip_fil.h) AC_CHECK_HEADERS(hpsecurity.h stropts.h) fi dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE AC_TYPE_PID_T AC_TYPE_SIZE_T AC_DNET_SOCKADDR_IN6 if test "$ac_cv_header_sys_socket_h" = yes ; then AC_DNET_SOCKADDR_SA_LEN fi if test "$ac_cv_header_net_if_arp_h" = yes ; then AC_DNET_ARPREQ_ARP_DEV fi if test "$ac_cv_header_net_route_h" = yes ; then AC_DNET_ROUTE_RT_MSGHDR fi AC_PROG_GCC_TRADITIONAL if test "$GCC" = yes ; then CFLAGS="$CFLAGS -Wall" fi dnl Checks for library functions. AC_FUNC_MEMCMP AC_REPLACE_FUNCS(err strlcat strlcpy strsep) dnl Checks for other system-specific jonks. if test "$CYGWIN" != yes ; then AC_DNET_BSD_BPF AC_DNET_LINUX_PROCFS AC_DNET_LINUX_PF_PACKET AC_DNET_STREAMS_MIB2 AC_DNET_STREAMS_ROUTE AC_DNET_IOCTL_ARP AC_DNET_RAWIP_HOST_OFFLEN AC_DNET_RAWIP_COOKED fi dnl Check for arp interface. if test "$ac_cv_header_Iphlpapi_h" = yes ; then AC_LIBOBJ([arp-win32]) elif test "$ac_cv_dnet_ioctl_arp" = yes ; then AC_LIBOBJ([arp-ioctl]) elif test "$ac_cv_dnet_route_h_has_rt_msghdr" = yes ; then AC_LIBOBJ([arp-bsd]) else AC_LIBOBJ([arp-none]) fi dnl Check for Ethernet interface. if test "$ac_cv_header_Iphlpapi_h" = yes ; then AC_LIBOBJ([eth-win32]) elif test "$ac_cv_header_net_pfilt_h" = yes ; then AC_LIBOBJ([eth-pfilt]) elif test "$ac_cv_dnet_bsd_bpf" = yes ; then AC_LIBOBJ([eth-bsd]) elif test "$ac_cv_dnet_linux_pf_packet" = yes ; then AC_LIBOBJ([eth-linux]) elif test "$ac_cv_header_net_raw_h" = yes ; then AC_LIBOBJ([eth-snoop]) elif test "$ac_cv_header_sys_ndd_var_h" = yes ; then AC_LIBOBJ([eth-ndd]) elif test "$ac_cv_header_sys_dlpi_h" = yes || \ test "$ac_cv_header_sys_dlpihdr_h" = yes ; then AC_LIBOBJ([eth-dlpi]) else AC_LIBOBJ([eth-none]) fi dnl Check for network interface interface. if test "$ac_cv_header_Iphlpapi_h" = yes ; then AC_LIBOBJ([intf-win32]) else AC_LIBOBJ([intf]) fi dnl Check for raw IP interface. if test "$ac_cv_header_Iphlpapi_h" = yes ; then AC_LIBOBJ([ip-win32]) elif test "$ac_cv_dnet_rawip_cooked" = yes ; then AC_LIBOBJ([ip-cooked]) else AC_LIBOBJ([ip]) fi dnl Check for routing interface. if test "$ac_cv_header_Iphlpapi_h" = yes ; then AC_LIBOBJ([route-win32]) elif test "$ac_cv_dnet_route_h_has_rt_msghdr" = yes ; then AC_LIBOBJ([route-bsd]) elif test "$ac_cv_dnet_linux_procfs" = yes ; then AC_LIBOBJ([route-linux]) elif test "$ac_cv_header_hpsecurity_h" = yes ; then AC_LIBOBJ([route-hpux]) else AC_LIBOBJ([route-none]) fi AC_OUTPUT([Makefile dnet-config include/Makefile include/dnet/Makefile src/Makefile], [chmod 755 dnet-config]) --- NEW FILE: Makefile --- # Makefile.in generated by automake 1.9.6 from Makefile.am. # Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. srcdir = . top_srcdir = . pkgdatadir = $(datadir)/libdnet pkglibdir = $(libdir)/libdnet pkgincludedir = $(includedir)/libdnet top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = /usr/bin/install -c install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = i386-unknown-openbsd4.4 host_triplet = i386-unknown-openbsd4.4 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/dnet-config.in \ $(top_srcdir)/Makefile.am.common $(top_srcdir)/configure \ INSTALL THANKS TODO acconfig.h config/config.guess \ config/config.sub config/install-sh config/ltmain.sh \ config/missing config/mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = dnet-config am__installdirs = "$(DESTDIR)$(bindir)" binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run aclocal-1.6 AMDEP_FALSE = # AMDEP_TRUE = AMTAR = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run tar AR = ar AUTOCONF = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run autoconf AUTOHEADER = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run autoheader AUTOMAKE = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run automake-1.6 AWK = nawk CC = gcc CCDEPMODE = depmode=none CFLAGS = -I/usr/local/include -Wall CHECKINC = CHECKLIB = CPP = gcc -E CPPFLAGS = CXX = g++ CXXCPP = g++ -E CXXDEPMODE = depmode=none CXXFLAGS = -I/usr/local/include CYGPATH_W = @CYGPATH_W@ DEFS = -DHAVE_CONFIG_H DEPDIR = .deps DSYMUTIL = @DSYMUTIL@ ECHO = /bin/echo ECHO_C = ECHO_N = -n ECHO_T = EGREP = /usr/bin/grep -E EXEEXT = F77 = g77 FFLAGS = -g -O2 GREP = /usr/bin/grep HAVE_CHECK_FALSE = HAVE_CHECK_TRUE = # INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s LDFLAGS = -L/usr/local/lib LIBOBJS = ${LIBOBJDIR}arp-bsd$U.o ${LIBOBJDIR}eth-bsd$U.o ${LIBOBJDIR}intf$U.o ${LIBOBJDIR}ip$U.o ${LIBOBJDIR}route-bsd$U.o LIBS = LIBTOOL = $(SHELL) $(top_builddir)/libtool LN_S = ln -s LTLIBOBJS = ${LIBOBJDIR}arp-bsd$U.lo ${LIBOBJDIR}eth-bsd$U.lo ${LIBOBJDIR}intf$U.lo ${LIBOBJDIR}ip$U.lo ${LIBOBJDIR}route-bsd$U.lo MAINT = # MAINTAINER_MODE_FALSE = MAINTAINER_MODE_TRUE = # MAKEINFO = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run makeinfo NMEDIT = @NMEDIT@ OBJEXT = o PACKAGE = libdnet PACKAGE_BUGREPORT = PACKAGE_NAME = PACKAGE_STRING = PACKAGE_TARNAME = PACKAGE_VERSION = PATH_SEPARATOR = : RANLIB = ranlib SED = @SED@ SET_MAKE = SHELL = /bin/sh STRIP = strip VERSION = 1.11 ac_aux_dir = config ac_ct_CC = gcc ac_ct_CXX = g++ ac_ct_F77 = g77 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = include am__leading_dot = @am__leading_dot@ am__quote = am__tar = @am__tar@ am__untar = @am__untar@ bindir = ${exec_prefix}/bin build = i386-unknown-openbsd4.4 build_alias = build_cpu = i386 build_os = openbsd4.4 build_vendor = unknown datadir = ${datarootdir} datarootdir = ${prefix}/share docdir = ${datarootdir}/doc/${PACKAGE} dvidir = ${docdir} exec_prefix = ${prefix} host = i386-unknown-openbsd4.4 host_alias = host_cpu = i386 host_os = openbsd4.4 host_vendor = unknown htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info install_sh = /home/key/IceScan/dnet-exported/config/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale localstatedir = ${prefix}/var mandir = ${datarootdir}/man mkdir_p = @mkdir_p@ oldincludedir = /usr/include pdfdir = ${docdir} prefix = /usr/local program_transform_name = s,x,x, psdir = ${docdir} sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com sysconfdir = ${prefix}/etc target_alias = AUTOMAKE_OPTIONS = foreign no-dependencies AM_CPPFLAGS = -I$(top_srcdir)/include SUBDIRS = include src bin_SCRIPTS = dnet-config EXTRA_DIST = LICENSE Makefile.am.common acconfig.h CLEANFILES = dnet-config AUX_DIST = $(ac_aux_dir)/acinclude.m4 \ $(ac_aux_dir)/config.guess \ $(ac_aux_dir)/config.sub \ $(ac_aux_dir)/install-sh \ $(ac_aux_dir)/ltmain.sh \ $(ac_aux_dir)/missing \ $(ac_aux_dir)/mkinstalldirs all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: # $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): # $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) dnet-config: $(top_builddir)/config.status $(srcdir)/dnet-config.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/. $(distdir)/config @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(SCRIPTS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-binSCRIPTS install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-libtool clean-recursive \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-libtool distclean-recursive \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE: README --- libdnet ------- libdnet provides a simplified, portable interface to several low-level networking routines, including network address manipulation, kernel arp(4) cache and route(4) table lookup and manipulation, network firewalling, network interface lookup and manipulation, IP tunnelling, and raw IP packet and Ethernet frame transmission. WWW: http://libdnet.sourceforge.net/ $Id: README,v 1.1 2009/04/14 15:43:35 darkkey Exp $ --- NEW FILE: Makefile.am --- ## $Id: Makefile.am,v 1.1 2009/04/14 15:43:35 darkkey Exp $ include $(top_srcdir)/Makefile.am.common SUBDIRS = include src bin_SCRIPTS = dnet-config EXTRA_DIST = LICENSE Makefile.am.common acconfig.h CLEANFILES = dnet-config AUX_DIST = $(ac_aux_dir)/acinclude.m4 \ $(ac_aux_dir)/config.guess \ $(ac_aux_dir)/config.sub \ $(ac_aux_dir)/install-sh \ $(ac_aux_dir)/ltmain.sh \ $(ac_aux_dir)/missing \ $(ac_aux_dir)/mkinstalldirs --- NEW FILE: libtool --- #! /bin/sh # libtoolT - Provide generalized library-building support services. # Generated automatically by (GNU libdnet 1.11) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit <go...@gn...>, 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of [...7324 lines suppressed...] # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" # Set to yes if exported symbols are required. always_export_symbols=no # The commands to list exported symbols. export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds="" # Symbols that should not be listed in the preloaded symbols. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Symbols that must always be exported. include_expsyms="" # ### END LIBTOOL TAG CONFIG: F77 --- NEW FILE: THANKS --- # $Id: THANKS,v 1.1 2009/04/14 15:43:35 darkkey Exp $ many thanks to all the folks who have contributed to libdnet: Thamer Al-Harbash <tm...@wh...> excellent bug reports and fearless beta-testing Marc Bevand <bev...@ep...> RFC 768 UDP zero-checksum fix Michael Coulter <mj...@bi...> OpenBSD pfioc_pooladdr fix, pf rule deletion bug report Michael A. Davis <mi...@da...> win32 code cleanup Scott Dawson <sd...@ar...> interface alias fix Ben Fleis <be...@mo...> constification and code cleanup Mike Frantzen <fra...@w4...> dnet hex test module fix Markus Friedl <ma...@op...> BSD/OS testing and autoconf fixes Tangy Gnat <tan...@ba...> missing queue.h Loren Gorden <lor...@vi...> many thorough, detailed bug reports and fixes Eric Jackson <sh...@mo...> OpenBSD-alpha testing Juan <ju...@fo...> plugged BPF fd leak on failure K2 <k2...@kt...> HP-UX, OSF1, UnixWare, Solaris x86, Slackware, etc. access Kirby Kuehl <kk...@gm...> win32 and OpenBSD updates David Lee <dav...@te...> addr_btos() bugfixes Kuk-hyeon Lee <er...@in...> C++ support fixes Robert Lowe <rob...@la...> Tru64 access, and allowing me to crash his machine Dominic Marks <do...@cu...> FreeBSD 5 ipfw port fixes Jose Nazario <jo...@bi...> IRIX access, and allowing me to crash his machine Nergal <ne...@7b...> TCP sequence number handling fixes Peter C. Norton <sp...@le...> Linux port fixes plaguez <dub...@eu...> for convincing me to write this, and suffering my bad French NN Poster <nnp...@us...> RPM spec file Niels Provos <pr...@mo...> many bugfixes and much encouragement Andrew Reiter <ar...@wa...> help with ipfw braindeath John S <sj...@us...> VPATH build bug report Federico Sacerdoti <fd...@sd...> dotted-quad IPv4 netmask support in addr_pton() Mike Schiffman <mi...@in...> inspiration via libnet Matt Smart <sm...@mo...> caught pastos Matt Sommers <mm...@ar...> BSD/OS testing Mike Stolarchuk <mt...@of...> enlightening discussion of *ntoa optimizations Greg Taleck <ta...@oz...> OpenBSD pf bug reporting Christophe Ternat <chr...@rs...> route-bsd.c fork() bug report xs <xs...@ni...> NetBSD testing --- NEW FILE: INSTALL --- *BSD, MacOS X, Linux -------------------- ./configure && make Solaris, IRIX, BSD/OS, HP-UX, Tru64 ----------------------------------- For firewall support, install Darren Reed's IP Filter package: http://coombs.anu.edu.au/~avalon/ For tunnel support on Solaris, install the Universal TUN/TAP Driver: http://vtun.sourceforge.net/tun/ Unixware, AIX ------------- These ports are incomplete. If anyone can set me up with legitimate root access to these platforms, it would be most appreciated. :-) Windows 2000/XP --------------- For raw Ethernet sending, install the WinPcap driver and DLLs, and extract their developer pack to a build directory: http://winpcap.polito.it/install/default.htm # XXX - unsupported for now # For tunnel interface support, install the OpenVPN "TAP-Win32 Virtual # Ethernet Adapter" component (their Windows installer will let you # install it alone): # # http://openvpn.sourceforge.net/ For firewall support, install HSC's PktFilter service: http://www.hsc.fr/ressources/outils/pktfilter/index.html.en Most Windows developers should just use the libdnet developer's pack (with MinGW and MSVC++ libraries) instead of building it themselves. But for those who really want to know... To build a MinGW native library (under Cygwin+MinGW): ./configure && make To build a Microsoft Visual C++ native library and Python module (again, under Cygwin+MinGW): ./configure cd python && C:/Python23/python.exe setup.py build cd ../src && lib /out:dnet.lib *.obj # $Id: INSTALL,v 1.1 2009/04/14 15:43:35 darkkey Exp $ --- NEW FILE: dnet-exported.vcproj --- <?xml version="1.0" encoding="windows-1251"?> <VisualStudioProject ProjectType="Visual C++" Version="9,00" Name="dnet-exported" ProjectGUID="{C470AEFC-3AF4-48D6-8599-BE53B8D539B4}" RootNamespace="dnetexported" TargetFrameworkVersion="196613" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="$(SolutionDir)$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="4" CharacterSet="2" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDat... [truncated message content] |
From: Alexander B. <da...@us...> - 2009-04-14 15:43:41
|
Update of /cvsroot/icescan/IceScan/dnet-exported/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31421/dnet-exported/include Added Files: Makefile Makefile.am Makefile.in config.h config.h.in dnet.h err.h queue.h stamp-h1 winconfig.h Log Message: Initial libDnet import to repository. --- NEW FILE: config.h --- /* include/config.h. Generated from config.h.in by configure. */ /* include/config.h.in. Generated from configure.in by autoheader. */ /* Define if arpreq struct has arp_dev. */ /* #undef HAVE_ARPREQ_ARP_DEV */ /* Define if you have the Berkeley Packet Filter. */ #define HAVE_BSD_BPF 1 /* Define to 1 if you have the <dlfcn.h> header file. */ #define HAVE_DLFCN_H 1 /* Define to 1 if you have the `err' function. */ #define HAVE_ERR 1 /* Define to 1 if you have the <fcntl.h> header file. */ #define HAVE_FCNTL_H 1 /* Define to 1 if you have the <hpsecurity.h> header file. */ /* #undef HAVE_HPSECURITY_H */ /* Define to 1 if you have the <inttypes.h> header file. */ #define HAVE_INTTYPES_H 1 /* Define if you have arp(7) ioctls. */ /* #undef HAVE_IOCTL_ARP */ /* Define to 1 if you have the <Iphlpapi.h> header file. */ /* #undef HAVE_IPHLPAPI_H */ /* Define to 1 if you have the <ip_compat.h> header file. */ /* #undef HAVE_IP_COMPAT_H */ /* Define to 1 if you have the <ip_fil_compat.h> header file. */ /* #undef HAVE_IP_FIL_COMPAT_H */ /* Define to 1 if you have the <ip_fil.h> header file. */ /* #undef HAVE_IP_FIL_H */ /* Define to 1 if you have the `iphlpapi' library (-liphlpapi). */ /* #undef HAVE_LIBIPHLPAPI */ /* Define to 1 if you have the `nm' library (-lnm). */ /* #undef HAVE_LIBNM */ /* Define to 1 if you have the `nsl' library (-lnsl). */ /* #undef HAVE_LIBNSL */ /* Define to 1 if you have the `resolv' library (-lresolv). */ /* #undef HAVE_LIBRESOLV */ /* Define to 1 if you have the `socket' library (-lsocket). */ /* #undef HAVE_LIBSOCKET */ /* Define to 1 if you have the `str' library (-lstr). */ /* #undef HAVE_LIBSTR */ /* Define to 1 if you have the `ws2_32' library (-lws2_32). */ /* #undef HAVE_LIBWS2_32 */ /* Define to 1 if you have the <linux/if_tun.h> header file. */ /* #undef HAVE_LINUX_IF_TUN_H */ /* Define to 1 if you have the <linux/ip_fwchains.h> header file. */ /* #undef HAVE_LINUX_IP_FWCHAINS_H */ /* Define to 1 if you have the <linux/ip_fw.h> header file. */ /* #undef HAVE_LINUX_IP_FW_H */ /* Define to 1 if you have the <linux/netfilter_ipv4/ipchains_core.h> header file. */ /* #undef HAVE_LINUX_NETFILTER_IPV4_IPCHAINS_CORE_H */ /* Define if you have Linux PF_PACKET sockets. */ /* #undef HAVE_LINUX_PF_PACKET */ /* Define if you have the Linux /proc filesystem. */ /* #undef HAVE_LINUX_PROCFS */ /* Define to 1 if you have the <memory.h> header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the <netinet/in_var.h> header file. */ #define HAVE_NETINET_IN_VAR_H 1 /* Define to 1 if you have the <netinet/ip_compat.h> header file. */ /* #undef HAVE_NETINET_IP_COMPAT_H */ /* Define to 1 if you have the <netinet/ip_fil_compat.h> header file. */ /* #undef HAVE_NETINET_IP_FIL_COMPAT_H */ /* Define to 1 if you have the <netinet/ip_fil.h> header file. */ /* #undef HAVE_NETINET_IP_FIL_H */ /* Define to 1 if you have the <netinet/ip_fw.h> header file. */ /* #undef HAVE_NETINET_IP_FW_H */ /* Define to 1 if you have the <net/bpf.h> header file. */ #define HAVE_NET_BPF_H 1 /* Define to 1 if you have the <net/if_arp.h> header file. */ #define HAVE_NET_IF_ARP_H 1 /* Define to 1 if you have the <net/if_dl.h> header file. */ #define HAVE_NET_IF_DL_H 1 /* Define to 1 if you have the <net/if.h> header file. */ #define HAVE_NET_IF_H 1 /* Define to 1 if you have the <net/if_tun.h> header file. */ #define HAVE_NET_IF_TUN_H 1 /* Define to 1 if you have the <net/if_var.h> header file. */ /* #undef HAVE_NET_IF_VAR_H */ /* Define to 1 if you have the <net/pfilt.h> header file. */ /* #undef HAVE_NET_PFILT_H */ /* Define to 1 if you have the <net/pfvar.h> header file. */ #define HAVE_NET_PFVAR_H 1 /* Define to 1 if you have the <net/radix.h> header file. */ #define HAVE_NET_RADIX_H 1 /* Define to 1 if you have the <net/raw.h> header file. */ /* #undef HAVE_NET_RAW_H */ /* Define to 1 if you have the <net/route.h> header file. */ #define HAVE_NET_ROUTE_H 1 /* Define if you have cooked raw IP sockets. */ /* #undef HAVE_RAWIP_COOKED */ /* Define if raw IP sockets require host byte ordering for ip_off, ip_len. */ /* #undef HAVE_RAWIP_HOST_OFFLEN */ /* Define if <net/route.h> has rt_msghdr struct. */ #define HAVE_ROUTE_RT_MSGHDR 1 /* Define if <netinet/in.h> has sockaddr_in6 struct. */ #define HAVE_SOCKADDR_IN6 1 /* Define if sockaddr struct has sa_len. */ #define HAVE_SOCKADDR_SA_LEN 1 /* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 /* Define if you have SNMP MIB2 STREAMS. */ /* #undef HAVE_STREAMS_MIB2 */ /* Define if you have route(7) STREAMS. */ /* #undef HAVE_STREAMS_ROUTE */ /* Define to 1 if you have the <strings.h> header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strlcat' function. */ #define HAVE_STRLCAT 1 /* Define to 1 if you have the `strlcpy' function. */ #define HAVE_STRLCPY 1 /* Define to 1 if you have the <stropts.h> header file. */ /* #undef HAVE_STROPTS_H */ /* Define to 1 if you have the `strsep' function. */ #define HAVE_STRSEP 1 /* Define to 1 if you have the <sys/bufmod.h> header file. */ /* #undef HAVE_SYS_BUFMOD_H */ /* Define to 1 if you have the <sys/dlpihdr.h> header file. */ /* #undef HAVE_SYS_DLPIHDR_H */ /* Define to 1 if you have the <sys/dlpi_ext.h> header file. */ /* #undef HAVE_SYS_DLPI_EXT_H */ /* Define to 1 if you have the <sys/dlpi.h> header file. */ /* #undef HAVE_SYS_DLPI_H */ /* Define to 1 if you have the <sys/ioctl.h> header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the <sys/mib.h> header file. */ /* #undef HAVE_SYS_MIB_H */ /* Define to 1 if you have the <sys/ndd_var.h> header file. */ /* #undef HAVE_SYS_NDD_VAR_H */ /* Define to 1 if you have the <sys/socket.h> header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define to 1 if you have the <sys/sockio.h> header file. */ #define HAVE_SYS_SOCKIO_H 1 /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/sysctl.h> header file. */ #define HAVE_SYS_SYSCTL_H 1 /* Define to 1 if you have the <sys/time.h> header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the <winsock2.h> header file. */ /* #undef HAVE_WINSOCK2_H */ /* Name of package */ #define PACKAGE "libdnet" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ #define PACKAGE_NAME "" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "" /* Define to the version of this package. */ #define PACKAGE_VERSION "" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ #define VERSION "1.11" /* Define for faster code generation. */ /* #undef WIN32_LEAN_AND_MEAN */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* #undef inline */ #endif /* Define to `int' if <sys/types.h> does not define. */ /* #undef pid_t */ /* Define to `unsigned' if <sys/types.h> does not define. */ /* #undef size_t */ /* Use MingW32's internal snprintf */ /* #undef snprintf */ #include <sys/types.h> #ifdef HAVE_WINSOCK2_H # include <winsock2.h> # include <windows.h> #endif #ifdef __svr4__ # define BSD_COMP 1 #endif #if defined(__osf__) && !defined(_SOCKADDR_LEN) # define _SOCKADDR_LEN 1 #endif #ifndef HAVE_INET_PTON int inet_pton(int, const char *, void *); #endif #ifndef HAVE_STRLCAT int strlcat(char *, const char *, int); #endif #ifndef HAVE_STRLCPY int strlcpy(char *, const char *, int); #endif #ifndef HAVE_STRSEP char *strsep(char **, const char *); #endif --- NEW FILE: config.h.in --- /* include/config.h.in. Generated from configure.in by autoheader. */ /* Define if arpreq struct has arp_dev. */ #undef HAVE_ARPREQ_ARP_DEV /* Define if you have the Berkeley Packet Filter. */ #undef HAVE_BSD_BPF /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `err' function. */ #undef HAVE_ERR /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the <hpsecurity.h> header file. */ #undef HAVE_HPSECURITY_H /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H /* Define if you have arp(7) ioctls. */ #undef HAVE_IOCTL_ARP /* Define to 1 if you have the <Iphlpapi.h> header file. */ #undef HAVE_IPHLPAPI_H /* Define to 1 if you have the <ip_compat.h> header file. */ #undef HAVE_IP_COMPAT_H /* Define to 1 if you have the <ip_fil_compat.h> header file. */ #undef HAVE_IP_FIL_COMPAT_H /* Define to 1 if you have the <ip_fil.h> header file. */ #undef HAVE_IP_FIL_H /* Define to 1 if you have the `iphlpapi' library (-liphlpapi). */ #undef HAVE_LIBIPHLPAPI /* Define to 1 if you have the `nm' library (-lnm). */ #undef HAVE_LIBNM /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `resolv' library (-lresolv). */ #undef HAVE_LIBRESOLV /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the `str' library (-lstr). */ #undef HAVE_LIBSTR /* Define to 1 if you have the `ws2_32' library (-lws2_32). */ #undef HAVE_LIBWS2_32 /* Define to 1 if you have the <linux/if_tun.h> header file. */ #undef HAVE_LINUX_IF_TUN_H /* Define to 1 if you have the <linux/ip_fwchains.h> header file. */ #undef HAVE_LINUX_IP_FWCHAINS_H /* Define to 1 if you have the <linux/ip_fw.h> header file. */ #undef HAVE_LINUX_IP_FW_H /* Define to 1 if you have the <linux/netfilter_ipv4/ipchains_core.h> header file. */ #undef HAVE_LINUX_NETFILTER_IPV4_IPCHAINS_CORE_H /* Define if you have Linux PF_PACKET sockets. */ #undef HAVE_LINUX_PF_PACKET /* Define if you have the Linux /proc filesystem. */ #undef HAVE_LINUX_PROCFS /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the <netinet/in_var.h> header file. */ #undef HAVE_NETINET_IN_VAR_H /* Define to 1 if you have the <netinet/ip_compat.h> header file. */ #undef HAVE_NETINET_IP_COMPAT_H /* Define to 1 if you have the <netinet/ip_fil_compat.h> header file. */ #undef HAVE_NETINET_IP_FIL_COMPAT_H /* Define to 1 if you have the <netinet/ip_fil.h> header file. */ #undef HAVE_NETINET_IP_FIL_H /* Define to 1 if you have the <netinet/ip_fw.h> header file. */ #undef HAVE_NETINET_IP_FW_H /* Define to 1 if you have the <net/bpf.h> header file. */ #undef HAVE_NET_BPF_H /* Define to 1 if you have the <net/if_arp.h> header file. */ #undef HAVE_NET_IF_ARP_H /* Define to 1 if you have the <net/if_dl.h> header file. */ #undef HAVE_NET_IF_DL_H /* Define to 1 if you have the <net/if.h> header file. */ #undef HAVE_NET_IF_H /* Define to 1 if you have the <net/if_tun.h> header file. */ #undef HAVE_NET_IF_TUN_H /* Define to 1 if you have the <net/if_var.h> header file. */ #undef HAVE_NET_IF_VAR_H /* Define to 1 if you have the <net/pfilt.h> header file. */ #undef HAVE_NET_PFILT_H /* Define to 1 if you have the <net/pfvar.h> header file. */ #undef HAVE_NET_PFVAR_H /* Define to 1 if you have the <net/radix.h> header file. */ #undef HAVE_NET_RADIX_H /* Define to 1 if you have the <net/raw.h> header file. */ #undef HAVE_NET_RAW_H /* Define to 1 if you have the <net/route.h> header file. */ #undef HAVE_NET_ROUTE_H /* Define if you have cooked raw IP sockets. */ #undef HAVE_RAWIP_COOKED /* Define if raw IP sockets require host byte ordering for ip_off, ip_len. */ #undef HAVE_RAWIP_HOST_OFFLEN /* Define if <net/route.h> has rt_msghdr struct. */ #undef HAVE_ROUTE_RT_MSGHDR /* Define if <netinet/in.h> has sockaddr_in6 struct. */ #undef HAVE_SOCKADDR_IN6 /* Define if sockaddr struct has sa_len. */ #undef HAVE_SOCKADDR_SA_LEN /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H /* Define if you have SNMP MIB2 STREAMS. */ #undef HAVE_STREAMS_MIB2 /* Define if you have route(7) STREAMS. */ #undef HAVE_STREAMS_ROUTE /* Define to 1 if you have the <strings.h> header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strlcat' function. */ #undef HAVE_STRLCAT /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY /* Define to 1 if you have the <stropts.h> header file. */ #undef HAVE_STROPTS_H /* Define to 1 if you have the `strsep' function. */ #undef HAVE_STRSEP /* Define to 1 if you have the <sys/bufmod.h> header file. */ #undef HAVE_SYS_BUFMOD_H /* Define to 1 if you have the <sys/dlpihdr.h> header file. */ #undef HAVE_SYS_DLPIHDR_H /* Define to 1 if you have the <sys/dlpi_ext.h> header file. */ #undef HAVE_SYS_DLPI_EXT_H /* Define to 1 if you have the <sys/dlpi.h> header file. */ #undef HAVE_SYS_DLPI_H /* Define to 1 if you have the <sys/ioctl.h> header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the <sys/mib.h> header file. */ #undef HAVE_SYS_MIB_H /* Define to 1 if you have the <sys/ndd_var.h> header file. */ #undef HAVE_SYS_NDD_VAR_H /* Define to 1 if you have the <sys/socket.h> header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the <sys/sockio.h> header file. */ #undef HAVE_SYS_SOCKIO_H /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the <sys/sysctl.h> header file. */ #undef HAVE_SYS_SYSCTL_H /* Define to 1 if you have the <sys/time.h> header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the <winsock2.h> header file. */ #undef HAVE_WINSOCK2_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define for faster code generation. */ #undef WIN32_LEAN_AND_MEAN /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to `int' if <sys/types.h> does not define. */ #undef pid_t /* Define to `unsigned' if <sys/types.h> does not define. */ #undef size_t /* Use MingW32's internal snprintf */ #undef snprintf #include <sys/types.h> #ifdef HAVE_WINSOCK2_H # include <winsock2.h> # include <windows.h> #endif #ifdef __svr4__ # define BSD_COMP 1 #endif #if defined(__osf__) && !defined(_SOCKADDR_LEN) # define _SOCKADDR_LEN 1 #endif #ifndef HAVE_INET_PTON int inet_pton(int, const char *, void *); #endif #ifndef HAVE_STRLCAT int strlcat(char *, const char *, int); #endif #ifndef HAVE_STRLCPY int strlcpy(char *, const char *, int); #endif #ifndef HAVE_STRSEP char *strsep(char **, const char *); #endif --- NEW FILE: dnet.h --- /* * dnet.h * * Copyright (c) 2001 Dug Song <du...@mo...> * * $Id: dnet.h,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #ifndef DNET_H #define DNET_H #include "dnet/os.h" #include "dnet/eth.h" #include "dnet/ip.h" #include "dnet/ip6.h" #include "dnet/addr.h" #include "dnet/arp.h" #include "dnet/icmp.h" #include "dnet/tcp.h" #include "dnet/udp.h" #include "dnet/intf.h" #include "dnet/route.h" #endif /* DNET_H */ --- NEW FILE: Makefile.in --- # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/Makefile.am.common subdir = include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(includedir)" includeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECKINC = @CHECKINC@ CHECKLIB = @CHECKLIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_CHECK_FALSE = @HAVE_CHECK_FALSE@ HAVE_CHECK_TRUE = @HAVE_CHECK_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_aux_dir = @ac_aux_dir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AUTOMAKE_OPTIONS = foreign no-dependencies AM_CPPFLAGS = -I$(top_srcdir)/include include_HEADERS = dnet.h SUBDIRS = dnet EXTRA_DIST = err.h queue.h all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status include/config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(top_srcdir)/acconfig.h cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ rm -f "$(DESTDIR)$(includedir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(mkdir_p) $(distdir)/.. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(HEADERS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-includeHEADERS install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-includeHEADERS uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-hdr \ distclean-libtool distclean-recursive distclean-tags distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-includeHEADERS install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-includeHEADERS \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE: Makefile --- # Makefile.in generated by automake 1.9.6 from Makefile.am. # include/Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. srcdir = . top_srcdir = .. pkgdatadir = $(datadir)/libdnet pkglibdir = $(libdir)/libdnet pkgincludedir = $(includedir)/libdnet top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = /usr/bin/install -c install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = i386-unknown-openbsd4.4 host_triplet = i386-unknown-openbsd4.4 DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/Makefile.am.common subdir = include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(includedir)" includeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run aclocal-1.6 AMDEP_FALSE = # AMDEP_TRUE = AMTAR = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run tar AR = ar AUTOCONF = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run autoconf AUTOHEADER = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run autoheader AUTOMAKE = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run automake-1.6 AWK = nawk CC = gcc CCDEPMODE = depmode=none CFLAGS = -I/usr/local/include -Wall CHECKINC = CHECKLIB = CPP = gcc -E CPPFLAGS = CXX = g++ CXXCPP = g++ -E CXXDEPMODE = depmode=none CXXFLAGS = -I/usr/local/include CYGPATH_W = @CYGPATH_W@ DEFS = -DHAVE_CONFIG_H DEPDIR = .deps DSYMUTIL = @DSYMUTIL@ ECHO = /bin/echo ECHO_C = ECHO_N = -n ECHO_T = EGREP = /usr/bin/grep -E EXEEXT = F77 = g77 FFLAGS = -g -O2 GREP = /usr/bin/grep HAVE_CHECK_FALSE = HAVE_CHECK_TRUE = # INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s LDFLAGS = -L/usr/local/lib LIBOBJS = ${LIBOBJDIR}arp-bsd$U.o ${LIBOBJDIR}eth-bsd$U.o ${LIBOBJDIR}intf$U.o ${LIBOBJDIR}ip$U.o ${LIBOBJDIR}route-bsd$U.o LIBS = LIBTOOL = $(SHELL) $(top_builddir)/libtool LN_S = ln -s LTLIBOBJS = ${LIBOBJDIR}arp-bsd$U.lo ${LIBOBJDIR}eth-bsd$U.lo ${LIBOBJDIR}intf$U.lo ${LIBOBJDIR}ip$U.lo ${LIBOBJDIR}route-bsd$U.lo MAINT = # MAINTAINER_MODE_FALSE = MAINTAINER_MODE_TRUE = # MAKEINFO = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run makeinfo NMEDIT = @NMEDIT@ OBJEXT = o PACKAGE = libdnet PACKAGE_BUGREPORT = PACKAGE_NAME = PACKAGE_STRING = PACKAGE_TARNAME = PACKAGE_VERSION = PATH_SEPARATOR = : RANLIB = ranlib SED = @SED@ SET_MAKE = SHELL = /bin/sh STRIP = strip VERSION = 1.11 ac_aux_dir = config ac_ct_CC = gcc ac_ct_CXX = g++ ac_ct_F77 = g77 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = include am__leading_dot = @am__leading_dot@ am__quote = am__tar = @am__tar@ am__untar = @am__untar@ bindir = ${exec_prefix}/bin build = i386-unknown-openbsd4.4 build_alias = build_cpu = i386 build_os = openbsd4.4 build_vendor = unknown datadir = ${datarootdir} datarootdir = ${prefix}/share docdir = ${datarootdir}/doc/${PACKAGE} dvidir = ${docdir} exec_prefix = ${prefix} host = i386-unknown-openbsd4.4 host_alias = host_cpu = i386 host_os = openbsd4.4 host_vendor = unknown htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info install_sh = /home/key/IceScan/dnet-exported/config/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale localstatedir = ${prefix}/var mandir = ${datarootdir}/man mkdir_p = @mkdir_p@ oldincludedir = /usr/include pdfdir = ${docdir} prefix = /usr/local program_transform_name = s,x,x, psdir = ${docdir} sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com sysconfdir = ${prefix}/etc target_alias = AUTOMAKE_OPTIONS = foreign no-dependencies AM_CPPFLAGS = -I$(top_srcdir)/include include_HEADERS = dnet.h SUBDIRS = dnet EXTRA_DIST = err.h queue.h all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: $(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: # $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): # $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status include/config.h $(srcdir)/config.h.in: # $(am__configure_deps) $(top_srcdir)/acconfig.h cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ rm -f "$(DESTDIR)$(includedir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(mkdir_p) $(distdir)/.. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(HEADERS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-includeHEADERS install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-includeHEADERS uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-hdr \ distclean-libtool distclean-recursive distclean-tags distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-includeHEADERS install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-includeHEADERS \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE: err.h --- /* * err.h * * Adapted from OpenBSD libc *err* *warn* code. * * Copyright (c) 2000 Dug Song <du...@mo...> * * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)err.h 8.1 (Berkeley) 6/2/93 */ #ifndef _ERR_H_ #define _ERR_H_ void err(int eval, const char *fmt, ...); void warn(const char *fmt, ...); void errx(int eval, const char *fmt, ...); void warnx(const char *fmt, ...); #endif /* !_ERR_H_ */ --- NEW FILE: winconfig.h --- /* include/winconfig.h -- Windows configuration produced from config.h. */ /* Define if arpreq struct has arp_dev. */ #define HAVE_ARPREQ_ARP_DEV 1 /* Define if you have the <dlfcn.h> header file. */ #define HAVE_DLFCN_H 1 /* Define if you have the `err' function. */ #define HAVE_ERR 1 /* Define if you have the <fcntl.h> header file. */ #define HAVE_FCNTL_H 1 /* Define if you have the <inttypes.h> header file. */ #define HAVE_INTTYPES_H 1 /* Define if you have arp(7) ioctls. */ #define HAVE_IOCTL_ARP 1 /* Define if you have the <linux/if_tun.h> header file. */ #define HAVE_LINUX_IF_TUN_H 1 /* Define if you have the <linux/netfilter_ipv4/ipchains_core.h> header file. */ #define HAVE_LINUX_NETFILTER_IPV4_IPCHAINS_CORE_H 1 /* Define if you have Linux PF_PACKET sockets. */ #define HAVE_LINUX_PF_PACKET 1 /* Define if you have the Linux /proc filesystem. */ #define HAVE_LINUX_PROCFS 1 /* Define if you have the <memory.h> header file. */ #define HAVE_MEMORY_H 1 /* Define if you have the <net/if_arp.h> header file. */ #define HAVE_NET_IF_ARP_H 1 /* Define if you have the <net/route.h> header file. */ #define HAVE_NET_ROUTE_H 1 /* Define if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 /* Define if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 /* Define if you have the <strings.h> header file. */ #define HAVE_STRINGS_H 1 /* Define if you have the <string.h> header file. */ #define HAVE_STRING_H 1 /* Define if you have the <stropts.h> header file. */ #define HAVE_STROPTS_H 1 /* Define if you have the `strsep' function. */ #define HAVE_STRSEP 1 /* Define if you have the <sys/ioctl.h> header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define if you have the <sys/socket.h> header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 /* Define if you have the <sys/sysctl.h> header file. */ #define HAVE_SYS_SYSCTL_H 1 /* Define if you have the <sys/time.h> header file. */ #define HAVE_SYS_TIME_H 1 /* Define if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* Define if you have the <winsock2.h> header file. */ #define HAVE_WINSOCK2_H /* Name of package */ #define PACKAGE "libdnet" /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ #define VERSION "1.10" /* Define for faster code generation. */ #define WIN32_LEAN_AND_MEAN #include <sys/types.h> #ifdef HAVE_WINSOCK2_H # include <winsock2.h> # include <windows.h> #endif #ifdef __svr4__ # define BSD_COMP 1 #endif #if defined(__osf__) && !defined(_SOCKADDR_LEN) # define _SOCKADDR_LEN 1 #endif #ifndef HAVE_STRLCAT int strlcat(char *, const char *, int); #endif #ifndef HAVE_STRLCPY int strlcpy(char *, const char *, int); #endif #ifndef HAVE_STRSEP char *strsep(char **, const char *); #endif // remove ugly warnings... #define _CRT_SECURE_NO_DEPRECATE 1 --- NEW FILE: Makefile.am --- ## $Id: Makefile.am,v 1.1 2009/04/14 15:43:35 darkkey Exp $ include $(top_srcdir)/Makefile.am.common include_HEADERS = dnet.h SUBDIRS = dnet EXTRA_DIST = err.h queue.h --- NEW FILE: stamp-h1 --- timestamp for include/config.h --- NEW FILE: queue.h --- /* $OpenBSD: queue.h,v 1.22 2001/06/23 04:39:35 angelos Exp $ */ /* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ #ifndef _SYS_QUEUE_H_ #define _SYS_QUEUE_H_ /* * This file defines five types of data structures: singly-linked lists, * lists, simple queues, tail queues, and circular queues. * * * A singly-linked list is headed by a single forward pointer. The elements * are singly linked for minimum space and pointer manipulation overhead at * the expense of O(n) removal for arbitrary elements. New elements can be * added to the list after an existing element or at the head of the list. * Elements being removed from the head of the list should use the explicit * macro for this purpose for optimum efficiency. A singly-linked list may * only be traversed in the forward direction. Singly-linked lists are ideal * for applications with large datasets and few or no removals or for * implementing a LIFO queue. * * A list is headed by a single forward pointer (or an array of forward * pointers for a hash table header). The elements are doubly linked * so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before * or after an existing element or at the head of the list. A list * may only be traversed in the forward direction. * * A simple queue is headed by a pair of pointers, one the head of the * list and the other to the tail of the list. The elements are singly * linked to save space, so elements can only be removed from the * head of the list. New elements can be added to the list before or after * an existing element, at the head of the list, or at the end of the * list. A simple queue may only be traversed in the forward direction. * * A tail queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or * after an existing element, at the head of the list, or at the end of * the list. A tail queue may be traversed in either direction. * * A circle queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or after * an existing element, at the head of the list, or at the end of the list. * A circle queue may be traversed in either direction, but has a more * complex end of list detection. * * For details on the use of these macros, see the queue(3) manual page. */ /* * Singly-linked List definitions. */ #define SLIST_HEAD(name, type) \ struct name { \ struct type *slh_first; /* first element */ \ } #define SLIST_HEAD_INITIALIZER(head) \ { NULL } #define SLIST_ENTRY(type) \ struct { \ struct type *sle_next; /* next element */ \ } /* * Singly-linked List access methods. */ #define SLIST_FIRST(head) ((head)->slh_first) #define SLIST_END(head) NULL #define SLIST_EMPTY(head) (SLIST_FIRST(head) == SLIST_END(head)) #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) #define SLIST_FOREACH(var, head, field) \ for((var) = SLIST... [truncated message content] |
From: Alexander B. <da...@us...> - 2009-04-14 15:43:41
|
Update of /cvsroot/icescan/IceScan In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31421 Modified Files: Makefile.am config.h.in configure.ac icescan.1 icescan.html Log Message: Initial libDnet import to repository. Index: icescan.1 =================================================================== RCS file: /cvsroot/icescan/IceScan/icescan.1,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** icescan.1 7 Apr 2009 13:39:55 -0000 1.11 --- icescan.1 14 Apr 2009 15:43:35 -0000 1.12 *************** *** 6,9 **** --- 6,11 ---- .nh + .do mso www.tmac + .ad l *************** *** 14,18 **** .B \fBicescan\fR [\fIscan_type\fR] [\fIoptions\fR] <\fItarget\fR> .SH DESCRIPTION ! \fBIceScan\fR is an open source tool (GPL licenced) for network audit and exploraion. You can find that IceScan in some options and features very close to Nmap (\fIhttp://www.insecure.org/nmap/\fR) and that's the true. IceScan was written for educational purposes, but even now have some features, that doesn't exists in other \fIfree\fR network auditing tools, so you may find it useful in process of security auditing your network(s). .PP Either as Nmap, main result provided by IceScan is ports table. It consist of three columns: port number/protocol, port state and service. Port can have different states: open, closed, filtered (filt), open|filtered (o|f) and unfiltered (unfilt). Open port means that there's an application on target, listening for connections/datagrams on this port. Filtered port is a port blocked by firewall. Closed ports have no applications listening on them, but access isn't blocked by firewall. Unfiltered port isn't blocked by firewall and may be opened or closed. And at last, open|filtered port means that port isn't closed and IceScan can't determine which state is has: opened or filtered. The service column provide some information about application that running or can be run on this port. This information may include supposed protocol or application name and version. --- 16,22 ---- .B \fBicescan\fR [\fIscan_type\fR] [\fIoptions\fR] <\fItarget\fR> .SH DESCRIPTION ! \fBIceScan\fR is an open source tool (GPL licenced) for network audit and exploraion. You can find that IceScan in some options and features very close to ! .URL http://www.insecure.org/nmap/ "Nmap" ! and that's the true. IceScan was written for educational purposes, but even now have some features, that doesn't exists in other \fIfree\fR network auditing tools, so you may find it useful in process of security auditing your network(s). .PP Either as Nmap, main result provided by IceScan is ports table. It consist of three columns: port number/protocol, port state and service. Port can have different states: open, closed, filtered (filt), open|filtered (o|f) and unfiltered (unfilt). Open port means that there's an application on target, listening for connections/datagrams on this port. Filtered port is a port blocked by firewall. Closed ports have no applications listening on them, but access isn't blocked by firewall. Unfiltered port isn't blocked by firewall and may be opened or closed. And at last, open|filtered port means that port isn't closed and IceScan can't determine which state is has: opened or filtered. The service column provide some information about application that running or can be run on this port. This information may include supposed protocol or application name and version. *************** *** 22,28 **** IceScan can work in two modes: active (nmap-like mode) and passive. In active mode, it acts as standart port scanner. In passive mode, IceScan do not send any packets, instead of this, it listens for incoming packets and try to create "map" of the network. Two modes can be combined: passive discovery with following active scanning. .PP ! Also see \fIREADME\fR and \fIINSTALL\fR for more on using/installing IceScan and \fINEWS\fR for information about IceScan news. .PP ! You can get the newest version of IceScan from: \fIhttp://sf.net/projects/IceScan\fR, or, from CVS: pserver:ano...@ic...:/cvsroot/icescan, module name is IceScan. .SH OPTIONS SUMMARY --- 26,38 ---- IceScan can work in two modes: active (nmap-like mode) and passive. In active mode, it acts as standart port scanner. In passive mode, IceScan do not send any packets, instead of this, it listens for incoming packets and try to create "map" of the network. Two modes can be combined: passive discovery with following active scanning. .PP ! Also see ! .URL README README ! and ! .URL INSTALL INSTALL ! for more on using/installing IceScan and \fINEWS\fR for information about IceScan news. .PP ! You can download the newest version of IceScan from ! .URL http://sf.net/projects/IceScan "homepage" ! , or, from CVS: pserver:ano...@ic...:/cvsroot/icescan, module name is IceScan. .SH OPTIONS SUMMARY *************** *** 462,466 **** .SH BUGS .PP ! IceScan is still under constant development, so it is possible that you will encounter a bug while using it. Please report bugs to <icescan-devs(at)lists.sourceforge.net>. \%(\fIhttp://lists.sf.net/mailman/listinfo/icescan-devs\fR) .PP Be sure you tell us: --- 472,478 ---- .SH BUGS .PP ! IceScan is still under constant development, so it is possible that you will encounter a bug while using it. Please report bugs to <icescan-devs(at)lists.sourceforge.net>. \%( ! .URL "subscribe" http://lists.sf.net/mailman/listinfo/icescan-devs ! ) .PP Be sure you tell us: *************** *** 498,522 **** Also, big work for bringing IceScan to life was done by Konstantin Karpov[\fIQ_\fR] <q_(at)peterstar.ru> ! See \fIAUTHORS\fR for more details and names of people who made contributions to IceScan or whos code/algorithms/etc implemented in IceScan. .SH REFERENCES ! .TP 4 ! 1.\ Libpcap portable packet capture library ! \%http://www.tcpdump.org ! .TP 4 ! 2.\ WinPcap library ! \%http://www.winpcap.org ! .TP 4 ! 3.\ PCRE library ! \%http://www.pcre.org ! .TP 4 ! 4.\ Libdnet ! \%http://libdnet.sourceforge.net ! .TP 4 ! 5.\ arp-scan ! \%http://www.nta-monitor.com/tools/arp-scan/ ! .TP 4 ! 6.\ p0f ! \%http://lcamtuf.coredump.cx/p0f.shtml --- 510,546 ---- Also, big work for bringing IceScan to life was done by Konstantin Karpov[\fIQ_\fR] <q_(at)peterstar.ru> ! See ! .URL AUTHORS AUTHORS ! for more details and names of people who made contributions to IceScan or whos code/algorithms/etc implemented in IceScan. ! ! ! .SH MAILING LISTS ! <icescan-cvs(at)lists.sourceforge.net> -- IceScan CVS History. Here you can see latest CVS patches and monitor development process of IceScan. ! .PP ! <icescan-devs(at)lists.sourceforge.net> -- IceScan Developers and Users list. Write here, if you want to propose a patch, report about wanted feature, or simply ask developers about IceScan work. Also, send bugs here, if you find any. ! .PP ! You can subscribe at ! .URL http://sourceforge.net/mail/?group_id=185109 "mailing lists page". ! .SH REFERENCES ! .PP ! 1. ! .URL http://www.tcpdump.org "Libpcap portable packet capture library" ! .PP ! 2. ! .URL http://www.winpcap.org "WinPcap library" ! .PP ! 3. ! .URL http://www.pcre.org "PCRE library" ! .PP ! 4. ! .URL http://libdnet.sourceforge.net "Libdnet" ! .PP ! 5. ! .URL http://www.nta-monitor.com/tools/arp-scan/ "arp-scan" ! .PP ! 6. ! .URL http://lcamtuf.coredump.cx/p0f.shtml "p0f" *************** *** 531,533 **** You should use this software only for LEGAL purposes. .PP ! See \fICOPYING\fR for more details. --- 555,559 ---- You should use this software only for LEGAL purposes. .PP ! See ! .URL COPYING COPYING ! for more details. Index: configure.ac =================================================================== RCS file: /cvsroot/icescan/IceScan/configure.ac,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** configure.ac 7 Apr 2009 13:39:55 -0000 1.12 --- configure.ac 14 Apr 2009 15:43:35 -0000 1.13 *************** *** 26,31 **** AC_PROG_CC ! CXXFLAGS = "$CXXFLAGS" ! LDFLAGS = "$LDFLAGS" case "$host" in --- 26,32 ---- AC_PROG_CC ! ! #CXXFLAGS = "$CXXFLAGS" ! #LDFLAGS = "$LDFLAGS" case "$host" in *************** *** 90,94 **** # Checks for libraries. ! AC_CHECK_LIB([dnet], [arp_open]) AC_CHECK_LIB([pcap], [main]) AC_CHECK_LIB([pcre], [main]) --- 91,111 ---- # Checks for libraries. ! LIBDNETDIR=dnet-exported ! AC_CONFIG_SUBDIRS( dnet-exported ) ! CPPFLAGS="-I$LIBDNETDIR/include $CPPFLAGS" ! LIBDNET_LIBS="$LIBDNETDIR/src/.libs/libdnet.a" ! DNET_DEPENDS="$LIBDNETDIR/src/.libs/libdnet.a" ! # LDFLAGS="$LDFLAGS $LIBDNET_LIBS" ! DNET_BUILD="dnet_build" ! DNET_CLEAN="dnet_clean" ! DNET_DIST_CLEAN="dnet_dist_clean" ! AC_SUBST(LIBDNET_LIBS) ! AC_SUBST(LIBDNETDIR) ! AC_SUBST(DNET_DEPENDS) ! AC_SUBST(DNET_BUILD) ! AC_SUBST(DNET_CLEAN) ! AC_SUBST(DNET_DIST_CLEAN) ! ! #AC_CHECK_LIB([dnet], [arp_open]) AC_CHECK_LIB([pcap], [main]) AC_CHECK_LIB([pcre], [main]) Index: icescan.html =================================================================== RCS file: /cvsroot/icescan/IceScan/icescan.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** icescan.html 7 Apr 2009 13:39:55 -0000 1.2 --- icescan.html 14 Apr 2009 15:43:35 -0000 1.3 *************** *** 13,27 **** <a href="#OS DETECTION:">OS DETECTION:</a><br> <a href="#INTERFACES">INTERFACES</a><br> ! <a href="#FW/EVASION AND SPOOFING OPTIONS">FW/EVASION AND SPOOFING OPTIONS</a><br> <a href="#OTHER OPTIONS">OTHER OPTIONS</a><br> <a href="#EXAMPLES">EXAMPLES</a><br> <a href="#BUGS">BUGS</a><br> <a href="#AUTHOR">AUTHOR</a><br> <a href="#REFERENCES">REFERENCES</a><br> <a href="#LICENSE">LICENSE</a><br> <!-- Creator : groff version 1.15 --> ! <!-- CreationDate: Sun Apr 5 18:39:12 2009 --> ! <!-- Total number of pages: 6 --> <!-- Page: 1 --> <!-- left margin: 100 --> --- 13,30 ---- <a href="#OS DETECTION:">OS DETECTION:</a><br> <a href="#INTERFACES">INTERFACES</a><br> ! <a href="#SCRIPTING && IDS">SCRIPTING && IDS</a><br> ! <a href="#FW/IDS EVASION AND SPOOFING OPTIONS">FW/IDS EVASION AND SPOOFING OPTIONS</a><br> ! <a href="#OUTPUT">OUTPUT</a><br> <a href="#OTHER OPTIONS">OTHER OPTIONS</a><br> <a href="#EXAMPLES">EXAMPLES</a><br> <a href="#BUGS">BUGS</a><br> <a href="#AUTHOR">AUTHOR</a><br> + <a href="#MAILING LISTS">MAILING LISTS</a><br> <a href="#REFERENCES">REFERENCES</a><br> <a href="#LICENSE">LICENSE</a><br> <!-- Creator : groff version 1.15 --> ! <!-- CreationDate: Fri Apr 10 23:50:38 2009 --> ! <!-- Total number of pages: 8 --> <!-- Page: 1 --> <!-- left margin: 100 --> *************** *** 30,50 **** <a name="SYNOPSIS"></a><h2>SYNOPSIS</h2><p><font size=3><B>icescan</B> <font size=3>[<font size=3><I>scan_type</I><font size=3>] [<font size=3><I>options</I><font size=3>] <<font size=3><I>target</I><font size=3>></p> <a name="DESCRIPTION"></a><h2>DESCRIPTION</h2><p><font size=3><B>IceScan</B> <font size=3>is an open source tool (GPL licenced) for network audit and exploraion. You can find that IceScan in<br> ! some options and features very close to Nmap (<font size=3><I>http://www.insecure.org/nmap/</I><font size=3>) and that's the true. IceScan was<br> ! written for educational purposes, but even now have some features, that doesn't exists in other <font size=3><I>free</I> <font size=3>network<br> ! auditing tools, so you may find it useful in process of security auditing your network(s).</p> <p><font size=3>Either as Nmap, main result provided by IceScan is ports table. It consist of three columns: port number/protocol, port state and service. Port can have different states: open, closed, filtered (filt), open|filtered (o|f) and unfiltered</p> <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="99.0698%"> <p><font size=3>(unfilt). Open port means that there's an application on target, listening for connections/datagrams on this port.<br> Filtered port is a port blocked by firewall. Closed ports have no applications listening on them, but access isn't<br> blocked by firewall. Unfiltered port isn't blocked by firewall and may be opened or closed. And at last,<br> ! open|filtered port means that port isn't closed and IceScan can't determine which state is has: opened or filtered. The service column provide some information about application that running or can be run on this port. This<br> information may include supposed protocol or application name and version.</p> <p><font size=3>The other type of results may include discovery(reverse DNS lookups, MACs timestamps, etc), fingerprinting<br> (OS version, device type and etc) information and also some vulnerability testings.</p> ! <p><font size=3>Also see <font size=3><I>README</I> <font size=3>and <font size=3><I>INSTALL</I> <font size=3>for more on using/installing IceScan and <font size=3><I>NEWS</I> <font size=3>for information about IceScan news.</p> ! <p><font size=3>You can get the newest version of IceScan from: <font size=3><I>http://sf.net/projects/IceScan</I><font size=3>, or, from CVS:<br> pserver:ano...@ic...:/cvsroot/icescan, module name is IceScan.</p> </td> --- 33,57 ---- <a name="SYNOPSIS"></a><h2>SYNOPSIS</h2><p><font size=3><B>icescan</B> <font size=3>[<font size=3><I>scan_type</I><font size=3>] [<font size=3><I>options</I><font size=3>] <<font size=3><I>target</I><font size=3>></p> <a name="DESCRIPTION"></a><h2>DESCRIPTION</h2><p><font size=3><B>IceScan</B> <font size=3>is an open source tool (GPL licenced) for network audit and exploraion. You can find that IceScan in<br> ! some options and features very close to and that's the true. IceScan was written for educational purposes, but<br> ! even now have some features, that doesn't exists in other <font size=3><I>free</I> <font size=3>network auditing tools, so you may find it useful in<br> ! process of security auditing your network(s).</p> <p><font size=3>Either as Nmap, main result provided by IceScan is ports table. It consist of three columns: port number/protocol, port state and service. Port can have different states: open, closed, filtered (filt), open|filtered (o|f) and unfiltered</p> <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="99.8450%"> <p><font size=3>(unfilt). Open port means that there's an application on target, listening for connections/datagrams on this port.<br> Filtered port is a port blocked by firewall. Closed ports have no applications listening on them, but access isn't<br> blocked by firewall. Unfiltered port isn't blocked by firewall and may be opened or closed. And at last,<br> ! open|filtered port means that port isn't closed and IceScan can't determine which state is has: opened or filtered.<br> ! The service column provide some information about application that running or can be run on this port. This<br> information may include supposed protocol or application name and version.</p> <p><font size=3>The other type of results may include discovery(reverse DNS lookups, MACs timestamps, etc), fingerprinting<br> (OS version, device type and etc) information and also some vulnerability testings.</p> ! <p><font size=3>IceScan can work in two modes: active (nmap-like mode) and passive. In active mode, it acts as standart port<br> ! scanner. In passive mode, IceScan do not send any packets, instead of this, it listens for incoming packets and try<br> ! to create "map" of the network. Two modes can be combined: passive discovery with following active scanning.</p> ! <p><font size=3>Also see and for more on using/installing IceScan and <font size=3><I>NEWS</I> <font size=3>for information about IceScan news.</p> ! <p><font size=3>You can get the newest version of IceScan from , or, from CVS:<br> pserver:ano...@ic...:/cvsroot/icescan, module name is IceScan.</p> </td> *************** *** 76,79 **** --- 83,87 ---- <span style=" text-indent: 0.2400in;"></span>-PP [seconds]: passive discovery; capture packets for [seconds]<br> <span style=" text-indent: 0.2400in;"></span>-n: disable reverse-dns lookups<br> + <span style=" text-indent: 0.2400in;"></span>--use-first-resolve: use only 1st IP in DNS resolving of target<br> <span style=" text-indent: 0.2400in;"></span>--dns-servers <dns1[,dns2],...>: specify custom DNS servers<br> <span style=" text-indent: 0.2400in;"></span>--system-dns: use standart(OS) DNS resolver<br> *************** *** 87,94 **** <span style=" text-indent: 0.2400in;"></span>-SU: udp scan<br> <span style=" text-indent: 0.2400in;"></span>-S0: no scan<br> ! <span style=" text-indent: 0.2400in;"></span>-SL: list scan<br> ! <span style=" text-indent: 0.2400in;"></span>--scanflags <flags>: Customize TCP scan flags (SF/SX/SN scans)<br> ! <span style=" text-indent: 0.2400in;"></span>--data-length <len>: Append random data to sent packets<br> ! <span style=" text-indent: 0.2400in;"></span>-p <port range>: specify port range to scan (default 1-1024), example: 1-10,12-14</p> </td> <td valign="top" align="left" width="28.8372%"> --- 95,99 ---- <span style=" text-indent: 0.2400in;"></span>-SU: udp scan<br> <span style=" text-indent: 0.2400in;"></span>-S0: no scan<br> ! <span style=" text-indent: 0.2400in;"></span>-SL: list scan</p> </td> <td valign="top" align="left" width="28.8372%"> *************** *** 106,114 **** </td> <td valign="top" align="left" width="83.7963%"> ! <p><font size=3>OS DETECTION:<br> <span style=" text-indent: 0.2400in;"></span>-O: passive os fingerprinting (works with -SS and -SP)<br> INTERFACES:<br> <span style=" text-indent: 0.2400in;"></span>--list-interfaces: list all interfaces<br> <span style=" text-indent: 0.2400in;"></span>-e <iface-number>: use interface <iface-number> for pcap/source iface<br> <span style=" text-indent: 0.2400in;"></span>--send-eth: use channel(2) level to send raw packets<br> <span style=" text-indent: 0.2400in;"></span>--send-ip: use network(3) level to send raw packets<br> --- 111,123 ---- </td> <td valign="top" align="left" width="83.7963%"> ! <p><font size=3><span style=" text-indent: 0.2400in;"></span>--scanflags <flags>: Customize TCP scan flags (SF/SX/SN scans)<br> ! <span style=" text-indent: 0.2400in;"></span>--data-length <len>: Append random data to sent packets<br> ! <span style=" text-indent: 0.2400in;"></span>-p <port range>: specify port range to scan (default 1-1024), example: 1-10,12-14<br> ! OS DETECTION:<br> <span style=" text-indent: 0.2400in;"></span>-O: passive os fingerprinting (works with -SS and -SP)<br> INTERFACES:<br> <span style=" text-indent: 0.2400in;"></span>--list-interfaces: list all interfaces<br> <span style=" text-indent: 0.2400in;"></span>-e <iface-number>: use interface <iface-number> for pcap/source iface<br> + <span style=" text-indent: 0.2400in;"></span>--pcap-filter "expression": use pcap filter<br> <span style=" text-indent: 0.2400in;"></span>--send-eth: use channel(2) level to send raw packets<br> <span style=" text-indent: 0.2400in;"></span>--send-ip: use network(3) level to send raw packets<br> *************** *** 134,137 **** --- 143,147 ---- <span style=" text-indent: 0.2400in;"></span>-oI/oG <filename>: Output scan in normal/grepable format to given file<br> <span style=" text-indent: 0.2400in;"></span>-oA <base_filename>: Output in all formats at once<br> + <span style=" text-indent: 0.2400in;"></span>-w <filename>: dump all recieved packets to file<br> <span style=" text-indent: 0.2400in;"></span>--packet-trace: print all packets that sent and received<br> <span style=" text-indent: 0.2400in;"></span>--open: show only open (or possibly open) port(s)<br> *************** *** 139,143 **** <span style=" text-indent: 0.2400in;"></span>-v[v[v[v]]]]: verbose levels<br> OTHER:<br> - <span style=" text-indent: 0.2400in;"></span>--use-first-resolve: use only 1st IP in DNS resolving of target<br> <span style=" text-indent: 0.2400in;"></span>--uid0: assume that the current user is fully privileged<br> <span style=" text-indent: 0.2400in;"></span>--uid1: assume that the current user isn't fully privileged<br> --- 149,152 ---- *************** *** 156,167 **** identified using a syntax similar to that of IPv4 addresses: a four-part dotted-decimal address, followed by a slash,<br> then a number from 0 to 32: A.B.C.D/N. The dotted decimal portion is interpreted, like an IPv4 address, as a<br> ! 32-bit binary number that has been broken into four 8-bit bytes. The number following the slash is the prefix length, the number of shared initial bits, counting from the left-hand side of the address. Example: giving IceScan<br> ! 192.168.0.0/24 will force scan of IPs 192.168.0.0 - 192.168.0.255 (including network and broadcast addresses).</p> <p><font size=3>Multiple targets also can be defined in one line, separated with spaces. You can mix CIDR blocks, IPs or domain<br> names. For example: icescan -n -P0 -SF 127.0.0.1 192.168.0.0/24 scanme.nmap.org</p> ! <a name="HOST DISCOVERY OPTIONS"></a><h2>HOST DISCOVERY OPTIONS</h2><p><font size=3>Before you can scan the target machine, you should check is it really up. If you don't know this, you can<br> ! incorrectly interpret port scanning results. Also, host discovery can provide you some additional information on<br> ! target, such as MACs, timestamps and etc.</p> ! <p><font size=3>Note: -P* options can be combined. By default -PE (root-mode) or -PA (non-root mode) are on.<br> </p> --- 165,183 ---- identified using a syntax similar to that of IPv4 addresses: a four-part dotted-decimal address, followed by a slash,<br> then a number from 0 to 32: A.B.C.D/N. The dotted decimal portion is interpreted, like an IPv4 address, as a<br> ! 32-bit binary number that has been broken into four 8-bit bytes. The number following the slash is the prefix length, the number of shared initial bits, counting from the left-hand side of the address. Example: giving IceScan</p> ! ! <table width="100%" rules="none" frame="none" cols="2"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="98.4568%"> ! <p><font size=3>192.168.0.0/24 will force scan of IPs 192.168.0.0 - 192.168.0.255 (including network and broadcast addresses).</p> <p><font size=3>Multiple targets also can be defined in one line, separated with spaces. You can mix CIDR blocks, IPs or domain<br> names. For example: icescan -n -P0 -SF 127.0.0.1 192.168.0.0/24 scanme.nmap.org</p> ! <p><font size=3><B>-iL</B> <font size=3><filename> | - (stdin) (input targets from file|stdin)</p> ! </td> ! <td valign="top" align="left" width="1.5432%"> ! </td> ! </tr> ! </table> ! <p><font size=3>Target(s) will be read from specified file or stdin, instead of command line arguments...<br> </p> *************** *** 169,174 **** <!-- left margin: 100 --> <!-- right margin: 747 --> ! <p><font size=3><B>-P0</B> <font size=3>(no ping)<br> ! <span style=" text-indent: 0.2400in;"></span>This options tells IceScan skip host discovery process and set target(s) to be up.</p> <p><font size=3><B>-PA/-PF/-PS</B> <font size=3>[portlist] (ACK or connect()/FIN/SYN ping)</p> --- 185,217 ---- <!-- left margin: 100 --> <!-- right margin: 747 --> ! ! <table width="100%" rules="none" frame="none" cols="2"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="96.7542%"> ! <p><font size=3><B>--exclude</B> <font size=3><host1[,host2][,host3],...> (exclude hosts/nets)<br> ! <span style=" text-indent: 0.2400in;"></span>Specified domain names, hosts and networks will be excluded from target(s) list. Note: NO RESOLVING<br> ! <span style=" text-indent: 0.2400in;"></span>from domain names here.</p> ! <p><font size=3><B>--excludefile</B> <font size=3><filename>| - (stdin) (exclude list from file|stdin)</p> ! </td> ! <td valign="top" align="left" width="3.2457%"> ! </td> ! </tr> ! </table> ! <p><font size=3>Same as previous option, but exludes list will be read from specified file or stdin.</p> ! <a name="HOST DISCOVERY OPTIONS"></a><h2>HOST DISCOVERY OPTIONS</h2> ! <table width="100%" rules="none" frame="none" cols="2"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="97.8362%"> ! <p><font size=3>Before you can scan the target machine, you should check is it really up. If you don't know this, you can<br> ! incorrectly interpret port scanning results. Also, host discovery can provide you some additional information on<br> ! target, such as MACs, timestamps and etc.</p> ! <p><font size=3>Note: -P* options can be combined. By default -PE (root-mode) or -PA (non-root mode) are on.</p> ! <p><font size=3><B>-P0</B> <font size=3>(no ping)</p> ! </td> ! <td valign="top" align="left" width="2.1638%"> ! </td> ! </tr> ! </table> ! <p><font size=3>This options tells IceScan skip host discovery process and set target(s) to be up.</p> <p><font size=3><B>-PA/-PF/-PS</B> <font size=3>[portlist] (ACK or connect()/FIN/SYN ping)</p> *************** *** 236,272 **** <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="96.4451%"> ! <p><font size=3><B>--dns-servers</B> <font size=3><dns1[,dns2],...> (specify dns servers)<br> ! <span style=" text-indent: 0.2400in;"></span>By default, IceScan tries to resolve all domain names using DNS servers, that specified in system settings<br> ! <span style=" text-indent: 0.2400in;"></span>(e.g. /etc/resolv.conf or registry). Here, you can define custom dns servers, that will be used instead.</p> ! <p><font size=3><B>--system-dns</B> <font size=3>(use standart(OS) DNS resolver)</p> </td> ! <td valign="top" align="left" width="3.5549%"> </td> </tr> </table> ! <p><font size=3>Use gethostbyname() and etc resolver (also known as system resolver) instead of internal IceScan resolve<br> <span style=" text-indent: 0.2400in;"></span>system.</p> <a name="SCAN OPTIONS"></a><h2>SCAN OPTIONS</h2><p><font size=3>The defailt post scanning methods are connect() in non-superuser mode and tcp SYN in superuser mode.</p> ! <p><font size=3><B>-ST</B> <font size=3>(tcp connect())</p> ! ! <table width="100%" rules="none" frame="none" cols="2"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="98.6090%"> ! <p><font size=3><span style=" text-indent: 0.2400in;"></span>The simplest scan engine, that use standart BSD sockets API function connect(). IceScan tries to connect()<br> <span style=" text-indent: 0.2400in;"></span>to specified port(s) and use getsockopt() function to detect its status. This is not a very good choice for<br> <span style=" text-indent: 0.2400in;"></span>stealthy scan. Moreover, this scan type is easily detected with firewall and IDS software. But this is the only<br> ! <span style=" text-indent: 0.2400in;"></span>scan method in non-superuser mode.</p> ! <p><font size=3><B>-SS</B> <font size=3>(tcp SYN scan)</p> ! </td> ! <td valign="top" align="left" width="1.3910%"> ! </td> ! </tr> ! </table> <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> <td valign="top" align="left" width="99.8454%"> ! <p><font size=3><span style=" text-indent: 0.2400in;"></span>The most-known and most-efficient scan method. It's stealthy, fast and almost reliable. We send tcp-SYN<br> <span style=" text-indent: 0.2400in;"></span>segment to target port, and, if we get RST answer, the port seems to be closed; if we recieve tcp SYN/ACK<br> <span style=" text-indent: 0.2400in;"></span>segment, the port is open, we should send RST packet to close connection. If we get no reply at all, the port is<br> --- 279,314 ---- <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="93.6631%"> ! <p><font size=3><B>--use-first-resolve</B> <font size=3>(use only 1st IP in DNS resolving of target)<br> ! <span style=" text-indent: 0.2400in;"></span>When IceScan given a domain name that resolves in multiple IPs, only the first IP will be processed for<br> ! <span style=" text-indent: 0.2400in;"></span>discovering/scanning.</p> ! <p><font size=3><B>--dns-servers</B> <font size=3><dns1[,dns2],...> (specify dns servers)</p> </td> ! <td valign="top" align="left" width="6.3369%"> </td> </tr> </table> ! <p><font size=3>By default, IceScan tries to resolve all domain names using DNS servers, that specified in system settings<br> ! <span style=" text-indent: 0.2400in;"></span>(e.g. /etc/resolv.conf or registry). Here, you can define custom dns servers, that will be used instead.</p> ! <p><font size=3><B>--system-dns</B> <font size=3>(use standart(OS) DNS resolver)<br> ! <span style=" text-indent: 0.2400in;"></span>Use gethostbyname() and etc resolver (also known as system resolver) instead of internal IceScan resolve<br> <span style=" text-indent: 0.2400in;"></span>system.</p> <a name="SCAN OPTIONS"></a><h2>SCAN OPTIONS</h2><p><font size=3>The defailt post scanning methods are connect() in non-superuser mode and tcp SYN in superuser mode.</p> ! <p><font size=3><B>-ST</B> <font size=3>(tcp connect())<br> ! <span style=" text-indent: 0.2400in;"></span>The simplest scan engine, that use standart BSD sockets API function connect(). IceScan tries to connect()<br> <span style=" text-indent: 0.2400in;"></span>to specified port(s) and use getsockopt() function to detect its status. This is not a very good choice for<br> <span style=" text-indent: 0.2400in;"></span>stealthy scan. Moreover, this scan type is easily detected with firewall and IDS software. But this is the only<br> ! <span style=" text-indent: 0.2400in;"></span>scan method in non-superuser mode.<br> ! </p> ! ! <!-- Page: 4 --> ! <!-- left margin: 100 --> ! <!-- right margin: 747 --> <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> <td valign="top" align="left" width="99.8454%"> ! <p><font size=3><B>-SS</B> <font size=3>(tcp SYN scan)<br> ! <span style=" text-indent: 0.2400in;"></span>The most-known and most-efficient scan method. It's stealthy, fast and almost reliable. We send tcp-SYN<br> <span style=" text-indent: 0.2400in;"></span>segment to target port, and, if we get RST answer, the port seems to be closed; if we recieve tcp SYN/ACK<br> <span style=" text-indent: 0.2400in;"></span>segment, the port is open, we should send RST packet to close connection. If we get no reply at all, the port is<br> *************** *** 308,345 **** </tr> </table> - <p><font size=3><B>-SI</B> <font size=3>(IP Protocol scan)<br> - <span style=" text-indent: 0.2400in;"></span>IP protocol scan can determine what protocol types (TCP, ICMP, IGMP, etc.) supported by target host. It<br> - <span style=" text-indent: 0.2400in;"></span>use raw IP packets and ICMP messages to check it.<br> - </p> - - <!-- Page: 4 --> - <!-- left margin: 100 --> - <!-- right margin: 747 --> <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="99.0726%"> ! <p><font size=3><B>-SN/SF/SX/SM</B> <font size=3>(stealth tcp Null/FIN/XMAS/Mainmon scan)<br> ! <span style=" text-indent: 0.2400in;"></span>Rare variations of TCP scan. With this scan types, we send tcp segment with<br> ! <span style=" text-indent: 0.2400in;"></span>none/FIN/FIN+PSH+URG/FIN+ACK flags set. If we recieved an RST packet, we set port status to closed,<br> ! <span style=" text-indent: 0.2400in;"></span>else we think that it's open|filtered port.</p> ! <p><font size=3><B>-SP</B> <font size=3>[seconds] (passive scan)</p> </td> ! <td valign="top" align="left" width="1.0000%"> </td> </tr> </table> ! <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="99.3818%"> ! <p><font size=3><span style=" text-indent: 0.2400in;"></span>In passive scan we capture packets for a given interval or until Ctrl-C is hit. Network traffic can be recieved<br> ! <span style=" text-indent: 0.2400in;"></span>from interface (<font size=3><B>-e</B> <font size=3>option) or from dumpfile (<font size=3><B>--input-dumpfile</B> <font size=3>option). Target argument(s) act like filter in this<br> ! <span style=" text-indent: 0.2400in;"></span>scan type: every packet that doesn't fit target specification will be ignored). But you set target to 0.0.0.0/0 to<br> ! <span style=" text-indent: 0.2400in;"></span>explore all hosts mentioned in network traffic data. When tcp SYN+ACK/RST packet is recived by IceScan,<br> ! <span style=" text-indent: 0.2400in;"></span>it detemines, that source port on source target is open/closed. This scan type also can be used in combination<br> ! <span style=" text-indent: 0.2400in;"></span>with passive OS (<font size=3><B>-O</B><font size=3>) fingerprinting option to detect target's OS. Also, with passive scan you can gain<br> ! <span style=" text-indent: 0.2400in;"></span>information about MAC addresses, MTUs and timestamps.</p> ! <p><font size=3><B>-SU</B> <font size=3>(udp scan)</p> </td> <td valign="top" align="left" width="1.0000%"> --- 350,396 ---- </tr> </table> <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="97.5270%"> ! <p><font size=3><B>-SI</B> <font size=3>(IP Protocol scan)<br> ! <span style=" text-indent: 0.2400in;"></span>IP protocol scan can determine what protocol types (TCP, ICMP, IGMP, etc.) supported by target host. It<br> ! <span style=" text-indent: 0.2400in;"></span>use raw IP packets and ICMP messages to check it.</p> ! <p><font size=3><B>-SN/SF/SX/SM</B> <font size=3>(stealth tcp Null/FIN/XMAS/Mainmon scan)</p> </td> ! <td valign="top" align="left" width="2.4730%"> </td> </tr> </table> ! <table width="100%" rules="none" frame="none" cols="4"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="3.2457%"> ! </td> ! <td valign="top" align="left" width="1.0000%"> ! </td> ! <td valign="top" align="left" width="95.6723%"> ! <p><font size=3>Rare variations of TCP scan. With this scan types, we send tcp segment with<br> ! none/FIN/FIN+PSH+URG/FIN+ACK flags set. If we recieved an RST packet, we set port status to closed,<br> ! else we think that it's open|filtered port.</p> ! </td> ! <td valign="top" align="left" width="1.0000%"> ! </td> ! </tr> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="3.2457%"> ! <p><font size=3><B>-SP</p> ! </B></td> ! <td valign="top" align="left" width="1.0000%"> ! </td> ! <td valign="top" align="left" width="95.6723%"> ! <p><font size=3>[seconds] (passive scan)<br> ! In passive scan we capture packets for a given interval or until Ctrl-C is hit. Network traffic can be recieved<br> ! from interface (<font size=3><B>-e</B> <font size=3>option) or from dumpfile (<font size=3><B>--input-dumpfile</B> <font size=3>option). Target argument(s) act like filter in this<br> ! scan type: every packet that doesn't fit target specification will be ignored). But you set target to 0.0.0.0/0 to<br> ! explore all hosts mentioned in network traffic data. When tcp SYN+ACK/RST packet is recived by IceScan,<br> ! it detemines, that source port on source target is open/closed. This scan type also can be used in combination<br> ! with passive OS (<font size=3><B>-O</B><font size=3>) fingerprinting option to detect target's OS. Also, with passive scan you can gain<br> ! information about MAC addresses, MTUs and timestamps.</p> </td> <td valign="top" align="left" width="1.0000%"> *************** *** 347,350 **** --- 398,402 ---- </tr> </table> + <p><font size=3><B>-SU</B> <font size=3>(udp scan)</p> <table width="100%" rules="none" frame="none" cols="2"> *************** *** 418,428 **** # tcp syn signatures<br> [tcpsynack]<br> ! # tcp syn+ack signatures<br> ! [tcprst]<br> # tcp rst signatures<br> For more information of signatures format, see <font size=3><I>passiveos-fp</I> <font size=3>file.</p> <p><font size=3><B>-O</B> <font size=3>(passive os fingerprinting)</p> </td> ! <td valign="top" align="left" width="1.0000%"> </td> </tr> --- 470,493 ---- # tcp syn signatures<br> [tcpsynack]<br> ! # tcp syn+ack signatures</p> ! </td> ! <td valign="top" align="left" width="1.0000%"> ! </td> ! </tr> ! </table> ! <br> ! <!-- Page: 5 --> ! <!-- left margin: 100 --> ! <!-- right margin: 744 --> ! ! <table width="100%" rules="none" frame="none" cols="2"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="56.6770%"> ! <p><font size=3>[tcprst]<br> # tcp rst signatures<br> For more information of signatures format, see <font size=3><I>passiveos-fp</I> <font size=3>file.</p> <p><font size=3><B>-O</B> <font size=3>(passive os fingerprinting)</p> </td> ! <td valign="top" align="left" width="43.3230%"> </td> </tr> *************** *** 431,446 **** <span style=" text-indent: 0.2400in;"></span>signature if can't detect OS type. In such case, if you know target OS type and version, please send following<br> <span style=" text-indent: 0.2400in;"></span>output and full description of scanned device to ice...@li....</p> ! <a name="INTERFACES"></a><h2>INTERFACES</h2><p><font size=3>With options of this section you can define way how packets will be delivered to network by IceScan and the way<br> ! how they will be captured from there.</p> <p><font size=3><B>--list-interfaces</B> <font size=3>(list all interfaces)<br> <span style=" text-indent: 0.2400in;"></span>Simply lists all network interfaces (with their numbers) that are available for packet sending/recieving.</p> <p><font size=3><B>-e</B> <font size=3><iface-number> (use specific interface for capture/send)<br> <span style=" text-indent: 0.2400in;"></span>If this option used, the IceScan will listen and send packets from selected interface (interfaces numbers can<br> ! </p> ! ! <!-- Page: 5 --> ! <!-- left margin: 100 --> ! <!-- right margin: 746 --> ! <p><span style=" text-indent: 0.2400in;"></span><font size=3>be printed with <font size=3><B>--list-interfaces</B> <font size=3>option). All other interfaces and interface auto-detection will be disabled.</p> <p><font size=3><B>--send-eth</B> <font size=3>(use channel(2) level to send raw packets)<br> <span style=" text-indent: 0.2400in;"></span>IceScan will use pcap mechanism for injecting packets into network. This is default in almost cases.</p> --- 496,517 ---- <span style=" text-indent: 0.2400in;"></span>signature if can't detect OS type. In such case, if you know target OS type and version, please send following<br> <span style=" text-indent: 0.2400in;"></span>output and full description of scanned device to ice...@li....</p> ! <a name="INTERFACES"></a><h2>INTERFACES</h2><p><font size=3>With options of this section you can define way how packets will be delivered to network by IceScan and the way how they will be captured from there.</p> <p><font size=3><B>--list-interfaces</B> <font size=3>(list all interfaces)<br> <span style=" text-indent: 0.2400in;"></span>Simply lists all network interfaces (with their numbers) that are available for packet sending/recieving.</p> + + <table width="100%" rules="none" frame="none" cols="2"> + <tr valign="top" align="left"> + <td valign="top" align="left" width="98.6025%"> <p><font size=3><B>-e</B> <font size=3><iface-number> (use specific interface for capture/send)<br> <span style=" text-indent: 0.2400in;"></span>If this option used, the IceScan will listen and send packets from selected interface (interfaces numbers can<br> ! <span style=" text-indent: 0.2400in;"></span>be printed with <font size=3><B>--list-interfaces</B> <font size=3>option). All other interfaces and interface auto-detection will be disabled.</p> ! <p><font size=3><B>--pcap-filter</B> <font size=3><"expression"> (use pcap filter)</p> ! </td> ! <td valign="top" align="left" width="1.3975%"> ! </td> ! </tr> ! </table> ! <p><font size=3>If this option set, all incoming packets will be filtered with pcap filter "expression". For more information on<br> ! <span style=" text-indent: 0.2400in;"></span>pcap filters, check TCPDUMP ( http://www.tcpdump.org ) homepage.</p> <p><font size=3><B>--send-eth</B> <font size=3>(use channel(2) level to send raw packets)<br> <span style=" text-indent: 0.2400in;"></span>IceScan will use pcap mechanism for injecting packets into network. This is default in almost cases.</p> *************** *** 448,452 **** <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="98.1424%"> <p><font size=3><B>--send-ip</B> <font size=3>(use network(3) level to send raw packets)<br> <span style=" text-indent: 0.2400in;"></span>IceScan will use rawsockets mechanism for injecting packets into network. Note: this won't work on some<br> --- 519,523 ---- <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="98.4472%"> <p><font size=3><B>--send-ip</B> <font size=3>(use network(3) level to send raw packets)<br> <span style=" text-indent: 0.2400in;"></span>IceScan will use rawsockets mechanism for injecting packets into network. Note: this won't work on some<br> *************** *** 454,458 **** <p><font size=3><B>--promisc</B> <font size=3>(put interface(s) in promiscuous mode)</p> </td> ! <td valign="top" align="left" width="1.8576%"> </td> </tr> --- 525,529 ---- <p><font size=3><B>--promisc</B> <font size=3>(put interface(s) in promiscuous mode)</p> </td> ! <td valign="top" align="left" width="1.5528%"> </td> </tr> *************** *** 462,466 **** <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="98.9164%"> <p><font size=3><span style=" text-indent: 0.2400in;"></span>useless for active scan mode.</p> <p><font size=3><B>--input-dumpfile</B> <font size=3><dumpfile> (input tcpdump file for passive scan/ping)<br> --- 533,537 ---- <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="99.2236%"> <p><font size=3><span style=" text-indent: 0.2400in;"></span>useless for active scan mode.</p> <p><font size=3><B>--input-dumpfile</B> <font size=3><dumpfile> (input tcpdump file for passive scan/ping)<br> *************** *** 468,485 **** <span style=" text-indent: 0.2400in;"></span>used).</p> </td> ! <td valign="top" align="left" width="1.0836%"> </td> </tr> </table> ! <a name="FW/EVASION AND SPOOFING OPTIONS"></a><h2>FW/EVASION AND SPOOFING OPTIONS</h2><a name="OTHER OPTIONS"></a><h2>OTHER OPTIONS</h2><a name="EXAMPLES"></a><h2>EXAMPLES</h2><a name="BUGS"></a><h2>BUGS</h2> <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="97.0588%"> <p><font size=3>IceScan is still under constant development, so it is possible that you will encounter a bug while using it. Please<br> ! report bugs to <icescan-bugs(at)lists.sourceforge.net>. (<font size=3><I>http://lists.sf.net/mailman/listinfo/icescan-bugs</I><font size=3>)</p> <p><font size=3>Be sure you tell us:</p> <p><font size=3>1) Operating System and version (the command 'uname -sr' may tell you this, although on</p> </td> ! <td valign="top" align="left" width="2.9412%"> </td> </tr> --- 539,750 ---- <span style=" text-indent: 0.2400in;"></span>used).</p> </td> ! <td valign="top" align="left" width="1.0000%"> </td> </tr> </table> ! <a name="SCRIPTING && IDS"></a><h2>SCRIPTING && IDS</h2><p><font size=3>IceScan has small scripting features, based on LUA. Currently, scripting engine in early development stages and<br> ! highly experimental.</p> ! <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="95.3416%"> ! <p><font size=3><B>-SC</B> <font size=3>(script scan)<br> ! <span style=" text-indent: 0.2400in;"></span>IceScan will try to execute script, passed with <font size=3><B>--script</B> <font size=3>option after open port is discovered and port type<br> ! <span style=" text-indent: 0.2400in;"></span>satisfy script conditions.</p> ! <p><font size=3><B>--script</B> <font size=3><script filename> (script name to run)</p> ! </td> ! <td valign="top" align="left" width="4.6584%"> ! </td> ! </tr> ! </table> ! <p><font size=3>Sets script filename to load and run after discovering any open port.</p> ! <a name="FW/IDS EVASION AND SPOOFING OPTIONS"></a><h2>FW/IDS EVASION AND SPOOFING OPTIONS</h2><p><font size=3>Options in this section used for customizing outgoing IP packets to make them chance of evading firewall and/or</p> ! ! <table width="100%" rules="none" frame="none" cols="2"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="60.8696%"> ! <p><font size=3>IDS.</p> ! <p><font size=3><B>-s</B> <font size=3><IPv4 address> (spoof source address)<br> ! <span style=" text-indent: 0.2400in;"></span>With this option, you can set source address of outgoing packets.</p> ! <p><font size=3><B>--source-port/-g</B> <font size=3><portnum> (use specified source port number)</p> ! </td> ! <td valign="top" align="left" width="39.1304%"> ! </td> ! </tr> ! </table> ! <p><font size=3>In default mode of operation, IceScan select source port randomly from range of 9999-65534. This option<br> ! <span style=" text-indent: 0.2400in;"></span>forces outgoing tcp/udp packets have predefined source port.</p> ! <p><font size=3><B>--ttl</B> <font size=3><value> (set IP time-to-live field)<br> ! <span style=" text-indent: 0.2400in;"></span>After setting this option, all outgoing IP packets will have specified value in TTL field.</p> ! ! <table width="100%" rules="none" frame="none" cols="2"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="94.5652%"> ! <p><font size=3><B>--bounce-http-proxy</B> <font size=3><<hostname>:<port>> connect() through HTTP proxy<br> ! <span style=" text-indent: 0.2400in;"></span>If you have address(es) of HTTP proxy, you can use them in your connect() (-ST) scans to reach more<br> ! <span style=" text-indent: 0.2400in;"></span>stealthiness. IceScan will try to pass probes through HTTP proxy, instead of direct connection.</p> ! <p><font size=3><B>--ip-options</B> <font size=3>< R | T | U > (add specific IP option to outgoing packets)</p> ! </td> ! <td valign="top" align="left" width="5.4348%"> ! </td> ! </tr> ! </table> ! <p><font size=3>With this option you can add specific (only one) option to outgoing packets: R (record route), T (record<br> ! </p> ! ! <!-- Page: 6 --> ! <!-- left margin: 100 --> ! <!-- right margin: 750 --> ! <p><span style=" text-indent: 0.2400in;"></span><font size=3>internet timestamps), U (record timestamps and ip addresses). Only one option still can be specified at one</p> ! ! <table width="100%" rules="none" frame="none" cols="2"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="97.6923%"> ! <p><font size=3><span style=" text-indent: 0.2400in;"></span>time.</p> ! <p><font size=3><B>--tcp-options</B> <font size=3><N|E|S|T0|T|?x|Mx|Wx,...> (add specific tcp options)<br> ! <span style=" text-indent: 0.2400in;"></span>Add specific TCP options to outgoing packets, like timestamp, MSS and more. Options are passed in string,<br> ! <span style=" text-indent: 0.2400in;"></span>with comma as delimeter. Here are all list of available options:</p> ! </td> ! <td valign="top" align="left" width="2.3077%"> ! </td> ! </tr> ! </table> ! ! <table width="100%" rules="none" frame="none" cols="2"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="65.3846%"> ! <p><font size=3><span style=" text-indent: 0.2400in;"></span>N - NOP option<br> ! <span style=" text-indent: 0.2400in;"></span>E - EOL option<br> ! <span style=" text-indent: 0.2400in;"></span>Wx - window scaling option, value x<br> ! <span style=" text-indent: 0.2400in;"></span>Mx - maximum segment size option, value x<br> ! <span style=" text-indent: 0.2400in;"></span>S - selective ACK OK<br> ! <span style=" text-indent: 0.2400in;"></span>T - timestamp<br> ! <span style=" text-indent: 0.2400in;"></span>T0 - timestamp with zero value<br> ! <span style=" text-indent: 0.2400in;"></span>?n - unrecognized option number n.<br> ! <span style=" text-indent: 0.2400in;"></span>Options will be applied to all outgoing tcp segments in superuser mode.</p> ! <p><font size=3><B>--badchksum</B> <font size=3>(send packets with a wrong TCP/UDP checksums)</p> ! </td> ! <td valign="top" align="left" width="34.6154%"> ! </td> ! </tr> ! </table> ! <p><font size=3>All outgoing packets CRC filed will be filled with random junk value.</p> ! <a name="OUTPUT"></a><h2>OUTPUT</h2> ! <table width="100%" rules="none" frame="none" cols="2"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="98.9231%"> ! <p><font size=3>Output options configure IceScan output parameters, debugging and logs. Currently, IceScan supports two types<br> ! of output formats: normal (also known as "nmap-style") and grepable (useful for parsing with sed, awk, grep and<br> ! other tools). In all cases when you can set filename you can also use "-" if you want print information to stdout.</p> ! <p><font size=3><B>-oI/oG-</B> <font size=3><filename> (output results in normal/grepable format to file)</p> ! </td> ! <td valign="top" align="left" width="1.0769%"> ! </td> ! </tr> ! </table> ! ! <table width="100%" rules="none" frame="none" cols="4"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="3.2308%"> ! </td> ! <td valign="top" align="left" width="1.0000%"> ! </td> ! <td valign="top" align="left" width="94.6154%"> ! <p><font size=3>Results of IceScan will be put to file (or to stdout) in selected format. You can combine options to output with<br> ! different formats into different files.</p> ! </td> ! <td valign="top" align="left" width="1.6923%"> ! </td> ! </tr> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="3.2308%"> ! <p><font size=3><B>-oA</p> ! </B></td> ! <td valign="top" align="left" width="1.0000%"> ! </td> ! <td valign="top" align="left" width="94.6154%"> ! <p><font size=3><base_filename> (output in all formats at once)<br> ! Results of IceScan will be put into files base_filename.icescan (normal style) and base_filename.grep<br> ! (grepable style).</p> ! </td> ! <td valign="top" align="left" width="1.6923%"> ! </td> ! </tr> ! </table> ! <p><font size=3><B>-w</B> <font size=3><filename> (dump all recieved packets to file)<br> ! <span style=" text-indent: 0.2400in;"></span>All recieved packets will be dumped to tcpdump-format file specified by filename.</p> ! <p><font size=3><B>--packet-trace</B> <font size=3>(print all packets that are sent and received)<br> ! <span style=" text-indent: 0.2400in;"></span>Every recieved and sent packet/connection will be printed in tcpdump style. By the way, with this options, you<br> ! <span style=" text-indent: 0.2400in;"></span>can easily use IceScan instead of tcpdump, just type:<br> ! <span style=" text-indent: 0.2400in;"></span>icescan -e <interface> -P0 -SP --packet-trace 0.0.0.0/0</p> ! ! <table width="100%" rules="none" frame="none" cols="2"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="99.2308%"> ! <p><font size=3><B>--open</B> <font size=3>(show only open/possibly open ports)<br> ! <span style=" text-indent: 0.2400in;"></span>In output port tables only open (or possibly open, such unfiltered state) ports will be shown; other ports will be<br> ! <span style=" text-indent: 0.2400in;"></span>skipped.</p> ! <p><font size=3><B>-d<debug level></B> <font size=3>(set debug level)</p> ! </td> ! <td valign="top" align="left" width="1.0000%"> ! </td> ! </tr> ! </table> ! <p><font size=3>Sets IceScan debug output on with selected level. Levels from 1 to 9 are available.</p> ! <p><font size=3><B>-v[v[v[v]]]]</B> <font size=3>(verbose levels)<br> ! <span style=" text-indent: 0.2400in;"></span>Sets IceScan output verbosity level. Four levels are available. Setting upper levels may fill your screen with<br> ! <span style=" text-indent: 0.2400in;"></span>MUCH useless and unimportant information, be careful!</p> ! <a name="OTHER OPTIONS"></a><h2>OTHER OPTIONS</h2> ! <table width="100%" rules="none" frame="none" cols="2"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="97.0769%"> ! <p><font size=3>Misceleanous options of IceScan.</p> ! <p><font size=3><B>--uid0</B> <font size=3>(assume that the current user is fully privileged)<br> ! <span style=" text-indent: 0.2400in;"></span>If you set this option, IceScan will work as it has superuser proveleges (e.g. root in *nix or Administrator in<br> ! <span style=" text-indent: 0.2400in;"></span>NT systems).</p> ! <p><font size=3><B>--uid1</B> <font size=3>(assume that the current user isn't fully privileged)</p> ! </td> ! <td valign="top" align="left" width="2.9231%"> ! </td> ! </tr> ! </table> ! <p><font size=3>If you set this option, IceScan won't use any features, that require superuser priveleges.</p> ! <p><font size=3><B>-V/--version</B> <font size=3>(print version information and exit)<br> ! <span style=" text-indent: 0.2400in;"></span>IceScan will print version information, information of used libraries and exit.</p> ! <p><font size=3><B>-?</B> <font size=3>(help message)<br> ! <span style=" text-indent: 0.2400in;"></span>Short scrib anout all IceScan parameters and options.<br> ! </p> ! ! <!-- Page: 7 --> ! <!-- left margin: 100 --> ! <!-- right margin: 749 --> ! <a name="EXAMPLES"></a><h2>EXAMPLES</h2> ! <table width="100%" rules="none" frame="none" cols="2"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="97.2265%"> ! <p><font size=3>Here are some examples of IceScan usage. To collect information about all hosts in network segment using the<br> ! passive scan, use:</p> ! <p><font size=3>icescan -n -v -SP -e <interface_number> 0.0.0.0/0</p> ! <p><font size=3>To list available interfaces, sumply type:</p> ! <p><font size=3>icescan --list-interfaces</p> ! <p><font size=3>To scan target in active mode with FIN-scan, type:</p> ! <p><font size=3>icescan -SF <target_ip></p> ! <p><font size=3>To use OS fingerprinting feature in active scan mode, you can use:</p> ! <p><font size=3>icescan -O -SS -v <target_ip></p> ! </td> ! <td valign="top" align="left" width="2.7735%"> ! </td> ! </tr> ! </table> ! <a name="BUGS"></a><h2>BUGS</h2> ! <table width="100%" rules="none" frame="none" cols="2"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="96.6102%"> <p><font size=3>IceScan is still under constant development, so it is possible that you will encounter a bug while using it. Please<br> ! report bugs to <icescan-devs(at)lists.sourceforge.net>. ( )</p> <p><font size=3>Be sure you tell us:</p> <p><font size=3>1) Operating System and version (the command 'uname -sr' may tell you this, although on</p> </td> ! <td valign="top" align="left" width="3.3898%"> </td> </tr> *************** *** 488,496 **** <table width="100%" rules="none" frame="none" cols="4"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="1.8576%"> </td> ! <td valign="top" align="left" width="18.2663%"> </td> ! <td valign="top" align="left" width="79.5666%"> <p><font size=3>Linux systems it will probably tell you only the version number of the Linux kernel, not of<br> the distribution as a whole; on Linux systems, please tell us both the version number of the<br> --- 753,761 ---- <table width="100%" rules="none" frame="none" cols="4"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="1.8490%"> </td> ! <td valign="top" align="left" width="18.1818%"> </td> ! <td valign="top" align="left" width="79.1988%"> <p><font size=3>Linux systems it will probably tell you only the version number of the Linux kernel, not of<br> the distribution as a whole; on Linux systems, please tell us both the version number of the<br> *************** *** 501,511 **** </tr> <tr valign="top" align="left"> ! <td valign="top" align="left" width="1.8576%"> <p><font size=3>2)</p> <p><font size=3>3)</p> </td> ! <td valign="top" align="left" width="18.2663%"> </td> ! <td valign="top" align="left" width="79.5666%"> <p><font size=3>Version of libpcap, libdnet and libpcre. Compressed config.log file.</p> <p><font size=3>Version of IceScan (the command 'icescan -V' will tell you, unless the bug is so severe as<br> --- 766,776 ---- </tr> <tr valign="top" align="left"> ! <td valign="top" align="left" width="1.8490%"> <p><font size=3>2)</p> <p><font size=3>3)</p> </td> ! <td valign="top" align="left" width="18.1818%"> </td> ! <td valign="top" align="left" width="79.1988%"> <p><font size=3>Version of libpcap, libdnet and libpcre. Compressed config.log file.</p> <p><font size=3>Version of IceScan (the command 'icescan -V' will tell you, unless the bug is so severe as<br> *************** *** 516,525 **** </tr> <tr valign="top" align="left"> ! <td valign="top" align="left" width="1.8576%"> <p><font size=3>4)</p> </td> ! <td valign="top" align="left" width="18.2663%"> </td> ! <td valign="top" align="left" width="79.5666%"> <p><font size=3>The command you used to invoke IceScan, and the sequence of operations you performed<br> that caused the bug to appear.</p> --- 781,790 ---- </tr> <tr valign="top" align="left"> ! <td valign="top" align="left" width="1.8490%"> <p><font size=3>4)</p> </td> ! <td valign="top" align="left" width="18.1818%"> </td> ! <td valign="top" align="left" width="79.1988%"> <p><font size=3>The command you used to invoke IceScan, and the sequence of operations you performed<br> that caused the bug to appear.</p> *************** *** 529,532 **** --- 794,801 ---- </tr> </table> + + <table width="100%" rules="none" frame="none" cols="2"> + <tr valign="top" align="left"> + <td valign="top" align="left" width="99.5378%"> <p><font size=3>If the bug is produced by a particular trace file, please be sure to send a trace file along with your bug description.<br> Please don't send a trace file greater than 1 MB when compressed. If the trace file contains sensitive information<br> *************** *** 534,550 **** <p><font size=3>If IceScan died on you with a 'segmentation violation', 'bus error', 'abort', or other error that produces a UNIX<br> core dump file, you can help the developers a lot if you have a debugger installed. A stack trace can be obtained<br> ! by using your debugger ('gdb' in this example), the IceScan binary, and the resulting core file. Here's an example of how to use the gdb command 'backtrace' to do so.</p> ! <p><font size=3>$ <font size=3><B>gdb icescan core</p> ! </B> <table width="100%" rules="none" frame="none" cols="2"> <tr valign="top" align="left"> ! <td valign="top" align="left" width="96.1300%"> ! <p><font size=3>(gdb) <font size=3><B>backtrace<br> ! <span style=" text-indent: 0.0300in;"></span></B>.... prints the stack trace<br> (gdb) <font size=3><B>quit<br> </B>$</p> <p><font size=3>The core dump file may be named "icescan.core" rather than "core" on some platforms (e.g., BSD systems).</p> </td> ! <td valign="top" align="left" width="3.8700%"> </td> </tr> --- 803,825 ---- <p><font size=3>If IceScan died on you with a 'segmentation violation', 'bus error', 'abort', or other error that produces a UNIX<br> core dump file, you can help the developers a lot if you have a debugger installed. A stack trace can be obtained<br> ! by using your debugger ('gdb' in this example), the IceScan binary, and the resulting core file. Here's an example<br> ! of how to u... [truncated message content] |
From: Alexander B. <da...@us...> - 2009-04-14 15:43:41
|
Update of /cvsroot/icescan/IceScan/dnet-exported/include/dnet In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31421/dnet-exported/include/dnet Added Files: Makefile Makefile.am Makefile.in addr.h arp.h blob.h eth.h fw.h icmp.h intf.h ip.h ip6.h os.h rand.h route.h tcp.h tun.h udp.h Log Message: Initial libDnet import to repository. --- NEW FILE: ip.h --- /* * ip.h * * Internet Protocol (RFC 791). * * Copyright (c) 2000 Dug Song <du...@mo...> * * $Id: ip.h,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #ifndef DNET_IP_H #define DNET_IP_H #define IP_ADDR_LEN 4 /* IP address length */ #define IP_ADDR_BITS 32 /* IP address bits */ #define IP_HDR_LEN 20 /* base IP header length */ #define IP_OPT_LEN 2 /* base IP option length */ #define IP_OPT_LEN_MAX 40 #define IP_HDR_LEN_MAX (IP_HDR_LEN + IP_OPT_LEN_MAX) #define IP_LEN_MAX 65535 #define IP_LEN_MIN IP_HDR_LEN typedef uint32_t ip_addr_t; #ifndef __GNUC__ # define __attribute__(x) # pragma pack(1) #endif /* * IP header, without options */ struct ip_hdr { #if DNET_BYTESEX == DNET_BIG_ENDIAN uint8_t ip_v:4, /* version */ ip_hl:4; /* header length (incl any options) */ #elif DNET_BYTESEX == DNET_LIL_ENDIAN uint8_t ip_hl:4, ip_v:4; #else # error "need to include <dnet.h>" #endif uint8_t ip_tos; /* type of service */ uint16_t ip_len; /* total length (incl header) */ uint16_t ip_id; /* identification */ uint16_t ip_off; /* fragment offset and flags */ uint8_t ip_ttl; /* time to live */ uint8_t ip_p; /* protocol */ uint16_t ip_sum; /* checksum */ ip_addr_t ip_src; /* source address */ ip_addr_t ip_dst; /* destination address */ }; /* * Type of service (ip_tos), RFC 1349 ("obsoleted by RFC 2474") */ #define IP_TOS_DEFAULT 0x00 /* default */ #define IP_TOS_LOWDELAY 0x10 /* low delay */ #define IP_TOS_THROUGHPUT 0x08 /* high throughput */ #define IP_TOS_RELIABILITY 0x04 /* high reliability */ #define IP_TOS_LOWCOST 0x02 /* low monetary cost - XXX */ #define IP_TOS_ECT 0x02 /* ECN-capable transport */ #define IP_TOS_CE 0x01 /* congestion experienced */ /* * IP precedence (high 3 bits of ip_tos), hopefully unused */ #define IP_TOS_PREC_ROUTINE 0x00 #define IP_TOS_PREC_PRIORITY 0x20 #define IP_TOS_PREC_IMMEDIATE 0x40 #define IP_TOS_PREC_FLASH 0x60 #define IP_TOS_PREC_FLASHOVERRIDE 0x80 #define IP_TOS_PREC_CRITIC_ECP 0xa0 #define IP_TOS_PREC_INTERNETCONTROL 0xc0 #define IP_TOS_PREC_NETCONTROL 0xe0 /* * Fragmentation flags (ip_off) */ #define IP_RF 0x8000 /* reserved */ #define IP_DF 0x4000 /* don't fragment */ #define IP_MF 0x2000 /* more fragments (not last frag) */ #define IP_OFFMASK 0x1fff /* mask for fragment offset */ /* * Time-to-live (ip_ttl), seconds */ #define IP_TTL_DEFAULT 64 /* default ttl, RFC 1122, RFC 1340 */ #define IP_TTL_MAX 255 /* maximum ttl */ /* * Protocol (ip_p) - http://www.iana.org/assignments/protocol-numbers */ #define IP_PROTO_IP 0 /* dummy for IP */ #define IP_PROTO_HOPOPTS IP_PROTO_IP /* IPv6 hop-by-hop options */ #define IP_PROTO_ICMP 1 /* ICMP */ #define IP_PROTO_IGMP 2 /* IGMP */ #define IP_PROTO_GGP 3 /* gateway-gateway protocol */ #define IP_PROTO_IPIP 4 /* IP in IP */ #define IP_PROTO_ST 5 /* ST datagram mode */ #define IP_PROTO_TCP 6 /* TCP */ #define IP_PROTO_CBT 7 /* CBT */ #define IP_PROTO_EGP 8 /* exterior gateway protocol */ #define IP_PROTO_IGP 9 /* interior gateway protocol */ #define IP_PROTO_BBNRCC 10 /* BBN RCC monitoring */ #define IP_PROTO_NVP 11 /* Network Voice Protocol */ #define IP_PROTO_PUP 12 /* PARC universal packet */ #define IP_PROTO_ARGUS 13 /* ARGUS */ #define IP_PROTO_EMCON 14 /* EMCON */ #define IP_PROTO_XNET 15 /* Cross Net Debugger */ #define IP_PROTO_CHAOS 16 /* Chaos */ #define IP_PROTO_UDP 17 /* UDP */ #define IP_PROTO_MUX 18 /* multiplexing */ #define IP_PROTO_DCNMEAS 19 /* DCN measurement */ #define IP_PROTO_HMP 20 /* Host Monitoring Protocol */ #define IP_PROTO_PRM 21 /* Packet Radio Measurement */ #define IP_PROTO_IDP 22 /* Xerox NS IDP */ #define IP_PROTO_TRUNK1 23 /* Trunk-1 */ #define IP_PROTO_TRUNK2 24 /* Trunk-2 */ #define IP_PROTO_LEAF1 25 /* Leaf-1 */ #define IP_PROTO_LEAF2 26 /* Leaf-2 */ #define IP_PROTO_RDP 27 /* "Reliable Datagram" proto */ #define IP_PROTO_IRTP 28 /* Inet Reliable Transaction */ #define IP_PROTO_TP 29 /* ISO TP class 4 */ #define IP_PROTO_NETBLT 30 /* Bulk Data Transfer */ #define IP_PROTO_MFPNSP 31 /* MFE Network Services */ #define IP_PROTO_MERITINP 32 /* Merit Internodal Protocol */ #define IP_PROTO_SEP 33 /* Sequential Exchange proto */ #define IP_PROTO_3PC 34 /* Third Party Connect proto */ #define IP_PROTO_IDPR 35 /* Interdomain Policy Route */ #define IP_PROTO_XTP 36 /* Xpress Transfer Protocol */ #define IP_PROTO_DDP 37 /* Datagram Delivery Proto */ #define IP_PROTO_CMTP 38 /* IDPR Ctrl Message Trans */ #define IP_PROTO_TPPP 39 /* TP++ Transport Protocol */ #define IP_PROTO_IL 40 /* IL Transport Protocol */ #define IP_PROTO_IPV6 41 /* IPv6 */ #define IP_PROTO_SDRP 42 /* Source Demand Routing */ #define IP_PROTO_ROUTING 43 /* IPv6 routing header */ #define IP_PROTO_FRAGMENT 44 /* IPv6 fragmentation header */ #define IP_PROTO_RSVP 46 /* Reservation protocol */ #define IP_PROTO_GRE 47 /* General Routing Encap */ #define IP_PROTO_MHRP 48 /* Mobile Host Routing */ #define IP_PROTO_ENA 49 /* ENA */ #define IP_PROTO_ESP 50 /* Encap Security Payload */ #define IP_PROTO_AH 51 /* Authentication Header */ #define IP_PROTO_INLSP 52 /* Integated Net Layer Sec */ #define IP_PROTO_SWIPE 53 /* SWIPE */ #define IP_PROTO_NARP 54 /* NBMA Address Resolution */ #define IP_PROTO_MOBILE 55 /* Mobile IP, RFC 2004 */ #define IP_PROTO_TLSP 56 /* Transport Layer Security */ #define IP_PROTO_SKIP 57 /* SKIP */ #define IP_PROTO_ICMPV6 58 /* ICMP for IPv6 */ #define IP_PROTO_NONE 59 /* IPv6 no next header */ #define IP_PROTO_DSTOPTS 60 /* IPv6 destination options */ #define IP_PROTO_ANYHOST 61 /* any host internal proto */ #define IP_PROTO_CFTP 62 /* CFTP */ #define IP_PROTO_ANYNET 63 /* any local network */ #define IP_PROTO_EXPAK 64 /* SATNET and Backroom EXPAK */ #define IP_PROTO_KRYPTOLAN 65 /* Kryptolan */ #define IP_PROTO_RVD 66 /* MIT Remote Virtual Disk */ #define IP_PROTO_IPPC 67 /* Inet Pluribus Packet Core */ #define IP_PROTO_DISTFS 68 /* any distributed fs */ #define IP_PROTO_SATMON 69 /* SATNET Monitoring */ #define IP_PROTO_VISA 70 /* VISA Protocol */ #define IP_PROTO_IPCV 71 /* Inet Packet Core Utility */ #define IP_PROTO_CPNX 72 /* Comp Proto Net Executive */ #define IP_PROTO_CPHB 73 /* Comp Protocol Heart Beat */ #define IP_PROTO_WSN 74 /* Wang Span Network */ #define IP_PROTO_PVP 75 /* Packet Video Protocol */ #define IP_PROTO_BRSATMON 76 /* Backroom SATNET Monitor */ #define IP_PROTO_SUNND 77 /* SUN ND Protocol */ #define IP_PROTO_WBMON 78 /* WIDEBAND Monitoring */ #define IP_PROTO_WBEXPAK 79 /* WIDEBAND EXPAK */ #define IP_PROTO_EON 80 /* ISO CNLP */ #define IP_PROTO_VMTP 81 /* Versatile Msg Transport*/ #define IP_PROTO_SVMTP 82 /* Secure VMTP */ #define IP_PROTO_VINES 83 /* VINES */ #define IP_PROTO_TTP 84 /* TTP */ #define IP_PROTO_NSFIGP 85 /* NSFNET-IGP */ #define IP_PROTO_DGP 86 /* Dissimilar Gateway Proto */ #define IP_PROTO_TCF 87 /* TCF */ #define IP_PROTO_EIGRP 88 /* EIGRP */ #define IP_PROTO_OSPF 89 /* Open Shortest Path First */ #define IP_PROTO_SPRITERPC 90 /* Sprite RPC Protocol */ #define IP_PROTO_LARP 91 /* Locus Address Resolution */ #define IP_PROTO_MTP 92 /* Multicast Transport Proto */ #define IP_PROTO_AX25 93 /* AX.25 Frames */ #define IP_PROTO_IPIPENCAP 94 /* yet-another IP encap */ #define IP_PROTO_MICP 95 /* Mobile Internet Ctrl */ #define IP_PROTO_SCCSP 96 /* Semaphore Comm Sec Proto */ #define IP_PROTO_ETHERIP 97 /* Ethernet in IPv4 */ #define IP_PROTO_ENCAP 98 /* encapsulation header */ #define IP_PROTO_ANYENC 99 /* private encryption scheme */ #define IP_PROTO_GMTP 100 /* GMTP */ #define IP_PROTO_IFMP 101 /* Ipsilon Flow Mgmt Proto */ #define IP_PROTO_PNNI 102 /* PNNI over IP */ #define IP_PROTO_PIM 103 /* Protocol Indep Multicast */ #define IP_PROTO_ARIS 104 /* ARIS */ #define IP_PROTO_SCPS 105 /* SCPS */ #define IP_PROTO_QNX 106 /* QNX */ #define IP_PROTO_AN 107 /* Active Networks */ #define IP_PROTO_IPCOMP 108 /* IP Payload Compression */ #define IP_PROTO_SNP 109 /* Sitara Networks Protocol */ #define IP_PROTO_COMPAQPEER 110 /* Compaq Peer Protocol */ #define IP_PROTO_IPXIP 111 /* IPX in IP */ #define IP_PROTO_VRRP 112 /* Virtual Router Redundancy */ #define IP_PROTO_PGM 113 /* PGM Reliable Transport */ #define IP_PROTO_ANY0HOP 114 /* 0-hop protocol */ #define IP_PROTO_L2TP 115 /* Layer 2 Tunneling Proto */ #define IP_PROTO_DDX 116 /* D-II Data Exchange (DDX) */ #define IP_PROTO_IATP 117 /* Interactive Agent Xfer */ #define IP_PROTO_STP 118 /* Schedule Transfer Proto */ #define IP_PROTO_SRP 119 /* SpectraLink Radio Proto */ #define IP_PROTO_UTI 120 /* UTI */ #define IP_PROTO_SMP 121 /* Simple Message Protocol */ #define IP_PROTO_SM 122 /* SM */ #define IP_PROTO_PTP 123 /* Performance Transparency */ #define IP_PROTO_ISIS 124 /* ISIS over IPv4 */ #define IP_PROTO_FIRE 125 /* FIRE */ #define IP_PROTO_CRTP 126 /* Combat Radio Transport */ #define IP_PROTO_CRUDP 127 /* Combat Radio UDP */ #define IP_PROTO_SSCOPMCE 128 /* SSCOPMCE */ #define IP_PROTO_IPLT 129 /* IPLT */ #define IP_PROTO_SPS 130 /* Secure Packet Shield */ #define IP_PROTO_PIPE 131 /* Private IP Encap in IP */ #define IP_PROTO_SCTP 132 /* Stream Ctrl Transmission */ #define IP_PROTO_FC 133 /* Fibre Channel */ #define IP_PROTO_RSVPIGN 134 /* RSVP-E2E-IGNORE */ #define IP_PROTO_RAW 255 /* Raw IP packets */ #define IP_PROTO_RESERVED IP_PROTO_RAW /* Reserved */ #define IP_PROTO_MAX 255 /* * Option types (opt_type) - http://www.iana.org/assignments/ip-parameters */ #define IP_OPT_CONTROL 0x00 /* control */ #define IP_OPT_DEBMEAS 0x40 /* debugging & measurement */ #define IP_OPT_COPY 0x80 /* copy into all fragments */ #define IP_OPT_RESERVED1 0x20 #define IP_OPT_RESERVED2 0x60 #define IP_OPT_EOL 0 /* end of option list */ #define IP_OPT_NOP 1 /* no operation */ #define IP_OPT_SEC (2|IP_OPT_COPY) /* DoD basic security */ #define IP_OPT_LSRR (3|IP_OPT_COPY) /* loose source route */ #define IP_OPT_TS (4|IP_OPT_DEBMEAS) /* timestamp */ #define IP_OPT_ESEC (5|IP_OPT_COPY) /* DoD extended security */ #define IP_OPT_CIPSO (6|IP_OPT_COPY) /* commercial security */ #define IP_OPT_RR 7 /* record route */ #define IP_OPT_SATID (8|IP_OPT_COPY) /* stream ID (obsolete) */ #define IP_OPT_SSRR (9|IP_OPT_COPY) /* strict source route */ #define IP_OPT_ZSU 10 /* experimental measurement */ #define IP_OPT_MTUP 11 /* MTU probe */ #define IP_OPT_MTUR 12 /* MTU reply */ #define IP_OPT_FINN (13|IP_OPT_COPY|IP_OPT_DEBMEAS) /* exp flow control */ #define IP_OPT_VISA (14|IP_OPT_COPY) /* exp access control */ #define IP_OPT_ENCODE 15 /* ??? */ #define IP_OPT_IMITD (16|IP_OPT_COPY) /* IMI traffic descriptor */ #define IP_OPT_EIP (17|IP_OPT_COPY) /* extended IP, RFC 1385 */ #define IP_OPT_TR (18|IP_OPT_DEBMEAS) /* traceroute */ #define IP_OPT_ADDEXT (19|IP_OPT_COPY) /* IPv7 ext addr, RFC 1475 */ #define IP_OPT_RTRALT (20|IP_OPT_COPY) /* router alert, RFC 2113 */ #define IP_OPT_SDB (21|IP_OPT_COPY) /* directed bcast, RFC 1770 */ #define IP_OPT_NSAPA (22|IP_OPT_COPY) /* NSAP addresses */ #define IP_OPT_DPS (23|IP_OPT_COPY) /* dynamic packet state */ #define IP_OPT_UMP (24|IP_OPT_COPY) /* upstream multicast */ #define IP_OPT_MAX 25 #define IP_OPT_COPIED(o) ((o) & 0x80) #define IP_OPT_CLASS(o) ((o) & 0x60) #define IP_OPT_NUMBER(o) ((o) & 0x1f) #define IP_OPT_TYPEONLY(o) ((o) == IP_OPT_EOL || (o) == IP_OPT_NOP) /* * Security option data - RFC 791, 3.1 */ struct ip_opt_data_sec { uint16_t s; /* security */ uint16_t c; /* compartments */ uint16_t h; /* handling restrictions */ uint8_t tcc[3]; /* transmission control code */ } __attribute__((__packed__)); #define IP_OPT_SEC_UNCLASS 0x0000 /* unclassified */ #define IP_OPT_SEC_CONFID 0xf135 /* confidential */ #define IP_OPT_SEC_EFTO 0x789a /* EFTO */ #define IP_OPT_SEC_MMMM 0xbc4d /* MMMM */ #define IP_OPT_SEC_PROG 0x5e26 /* PROG */ #define IP_OPT_SEC_RESTR 0xaf13 /* restricted */ #define IP_OPT_SEC_SECRET 0xd788 /* secret */ #define IP_OPT_SEC_TOPSECRET 0x6bc5 /* top secret */ /* * {Loose Source, Record, Strict Source} Route option data - RFC 791, 3.1 */ struct ip_opt_data_rr { uint8_t ptr; /* from start of option, >= 4 */ uint32_t iplist __flexarr; /* list of IP addresses */ } __attribute__((__packed__)); /* * Timestamp option data - RFC 791, 3.1 */ struct ip_opt_data_ts { uint8_t ptr; /* from start of option, >= 5 */ #if DNET_BYTESEX == DNET_BIG_ENDIAN uint8_t oflw:4, /* number of IPs skipped */ flg:4; /* address[ / timestamp] flag */ #elif DNET_BYTESEX == DNET_LIL_ENDIAN uint8_t flg:4, oflw:4; #endif uint32_t ipts __flexarr; /* IP address [/ timestamp] pairs */ } __attribute__((__packed__)); #define IP_OPT_TS_TSONLY 0 /* timestamps only */ #define IP_OPT_TS_TSADDR 1 /* IP address / timestamp pairs */ #define IP_OPT_TS_PRESPEC 3 /* IP address / zero timestamp pairs */ /* * Traceroute option data - RFC 1393, 2.2 */ struct ip_opt_data_tr { uint16_t id; /* ID number */ uint16_t ohc; /* outbound hop count */ uint16_t rhc; /* return hop count */ uint32_t origip; /* originator IP address */ } __attribute__((__packed__)); /* * IP option (following IP header) */ struct ip_opt { uint8_t opt_type; /* option type */ uint8_t opt_len; /* option length >= IP_OPT_LEN */ union ip_opt_data { struct ip_opt_data_sec sec; /* IP_OPT_SEC */ struct ip_opt_data_rr rr; /* IP_OPT_{L,S}RR */ struct ip_opt_data_ts ts; /* IP_OPT_TS */ uint16_t satid; /* IP_OPT_SATID */ uint16_t mtu; /* IP_OPT_MTU{P,R} */ struct ip_opt_data_tr tr; /* IP_OPT_TR */ uint32_t addext[2]; /* IP_OPT_ADDEXT */ uint16_t rtralt; /* IP_OPT_RTRALT */ uint32_t sdb[9]; /* IP_OPT_SDB */ uint8_t data8[IP_OPT_LEN_MAX - IP_OPT_LEN]; } opt_data; } __attribute__((__packed__)); #ifndef __GNUC__ # pragma pack() #endif /* * Classful addressing */ #define IP_CLASSA(i) (((uint32_t)(i) & htonl(0x80000000)) == \ htonl(0x00000000)) #define IP_CLASSA_NET (htonl(0xff000000)) #define IP_CLASSA_NSHIFT 24 #define IP_CLASSA_HOST (htonl(0x00ffffff)) #define IP_CLASSA_MAX 128 #define IP_CLASSB(i) (((uint32_t)(i) & htonl(0xc0000000)) == \ htonl(0x80000000)) #define IP_CLASSB_NET (htonl(0xffff0000)) #define IP_CLASSB_NSHIFT 16 #define IP_CLASSB_HOST (htonl(0x0000ffff)) #define IP_CLASSB_MAX 65536 #define IP_CLASSC(i) (((uint32_t)(i) & htonl(0xe0000000)) == \ htonl(0xc0000000)) #define IP_CLASSC_NET (htonl(0xffffff00)) #define IP_CLASSC_NSHIFT 8 #define IP_CLASSC_HOST (htonl(0x000000ff)) #define IP_CLASSD(i) (((uint32_t)(i) & htonl(0xf0000000)) == \ htonl(0xe0000000)) /* These ones aren't really net and host fields, but routing needn't know. */ #define IP_CLASSD_NET (htonl(0xf0000000)) #define IP_CLASSD_NSHIFT 28 #define IP_CLASSD_HOST (htonl(0x0fffffff)) #define IP_MULTICAST(i) IP_CLASSD(i) #define IP_EXPERIMENTAL(i) (((uint32_t)(i) & htonl(0xf0000000)) == \ htonl(0xf0000000)) #define IP_BADCLASS(i) (((uint32_t)(i) & htonl(0xf0000000)) == \ htonl(0xf0000000)) #define IP_LOCAL_GROUP(i) (((uint32_t)(i) & htonl(0xffffff00)) == \ htonl(0xe0000000)) /* * Reserved addresses */ #define IP_ADDR_ANY (htonl(0x00000000)) /* 0.0.0.0 */ #define IP_ADDR_BROADCAST (htonl(0xffffffff)) /* 255.255.255.255 */ #define IP_ADDR_LOOPBACK (htonl(0x7f000001)) /* 127.0.0.1 */ #define IP_ADDR_MCAST_ALL (htonl(0xe0000001)) /* 224.0.0.1 */ #define IP_ADDR_MCAST_LOCAL (htonl(0xe00000ff)) /* 224.0.0.255 */ #define ip_pack_hdr(hdr, tos, len, id, off, ttl, p, src, dst) do { \ struct ip_hdr *ip_pack_p = (struct ip_hdr *)(hdr); \ ip_pack_p->ip_v = 4; ip_pack_p->ip_hl = 5; \ ip_pack_p->ip_tos = tos; ip_pack_p->ip_len = htons(len); \ ip_pack_p->ip_id = htons(id); ip_pack_p->ip_off = htons(off); \ ip_pack_p->ip_ttl = ttl; ip_pack_p->ip_p = p; \ ip_pack_p->ip_src = src; ip_pack_p->ip_dst = dst; \ } while (0) typedef struct ip_handle ip_t; __BEGIN_DECLS ip_t *ip_open(void); ssize_t ip_send(ip_t *i, const void *buf, size_t len); ip_t *ip_close(ip_t *i); char *ip_ntop(const ip_addr_t *ip, char *dst, size_t len); int ip_pton(const char *src, ip_addr_t *dst); char *ip_ntoa(const ip_addr_t *ip); #define ip_aton ip_pton ssize_t ip_add_option(void *buf, size_t len, int proto, const void *optbuf, size_t optlen); void ip_checksum(void *buf, size_t len); int ip_cksum_add(const void *buf, size_t len, int cksum); #define ip_cksum_carry(x) \ (x = (x >> 16) + (x & 0xffff), (~(x + (x >> 16)) & 0xffff)) __END_DECLS #endif /* DNET_IP_H */ --- NEW FILE: eth.h --- /* * eth.h * * Ethernet. * * Copyright (c) 2000 Dug Song <du...@mo...> * * $Id: eth.h,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #ifndef DNET_ETH_H #define DNET_ETH_H #define ETH_ADDR_LEN 6 #define ETH_ADDR_BITS 48 #define ETH_TYPE_LEN 2 #define ETH_CRC_LEN 4 #define ETH_HDR_LEN 14 #define ETH_LEN_MIN 64 /* minimum frame length with CRC */ #define ETH_LEN_MAX 1518 /* maximum frame length with CRC */ #define ETH_MTU (ETH_LEN_MAX - ETH_HDR_LEN - ETH_CRC_LEN) #define ETH_MIN (ETH_LEN_MIN - ETH_HDR_LEN - ETH_CRC_LEN) typedef struct eth_addr { uint8_t data[ETH_ADDR_LEN]; } eth_addr_t; struct eth_hdr { eth_addr_t eth_dst; /* destination address */ eth_addr_t eth_src; /* source address */ uint16_t eth_type; /* payload type */ }; /* * Ethernet payload types - http://standards.ieee.org/regauth/ethertype */ #define ETH_TYPE_PUP 0x0200 /* PUP protocol */ #define ETH_TYPE_IP 0x0800 /* IP protocol */ #define ETH_TYPE_ARP 0x0806 /* address resolution protocol */ #define ETH_TYPE_REVARP 0x8035 /* reverse addr resolution protocol */ #define ETH_TYPE_8021Q 0x8100 /* IEEE 802.1Q VLAN tagging */ #define ETH_TYPE_IPV6 0x86DD /* IPv6 protocol */ #define ETH_TYPE_MPLS 0x8847 /* MPLS */ #define ETH_TYPE_MPLS_MCAST 0x8848 /* MPLS Multicast */ #define ETH_TYPE_PPPOEDISC 0x8863 /* PPP Over Ethernet Discovery Stage */ #define ETH_TYPE_PPPOE 0x8864 /* PPP Over Ethernet Session Stage */ #define ETH_TYPE_LOOPBACK 0x9000 /* used to test interfaces */ #define ETH_IS_MULTICAST(ea) (*(ea) & 0x01) /* is address mcast/bcast? */ #define ETH_ADDR_BROADCAST "\xff\xff\xff\xff\xff\xff" #define eth_pack_hdr(h, dst, src, type) do { \ struct eth_hdr *eth_pack_p = (struct eth_hdr *)(h); \ memmove(ð_pack_p->eth_dst, &(dst), ETH_ADDR_LEN); \ memmove(ð_pack_p->eth_src, &(src), ETH_ADDR_LEN); \ eth_pack_p->eth_type = htons(type); \ } while (0) typedef struct eth_handle eth_t; __BEGIN_DECLS eth_t *eth_open(const char *device); int eth_get(eth_t *e, eth_addr_t *ea); int eth_set(eth_t *e, const eth_addr_t *ea); ssize_t eth_send(eth_t *e, const void *buf, size_t len); eth_t *eth_close(eth_t *e); char *eth_ntop(const eth_addr_t *eth, char *dst, size_t len); int eth_pton(const char *src, eth_addr_t *dst); char *eth_ntoa(const eth_addr_t *eth); #define eth_aton eth_pton __END_DECLS #endif /* DNET_ETH_H */ --- NEW FILE: route.h --- /* * route.c * * Kernel route table operations. * * Copyright (c) 2000 Dug Song <du...@mo...> * * $Id: route.h,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #ifndef DNET_ROUTE_H #define DNET_ROUTE_H /* * Routing table entry */ struct route_entry { struct addr route_dst; /* destination address */ struct addr route_gw; /* gateway address */ }; typedef struct route_handle route_t; typedef int (*route_handler)(const struct route_entry *entry, void *arg); __BEGIN_DECLS route_t *route_open(void); int route_add(route_t *r, const struct route_entry *entry); int route_delete(route_t *r, const struct route_entry *entry); int route_get(route_t *r, struct route_entry *entry); int route_loop(route_t *r, route_handler callback, void *arg); route_t *route_close(route_t *r); __END_DECLS #endif /* DNET_ROUTE_H */ --- NEW FILE: Makefile.in --- # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(dnetinclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.common subdir = include/dnet ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(dnetincludedir)" dnetincludeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(dnetinclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECKINC = @CHECKINC@ CHECKLIB = @CHECKLIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_CHECK_FALSE = @HAVE_CHECK_FALSE@ HAVE_CHECK_TRUE = @HAVE_CHECK_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_aux_dir = @ac_aux_dir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AUTOMAKE_OPTIONS = foreign no-dependencies AM_CPPFLAGS = -I$(top_srcdir)/include dnetincludedir = $(includedir)/dnet dnetinclude_HEADERS = addr.h arp.h blob.h eth.h fw.h icmp.h intf.h ip.h \ ip6.h os.h rand.h route.h tcp.h tun.h udp.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/dnet/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign include/dnet/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-dnetincludeHEADERS: $(dnetinclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(dnetincludedir)" || $(mkdir_p) "$(DESTDIR)$(dnetincludedir)" @list='$(dnetinclude_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(dnetincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(dnetincludedir)/$$f'"; \ $(dnetincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(dnetincludedir)/$$f"; \ done uninstall-dnetincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(dnetinclude_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dnetincludedir)/$$f'"; \ rm -f "$(DESTDIR)$(dnetincludedir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(mkdir_p) $(distdir)/../.. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(dnetincludedir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dnetincludeHEADERS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dnetincludeHEADERS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dnetincludeHEADERS install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-dnetincludeHEADERS \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE: addr.h --- /* * addr.h * * Network address operations. * * Copyright (c) 2000 Dug Song <du...@mo...> * * $Id: addr.h,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #ifndef DNET_ADDR_H #define DNET_ADDR_H #define ADDR_TYPE_NONE 0 /* No address set */ #define ADDR_TYPE_ETH 1 /* Ethernet */ #define ADDR_TYPE_IP 2 /* Internet Protocol v4 */ #define ADDR_TYPE_IP6 3 /* Internet Protocol v6 */ struct addr { uint16_t addr_type; uint16_t addr_bits; union { eth_addr_t __eth; ip_addr_t __ip; ip6_addr_t __ip6; uint8_t __data8[16]; uint16_t __data16[8]; uint32_t __data32[4]; } __addr_u; }; #define addr_eth __addr_u.__eth #define addr_ip __addr_u.__ip #define addr_ip6 __addr_u.__ip6 #define addr_data8 __addr_u.__data8 #define addr_data16 __addr_u.__data16 #define addr_data32 __addr_u.__data32 #define addr_pack(addr, type, bits, data, len) do { \ (addr)->addr_type = type; \ (addr)->addr_bits = bits; \ memmove((addr)->addr_data8, (char *)data, len); \ } while (0) __BEGIN_DECLS int addr_cmp(const struct addr *a, const struct addr *b); int addr_bcast(const struct addr *a, struct addr *b); int addr_net(const struct addr *a, struct addr *b); char *addr_ntop(const struct addr *src, char *dst, size_t size); int addr_pton(const char *src, struct addr *dst); char *addr_ntoa(const struct addr *a); #define addr_aton addr_pton int addr_ntos(const struct addr *a, struct sockaddr *sa); int addr_ston(const struct sockaddr *sa, struct addr *a); int addr_btos(uint16_t bits, struct sockaddr *sa); int addr_stob(const struct sockaddr *sa, uint16_t *bits); int addr_btom(uint16_t bits, void *mask, size_t size); int addr_mtob(const void *mask, size_t size, uint16_t *bits); __END_DECLS #endif /* DNET_ADDR_H */ --- NEW FILE: udp.h --- /* * udp.h * * User Datagram Protocol (RFC 768). * * Copyright (c) 2000 Dug Song <du...@mo...> * * $Id: udp.h,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #ifndef DNET_UDP_H #define DNET_UDP_H #define UDP_HDR_LEN 8 struct udp_hdr { uint16_t uh_sport; /* source port */ uint16_t uh_dport; /* destination port */ uint16_t uh_ulen; /* udp length (including header) */ uint16_t uh_sum; /* udp checksum */ }; #define UDP_PORT_MAX 65535 #define udp_pack_hdr(hdr, sport, dport, ulen) do { \ struct udp_hdr *udp_pack_p = (struct udp_hdr *)(hdr); \ udp_pack_p->uh_sport = htons(sport); \ udp_pack_p->uh_dport = htons(dport); \ udp_pack_p->uh_ulen = htons(ulen); \ } while (0) #endif /* DNET_UDP_H */ --- NEW FILE: ip6.h --- /* * ip6.h * * Internet Protocol, Version 6 (RFC 2460). * * Copyright (c) 2002 Dug Song <du...@mo...> * * $Id: ip6.h,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #ifndef DNET_IP6_H #define DNET_IP6_H #define IP6_ADDR_LEN 16 #define IP6_ADDR_BITS 128 #define IP6_HDR_LEN 40 /* IPv6 header length */ #define IP6_LEN_MIN IP6_HDR_LEN #define IP6_LEN_MAX 65535 /* non-jumbo payload */ #define IP6_MTU_MIN 1280 /* minimum MTU (1024 + 256) */ typedef struct ip6_addr { uint8_t data[IP6_ADDR_LEN]; } ip6_addr_t; #ifndef __GNUC__ # define __attribute__(x) # pragma pack(1) #endif /* * IPv6 header */ struct ip6_hdr { union { struct ip6_hdr_ctl { uint32_t ip6_un1_flow; /* 20 bits of flow ID */ uint16_t ip6_un1_plen; /* payload length */ uint8_t ip6_un1_nxt; /* next header */ uint8_t ip6_un1_hlim; /* hop limit */ } ip6_un1; uint8_t ip6_un2_vfc; /* 4 bits version, top 4 bits class */ } ip6_ctlun; ip6_addr_t ip6_src; ip6_addr_t ip6_dst; } __attribute__((__packed__)); #define ip6_vfc ip6_ctlun.ip6_un2_vfc #define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow #define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen #define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt /* IP_PROTO_* */ #define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim #define IP6_VERSION 0x60 #define IP6_VERSION_MASK 0xf0 /* ip6_vfc version */ #if DNET_BYTESEX == DNET_BIG_ENDIAN #define IP6_FLOWINFO_MASK 0x0fffffff /* ip6_flow info (28 bits) */ #define IP6_FLOWLABEL_MASK 0x000fffff /* ip6_flow label (20 bits) */ #elif DNET_BYTESEX == DNET_LIL_ENDIAN #define IP6_FLOWINFO_MASK 0xffffff0f /* ip6_flow info (28 bits) */ #define IP6_FLOWLABEL_MASK 0xffff0f00 /* ip6_flow label (20 bits) */ #endif /* * Hop limit (ip6_hlim) */ #define IP6_HLIM_DEFAULT 64 #define IP6_HLIM_MAX 255 /* * Preferred extension header order from RFC 2460, 4.1: * * IP_PROTO_IPV6, IP_PROTO_HOPOPTS, IP_PROTO_DSTOPTS, IP_PROTO_ROUTING, * IP_PROTO_FRAGMENT, IP_PROTO_AH, IP_PROTO_ESP, IP_PROTO_DSTOPTS, IP_PROTO_* */ /* * Routing header data (IP_PROTO_ROUTING) */ struct ip6_ext_data_routing { uint8_t type; /* routing type */ uint8_t segleft; /* segments left */ /* followed by routing type specific data */ } __attribute__((__packed__)); struct ip6_ext_data_routing0 { uint8_t type; /* always zero */ uint8_t segleft; /* segments left */ uint8_t reserved; /* reserved field */ uint8_t slmap[3]; /* strict/loose bit map */ ip6_addr_t addr[1]; /* up to 23 addresses */ } __attribute__((__packed__)); /* * Fragment header data (IP_PROTO_FRAGMENT) */ struct ip6_ext_data_fragment { uint16_t offlg; /* offset, reserved, and flag */ uint32_t ident; /* identification */ } __attribute__((__packed__)); /* * Fragmentation offset, reserved, and flags (offlg) */ #if DNET_BYTESEX == DNET_BIG_ENDIAN #define IP6_OFF_MASK 0xfff8 /* mask out offset from offlg */ #define IP6_RESERVED_MASK 0x0006 /* reserved bits in offlg */ #define IP6_MORE_FRAG 0x0001 /* more-fragments flag */ #elif DNET_BYTESEX == DNET_LIL_ENDIAN #define IP6_OFF_MASK 0xf8ff /* mask out offset from offlg */ #define IP6_RESERVED_MASK 0x0600 /* reserved bits in offlg */ #define IP6_MORE_FRAG 0x0100 /* more-fragments flag */ #endif /* * Option types, for IP_PROTO_HOPOPTS, IP_PROTO_DSTOPTS headers */ #define IP6_OPT_PAD1 0x00 /* 00 0 00000 */ #define IP6_OPT_PADN 0x01 /* 00 0 00001 */ #define IP6_OPT_JUMBO 0xC2 /* 11 0 00010 = 194 */ #define IP6_OPT_JUMBO_LEN 6 #define IP6_OPT_RTALERT 0x05 /* 00 0 00101 */ #define IP6_OPT_RTALERT_LEN 4 #define IP6_OPT_RTALERT_MLD 0 /* Datagram contains an MLD message */ #define IP6_OPT_RTALERT_RSVP 1 /* Datagram contains an RSVP message */ #define IP6_OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */ #define IP6_OPT_LEN_MIN 2 #define IP6_OPT_TYPE(o) ((o) & 0xC0) /* high 2 bits of opt_type */ #define IP6_OPT_TYPE_SKIP 0x00 /* continue processing on failure */ #define IP6_OPT_TYPE_DISCARD 0x40 /* discard packet on failure */ #define IP6_OPT_TYPE_FORCEICMP 0x80 /* discard and send ICMP on failure */ #define IP6_OPT_TYPE_ICMP 0xC0 /* ...only if non-multicast dst */ #define IP6_OPT_MUTABLE 0x20 /* option data may change en route */ /* * Extension header (chained via {ip6,ext}_nxt, following IPv6 header) */ struct ip6_ext_hdr { uint8_t ext_nxt; /* next header */ uint8_t ext_len; /* following length in units of 8 octets */ union { struct ip6_ext_data_routing routing; struct ip6_ext_data_fragment fragment; } ext_data; } __attribute__((__packed__)); #ifndef __GNUC__ # pragma pack() #endif /* * Reserved addresses */ #define IP6_ADDR_UNSPEC \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" #define IP6_ADDR_LOOPBACK \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01" #define ip6_pack_hdr(hdr, fc, fl, plen, nxt, hlim, src, dst) do { \ struct ip6_hdr *ip6 = (struct ip6_hdr *)(hdr); \ ip6->ip6_flow = htonl(((uint32_t)(fc) << 28) & \ (IP6_FLOWLABEL_MASK | (fl))); \ ip6->ip6_vfc = (IP6_VERSION | ((fc) >> 4)); \ ip6->ip6_plen = htons((plen)); \ ip6->ip6_nxt = (nxt); ip6->ip6_hlim = (hlim); \ memmove(&ip6->ip6_src, &(src), IP6_ADDR_LEN); \ memmove(&ip6->ip6_dst, &(dst), IP6_ADDR_LEN); \ } while (0); __BEGIN_DECLS char *ip6_ntop(const ip6_addr_t *ip6, char *dst, size_t size); int ip6_pton(const char *src, ip6_addr_t *dst); char *ip6_ntoa(const ip6_addr_t *ip6); #define ip6_aton ip6_pton void ip6_checksum(void *buf, size_t len); __END_DECLS #endif /* DNET_IP6_H */ --- NEW FILE: rand.h --- --- NEW FILE: fw.h --- --- NEW FILE: os.h --- /* * os.h * * Sleazy OS-specific defines. * * Copyright (c) 2000 Dug Song <du...@mo...> * * $Id: os.h,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #ifndef DNET_OS_H #define DNET_OS_H #ifdef _WIN32 # include <winsock2.h> # include <windows.h> /* XXX */ # undef IP_OPT_LSRR # undef IP_OPT_TS # undef IP_OPT_RR # undef IP_OPT_SSRR typedef u_char uint8_t; typedef u_short uint16_t; typedef u_int uint32_t; # ifndef __CYGWIN__ typedef long ssize_t; # endif #else # include <sys/param.h> # include <sys/types.h> # include <sys/socket.h> # include <netinet/in.h> # include <arpa/inet.h> # include <netdb.h> # ifdef __bsdi__ # include <machine/types.h> typedef u_int8_t uint8_t; typedef u_int16_t uint16_t; typedef u_int32_t uint32_t; typedef u_int64_t uint64_t; # else # include <inttypes.h> # endif #endif #define DNET_LIL_ENDIAN 1234 #define DNET_BIG_ENDIAN 4321 /* BSD and IRIX */ #ifdef BYTE_ORDER #if BYTE_ORDER == LITTLE_ENDIAN # define DNET_BYTESEX DNET_LIL_ENDIAN #elif BYTE_ORDER == BIG_ENDIAN # define DNET_BYTESEX DNET_BIG_ENDIAN #endif #endif /* Linux */ #ifdef __BYTE_ORDER #if __BYTE_ORDER == __LITTLE_ENDIAN # define DNET_BYTESEX DNET_LIL_ENDIAN #elif __BYTE_ORDER == __BIG_ENDIAN # define DNET_BYTESEX DNET_BIG_ENDIAN #endif #endif /* Solaris */ #if defined(_BIT_FIELDS_LTOH) # define DNET_BYTESEX DNET_LIL_ENDIAN #elif defined (_BIT_FIELDS_HTOL) # define DNET_BYTESEX DNET_BIG_ENDIAN #endif /* Win32 - XXX */ #ifdef _WIN32 # define DNET_BYTESEX DNET_LIL_ENDIAN #endif /* Nastiness from old BIND code. */ #ifndef DNET_BYTESEX # if defined(vax) || defined(ns32000) || defined(sun386) || defined(i386) || \ defined(MIPSEL) || defined(_MIPSEL) || defined(BIT_ZERO_ON_RIGHT) || \ defined(__alpha__) || defined(__alpha) # define DNET_BYTESEX DNET_LIL_ENDIAN # elif defined(sel) || defined(pyr) || defined(mc68000) || defined(sparc) || \ defined(is68k) || defined(tahoe) || defined(ibm032) || defined(ibm370) || \ defined(MIPSEB) || defined(_MIPSEB) || defined(_IBMR2) || defined(DGUX) ||\ defined(apollo) || defined(__convex__) || defined(_CRAY) || \ defined(__hppa) || defined(__hp9000) || \ defined(__hp9000s300) || defined(__hp9000s700) || defined(__ia64) || \ defined (BIT_ZERO_ON_LEFT) || defined(m68k) # define DNET_BYTESEX DNET_BIG_ENDIAN # else # error "bytesex unknown" # endif #endif /* C++ support. */ #undef __BEGIN_DECLS #undef __END_DECLS #ifdef __cplusplus # define __BEGIN_DECLS extern "C" { # define __END_DECLS } /* extern "C" */ #else # define __BEGIN_DECLS # define __END_DECLS #endif /* Support for flexible arrays. */ #undef __flexarr #if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)) /* GCC 2.97 supports C99 flexible array members. */ # define __flexarr [] #else # ifdef __GNUC__ # define __flexarr [0] # else # if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L # define __flexarr [] # elif defined(_WIN32) /* MS VC++ */ # define __flexarr [] # else /* Some other non-C99 compiler. Approximate with [1]. */ # define __flexarr [1] # endif # endif #endif #endif /* DNET_OS_H */ --- NEW FILE: Makefile --- # Makefile.in generated by automake 1.9.6 from Makefile.am. # include/dnet/Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. srcdir = . top_srcdir = ../.. pkgdatadir = $(datadir)/libdnet pkglibdir = $(libdir)/libdnet pkgincludedir = $(includedir)/libdnet top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = /usr/bin/install -c install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = i386-unknown-openbsd4.4 host_triplet = i386-unknown-openbsd4.4 DIST_COMMON = $(dnetinclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.common subdir = include/dnet ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(dnetincludedir)" dnetincludeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(dnetinclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run aclocal-1.6 AMDEP_FALSE = # AMDEP_TRUE = AMTAR = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run tar AR = ar AUTOCONF = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run autoconf AUTOHEADER = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run autoheader AUTOMAKE = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run automake-1.6 AWK = nawk CC = gcc CCDEPMODE = depmode=none CFLAGS = -I/usr/local/include -Wall CHECKINC = CHECKLIB = CPP = gcc -E CPPFLAGS = CXX = g++ CXXCPP = g++ -E CXXDEPMODE = depmode=none CXXFLAGS = -I/usr/local/include CYGPATH_W = @CYGPATH_W@ DEFS = -DHAVE_CONFIG_H DEPDIR = .deps DSYMUTIL = @DSYMUTIL@ ECHO = /bin/echo ECHO_C = ECHO_N = -n ECHO_T = EGREP = /usr/bin/grep -E EXEEXT = F77 = g77 FFLAGS = -g -O2 GREP = /usr/bin/grep HAVE_CHECK_FALSE = HAVE_CHECK_TRUE = # INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s LDFLAGS = -L/usr/local/lib LIBOBJS = ${LIBOBJDIR}arp-bsd$U.o ${LIBOBJDIR}eth-bsd$U.o ${LIBOBJDIR}intf$U.o ${LIBOBJDIR}ip$U.o ${LIBOBJDIR}route-bsd$U.o LIBS = LIBTOOL = $(SHELL) $(top_builddir)/libtool LN_S = ln -s LTLIBOBJS = ${LIBOBJDIR}arp-bsd$U.lo ${LIBOBJDIR}eth-bsd$U.lo ${LIBOBJDIR}intf$U.lo ${LIBOBJDIR}ip$U.lo ${LIBOBJDIR}route-bsd$U.lo MAINT = # MAINTAINER_MODE_FALSE = MAINTAINER_MODE_TRUE = # MAKEINFO = ${SHELL} /home/key/IceScan/dnet-exported/config/missing --run makeinfo NMEDIT = @NMEDIT@ OBJEXT = o PACKAGE = libdnet PACKAGE_BUGREPORT = PACKAGE_NAME = PACKAGE_STRING = PACKAGE_TARNAME = PACKAGE_VERSION = PATH_SEPARATOR = : RANLIB = ranlib SED = @SED@ SET_MAKE = SHELL = /bin/sh STRIP = strip VERSION = 1.11 ac_aux_dir = config ac_ct_CC = gcc ac_ct_CXX = g++ ac_ct_F77 = g77 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = include am__leading_dot = @am__leading_dot@ am__quote = am__tar = @am__tar@ am__untar = @am__untar@ bindir = ${exec_prefix}/bin build = i386-unknown-openbsd4.4 build_alias = build_cpu = i386 build_os = openbsd4.4 build_vendor = unknown datadir = ${datarootdir} datarootdir = ${prefix}/share docdir = ${datarootdir}/doc/${PACKAGE} dvidir = ${docdir} exec_prefix = ${prefix} host = i386-unknown-openbsd4.4 host_alias = host_cpu = i386 host_os = openbsd4.4 host_vendor = unknown htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info install_sh = /home/key/IceScan/dnet-exported/config/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale localstatedir = ${prefix}/var mandir = ${datarootdir}/man mkdir_p = @mkdir_p@ oldincludedir = /usr/include pdfdir = ${docdir} prefix = /usr/local program_transform_name = s,x,x, psdir = ${docdir} sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com sysconfdir = ${prefix}/etc target_alias = AUTOMAKE_OPTIONS = foreign no-dependencies AM_CPPFLAGS = -I$(top_srcdir)/include dnetincludedir = $(includedir)/dnet dnetinclude_HEADERS = addr.h arp.h blob.h eth.h fw.h icmp.h intf.h ip.h \ ip6.h os.h rand.h route.h tcp.h tun.h udp.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/dnet/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign include/dnet/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: # $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): # $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-dnetincludeHEADERS: $(dnetinclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(dnetincludedir)" || $(mkdir_p) "$(DESTDIR)$(dnetincludedir)" @list='$(dnetinclude_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(dnetincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(dnetincludedir)/$$f'"; \ $(dnetincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(dnetincludedir)/$$f"; \ done uninstall-dnetincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(dnetinclude_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dnetincludedir)/$$f'"; \ rm -f "$(DESTDIR)$(dnetincludedir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(mkdir_p) $(distdir)/../.. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(dnetincludedir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dnetincludeHEADERS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dnetincludeHEADERS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dnetincludeHEADERS install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-dnetincludeHEADERS \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE: Makefile.am --- ## $Id: Makefile.am,v 1.1 2009/04/14 15:43:35 darkkey Exp $ include $(top_srcdir)/Makefile.am.common dnetincludedir = $(includedir)/dnet dnetinclude_HEADERS = addr.h arp.h blob.h eth.h fw.h icmp.h intf.h ip.h \ ip6.h os.h rand.h route.h tcp.h tun.h udp.h --- NEW FILE: tcp.h --- /* * tcp.h * * Transmission Control Protocol (RFC 793). * * Copyright (c) 2000 Dug Song <du...@mo...> * * $Id: tcp.h,v 1.1 2009/04/14 15:43:35 darkkey Exp $ */ #ifndef DNET_TCP_H #define DNET_TCP_H #define TCP_HDR_LEN 20 /* base TCP header length */ #define TCP_OPT_LEN 2 /* base TCP option length */ #define TCP_OPT_LEN_MAX 40 #define TCP_HDR_LEN_MAX (TCP_HDR_LEN + TCP_OPT_LEN_MAX) #ifndef __GNUC__ # define __attribute__(x) # pragma pack(1) #endif /* * TCP header, without options */ struct tcp_hdr { uint16_t th_sport; /* source port */ uint16_t th_dport; /* destination port */ uint32_t th_seq; /* sequence number */ uint32_t th_ack; /* acknowledgment number */ #if DNET_BYTESEX == DNET_BIG_ENDIAN uint8_t th_off:4, /* data offset */ th_x2:4; /* (unused) */ #elif DNET_BYTESEX == DNET_LIL_ENDIAN uint8_t th_x2:4, th_off:4; #else # error "need to include <dnet.h>" #endif uint8_t th_flags; /* control flags */ uint16_t th_win; /* window */ uint16_t th_sum; /* checksum */ uint16_t th_urp; /* urgent pointer */ }; /* * TCP control flags (th_flags) */ #define TH_FIN 0x01 /* end of data */ #define TH_SYN 0x02 /* synchronize sequence numbers */ #define TH_RST 0x04 /* reset connection */ #define TH_PUSH 0x08 /* push */ #define TH_ACK 0x10 /* acknowledgment number set */ #define TH_URG 0x20 /* urgent pointer set */ #define TH_ECE 0x40 /* ECN echo, RFC 3168 */ #define TH_CWR 0x80 /* congestion window reduced */ #define TCP_PORT_MAX 65535 /* maximum port */ #define TCP_WIN_MAX 65535 /* maximum (unscaled) window */ /* * Sequence number comparison macros */ #define TCP_SEQ_LT(a,b) ((int)((a)-(b)) < 0) #define TCP_SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0) #define TCP_SEQ_GT(a,b) ((int)((a)-(b)) > 0) #define TCP_SEQ_GEQ(a,b) ((int)((a)-(b)) >= 0) /* * TCP FSM states */ #define TCP_STATE_CLOSED 0 /* closed */ #define TCP_STATE_LISTEN 1 /* listening from connection */ #define TCP_STATE_SYN_SENT 2 /* active, have sent SYN */ #define TCP_STATE_SYN_RECEIVED 3 /* have sent and received SYN */ #define TCP_STATE_ESTABLISHED 4 /* established */ #define TCP_STATE_CLOSE_WAIT 5 /* rcvd FIN, waiting for close */ #define TCP_STATE_FIN_WAIT_1 6 /* have closed, sent FIN */ #define TCP_STATE_CLOSING 7 /* closed xchd FIN, await FIN-ACK */ #define TCP_STATE_LAST_ACK 8 /* had FIN and close, await FIN-ACK */ #define TCP_STATE_FIN_WAIT_2 9 /* have closed, FIN is acked */ #define TCP_STATE_TIME_WAIT 10 /* in 2*MSL quiet wait after close */ #define TCP_STATE_MAX 11 /* * Options (opt_type) - http://www.iana.org/assignments/tcp-parameters */ #define TCP_OPT_EOL 0 /* end of option list */ #define TCP_OPT_NOP 1 /* no operation */ #define TCP_OPT_MSS 2 /* maximum segment size */ #define TCP_OPT_WSCALE 3 /* window scale factor, RFC 1072 */ #define TCP_OPT_SACKOK 4 /* SACK permitted, RFC 2018 */ #define TCP_OPT_SACK 5 /* SACK, RFC 2018 */ #define TCP_OPT_ECHO 6 /* echo (obsolete), RFC 1072 */ #define TCP_OPT_ECHOREPLY 7 /* echo reply (obsolete), RFC 1072 */ #define TCP_OPT_TIMESTAMP 8 /* timestamp, RFC 1323 */ #define TCP_OPT_POCONN 9 /* partial order conn, RFC 1693 */ #define TCP_OPT_POSVC 10 /* partial order service, RFC 1693 */ #define TCP_OPT_CC 11 /* connection count, RFC 1644 */ #define TCP_OPT_CCNEW 12 /* CC.NEW, RFC 1644 */ #define TCP_OPT_CCECHO 13 /* CC.ECHO, RFC 1644 */ #define TCP_OPT_ALTSUM 14 /* alt checksum request, RFC 1146 */ #define TCP_OPT_ALTSUMDATA 15 /* alt checksum data, RFC 1146 */ #define TCP_OPT_SKEETER 16 /* Skeeter */ #define TCP_OPT_BUBBA 17 /* Bubba */ #define TCP_OPT_TRAILSUM 18 /* trailer checksum */ #define TCP_OPT_MD5 19 /* MD5 signature, RFC 2385 */ #define TCP_OPT_SCPS 20 /* SCPS capabilities */ #define TCP_OPT_SNACK 21 /* selective negative acks */ #define TCP_OPT_REC 22 /* record boundaries */ #define TCP_OPT_CORRUPT 23 /* corruption experienced */ #define TCP_OPT_SNAP 24 /* SNAP */ #define TCP_OPT_TCPCOMP 26 /* TCP compression filter */ #define TCP_OPT_MAX 27 #define TCP_OPT_TYPEONLY(type) \ ((type) == TCP_OPT_EOL ... [truncated message content] |
From: Alexander B. <da...@us...> - 2009-04-14 15:43:38
|
Update of /cvsroot/icescan/IceScan/icesockets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31421/icesockets Modified Files: sock_types.h sock_win.h Log Message: Initial libDnet import to repository. Index: sock_types.h =================================================================== RCS file: /cvsroot/icescan/IceScan/icesockets/sock_types.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** sock_types.h 15 Mar 2009 18:59:20 -0000 1.19 --- sock_types.h 14 Apr 2009 15:43:35 -0000 1.20 *************** *** 157,168 **** }; ! #ifdef HAVE_LIBDNET ! #include <dnet.h> ! #else ! #define ETH_ADDR_LEN ETH_ALEN_ ! #define ARP_HRD_ETH ARPHRD_ETHER ! #define IP_ADDR_LEN 32 ! typedef arp_ether_ipv4 arp_hdr; ! #endif // Structure and constants for icmp packets --- 157,169 ---- }; ! #define HAVE_LIBDNET 1 ! #include "dnet.h" ! ! //#else ! // #define ETH_ADDR_LEN ETH_ALEN_ ! // #define ARP_HRD_ETH ARPHRD_ETHER ! // #define IP_ADDR_LEN 32 ! // typedef arp_ether_ipv4 arp_hdr; ! //#endif // Structure and constants for icmp packets Index: sock_win.h =================================================================== RCS file: /cvsroot/icescan/IceScan/icesockets/sock_win.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sock_win.h 4 Mar 2009 15:02:15 -0000 1.2 --- sock_win.h 14 Apr 2009 15:43:35 -0000 1.3 *************** *** 20,24 **** #pragma comment(lib, "wpcap.lib") #pragma comment(lib, "packet.lib") ! #pragma comment(lib, "dnet.lib") //libdnet-stripped #pragma comment(lib, "iphlpapi.lib") #pragma comment(lib, "liblua.lib") --- 20,24 ---- #pragma comment(lib, "wpcap.lib") #pragma comment(lib, "packet.lib") ! #pragma comment(lib, "dnet.lib") #pragma comment(lib, "iphlpapi.lib") #pragma comment(lib, "liblua.lib") |
From: Alexander B. <da...@us...> - 2009-04-14 15:43:38
|
Update of /cvsroot/icescan/IceScan/vccproject In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31421/vccproject Modified Files: IceScan.vcproj Removed Files: IceScan.suo Log Message: Initial libDnet import to repository. --- IceScan.suo DELETED --- Index: IceScan.vcproj =================================================================== RCS file: /cvsroot/icescan/IceScan/vccproject/IceScan.vcproj,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** IceScan.vcproj 16 Mar 2009 16:41:04 -0000 1.8 --- IceScan.vcproj 14 Apr 2009 15:43:35 -0000 1.9 *************** *** 61,65 **** --- 61,67 ---- <Tool Name="VCLinkerTool" + OutputFile="..\$(ProjectName).exe" LinkIncremental="2" + AdditionalLibraryDirectories=""dnet-exported"" GenerateDebugInformation="true" SubSystem="1" *************** *** 131,134 **** --- 133,137 ---- <Tool Name="VCLinkerTool" + OutputFile="..\$(ProjectName).exe" LinkIncremental="2" GenerateDebugInformation="true" |
From: Alexander B. <da...@us...> - 2009-04-14 15:39:53
|
Update of /cvsroot/icescan/IceScan/dnet-exported/include/dnet In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31055/include/dnet Log Message: Directory /cvsroot/icescan/IceScan/dnet-exported/include/dnet added to the repository |
From: Alexander B. <da...@us...> - 2009-04-14 15:39:35
|
Update of /cvsroot/icescan/IceScan/dnet-exported/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31027/include Log Message: Directory /cvsroot/icescan/IceScan/dnet-exported/include added to the repository |
From: Alexander B. <da...@us...> - 2009-04-14 15:39:33
|
Update of /cvsroot/icescan/IceScan/dnet-exported/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31027/src Log Message: Directory /cvsroot/icescan/IceScan/dnet-exported/src added to the repository |
From: Alexander B. <da...@us...> - 2009-04-14 15:39:29
|
Update of /cvsroot/icescan/IceScan/dnet-exported/config In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31027/config Log Message: Directory /cvsroot/icescan/IceScan/dnet-exported/config added to the repository |
From: Alexander B. <da...@us...> - 2009-04-14 15:37:45
|
Update of /cvsroot/icescan/IceScan/dnet-exported In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30958/dnet-exported Log Message: Directory /cvsroot/icescan/IceScan/dnet-exported added to the repository |
From: yu l. <mc...@us...> - 2009-04-13 13:24:51
|
Update of /cvsroot/icescan/IceScan In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv18184 Modified Files: ChangeLog TODO Log Message: Index: TODO =================================================================== RCS file: /cvsroot/icescan/IceScan/TODO,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** TODO 10 Apr 2009 14:07:37 -0000 1.68 --- TODO 13 Apr 2009 13:24:47 -0000 1.69 *************** *** 134,138 **** I64 + develop *standart* engine for realtime hostinfo output (eg port/protocol/table/etc) ! I51 + -oX [filename] - XML output I53 + -oT [filename] - troff output --- 134,138 ---- I64 + develop *standart* engine for realtime hostinfo output (eg port/protocol/table/etc) ! I51 + -oX [filename] - XML output(header and footer has been added) I53 + -oT [filename] - troff output Index: ChangeLog =================================================================== RCS file: /cvsroot/icescan/IceScan/ChangeLog,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** ChangeLog 10 Apr 2009 14:07:37 -0000 1.38 --- ChangeLog 13 Apr 2009 13:24:47 -0000 1.39 *************** *** 4,7 **** --- 4,8 ---- *** IceScan v. 0.0.7, possibly 1st May 2009 *** + + added xml output(just header and footer) * fixed duplicated ports of -p * fixed minor bugs with running on Win32. |
From: yu l. <mc...@us...> - 2009-04-13 12:56:50
|
Update of /cvsroot/icescan/IceScan In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17000 Modified Files: iceoutput.h icescan.cc Log Message: Add xml output ,but just has header and footer Index: icescan.cc =================================================================== RCS file: /cvsroot/icescan/IceScan/icescan.cc,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** icescan.cc 10 Apr 2009 14:34:07 -0000 1.55 --- icescan.cc 13 Apr 2009 12:56:34 -0000 1.56 *************** *** 789,794 **** par->output_filenames[GREP].assign(argv[i+1]); i++; ! break; ! default: invalid_command(argv[0], "Invalid output type.",""); --- 789,797 ---- par->output_filenames[GREP].assign(argv[i+1]); i++; ! break; ! case 'X': ! par->output_filenames[XML].assign(argv[i+1]); ! i++; ! break; default: invalid_command(argv[0], "Invalid output type.",""); Index: iceoutput.h =================================================================== RCS file: /cvsroot/icescan/IceScan/iceoutput.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** iceoutput.h 15 Mar 2009 18:59:18 -0000 1.20 --- iceoutput.h 13 Apr 2009 12:56:34 -0000 1.21 *************** *** 8,11 **** --- 8,12 ---- #define MAX_SHOWED 7 + #define XML_INCIDENT " " class out_type{ *************** *** 119,123 **** std::ostringstream os; ! if(outs[TEXT].exists || outs[GREP].exists){ os.str().clear(); --- 120,124 ---- std::ostringstream os; ! if(outs[TEXT].exists || outs[GREP].exists || outs[XML].exists){ os.str().clear(); *************** *** 125,129 **** trim_last(tm, '\n'); ! os << "# " << ICENAME << " " << ICEVERSION << " started at " << tm << " as "; --- 126,130 ---- trim_last(tm, '\n'); ! os << "# " << ICENAME << " " << ICEVERSION << " started at " << tm << " as "; *************** *** 139,142 **** --- 140,155 ---- if(outs[GREP].exists) outs[GREP].out << os.str(); + //Ugly:) ,but the temp way to show the header + if(outs[XML].exists){ + std::ostringstream xml_os; + xml_os.str().clear(); + xml_os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl; + xml_os << "<IceScan>" << endl; + xml_os << XML_INCIDENT <<"<header>" <<endl; + xml_os << XML_INCIDENT << XML_INCIDENT << "<version>" << ICEVERSION << "</version>" << endl; + xml_os << XML_INCIDENT << XML_INCIDENT << "<start-time>" << tm << "</start-time>" << endl; + xml_os << XML_INCIDENT << "</header> " << endl; + outs[XML].out << xml_os.str(); + } } } *************** *** 154,158 **** std::ostringstream os; ! if(outs[TEXT].exists || outs[GREP].exists){ os.str().clear(); --- 167,171 ---- std::ostringstream os; ! if(outs[TEXT].exists || outs[GREP].exists || outs[XML].exists){ os.str().clear(); *************** *** 169,173 **** if(outs[GREP].exists) ! outs[GREP].out << os.str(); } --- 182,198 ---- if(outs[GREP].exists) ! outs[GREP].out << os.str(); ! ! if(outs[XML].exists){ ! std::ostringstream xml_os; ! xml_os.str().clear(); ! xml_os << XML_INCIDENT << "<footer>" <<endl; ! xml_os << XML_INCIDENT << XML_INCIDENT <<"<ips>" << up_targets << "</ips>" << endl; ! xml_os << XML_INCIDENT << XML_INCIDENT <<"<lapse-seconds>" << seconds << "</lapse-seconds>" << endl; ! xml_os << XML_INCIDENT << "</footer> " << endl; ! xml_os << "</IceScan>" << endl; ! outs[XML].out << xml_os.str(); ! } ! } *************** *** 507,514 **** outs[TEXT].out.open(fname.c_str()); ! //fname.assign(filename); ! //fname.append(".xml"); ! //outs[XML].exists = true; ! //outs[XML].out.open(fname.c_str()); fname.assign(filename); --- 532,539 ---- outs[TEXT].out.open(fname.c_str()); ! fname.assign(filename); ! fname.append(".xml"); ! outs[XML].exists = true; ! outs[XML].out.open(fname.c_str()); fname.assign(filename); |
From: yu l. <mc...@us...> - 2009-04-10 14:34:13
|
Update of /cvsroot/icescan/IceScan In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv8056 Modified Files: icescan.cc Log Message: Index: icescan.cc =================================================================== RCS file: /cvsroot/icescan/IceScan/icescan.cc,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** icescan.cc 10 Apr 2009 14:07:37 -0000 1.54 --- icescan.cc 10 Apr 2009 14:34:07 -0000 1.55 *************** *** 249,263 **** re.match(argv[i+1]); ! ! re.findReset(); ! char *port_s = new char[65536];//status of all ports(used or not) ! ! int port_low, port_up; ! int start_port = 65535, end_port = 0; ! while(re.findNext()){ var2 = ""; var = ""; ! re.group(1, var); if(re.groups() > 2) re.group(2,var2); --- 249,259 ---- re.match(argv[i+1]); ! re.findReset(); ! char *port_s=(char*)malloc(sizeof(char)*65536);//status of all ports(used or not) ! int port_low,port_up,port_min=70000,port_max=-1; while(re.findNext()){ var2 = ""; var = ""; ! re.group(1,var); if(re.groups() > 2) re.group(2,var2); *************** *** 268,312 **** sscanf(var.c_str(), "%d-%d", &port_low, &port_up); } ! ! start_port = MIN(start_port, port_low); ! end_port = MAX(end_port, port_up); ! ! DBGOUTPUT(port_low << " " << port_up); ! DBGOUTPUT(start_port << " " << end_port); ! if(MAX(port_low, port_up) > 65535 || MIN(port_low, port_up)< 0) invalid_command(argv[0], "Invalid port range definition format: port value should be between 0 - 65535.",""); ! for(int j = MIN(port_low, port_up); j <= MAX(port_low, port_up); j++) port_s[j] = 1;//mark the port used ! } ! ! int j,k; ! ! for(j = start_port; j <= end_port;){ ! DBGOUTPUT(j); ! ! for(; j <= end_port && !port_s[j]; j++) ! DBGOUTPUT(j); ! ; //skip unused ports ! ! if( j <= end_port){ //check whether out of boundary ! ! struct port_range pr_new; ! ! pr_new.lower_port=j; ! ! for( k = j; k <= end_port && port_s[k]; k++);//find all continuesly used ports ! ! pr_new.upper_port = k-1; //we don't need to check k here ! ! DBGOUTPUT(pr_new.lower_port << " " << pr_new.upper_port); ! ! j = k; ! ! ports.push_back(pr_new); ! } ! } ! ! delete[] port_s; i++; } --- 264,285 ---- sscanf(var.c_str(), "%d-%d", &port_low, &port_up); } ! if(MAX(port_low, port_up)>port_max)port_max=MAX(port_low, port_up); ! if(MIN(port_low, port_up)<port_min)port_min=MIN(port_low, port_up); if(MAX(port_low, port_up) > 65535 || MIN(port_low, port_up)< 0) invalid_command(argv[0], "Invalid port range definition format: port value should be between 0 - 65535.",""); ! for(int j = MIN(port_low, port_up);j <= MAX(port_low, port_up);j++) port_s[j] = 1;//mark the port used ! } ! int j; ! for(j = port_min;j <= port_max; ){ ! for(;j <= port_max && !port_s[j];j++);//skip unused ports ! if(j > port_max)continue;//check whether out of boundary ! struct port_range pr_new; ! pr_new.lower_port = j; ! for( ;j <= port_max && port_s[j];j++);//find all continuesly used ports ! pr_new.upper_port = j-1;//we don't need to check k here ! ports.push_back(pr_new); ! } ! free(port_s); i++; } |
From: yu l. <mc...@us...> - 2009-04-10 14:15:26
|
Update of /cvsroot/icescan/IceScan In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4439 Modified Files: ChangeLog TODO Log Message: Index: TODO =================================================================== RCS file: /cvsroot/icescan/IceScan/TODO,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** TODO 7 Apr 2009 13:39:55 -0000 1.66 --- TODO 10 Apr 2009 13:38:29 -0000 1.67 *************** *** 49,53 **** I71 + PACKET TRACE options. (--trace-options) I83 * check ports with -p for duplicates and reorganaize them (e.g. convert 20-30,25-35 ! to 20-35 at ports parse time). I104 + PACKET TRACE messages engine: add user UDP and DNS handling --- 49,53 ---- I71 + PACKET TRACE options. (--trace-options) I83 * check ports with -p for duplicates and reorganaize them (e.g. convert 20-30,25-35 ! to 20-35 at ports parse time).(fixed) I104 + PACKET TRACE messages engine: add user UDP and DNS handling Index: ChangeLog =================================================================== RCS file: /cvsroot/icescan/IceScan/ChangeLog,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** ChangeLog 7 Apr 2009 13:39:55 -0000 1.36 --- ChangeLog 10 Apr 2009 13:38:29 -0000 1.37 *************** *** 4,8 **** *** IceScan v. 0.0.7, possibly 1st May 2009 *** ! * fixed minor bugs with running on Win32. + UDP scan and ping completely rewritten. --- 4,8 ---- *** IceScan v. 0.0.7, possibly 1st May 2009 *** ! * fixed duplicated ports of -p * fixed minor bugs with running on Win32. + UDP scan and ping completely rewritten. |
From: Alexander B. <da...@us...> - 2009-04-10 14:07:49
|
Update of /cvsroot/icescan/IceScan In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6117 Modified Files: ChangeLog TODO icescan.cc Log Message: I83 fixed. Index: icescan.cc =================================================================== RCS file: /cvsroot/icescan/IceScan/icescan.cc,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** icescan.cc 10 Apr 2009 12:57:49 -0000 1.53 --- icescan.cc 10 Apr 2009 14:07:37 -0000 1.54 *************** *** 249,259 **** re.match(argv[i+1]); ! re.findReset(); ! char *port_s=(char*)malloc(sizeof(char)*65536);//status of all ports(used or not) ! int port_low,port_up; while(re.findNext()){ var2 = ""; var = ""; ! re.group(1,var); if(re.groups() > 2) re.group(2,var2); --- 249,263 ---- re.match(argv[i+1]); ! ! re.findReset(); ! char *port_s = new char[65536];//status of all ports(used or not) ! ! int port_low, port_up; ! int start_port = 65535, end_port = 0; ! while(re.findNext()){ var2 = ""; var = ""; ! re.group(1, var); if(re.groups() > 2) re.group(2,var2); *************** *** 265,284 **** } if(MAX(port_low, port_up) > 65535 || MIN(port_low, port_up)< 0) invalid_command(argv[0], "Invalid port range definition format: port value should be between 0 - 65535.",""); ! for(int j=MIN(port_low, port_up);j<=MAX(port_low, port_up);j++) ! port_s[j]=1;//mark the port used ! } ! int j,k; ! for(j=MIN(port_low, port_up);j<=MAX(port_low, port_up);){ ! for(;j<=MAX(port_low, port_up)&&!port_s[j];j++);//skip unused ports ! if(j>MAX(port_low, port_up))continue;//check whether out of boundary ! struct port_range pr_new; ! pr_new.lower_port=j; ! for( k=j;k<=MAX(port_low, port_up)&&port_s[k];k++);//find all continuesly used ports ! pr_new.upper_port=k-1;//we don't need to check k here ! ports.push_back(pr_new); ! } ! free(port_s); i++; } --- 269,312 ---- } + start_port = MIN(start_port, port_low); + end_port = MAX(end_port, port_up); + + DBGOUTPUT(port_low << " " << port_up); + DBGOUTPUT(start_port << " " << end_port); + if(MAX(port_low, port_up) > 65535 || MIN(port_low, port_up)< 0) invalid_command(argv[0], "Invalid port range definition format: port value should be between 0 - 65535.",""); ! for(int j = MIN(port_low, port_up); j <= MAX(port_low, port_up); j++) ! port_s[j] = 1;//mark the port used ! } ! ! int j,k; ! ! for(j = start_port; j <= end_port;){ ! DBGOUTPUT(j); ! ! for(; j <= end_port && !port_s[j]; j++) ! DBGOUTPUT(j); ! ; //skip unused ports ! ! if( j <= end_port){ //check whether out of boundary ! ! struct port_range pr_new; ! ! pr_new.lower_port=j; ! ! for( k = j; k <= end_port && port_s[k]; k++);//find all continuesly used ports ! ! pr_new.upper_port = k-1; //we don't need to check k here ! ! DBGOUTPUT(pr_new.lower_port << " " << pr_new.upper_port); ! ! j = k; ! ! ports.push_back(pr_new); ! } ! } ! ! delete[] port_s; i++; } Index: TODO =================================================================== RCS file: /cvsroot/icescan/IceScan/TODO,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** TODO 10 Apr 2009 13:38:29 -0000 1.67 --- TODO 10 Apr 2009 14:07:37 -0000 1.68 *************** *** 48,53 **** I70 + PACKET TRACE should show TCP and IP options. I71 + PACKET TRACE options. (--trace-options) - I83 * check ports with -p for duplicates and reorganaize them (e.g. convert 20-30,25-35 - to 20-35 at ports parse time).(fixed) I104 + PACKET TRACE messages engine: add user UDP and DNS handling --- 48,51 ---- Index: ChangeLog =================================================================== RCS file: /cvsroot/icescan/IceScan/ChangeLog,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** ChangeLog 10 Apr 2009 13:38:29 -0000 1.37 --- ChangeLog 10 Apr 2009 14:07:37 -0000 1.38 *************** *** 35,38 **** --- 35,39 ---- + added --pcap-filter (set the pcap filter) option. * manpage fixes + * fixed ports dublication check in -p option *** IceScan v. 0.0.6, 12 Jan 2007 *** |
From: yu l. <mc...@us...> - 2009-04-10 12:58:01
|
Update of /cvsroot/icescan/IceScan In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2284 Modified Files: icescan.cc Log Message: I83 fixed .Now there is no duplicate of ports Index: icescan.cc =================================================================== RCS file: /cvsroot/icescan/IceScan/icescan.cc,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** icescan.cc 7 Apr 2009 13:39:55 -0000 1.52 --- icescan.cc 10 Apr 2009 12:57:49 -0000 1.53 *************** *** 243,247 **** invalid_command(argv[0], "Invalid port range definition format.", ""); else ! return false; }else{ IceRegex re("(\\d+(-\\d+)?),?"); --- 243,247 ---- invalid_command(argv[0], "Invalid port range definition format.", ""); else ! return false; }else{ IceRegex re("(\\d+(-\\d+)?),?"); *************** *** 250,253 **** --- 250,255 ---- re.match(argv[i+1]); re.findReset(); + char *port_s=(char*)malloc(sizeof(char)*65536);//status of all ports(used or not) + int port_low,port_up; while(re.findNext()){ *************** *** 255,277 **** re.group(1,var); if(re.groups() > 2) re.group(2,var2); - struct port_range pr; if(var2 == ""){ ! sscanf(var.c_str(), "%d", &pr.lower_port); ! pr.upper_port = pr.lower_port; }else{ ! sscanf(var.c_str(), "%d-%d", &pr.lower_port, &pr.upper_port); } ! ! if(MAX(pr.upper_port, pr.lower_port) > 65535 || MIN(pr.upper_port, pr.lower_port) < 0) ! invalid_command(argv[0], "Invalid port range definition format: port value should be between 0 - 65535.",""); ! ! ports.push_back(pr); } i++; } }else invalid_command(argv[0], "Invalid port range definition format.",""); ! return true; } --- 257,289 ---- re.group(1,var); if(re.groups() > 2) re.group(2,var2); if(var2 == ""){ ! sscanf(var.c_str(), "%d", &port_low); ! port_up = port_low; }else{ ! sscanf(var.c_str(), "%d-%d", &port_low, &port_up); } ! ! if(MAX(port_low, port_up) > 65535 || MIN(port_low, port_up)< 0) ! invalid_command(argv[0], "Invalid port range definition format: port value should be between 0 - 65535.",""); ! for(int j=MIN(port_low, port_up);j<=MAX(port_low, port_up);j++) ! port_s[j]=1;//mark the port used } + int j,k; + for(j=MIN(port_low, port_up);j<=MAX(port_low, port_up);){ + for(;j<=MAX(port_low, port_up)&&!port_s[j];j++);//skip unused ports + if(j>MAX(port_low, port_up))continue;//check whether out of boundary + struct port_range pr_new; + pr_new.lower_port=j; + for( k=j;k<=MAX(port_low, port_up)&&port_s[k];k++);//find all continuesly used ports + pr_new.upper_port=k-1;//we don't need to check k here + ports.push_back(pr_new); + } + free(port_s); i++; } }else invalid_command(argv[0], "Invalid port range definition format.",""); ! return true; } |
From: Alexander B. <da...@us...> - 2009-04-07 14:16:03
|
Update of /cvsroot/icescan/IceScan In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11281 Modified Files: ChangeLog Makefile.am TODO caengine2.h configure.ac cpengine.cc cpsosfp.h iceparams.h icescan.1 icescan.cc icescan.html Added Files: passive-osfp Removed Files: passive-osfp-tcprst passive-osfp-tcpsyn passive-osfp-tcpsynack Log Message: 0.0.7rc1 release Index: icescan.cc =================================================================== RCS file: /cvsroot/icescan/IceScan/icescan.cc,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** icescan.cc 15 Mar 2009 18:59:18 -0000 1.51 --- icescan.cc 7 Apr 2009 13:39:55 -0000 1.52 *************** *** 47,50 **** --- 47,51 ---- "\t-PP [seconds]: passive discovery; capture packets for [seconds]\n" "\t-n: disable reverse-dns lookups\n" + "\t--use-first-resolve: use only 1st IP in DNS resolving of target\n" "\t--dns-servers <dns1[,dns2],...>: specify custom DNS servers\n" "\t--system-dns: use standart(OS) DNS resolver\n" *************** *** 68,80 **** "\t--list-interfaces: list all interfaces\n" "\t-e <iface-number>: use interface <iface-number> for pcap/source iface\n" "\t--send-eth: use channel(2) level to send raw packets\n" "\t--send-ip: use network(3) level to send raw packets\n" "\t--promisc: put interface(s) in promiscuous mode\n" "\t--input-dumpfile: input tcpdump file for passive scan/ping\n" ! "TIMING AND PERFORMANCE:\n" "\t-T< 0 | 1 | 2 | 3 | 4 >: Specifies probe round trip time.\n" "\t--min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout <time>: Specifies probe round trip time.\n" "\t--max-retries <tries>: Caps number of port scan probe retransmissions.\n" "\t--scan-delay/--max-scan-delay <time>: Adjust delay between probes.\n" "SCRIPTING && IDS\n" "\t-SC: script scan\n" --- 69,84 ---- "\t--list-interfaces: list all interfaces\n" "\t-e <iface-number>: use interface <iface-number> for pcap/source iface\n" + "\t--pcap-filter \"expression\": use pcap filter\n" "\t--send-eth: use channel(2) level to send raw packets\n" "\t--send-ip: use network(3) level to send raw packets\n" "\t--promisc: put interface(s) in promiscuous mode\n" "\t--input-dumpfile: input tcpdump file for passive scan/ping\n" ! // FIXME: this options must work ! /* "TIMING AND PERFORMANCE:\n" "\t-T< 0 | 1 | 2 | 3 | 4 >: Specifies probe round trip time.\n" "\t--min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout <time>: Specifies probe round trip time.\n" "\t--max-retries <tries>: Caps number of port scan probe retransmissions.\n" "\t--scan-delay/--max-scan-delay <time>: Adjust delay between probes.\n" + */ "SCRIPTING && IDS\n" "\t-SC: script scan\n" *************** *** 91,94 **** --- 95,99 ---- "\t-oI/oG <filename>: Output scan in normal/grepable format to given file\n" "\t-oA <base_filename>: Output in all formats at once\n" + "\t-w <filename>: dump all recieved packets to file\n" "\t--packet-trace: print all packets that sent and received\n" "\t--open: show only open (or possibly open) port(s)\n" *************** *** 96,100 **** "\t-v[v[v[v]]]]: verbose levels\n" "OTHER:\n" - "\t--use-first-resolve: use only 1st IP in DNS resolving of target\n" "\t--uid0: assume that the current user is fully privileged\n" "\t--uid1: assume that the current user isn't fully privileged\n" --- 101,104 ---- *************** *** 370,373 **** --- 374,383 ---- }else if(!strcmp(argv[i], "--open")){ par->show_openonly = true; + }else if(!strcmp(argv[i], "--pcap-filter")){ + if(i+1 < argc){ + par->pcap_filter = argv[++i]; + //DBGOUTPUT( par->pcap_filter ); + }else + invalid_command(argv[0], "No pcap filter specified.", ""); }else if(!strcmp(argv[i], "--tcp-options")){ if(i+1 < argc){ *************** *** 566,569 **** --- 576,587 ---- exit(0); break; + + case 'w': + + if (i+1<argc){ + par->dumpfile = argv[++i]; + }else + invalid_command(argv[0], "Invalid option format.",""); + break; case 'n': --- passive-osfp-tcpsynack DELETED --- --- passive-osfp-tcprst DELETED --- --- passive-osfp-tcpsyn DELETED --- Index: ChangeLog =================================================================== RCS file: /cvsroot/icescan/IceScan/ChangeLog,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** ChangeLog 16 Mar 2009 16:41:03 -0000 1.35 --- ChangeLog 7 Apr 2009 13:39:55 -0000 1.36 *************** *** 3,7 **** (+ -- new feature, * -- bugfix) ! *** IceScan v. 0.0.7, 23 March 2009 *** * fixed minor bugs with running on Win32. --- 3,7 ---- (+ -- new feature, * -- bugfix) ! *** IceScan v. 0.0.7, possibly 1st May 2009 *** * fixed minor bugs with running on Win32. *************** *** 23,27 **** + parallel DNS-resolver for resolving ip/revnames at active scan phase. + --system-dns ans --dns-servers options. ! + own DNS-resolver for resolving revnames at passive scan phase. * fixed cpcapreader::read_rawpacket segfault on BIG packets. * system dns servers extraction from resolv.conf(*nix) or registry. --- 23,27 ---- + parallel DNS-resolver for resolving ip/revnames at active scan phase. + --system-dns ans --dns-servers options. ! + own DNS-resolver for resolving names/revnames at passive scan phase. * fixed cpcapreader::read_rawpacket segfault on BIG packets. * system dns servers extraction from resolv.conf(*nix) or registry. *************** *** 32,35 **** --- 32,38 ---- + added additional hosts debug stats. + added "all-hosts" congestion window. + + added -w (dump recieved packets to tcpdump file) option. + + added --pcap-filter (set the pcap filter) option. + * manpage fixes *** IceScan v. 0.0.6, 12 Jan 2007 *** Index: configure.ac =================================================================== RCS file: /cvsroot/icescan/IceScan/configure.ac,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** configure.ac 8 Mar 2009 22:44:52 -0000 1.11 --- configure.ac 7 Apr 2009 13:39:55 -0000 1.12 *************** *** 7,11 **** AC_DEFINE(ICESCAN_VERSION, AC_PACKAGE_VERSION, [version]) AC_DEFINE(ICESCAN_NAME, AC_PACKAGE_NAME, [name]) ! AC_DEFINE(ICESCAN_DATE, "17 March 2009", [releasedate]) AC_DEFINE(ICESCAN_WEBSITE, "http://sf.net/projects/icescan/", [website]) --- 7,11 ---- AC_DEFINE(ICESCAN_VERSION, AC_PACKAGE_VERSION, [version]) AC_DEFINE(ICESCAN_NAME, AC_PACKAGE_NAME, [name]) ! AC_DEFINE(ICESCAN_DATE, "07 April 2009", [releasedate]) AC_DEFINE(ICESCAN_WEBSITE, "http://sf.net/projects/icescan/", [website]) --- NEW FILE: passive-osfp --- # IceScan -- TCP Passive OS Fingerprints # # Signatures stored in sections [tcpsyn]/[tcpsynack]/[tcprst]. # Each section used for packets of same type (SYN/SYN+ACK/RST). # # Files format is similar to Michal Zalewski's pf0 # (see http://lcamtuf.coredump.cx/p0f.shtml), # so you can use pf0*.fp file(s) instead of these. # # Fingerprint entry format # (Copyright 2000-2006 by Michal Zalewski <lc...@co...>) # # wwww:ttt:D:ss:OOO...:QQ:OS:Details # # wwww - window size (can be * or %nnn or Sxx or Txx) # "Snn" (multiple of MSS) and "Tnn" (multiple of MTU) are allowed. # ttt - initial TTL # D - don't fragment bit (0 - not set, 1 - set) # ss - overall SYN packet size (* has a special meaning) # OOO - option value and order specification (see below) # QQ - specials list (see below) # OS - OS genre (Linux, Solaris, Windows) # details - OS description (2.6.x) # # Option block description is a list of comma or space separated # options in the order they appear in the packet: # # N - NOP option # E - EOL option # Wnnn - window scaling option, value nnn (or * or %nnn) # Mnnn - maximum segment size option, value nnn (or * or %nnn) # S - selective ACK OK # T - timestamp # T0 - timestamp with zero value # ?n - unrecognized option number n. # # Quirks section is usually an empty list ('.') of oddities or bugs of this # particular stack. List items are not separated in any way. Possible values: # # P - options past EOL, # Z - zero IP ID, # I - IP options specified, # U - urg pointer non-zero, # X - unused (x2) field non-zero, # A - ACK number non-zero, # T - non-zero second timestamp, # F - unusual flags (PUSH, URG, etc), # D - data payload, # ! - broken options segment. # K - RST with ACK flag # Q - seq is equal to ack # 0 - seq number is equal to zero # # If your system/device doesn't detected by IceScan, # please send following output and full description of # scanned device to ice...@li.... # IceScan -- TCP SYN Fingerprints [tcpsyn] # >>>Linux<<< S3:64:1:60:M*,S,T,N,W1:.:Linux:2.6, seldom 2.4 S4:64:1:60:M*,S,T,N,W1:.:Linux:2.6, seldom 2.4 S3:64:1:60:M*,S,T,N,W2:.:Linux:2.6, seldom 2.4 S4:64:1:60:M*,S,T,N,W2:.:Linux:2.6, seldom 2.4 S4:64:1:60:M*,S,T,N,W5:.:Linux:2.6 # >>>OpenBSD<<< 16384:64:1:64:M*,N,N,S,N,W0,N,N,T:.:OpenBSD:3.0-4.4 # >>>Windows<<< %8192:128:1:48:M*,N,N,S:.:Windows:2000 SP2+, XP SP1+ (seldom 98) 65535:128:1:48:M*,N,N,S:.:Windows:XP SP3 # >>>Cisco<<< 4128:255:0:44:M*:Z:Cisco:7200, Catalyst 3500 and more 4128:255:0:44:M*:.:Cisco:8xx, 18xx # IceScan -- TCP SYN+ACK Fingerprints [tcpsynack] # >>>Linux<<< 5792:64:1:60:M*,S,T,N,W1:ZAT:Linux:<= 2.6.18 5792:64:1:60:M*,S,T,N,W2:ZAT:Linux:<= 2.6.11 5792:64:1:60:M*,S,T,N,W7:ZAT:Linux:>=2.6.19 5840:64:1:48:M*,N,N,S:ZA:Linux:2.6.26+ # >>>OpenBSD<<< 16384:64:1:44:M1460:A:OpenBSD:4.3 and above 16384:64:1:48:M1460,N,N,S:A:OpenBSD:4.3 and above (with sack) 16384:64:1:64:M*,N,N,S,N,W0,N,N,T:AT:OpenBSD:4.0-4.1 17376:64:1:64:M*,N,N,S,N,W0,N,N,T:AT:OpenBSD:3.3-3.9 # >>>Windows<<< 16384:128:0:64:M*,N,W0,N,N,T0,N,N,S:A:Windows:2003 SP3+ 16384:128:0:48:M1460,N,N,S:A:Windows:2003 SP1+ %8192:128:1:48:M1460,N,N,S:A:Windows:Vista 65535:128:1:48:M1460,N,N,S:A:Windows:2000, XP SP1+ # >>>Cisco<<< 4128:255:0:44:M1460:A:Cisco:8xx 4128:255:0:44:M536:A:Cisco:18xx # IceScan -- TCP RST Fingerprints [tcprst] # >>>Linux<<< 0:64:1:40:.:ZADK0:Linux:2.6.x # >>>OpenBSD<<< 0:64:1:40:.:ADK0:OpenBSD:4.x # >>>Windows<<< 0:128:0:40:.:ADK0:Windows:2000, XP, 2003 0:128:1:40:.:ADK0:Windows:Vista # >>>Cisco<<< 0:255:0:40:.:ADK0:Cisco:8xx Index: iceparams.h =================================================================== RCS file: /cvsroot/icescan/IceScan/iceparams.h,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** iceparams.h 16 Mar 2009 16:41:04 -0000 1.50 --- iceparams.h 7 Apr 2009 13:39:55 -0000 1.51 *************** *** 77,80 **** --- 77,82 ---- bool promisc_mode; // forcing listen in promisc mode + icestring pcap_filter; + struct timeval start_time; // IceScan start time *************** *** 225,228 **** --- 227,232 ---- icestring output_template; + icestring dumpfile; + bool show_openonly; *************** *** 234,237 **** --- 238,243 ---- void default_init(){ + dumpfile = ""; + databases_dir = NULL; *************** *** 317,320 **** --- 323,329 ---- promisc_mode = false; + pcap_filter = ""; + + badchksum = false; random_len = 0; Index: Makefile.am =================================================================== RCS file: /cvsroot/icescan/IceScan/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Makefile.am 15 Mar 2009 18:59:18 -0000 1.12 --- Makefile.am 7 Apr 2009 13:39:55 -0000 1.13 *************** *** 4,9 **** icesockets/cpacket.cc icesockets/cdnsresolve.cc \ luascript.cc icescripts.cc ctargets.cc cpengine.cc icescan.cc ! icescan_DATA = services ieee-oui.txt README INSTALL COPYING AUTHORS ChangeLog INSTALL.conf passive-osfp-tcpsyn \ ! passive-osfp-tcpsynack passive-osfp-tcprst protocols man1_MANS=icescan.1 icescan_CXXFLAGS=-DICESCAN_DATADIR=\"$(icescandir)\" --- 4,9 ---- icesockets/cpacket.cc icesockets/cdnsresolve.cc \ luascript.cc icescripts.cc ctargets.cc cpengine.cc icescan.cc ! icescan_DATA = services ieee-oui.txt README INSTALL COPYING AUTHORS ChangeLog INSTALL.conf passive-osfp \ ! protocols man1_MANS=icescan.1 icescan_CXXFLAGS=-DICESCAN_DATADIR=\"$(icescandir)\" Index: icescan.1 =================================================================== RCS file: /cvsroot/icescan/IceScan/icescan.1,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** icescan.1 29 Jan 2007 13:58:14 -0000 1.10 --- icescan.1 7 Apr 2009 13:39:55 -0000 1.11 *************** *** 1,10 **** .\" Process this file with .\" groff -man -Tascii icescan.1 ! .\" ! .de Sp ! .if n .sp ! .if t .sp 0.4 ! .. ! .TH "ICESCAN" "1" "JANUARY 2007" "" "User Manuals" .SH NAME \fIicescan\fR \- network auditing/exploration tool and port scanner. --- 1,11 ---- .\" Process this file with .\" groff -man -Tascii icescan.1 ! .\" .de Sp .if n .sp .if t .sp 0.4 .. ! .TH "ICESCAN" "1" "APRIL 2008" "" "User Manuals" ! ! .nh ! ! .ad l ! .SH NAME \fIicescan\fR \- network auditing/exploration tool and port scanner. *************** *** 15,22 **** \fBIceScan\fR is an open source tool (GPL licenced) for network audit and exploraion. You can find that IceScan in some options and features very close to Nmap (\fIhttp://www.insecure.org/nmap/\fR) and that's the true. IceScan was written for educational purposes, but even now have some features, that doesn't exists in other \fIfree\fR network auditing tools, so you may find it useful in process of security auditing your network(s). .PP ! Either as Nmap, main result provided by IceScan is ports table. It consist of three columns: port number/protocol, port state and service. Port can have different states: open, closed, filtered (filt), open|filtered (o|f) and unfiltered (unfilt). Open port means that there's an application on target, listening for connections/datagrams on this port. Filtered port is a port blocked by firewall. Closed ports have no applications listening on them, but access isn't blocked by firewall. Unfiltered port isn't blocked by firewall and may be opened or closed.And at last, open|filtered port means that port isn't closed and IceScan can't determine which state is has: opened or filtered. The service column provide some information about application that running or can be run on this port. This information may include supposed protocol or application name and version. .PP The other type of results may include discovery(reverse DNS lookups, MACs timestamps, etc), fingerprinting (OS version, device type and etc) information and also some vulnerability testings. .PP Also see \fIREADME\fR and \fIINSTALL\fR for more on using/installing IceScan and \fINEWS\fR for information about IceScan news. .PP --- 16,25 ---- \fBIceScan\fR is an open source tool (GPL licenced) for network audit and exploraion. You can find that IceScan in some options and features very close to Nmap (\fIhttp://www.insecure.org/nmap/\fR) and that's the true. IceScan was written for educational purposes, but even now have some features, that doesn't exists in other \fIfree\fR network auditing tools, so you may find it useful in process of security auditing your network(s). .PP ! Either as Nmap, main result provided by IceScan is ports table. It consist of three columns: port number/protocol, port state and service. Port can have different states: open, closed, filtered (filt), open|filtered (o|f) and unfiltered (unfilt). Open port means that there's an application on target, listening for connections/datagrams on this port. Filtered port is a port blocked by firewall. Closed ports have no applications listening on them, but access isn't blocked by firewall. Unfiltered port isn't blocked by firewall and may be opened or closed. And at last, open|filtered port means that port isn't closed and IceScan can't determine which state is has: opened or filtered. The service column provide some information about application that running or can be run on this port. This information may include supposed protocol or application name and version. .PP The other type of results may include discovery(reverse DNS lookups, MACs timestamps, etc), fingerprinting (OS version, device type and etc) information and also some vulnerability testings. .PP + IceScan can work in two modes: active (nmap-like mode) and passive. In active mode, it acts as standart port scanner. In passive mode, IceScan do not send any packets, instead of this, it listens for incoming packets and try to create "map" of the network. Two modes can be combined: passive discovery with following active scanning. + .PP Also see \fIREADME\fR and \fIINSTALL\fR for more on using/installing IceScan and \fINEWS\fR for information about IceScan news. .PP *************** *** 24,126 **** .SH OPTIONS SUMMARY - .PP This options summary is printed when IceScan is started with no arguments - a short crib to all IceScan commands and specific options. Beware that options list may change from version to version. .PP .nf ! USAGE: ./icescan [options] [scan type] <target> ! target can be hostname, IP address (or range) or CIDR notation HOST DISCOVERY: default is PA and PE. ! -P0: skip host discovery ! -PA/PF/PS: ACK/FIN/SYN Ping host discovery ! -PR: ARP host discovery ! -PE/PT/PM: ICMP Echo/Timestamp/Mask host discovery ! -PU: UDP Ping discovery ! -PP [seconds]: passive discovery; capture packets for [seconds] ! -n: disable reverse-dns lookups SCAN: ! default is tcp connect() ! -ST/SA/SS/SWSM: tcp connect()/ACK/SYN/Window/Mainmon scan ! -SB: udp NetBIOS scan ! -SI: IP Protocol scan ! -SN/SF/SX: stealth tcp Null/FIN/XMAS scan ! -SP [seconds]: passive scan; capture packets for [seconds] ! -SU: udp scan ! -S0: no scan ! -SL: list scan ! --scanflags <flags>: Customize TCP scan flags (SF/SX/SN scans) ! --data-length <len>: Append random data to sent packets ! -p <port range>: specify port range to scan (default 1-1024) ! You can use: 1-10; 1; 1-10,12-14; etc. INTERFACES: ! --list-interfaces: list all interfaces ! -e <iface-number>: use interface <iface-number> for pcap iface ! --send-eth: use channel(2) level to send raw packets ! --send-ip: use network(3) level to send raw packets ! --promisc: put interface(s) in promiscuous mode ! --input-dumpfile: input tcpdump file for passive scan/ping FW/IDS EVASION AND SPOOFING: ! -s <IPv4 address>: spoof source address ! --source-port/-g <portnum>: use specified source port number ! --ttl <value>: set IP time-to-live field ! --bounce-http-proxy <<hostname>:<port>>: connect() through HTTP proxy ! OUTPUT: ! -oI/oG <filename>: Output scan in normal/grepable format to given file ! -oA <base_filename>: Output in all formats at once ! --packet-trace: print all packets that sent and received ! -d<debug level>: set debug level (values from 1 to 9 available) ! -v[v[v[v]]]]: verbose levels OTHER: ! --exclude <host1[,host2][,host3],...> (exclude hosts/nets) ! --excludefile <filename>| - (stdin) (exclude list from file|stdin) ! -iL <filename> | - (stdin): input targets from file|stdin ! --use-first-resolve: use only 1st IP in DNS resolving of target ! --uid0: assume that the current user is fully privileged ! -V/--version: print version information and exit ! -?: this message .fi ! .PP For useful work, IceScan requires only one argument \- target. Single target may be hostname, dns or IP address of machine you want to scan. Here are some examples of targets: 127.0.0.1, icestation, novell.com, 205.217.153.62 and etc. If target is domain name and it resolves in many IPs, IceScan will process all of them neither --use-first-resolve option is used. .PP Also you may use multiple target definition: CIDR notation. CIDR(Classless Inter-Domain Routing) blocks are identified using a syntax similar to that of IPv4 addresses: a four-part dotted-decimal address, followed by a slash, then a number from 0 to 32: A.B.C.D/N. The dotted decimal portion is interpreted, like an IPv4 address, as a 32-bit binary number that has been broken into four 8-bit bytes. The number following the slash is the prefix length, the number of shared initial bits, counting from the left-hand side of the address. Example: giving IceScan 192.168.0.0/24 will force scan of IPs 192.168.0.0 - 192.168.0.255 (including network and broadcast addresses). .PP ! Multiple targets also can be defined in one line, separated with spaces. You can mix CIDR blocks, IPs or domain names. For example: icescan -n -P0 -SF 127.0.0.1 192.168.0.0/24 scanme.nmap.org .SH HOST DISCOVERY OPTIONS ! Before you can scan the target machine, you should check is it really up. If you don't know this, you can incorrectly interpret port scanning results. Also, host discovery can provide you some additional information on target, ! such as MACs, timestamps and etc. .PP - Note: -P* options can be combined. By default -PE and -PA are on. - .TP \fB\-P0\fR (no ping) This options tells IceScan skip host discovery process and set target(s) to be up. ! .TP \fB\-PA/-PF/-PS\fR [portlist] (ACK or connect()/FIN/SYN ping) To discover that target is up, IceScan tries to send ACK (or connect() if non-superuser), FIN or SYN packet to all ports in portlist (or, if no portlist specified, to port 80) and if target replies in any way, it's determined as up. This discovery used by default. See \fB-p\fR option for details on portlist. ! .TP \fB\-PU\fR [portlist] (udp ping) In UDP ping, IceScan sends UDP datagrams to target host and, if host replies with udp or icmp message, it's determined as up. Portlist defines UDP destination ports, and, if no portlist specified port randomly selecting in interval of [30000, 65535].This scan requires superuser privileges. See \fB-p\fR option for details on portlist. ! .TP \fB\-PE/-PT/-PM\fR (ICMP Echo/TimeStamp/NetMask pings) This is "standart" host discovery way: through ICMP protocol. IceScan send echo/timestamp/netmask request to target and waiting for reply. If reply recieved, target is up. This scan requires superuser privileges. \fB-PE\fR is default option for discovery. \fB-PR\fR (ARP host discovery) This is an ARP low-level host-discovery. IceScan send target some message, and then, check ARP cache for target's IP. If it is there, target is up. When you run \fB-PR\fR under non-superuser, IceScan sends UDP datagram to port 138, hoping that OS will do ARP the best. Under superuser it sends only standart ARP Request. ARP Ping useful only on local networks. ! .TP \fB-PP\fR [seconds] (passive discovery for timeout in seconds) ! This is a passive discovery. IceScans sleeps for some \fIseconds\fR and collects network traffic on specified by \fB-i\fR interface (or gets it immediately from file, specified by \fB--input-dumpfile\fR). All collected traffic being parsed and any activity from host (e.g. TCP, UDP, IP or ARP) automatically sets it discovered. Note: if listening timeout is specified for \fB-SP\fR also, the maximum timeout will be used. ! .TP \fB\-n\fR (no dns lookups) This option tells IceScan that it should not make reverse-dns lookups (e.g. lookups for domain-name by IP address). Sometimes, it can make discovering process faster. .SH SCAN OPTIONS .SH INTERFACES ! .SH FW/EVASION AND SPOOFING OPTIONS .SH OTHER OPTIONS .SH EXAMPLES .SH BUGS .PP ! IceScan is still under constant development, so it is possible that you will encounter a bug while using it. Please report bugs to <icescan-bugs(at)lists.sourceforge.net>. \%(\fIhttp://lists.sf.net/mailman/listinfo/icescan-bugs\fR) .PP Be sure you tell us: --- 27,466 ---- .SH OPTIONS SUMMARY This options summary is printed when IceScan is started with no arguments - a short crib to all IceScan commands and specific options. Beware that options list may change from version to version. .PP + + .sp + .RS 4 .nf ! USAGE: icescan [options] [scan type] <target specification> ! TARGET SPECIFICATION: ! target can be hostname, IP address (or range) or CIDR block ! \-iL <filename> | \- (stdin): input targets from file|stdin ! \-\-exclude <host1[,host2][,host3],...> (exclude hosts/nets) ! \-\-excludefile <filename>| \- (stdin) (exclude list from file|stdin) HOST DISCOVERY: default is PA and PE. ! \-P0: skip host discovery ! \-PA/PF/PS: ACK/FIN/SYN Ping host discovery ! \-PR: ARP host discovery ! \-PE/PT/PM: ICMP Echo/Timestamp/Mask host discovery ! \-PU: UDP ping discovery ! \-PP [seconds]: passive discovery; capture packets for [seconds] ! \-n: disable reverse\-dns lookups ! \-\-use\-first\-resolve: use only 1st IP in DNS resolving of target ! \-\-dns\-servers <dns1[,dns2],...>: specify custom DNS servers ! \-\-system\-dns: use standart(OS) DNS resolver SCAN: ! default is tcp connect() or TCP SYN ! \-ST/SA/SS/SW/SM: tcp connect()/ACK/SYN/Window/Mainmon scan ! \-SB: udp NetBIOS scan ! \-SI: IP Protocol scan ! \-SN/SF/SX: stealth tcp Null/FIN/XMAS scan ! \-SP [seconds]: passive scan; capture packets for [seconds] ! \-SU: udp scan ! \-S0: no scan ! \-SL: list scan ! \-\-scanflags <flags>: Customize TCP scan flags (SF/SX/SN scans) ! \-\-data\-length <len>: Append random data to sent packets ! \-p <port range>: specify port range to scan (default 1\-1024), example: 1-10,12-14 ! OS DETECTION: ! \-O: passive os fingerprinting (works with \-SS and \-SP) INTERFACES: ! \-\-list-interfaces: list all interfaces ! \-e <iface\-number>: use interface <iface\-number> for pcap/source iface ! \-\-pcap-filter "expression": use pcap filter ! \-\-send-eth: use channel(2) level to send raw packets ! \-\-send-ip: use network(3) level to send raw packets ! \-\-promisc: put interface(s) in promiscuous mode ! \-\-input-dumpfile: input tcpdump file for passive scan/ping ! TIMING AND PERFORMANCE: ! \-T< 0 | 1 | 2 | 3 | 4 >: Specifies probe round trip time ! \-\-min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout <time>: Specifies probe round trip time ! \-\-max\-retries <tries>: Caps number of port scan probe retransmissions ! \-\-scan-delay/\-\-max\-scan\-delay <time>: Adjust delay between probes ! SCRIPTING && IDS ! \-SC: script scan ! \-\-script <script filename>: script name to run FW/IDS EVASION AND SPOOFING: ! \-s <IPv4 address>: spoof source address ! \-\-source\-port/\-g <portnum>: use specified source port number ! \-\-ttl <value>: set IP time\-to\-live field ! \-\-bounce\-http\-proxy <<hostname>:<port>>: connect() through HTTP proxy ! \-\-ip\-options < R | T | U >: add specific IP option to outgoing packets ! \-\-tcp\-options <N|E|S|T0|T|?x|Mx|Wx,...>: add specific tcp options ! \-\-badchksum: send packets with a wrong TCP/UDP checksums ! OUTPUT ! \-oI/oG <filename>: Output scan in normal/grepable format to given file ! \-oA <base_filename>: Output in all formats at once ! \-w <filename>: dump all recieved packets to file ! \-\-packet\-trace: print all packets that sent and received ! \-\-open: show only open (or possibly open) port(s) ! \-d<debug level>: set debug level (values from 1 to 9 available) ! \-v[v[v[v]]]]: verbose levels OTHER: ! \-\-uid0: assume that the current user is fully privileged ! \-\-uid1: assume that the current user isn't fully privileged ! \-V/\-\-version: print version information and exit ! \-?: this message .fi ! .RE ! .sp ! ! ! .SH TARGET SEPCIFICATION For useful work, IceScan requires only one argument \- target. Single target may be hostname, dns or IP address of machine you want to scan. Here are some examples of targets: 127.0.0.1, icestation, novell.com, 205.217.153.62 and etc. If target is domain name and it resolves in many IPs, IceScan will process all of them neither --use-first-resolve option is used. .PP Also you may use multiple target definition: CIDR notation. CIDR(Classless Inter-Domain Routing) blocks are identified using a syntax similar to that of IPv4 addresses: a four-part dotted-decimal address, followed by a slash, then a number from 0 to 32: A.B.C.D/N. The dotted decimal portion is interpreted, like an IPv4 address, as a 32-bit binary number that has been broken into four 8-bit bytes. The number following the slash is the prefix length, the number of shared initial bits, counting from the left-hand side of the address. Example: giving IceScan 192.168.0.0/24 will force scan of IPs 192.168.0.0 - 192.168.0.255 (including network and broadcast addresses). .PP ! Multiple targets also can be defined in one line, separated with spaces. You can mix CIDR blocks, IPs or domain names. For example: ! icescan -n -P0 -SF 127.0.0.1 192.168.0.0/24 scanme.nmap.org ! .PP ! \fB-iL\fR <filename> | - (stdin) (input targets from file|stdin) ! .RS 4 ! Target(s) will be read from specified file or stdin, instead of command line arguments... ! .RE ! .PP ! \fB--exclude\fR <host1[,host2][,host3],...> (exclude hosts/nets) ! .RS 4 ! Specified domain names, hosts and networks will be excluded from target(s) list. Note: NO RESOLVING from domain names here. ! .RE ! .PP ! \fB--excludefile\fR <filename>| - (stdin) (exclude list from file|stdin) ! .RS 4 ! Same as previous option, but exludes list will be read from specified file or stdin. ! .RE .SH HOST DISCOVERY OPTIONS ! Before you can scan the target machine, you should check is it really up. If you don't know this, you can incorrectly interpret port scanning results. Also, host discovery can provide you some additional information on target, such as MACs, timestamps and etc. ! .PP ! Note: -P* options can be combined. By default -PE (root-mode) or -PA (non-root mode) are on. .PP \fB\-P0\fR (no ping) + .RS 4 This options tells IceScan skip host discovery process and set target(s) to be up. ! .RE ! .PP \fB\-PA/-PF/-PS\fR [portlist] (ACK or connect()/FIN/SYN ping) + .RS 4 To discover that target is up, IceScan tries to send ACK (or connect() if non-superuser), FIN or SYN packet to all ports in portlist (or, if no portlist specified, to port 80) and if target replies in any way, it's determined as up. This discovery used by default. See \fB-p\fR option for details on portlist. ! .RE ! .PP \fB\-PU\fR [portlist] (udp ping) + .RS 4 In UDP ping, IceScan sends UDP datagrams to target host and, if host replies with udp or icmp message, it's determined as up. Portlist defines UDP destination ports, and, if no portlist specified port randomly selecting in interval of [30000, 65535].This scan requires superuser privileges. See \fB-p\fR option for details on portlist. ! .RE ! .PP \fB\-PE/-PT/-PM\fR (ICMP Echo/TimeStamp/NetMask pings) + .RS 4 This is "standart" host discovery way: through ICMP protocol. IceScan send echo/timestamp/netmask request to target and waiting for reply. If reply recieved, target is up. This scan requires superuser privileges. \fB-PE\fR is default option for discovery. + .RE \fB-PR\fR (ARP host discovery) + .RS 4 This is an ARP low-level host-discovery. IceScan send target some message, and then, check ARP cache for target's IP. If it is there, target is up. When you run \fB-PR\fR under non-superuser, IceScan sends UDP datagram to port 138, hoping that OS will do ARP the best. Under superuser it sends only standart ARP Request. ARP Ping useful only on local networks. ! .RE ! .PP \fB-PP\fR [seconds] (passive discovery for timeout in seconds) ! .RS 4 ! This is a passive discovery. IceScans sleeps for some \fIseconds\fR and collects network traffic on specified by \fB-e\fR interface (or gets it immediately from file, specified by \fB--input-dumpfile\fR). All collected traffic being parsed and any activity from host (e.g. TCP, UDP, IP or ARP) automatically sets it discovered. Note: if listening timeout is specified for \fB-SP\fR also, the maximum timeout will be used. If no timeout given at all, IceScan will collect data until Ctrl-C is hit. ! .RE ! .PP \fB\-n\fR (no dns lookups) + .RS 4 This option tells IceScan that it should not make reverse-dns lookups (e.g. lookups for domain-name by IP address). Sometimes, it can make discovering process faster. + .RE + .PP + \fB--use-first-resolve\fR (use only 1st IP in DNS resolving of target) + .RS 4 + When IceScan given a domain name that resolves in multiple IPs, only the first IP will be processed for discovering/scanning. + .RE + .PP + \fB--dns-servers\fR <dns1[,dns2],...> (specify dns servers) + .RS 4 + By default, IceScan tries to resolve all domain names using DNS servers, that specified in system settings (e.g. /etc/resolv.conf or registry). Here, you can define custom dns servers, that will be used instead. + .RE + .PP + \fB--system-dns\fR (use standart(OS) DNS resolver) + .RS 4 + Use gethostbyname() and etc resolver (also known as system resolver) instead of internal IceScan resolve system. + .RE .SH SCAN OPTIONS + The defailt post scanning methods are connect() in non-superuser mode and tcp SYN in superuser mode. + .PP + \fB-ST\fR (tcp connect()) + .RS 4 + The simplest scan engine, that use standart BSD sockets API function connect(). IceScan tries to connect() to specified port(s) and use getsockopt() function to detect its status. This is not a very good choice for stealthy scan. Moreover, this scan type is easily detected with firewall and IDS software. But this is the only scan method in non-superuser mode. + .RE + .PP + \fB-SS\fR (tcp SYN scan) + .RS 4 + The most-known and most-efficient scan method. It's stealthy, fast and almost reliable. We send tcp-SYN segment to target port, and, if we get RST answer, the port seems to be closed; if we recieve tcp SYN/ACK segment, the port is open, we should send RST packet to close connection. If we get no reply at all, the port is filtered. + .RE + .PP + \fB-SA/SW\fR (tcp ACK/Window scan) + .RS 4 + Two scan methods, based on same methodic -- we sent tcp segment, and if we recieve RST packet, target port is unfiltered (if we use ACK scan). With Window scan we can determine if port open or closed in rare cases, by checking return window size (if it's more than 0, target port is open). But it doesn't work very good in modern tcp stecks. + .RE + .PP + \fB-SB\fR (udp NetBIOS scan) + .RS 4 + With this type of scan, you can determine varios NetBIOS states of target system. + .RE + .PP + \fB-SI\fR (IP Protocol scan) + .RS 4 + IP protocol scan can determine what protocol types (TCP, ICMP, IGMP, etc.) supported by target host. It use raw IP packets and ICMP messages to check it. + .RE + .PP + \fB-SN/SF/SX/SM\fR (stealth tcp Null/FIN/XMAS/Mainmon scan) + .RS 4 + Rare variations of TCP scan. With this scan types, we send tcp segment with none/FIN/FIN+PSH+URG/FIN+ACK flags set. If we recieved an RST packet, we set port status to closed, else we think that it's open|filtered port. + .RE + .PP + \fB-SP\fR [seconds] (passive scan) + .RS 4 + In passive scan we capture packets for a given interval or until Ctrl-C is hit. Network traffic can be recieved from interface (\fB-e\fR option) or from dumpfile (\fB--input-dumpfile\fR option). Target argument(s) act like filter in this scan type: every packet that doesn't fit target specification will be ignored). But you set target to 0.0.0.0/0 to explore all hosts mentioned in network traffic data. When tcp SYN+ACK/RST packet is recived by IceScan, it detemines, that source port on source target is open/closed. This scan type also can be used in combination with passive OS (\fB-O\fR) fingerprinting option to detect target's OS. Also, with passive scan you can gain information about MAC addresses, MTUs and timestamps. + .RE + .PP + \fB-SU\fR (udp scan) + .RS 4 + This is the slowest and most unreliable type of scan. We sending udp packet to target portm and if we recive any answer, the port seems to be open. If we recive ICMP unreacheble packet, the port is closed. In any other cases it means that the port is open|filtered. + .RE + .PP + \fB-S0\fR (no scan) + .RS 4 + No scan: all target will be skipped at all or discovered (if \fB-P0\fR option doesn't specified). Useful for discovering up hosts in network without scanning \'em. + .RE + .PP + \fB-SL\fR (list scan) + .RS 4 + No scan and discover, only try to detect target's MAC and IP/reverse DNS name. Only for testing purposes. + .RE + .PP + \fB--scanflags\fR <flags> (customize TCP scan flags) + .RS 4 + With this option, you can set custom tcp flags for sending tcp segments in SF/SX/SN scans. The notation is simple: + <URG|ACK|PSH|RST|SYN|FIN[ URG|ACK|PSH|RST|SYN|FIN]...>. + .RE + .PP + \fB--data-length\fR <len> (append random data to sent packets) + .RS 4 + After using this option, a random-generated junk will be appended to all tcp/udp/ip packets that will be sent during scan. It's a good practice to evade some stupid firewalls or IDSes. + .RE + .PP + \fB-p\fR <port range> (specify port range to scan) + .RS 4 + The default port range is 1-1024, but you can specify your own port range. The syntax is simple -- ranges or single ports separated with commas. For example: 1-10,12-14,22. + .RE + + .SH OS DETECTION: + IceScan can detect remote host OS using the passive OS fingerprinting. The main principle of such method, is that we didn't sent fingerprinting queries to the target machine, but instead of it use its replies to standart scan probes (in active scan mode) or captured traffic data (in passive scan mode). The OS fingerprints stored in database (\fIpassive-osfp\fR file) with special format. IceScan uses same fingerprint database format as in p0f tool and some detecting methods, derived from p0f. Note: IceScan passive fp database was made from scratch and differs from p0f. The database format is simple: + .nf + [tcpsyn] + # tcp syn signatures + [tcpsynack] + # tcp syn+ack signatures + [tcprst] + # tcp rst signatures + .fi + For more information of signatures format, see \fIpassiveos-fp\fR file. + .PP + \fB-O\fR (passive os fingerprinting) + .RS 4 + Passive OS fingerprinting works only with -SS and -SP scan types. It prints possible OS after port table, and signature if can't detect OS type. In such case, if you know target OS type and version, please send following output and full description of scanned device to ice...@li.... + .RE + .SH INTERFACES ! With options of this section you can define way how packets will be delivered to network by IceScan and the way how they will be captured from there. ! .PP ! \fB--list-interfaces\fR (list all interfaces) ! .RS 4 ! Simply lists all network interfaces (with their numbers) that are available for packet sending/recieving. ! .RE ! .PP ! \fB-e\fR <iface-number> (use specific interface for capture/send) ! .RS 4 ! If this option used, the IceScan will listen and send packets from selected interface (interfaces numbers can be printed with \fB--list-interfaces\fR option). All other interfaces and interface auto-detection will be disabled. ! .RE ! .PP ! \fB--pcap-filter\fR <"expression"> (use pcap filter) ! .RS 4 ! If this option set, all incoming packets will be filtered with pcap filter "expression". For more information on pcap filters, check TCPDUMP ( http://www.tcpdump.org ) homepage. ! .RE ! .PP ! \fB--send-eth\fR (use channel(2) level to send raw packets) ! .RS 4 ! IceScan will use pcap mechanism for injecting packets into network. This is default in almost cases. ! .RE ! .PP ! \fB--send-ip\fR (use network(3) level to send raw packets) ! .RS 4 ! IceScan will use rawsockets mechanism for injecting packets into network. Note: this won't work on some operating systems (such as modern NT systems or Linux kernels). ! .RE ! .PP ! \fB--promisc\fR (put interface(s) in promiscuous mode) ! .RS 4 ! All interfaces used by IceScan will be opened in promiscuous mode. Useful for passive scanning, but almost useless for active scan mode. ! .RE ! .PP ! \fB--input-dumpfile\fR <dumpfile> (input tcpdump file for passive scan/ping) ! .RS 4 ! Instead of interface open, IceScan will recive packets from tcdump file or from stdin (when - as a filename is used). ! .RE ! ! .SH SCRIPTING && IDS ! IceScan has small scripting features, based on LUA. Currently, scripting engine in early development stages and highly experimental. ! .PP ! \fB-SC\fR (script scan) ! .RS 4 ! IceScan will try to execute script, passed with \fB--script\fR option after open port is discovered and port type satisfy script conditions. ! .RE ! .PP ! \fB--script\fR <script filename> (script name to run) ! .RS 4 ! Sets script filename to load and run after discovering any open port. ! .RE ! ! .SH FW/IDS EVASION AND SPOOFING OPTIONS ! Options in this section used for customizing outgoing IP packets to make them chance of evading firewall and/or IDS. ! .PP ! \fB-s\fR <IPv4 address> (spoof source address) ! .RS 4 ! With this option, you can set source address of outgoing packets. ! .RE ! .PP ! \fB--source-port/-g\fR <portnum> (use specified source port number) ! .RS 4 ! In default mode of operation, IceScan select source port randomly from range of 9999-65534. This option forces outgoing tcp/udp packets have predefined source port. ! .RE ! .PP ! \fB--ttl\fR <value> (set IP time-to-live field) ! .RS 4 ! After setting this option, all outgoing IP packets will have specified value in TTL field. ! .RE ! .PP ! \fB--bounce-http-proxy\fR <<hostname>:<port>> connect() through HTTP proxy ! .RS 4 ! If you have address(es) of HTTP proxy, you can use them in your connect() (-ST) scans to reach more stealthiness. IceScan will try to pass probes through HTTP proxy, instead of direct connection. ! .RE ! .PP ! \fB--ip-options\fR < R | T | U > (add specific IP option to outgoing packets) ! .RS 4 ! With this option you can add specific (only one) option to outgoing packets: R (record route), T (record internet timestamps), U (record timestamps and ip addresses). Only one option still can be specified at one time. ! .RE ! .PP ! \fB--tcp-options\fR <N|E|S|T0|T|?x|Mx|Wx,...> (add specific tcp options) ! .RS 4 ! Add specific TCP options to outgoing packets, like timestamp, MSS and more. Options are passed in string, with comma as delimeter. Here are all list of available options: ! .nf ! N - NOP option ! E - EOL option ! Wx - window scaling option, value x ! Mx - maximum segment size option, value x ! S - selective ACK OK ! T - timestamp ! T0 - timestamp with zero value ! ?n - unrecognized option number n. ! .fi ! Options will be applied to all outgoing tcp segments in superuser mode. ! .RE ! .PP ! \fB--badchksum\fR (send packets with a wrong TCP/UDP checksums) ! .RS 4 ! All outgoing packets CRC filed will be filled with random junk value. ! .RE ! ! .SH OUTPUT ! Output options configure IceScan output parameters, debugging and logs. Currently, IceScan supports two types of output formats: normal (also known as "nmap-style") and grepable (useful for parsing with sed, awk, grep and other tools). In all cases when you can set filename you can also use "-" if you want print information to stdout. ! .PP ! \fB-oI/oG-\fR <filename> (output results in normal/grepable format to file) ! .RS 4 ! Results of IceScan will be put to file (or to stdout) in selected format. You can combine options to output with different formats into different files. ! .RE ! .PP ! \fB-oA\fR <base_filename> (output in all formats at once) ! .RS 4 ! Results of IceScan will be put into files base_filename.icescan (normal style) and base_filename.grep (grepable style). ! .RE ! .PP ! \fB-w\fR <filename> (dump all recieved packets to file) ! .RS 4 ! All recieved packets will be dumped to tcpdump-format file specified by filename. ! .RE ! .PP ! \fB--packet-trace\fR (print all packets that are sent and received) ! .RS 4 ! Every recieved and sent packet/connection will be printed in tcpdump style. By the way, with this options, you can easily use IceScan instead of tcpdump, just type: ! .nf ! icescan -e <interface> -P0 -SP --packet-trace 0.0.0.0/0 ! .fi ! .RE ! .PP ! \fB--open\fR (show only open/possibly open ports) ! .RS 4 ! In output port tables only open (or possibly open, such unfiltered state) ports will be shown; other ports will be skipped. ! .RE ! .PP ! \fB-d<debug level>\fR (set debug level) ! .RS 4 ! Sets IceScan debug output on with selected level. Levels from 1 to 9 are available. ! .RE ! .PP ! \fB-v[v[v[v]]]]\fR (verbose levels) ! .RS 4 ! Sets IceScan output verbosity level. Four levels are available. Setting upper levels may fill your screen with MUCH useless and unimportant information, be careful! ! .RE ! .SH OTHER OPTIONS + Misceleanous options of IceScan. + .PP + \fB--uid0\fR (assume that the current user is fully privileged) + .RS 4 + If you set this option, IceScan will work as it has superuser proveleges (e.g. root in *nix or Administrator in NT systems). + .RE + .PP + \fB--uid1\fR (assume that the current user isn't fully privileged) + .RS 4 + If you set this option, IceScan won't use any features, that require superuser priveleges. + .RE + .PP + \fB-V/--version\fR (print version information and exit) + .RS 4 + IceScan will print version information, information of used libraries and exit. + .RE + .PP + \fB-?\fR (help message) + .RS 4 + Short scrib anout all IceScan parameters and options. + .RE .SH EXAMPLES + Here are some examples of IceScan usage. To collect information about all hosts in network segment using the passive scan, use: + + .nf + icescan -n -v -SP -e <interface_number> 0.0.0.0/0 + .fi + .PP + To list available interfaces, sumply type: + + .nf + icescan --list-interfaces + .fi + .PP + To scan target in active mode with FIN-scan, type: + + .nf + icescan -SF <target_ip> + .fi + .PP + To use OS fingerprinting feature in active scan mode, you can use: + + .nf + icescan -O -SS -v <target_ip> + .fi .SH BUGS .PP ! IceScan is still under constant development, so it is possible that you will encounter a bug while using it. Please report bugs to <icescan-devs(at)lists.sourceforge.net>. \%(\fIhttp://lists.sf.net/mailman/listinfo/icescan-devs\fR) .PP Be sure you tell us: *************** *** 158,163 **** Also, big work for bringing IceScan to life was done by Konstantin Karpov[\fIQ_\fR] <q_(at)peterstar.ru> ! See \fIAUTHORS\fR for more details and names of people who made contributions to IceScan or ! whos code/algorithms/etc implemented in IceScan. .SH REFERENCES --- 498,502 ---- Also, big work for bringing IceScan to life was done by Konstantin Karpov[\fIQ_\fR] <q_(at)peterstar.ru> ! See \fIAUTHORS\fR for more details and names of people who made contributions to IceScan or whos code/algorithms/etc implemented in IceScan. .SH REFERENCES *************** *** 177,180 **** --- 516,523 ---- 5.\ arp-scan \%http://www.nta-monitor.com/tools/arp-scan/ + .TP 4 + 6.\ p0f + \%http://lcamtuf.coredump.cx/p0f.shtml + .SH LICENSE Index: caengine2.h =================================================================== RCS file: /cvsroot/icescan/IceScan/caengine2.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** caengine2.h 17 Mar 2009 16:09:13 -0000 1.12 --- caengine2.h 7 Apr 2009 13:39:55 -0000 1.13 *************** *** 69,73 **** if(par.root()){ for(int i = 0; i<par.used_ifaces.size(); i++){ ! cpcapreader *pc = new cpcapreader(par.used_ifaces[i], false); pcaps.push_back(pc); } --- 69,78 ---- if(par.root()){ for(int i = 0; i<par.used_ifaces.size(); i++){ ! cpcapreader *pc; ! if(i == 0) ! pc = new cpcapreader(par.used_ifaces[i], false, par.promisc_mode, par.pcap_filter.c_str(), par.dumpfile); ! else ! pc = new cpcapreader(par.used_ifaces[i], false, par.promisc_mode, par.pcap_filter.c_str()); ! pcaps.push_back(pc); } Index: icescan.html =================================================================== RCS file: /cvsroot/icescan/IceScan/icescan.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** icescan.html 24 Dec 2006 19:45:55 -0000 1.1 --- icescan.html 7 Apr 2009 13:39:55 -0000 1.2 *************** *** 1,29 **** - <!-- Creator : groff version 1.19.2 --> - <!-- CreationDate: Sun Dec 24 22:17:51 2006 --> - <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> - <meta name="generator" content="groff -Thtml, see www.gnu.org"> - <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <meta name="Content-Style" content="text/css"> - <style type="text/css"> [...1001 lines suppressed...] + <span style=" text-indent: 0.2400in;"></span>http://lcamtuf.coredump.cx/p0f.shtml</p> + <a name="LICENSE"></a><h2>LICENSE</h2><p><font size=3>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public<br> + License version 2 as published by the Free Software Foundation,</p> + <p><font size=3>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</p> ! <table width="100%" rules="none" frame="none" cols="2"> ! <tr valign="top" align="left"> ! <td valign="top" align="left" width="99.2236%"> ! <p><font size=3>General Public License for more details.</p> ! <p><font size=3>You should have received a copy of the GNU General Public License along with this program; if not, write to the<br> ! Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</p> ! <p><font size=3>You should use this software only for LEGAL purposes.</p> ! <p><font size=3>See <font size=3><I>COPYING</I> <font size=3>for more details.</p> ! </td> ! <td valign="top" align="left" width="1.0000%"> ! </td> ! </tr> ! </table> ! <br></body> </html> Index: TODO =================================================================== RCS file: /cvsroot/icescan/IceScan/TODO,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** TODO 17 Mar 2009 16:09:07 -0000 1.65 --- TODO 7 Apr 2009 13:39:55 -0000 1.66 *************** *** 86,89 **** --- 86,90 ---- I105 + channel level scanner (CDP, OSPF, STP etc) I110 + connect() scan + uid0 = strange behaviour (sending RA???) + I113 * fix tcp XMAS/FIN/... scans to check ICMP unreachable error (type 3, code 1, 2, 3, 9, 10, or 13) (port is open in this case) -- Passive Scanning -- Index: cpengine.cc =================================================================== RCS file: /cvsroot/icescan/IceScan/cpengine.cc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** cpengine.cc 15 Mar 2009 18:59:18 -0000 1.13 --- cpengine.cc 7 Apr 2009 13:39:55 -0000 1.14 *************** *** 78,81 **** --- 78,83 ---- out << "Ctrl-C hitted, preparing to report && exit politely...\n"; + p->close_dumps(); + finish_targets(); *************** *** 118,126 **** if(par.input_dumpfile == ""){ ! p = new cpcapreader(par.source_iface, false, par.promisc_mode, ""); if(par.passive_discovery_timeout < 0) out << "No timeout for passive scan specified: going to <<forever mode>>, press Ctrl+C to finish and get report\n"; }else ! p = new cpcapreader(par.input_dumpfile); --- 120,128 ---- if(par.input_dumpfile == ""){ ! p = new cpcapreader(par.source_iface, false, par.promisc_mode, par.pcap_filter.c_str(), par.dumpfile); if(par.passive_discovery_timeout < 0) out << "No timeout for passive scan specified: going to <<forever mode>>, press Ctrl+C to finish and get report\n"; }else ! p = new cpcapreader(par.input_dumpfile, par.pcap_filter.c_str(), par.dumpfile); Index: cpsosfp.h =================================================================== RCS file: /cvsroot/icescan/IceScan/cpsosfp.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cpsosfp.h 15 Mar 2009 18:59:18 -0000 1.2 --- cpsosfp.h 7 Apr 2009 13:39:55 -0000 1.3 *************** *** 90,96 **** class ice_passive_osfinger{ ! std::vector<psvtcp_sig> ostcpsyn_sigs; ! std::vector<psvtcp_sig> ostcpsynack_sigs; ! std::vector<psvtcp_sig> ostcprst_sigs; public: --- 90,98 ---- class ice_passive_osfinger{ ! #define OSTCPSYN 0 ! #define OSTCPSYNACK 1 ! #define OSTCPRST 2 ! ! std::vector<psvtcp_sig> ostcp_sigs[3]; public: *************** *** 100,138 **** icestring fstr = "";; ! fstr = find_icefile_path("passive-osfp-tcpsyn", database_dir); ! load_tcpdb(fstr.c_str(), ostcpsyn_sigs); - fstr = find_icefile_path("passive-osfp-tcpsynack", database_dir); - load_tcpdb(fstr.c_str(), ostcpsynack_sigs); - - fstr = find_icefile_path("passive-osfp-tcprst", database_dir); - load_tcpdb(fstr.c_str(), ostcprst_sigs); } void test(ctarget* t, cpacket& pt){ int found = 0; ! ! std::vector<psvtcp_sig>* sigs; icestring tcpflgs = ""; if((pt.tcp_flags & (TH_SYN)) && !(pt.tcp_flags & (TH_ACK))){ ! sigs = &ostcpsyn_sigs; tcpflgs = "TCP SYN"; }else if((pt.tcp_flags & (TH_SYN|TH_ACK)) == (TH_SYN|TH_ACK)){ ! sigs = &ostcpsynack_sigs; tcpflgs = "TCP SYN/ACK"; }else if(pt.tcp_flags & (TH_RST)){ - sigs = &ostcprst_sigs; tcpflgs = "TCP RST"; }else return; ! found = tcp_test(pt, *sigs); if(found >= 0){ ! t->os_name = sigs->at(found).name; ! t->os_version = sigs->at(found).version; t->os_status = OSKNOWN; ! t->hops = sigs->at(found).ttl - pt.ip_ttl; //DBGOUTPUT(t->os_name << "\t" << t->os_version); --- 102,135 ---- icestring fstr = "";; ! fstr = find_icefile_path("passive-osfp", database_dir); ! load_tcpdb(fstr.c_str(), ostcp_sigs); } void test(ctarget* t, cpacket& pt){ int found = 0; ! ! int idx = 0; icestring tcpflgs = ""; if((pt.tcp_flags & (TH_SYN)) && !(pt.tcp_flags & (TH_ACK))){ ! idx = OSTCPSYN; tcpflgs = "TCP SYN"; }else if((pt.tcp_flags & (TH_SYN|TH_ACK)) == (TH_SYN|TH_ACK)){ ! idx = OSTCPSYNACK; tcpflgs = "TCP SYN/ACK"; }else if(pt.tcp_flags & (TH_RST)){ tcpflgs = "TCP RST"; + idx = OSTCPRST; }else return; ! found = tcp_test(pt, ostcp_sigs[idx]); if(found >= 0){ ! t->os_name = ostcp_sigs[idx].at(found).name; ! t->os_version = ostcp_sigs[idx].at(found).version; t->os_status = OSKNOWN; ! t->hops = ostcp_sigs[idx].at(found).ttl - pt.ip_ttl; //DBGOUTPUT(t->os_name << "\t" << t->os_version); *************** *** 157,163 **** private: ! void load_tcpdb(const char *db_fname, std::vector<psvtcp_sig>& tcp_sigs){ std::ifstream in; int line = 0; in.open(db_fname); --- 154,161 ---- private: ! void load_tcpdb(const char *db_fname, std::vector<psvtcp_sig> tcp_sigs[]){ std::ifstream in; int line = 0; + int idx = 0; in.open(db_fname); *************** *** 175,179 **** in.getline(tmpbuf,256); ! if(! re1.match(tmpbuf) ){ std::vector<icestring> v1; --- 173,184 ---- in.getline(tmpbuf,256); ! if(!strncmp(tmpbuf, "[tcpsyn]", 8)) ! idx = OSTCPSYN; ! else if(!strncmp(tmpbuf, "[tcpsynack]", 11)) ! idx = OSTCPSYNACK; ! else if(!strncmp(tmpbuf, "[tcprst]", 8)) ! idx = OSTCPRST; ! else if(! re1.match(tmpbuf) ){ ! std::vector<icestring> v1; *************** *** 220,269 **** // Options ! if(v1[4].size() > 0){ parse_tcp_options(v1[4], sig.tcpopt_sigs); - /*std::vector<icestring> opts; - split(v1[4], ',', opts); - - for(int i = 0; i < opts.size(); i++){ - switch(opts[i].at(0)){ - case 'N': - sig.tcpopt_sigs.push_back(tcpopt_sig(NOP,0)); - break; - case 'E': - sig.tcpopt_sigs.push_back(tcpopt_sig(EOL,0)); - break; - case 'S': - sig.tcpopt_sigs.push_back(tcpopt_sig(SACKOK,0)); - break; - case 'T': - if(opts[i].size()<2) - sig.tcpopt_sigs.push_back(tcpopt_sig(TIMESTAMP,0)); - else - sig.tcpopt_sigs.push_back(tcpopt_sig(TIMESTAMPZERO,0)); - break; - case '?': - sig.tcpopt_sigs.push_back(tcpopt_sig(FLGUNKNOWN,atoi(opts[i].substr(1).c_str()))); - break; - case 'M': - ... [truncated message content] |
From: Alexander B. <da...@us...> - 2009-04-07 14:15:52
|
Update of /cvsroot/icescan/IceScan/icesockets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11281/icesockets Modified Files: cpcapreader.h Log Message: 0.0.7rc1 release Index: cpcapreader.h =================================================================== RCS file: /cvsroot/icescan/IceScan/icesockets/cpcapreader.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** cpcapreader.h 15 Mar 2009 18:59:19 -0000 1.16 --- cpcapreader.h 7 Apr 2009 13:39:55 -0000 1.17 *************** *** 23,29 **** int link_type; public: ! cpcapreader(int iface, bool block, bool promisc = false, char *filter_exp = NULL){ p = init_pcap(iface, promisc); --- 23,31 ---- int link_type; + pcap_dumper_t* pdt; + public: ! cpcapreader(int iface, bool block, bool promisc = false, const char *filter_exp = NULL, icestring outdump = ""){ p = init_pcap(iface, promisc); *************** *** 35,43 **** pcap_filter(p, filter_exp); /// get LINK TYPE OF THE INTERFACE link_type = pcap_datalink(p); } ! cpcapreader(icestring dumpfile){ char errbuf[PCAP_ERRBUF_SIZE]; --- 37,50 ---- pcap_filter(p, filter_exp); + if(outdump != "") + pdt = pcap_dump_open(p, outdump.c_str()); + else + pdt = NULL; + /// get LINK TYPE OF THE INTERFACE link_type = pcap_datalink(p); } ! cpcapreader(icestring dumpfile, const char *filter_exp = NULL, icestring outdump = ""){ char errbuf[PCAP_ERRBUF_SIZE]; *************** *** 46,49 **** --- 53,64 ---- err_fatal(errbuf); } + + if(filter_exp) + pcap_filter(p, filter_exp); + + if(outdump != ""){ + pdt = pcap_dump_open(p, outdump.c_str()); + }else + pdt = NULL; } *************** *** 278,283 **** --- 293,309 ---- return res; } + + void close_dumps(){ + if(pdt){ + pcap_dump_flush(pdt); + pcap_dump_close(pdt); + pdt = NULL; + } + } + ~cpcapreader(){ + close_dumps(); + close_pcap(p); } *************** *** 469,472 **** --- 495,501 ---- if(!p) return NULL; + if(pdt) + pcap_dump((u_char*)pdt, &head, (const u_char*) p); + *caplen = head.caplen; *len = head.len; *************** *** 516,519 **** --- 545,551 ---- }else return NULL; + if(pdt) + pcap_dump((u_char*)pdt, &head, (const u_char*)p); + //DBGOUTPUT(offset); *************** *** 545,553 **** ! bool pcap_filter(pcap_t *p, char *filter_exp){ struct bpf_program fp; /* The compiled filter expression */ ! if (pcap_compile(p, &fp, filter_exp, 0, 0) == -1) { return false; } --- 577,585 ---- ! bool pcap_filter(pcap_t *p, const char *filter_exp){ struct bpf_program fp; /* The compiled filter expression */ ! if (pcap_compile(p, &fp, (char *)filter_exp, 0, 0) == -1) { return false; } |
From: Alexander B. <da...@us...> - 2009-03-17 16:09:58
|
Update of /cvsroot/icescan/IceScan In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv20282 Modified Files: TODO caengine2.h Log Message: Win32 fixes: ARP parsing, std::vector handling and DNS servers reading. Index: caengine2.h =================================================================== RCS file: /cvsroot/icescan/IceScan/caengine2.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** caengine2.h 16 Mar 2009 16:41:04 -0000 1.11 --- caengine2.h 17 Mar 2009 16:09:13 -0000 1.12 *************** *** 466,470 **** } ! int fill_host_probes(ctarget* c, int max_probes){ int i = 0; --- 466,470 ---- } ! int fill_host_probes(ctarget* c, int max_probes){ int i = 0; *************** *** 484,492 **** int k = 0; ! for(std::vector<scan_probe>::iterator it = c->progress_scan_probes.begin(); it != c->progress_scan_probes.end(); ++it){ if((*it).done){ //DBGOUTPUT(c->hostname << ":" << (*it).port << " done, removing..."); ! if((((*it).type == CONNECT_TCP) /*add here more types*/ || (*it).type == CONNECT_SCRIPT) && (*it).socket_ptr != -1) cde.shutdown_scansocket((*it).socket_ptr); --- 484,506 ---- int k = 0; ! struct remove { ! static bool if_probe_done(const scan_probe& sp){ ! /*if(sp.done) ! DBGOUTPUT(sp.c->hostname << ":" << sp.port << " done, removing...");*/ ! return sp.done; ! } ! }; ! ! std::vector<scan_probe>::iterator it = ! std::remove_if( c->progress_scan_probes.begin(), c->progress_scan_probes.end(), remove::if_probe_done ); ! ! c->progress_scan_probes.erase( ! it, c->progress_scan_probes.end() ); ! ! /*for(std::vector<scan_probe>::iterator it = c->progress_scan_probes.begin(); it != c->progress_scan_probes.end(); ++it){ if((*it).done){ //DBGOUTPUT(c->hostname << ":" << (*it).port << " done, removing..."); ! if((((*it).type == CONNECT_TCP) /*add here more types*//* || (*it).type == CONNECT_SCRIPT) && (*it).socket_ptr != -1) cde.shutdown_scansocket((*it).socket_ptr); *************** *** 498,509 **** break; else ! it--; } ! } for(k = 0; k < MIN(c->progress_scan_probes.size(), max_old_probes); k++){ probes.push_back(cur_probe(c, k)); ! //DBGOUTPUT("Added old probe " << c->hostname << ":" ! // << probes[probes.size() - 1].c->progress_scan_probes[probes[probes.size() - 1].p].port); } --- 512,525 ---- break; else ! it--; } ! }*/ ! ! check_host_finished(c); for(k = 0; k < MIN(c->progress_scan_probes.size(), max_old_probes); k++){ probes.push_back(cur_probe(c, k)); ! /*DBGOUTPUT("Added old probe " << c->hostname << ":" ! << probes[probes.size() - 1].c->progress_scan_probes[probes[probes.size() - 1].p].port);*/ } *************** *** 795,799 **** // send all attempts to host ! bool send_targets_attempts(){ bool stop = true; bool result = false; --- 811,815 ---- // send all attempts to host ! bool send_targets_attempts(){ bool stop = true; bool result = false; Index: TODO =================================================================== RCS file: /cvsroot/icescan/IceScan/TODO,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** TODO 15 Mar 2009 18:59:18 -0000 1.64 --- TODO 17 Mar 2009 16:09:07 -0000 1.65 *************** *** 85,88 **** --- 85,89 ---- I86 * rewrite Congestion Windows (cwnd) changing engine. I105 + channel level scanner (CDP, OSPF, STP etc) + I110 + connect() scan + uid0 = strange behaviour (sending RA???) -- Passive Scanning -- *************** *** 117,120 **** --- 118,123 ---- I87 * on Windows ARP module tries to detect MAC address for non-local network IP; shows "cc::...::cc" I92 * fix mac-address detecting with/without libdnet + I111 * fix DNS servers detecting: check if int up... + I112 * read net settings from http://msdn.microsoft.com/en-us/library/aa365968(VS.85).aspx ? -- Cygwin-specific -- |
From: Alexander B. <da...@us...> - 2009-03-17 16:09:18
|
Update of /cvsroot/icescan/IceScan/icesockets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv20282/icesockets Modified Files: packet_tracer.h sock_name.cc Log Message: Win32 fixes: ARP parsing, std::vector handling and DNS servers reading. Index: packet_tracer.h =================================================================== RCS file: /cvsroot/icescan/IceScan/icesockets/packet_tracer.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** packet_tracer.h 4 Mar 2009 15:02:15 -0000 1.12 --- packet_tracer.h 17 Mar 2009 16:09:13 -0000 1.13 *************** *** 477,483 **** }else if(htons(arp_h->ar_op) == ARP_OP_REPLY){ ! memmove(&(sa_d.sin_addr.s_addr), packet + (sizeof(arp_hdr)) + 6, IP_ADDR_LEN); ! struct sockaddr mac; --- 477,483 ---- }else if(htons(arp_h->ar_op) == ARP_OP_REPLY){ ! memmove(&(sa_s.sin_addr.s_addr), packet + (sizeof(arp_hdr)) + 6, IP_ADDR_LEN); ! memmove(&(sa_d.sin_addr.s_addr), packet + (sizeof(arp_hdr)) + 6, IP_ADDR_LEN); struct sockaddr mac; Index: sock_name.cc =================================================================== RCS file: /cvsroot/icescan/IceScan/icesockets/sock_name.cc,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** sock_name.cc 15 Mar 2009 18:59:20 -0000 1.12 --- sock_name.cc 17 Mar 2009 16:09:14 -0000 1.13 *************** *** 536,543 **** #else ! HKEY regKey1, regKey2; ! char buf[256]; ! char iname[512]; DWORD len, len2; if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, --- 536,544 ---- #else ! HKEY regKey1; ! char buf[256]; ! char iname[1024]; DWORD len, len2; + std::vector<icestring> tmp_dns; if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, *************** *** 549,561 **** len = sizeof(buf); if(RegQueryValueEx(regKey1, "NameServer", NULL, NULL, (LPBYTE) buf, (LPDWORD) &len) == ERROR_SUCCESS) ! dns_list.push_back(icestring(buf)); len = sizeof(buf); if(RegQueryValueEx(regKey1, "DhcpNameServer", NULL, NULL, (LPBYTE) buf, (LPDWORD) &len) == ERROR_SUCCESS) ! dns_list.push_back(icestring(buf)); RegCloseKey(regKey1); ! if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces", 0, KEY_ENUMERATE_SUB_KEYS, ®Key1) == ERROR_SUCCESS) { --- 550,562 ---- len = sizeof(buf); if(RegQueryValueEx(regKey1, "NameServer", NULL, NULL, (LPBYTE) buf, (LPDWORD) &len) == ERROR_SUCCESS) ! tmp_dns.push_back(icestring(buf)); len = sizeof(buf); if(RegQueryValueEx(regKey1, "DhcpNameServer", NULL, NULL, (LPBYTE) buf, (LPDWORD) &len) == ERROR_SUCCESS) ! tmp_dns.push_back(icestring(buf)); RegCloseKey(regKey1); ! if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces", 0, KEY_ENUMERATE_SUB_KEYS, ®Key1) == ERROR_SUCCESS) { *************** *** 563,583 **** len = sizeof(buf); for(int i=0; RegEnumKeyEx(regKey1, i, buf, &len, NULL, NULL, NULL, NULL) != ERROR_NO_MORE_ITEMS; i++) { snprintf(iname, sizeof(iname), "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces\\%s", buf); ! if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, iname, ! 0, KEY_READ, ®Key2) == ERROR_SUCCESS) { ! len2 = sizeof(buf); ! if(RegQueryValueEx(regKey2, "DhcpNameServer", NULL, NULL, (LPBYTE) buf, (LPDWORD) &len2) == ERROR_SUCCESS) ! dns_list.push_back(icestring(buf)); ! len2 = sizeof(buf); ! if (RegQueryValueEx(regKey2, "NameServer", NULL, NULL, (LPBYTE) buf, (LPDWORD) &len2) == ERROR_SUCCESS) ! dns_list.push_back(icestring(buf)); ! RegCloseKey(regKey2); } } --- 564,590 ---- len = sizeof(buf); for(int i=0; RegEnumKeyEx(regKey1, i, buf, &len, NULL, NULL, NULL, NULL) != ERROR_NO_MORE_ITEMS; i++) { + char buf2[256]; + HKEY regKey2; snprintf(iname, sizeof(iname), "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces\\%s", buf); ! int err = RegOpenKeyEx(HKEY_LOCAL_MACHINE, iname, ! 0, KEY_READ, ®Key2); ! if(err == ERROR_SUCCESS) { ! len2 = sizeof(buf2); ! if (RegQueryValueEx(regKey2, "NameServer", NULL, NULL, (LPBYTE) buf2, (LPDWORD) &len2) == ERROR_SUCCESS) ! tmp_dns.push_back(icestring(buf2)); ! len2 = sizeof(buf2); ! if(RegQueryValueEx(regKey2, "DhcpNameServer", NULL, NULL, (LPBYTE) buf2, (LPDWORD) &len2) == ERROR_SUCCESS) ! tmp_dns.push_back(icestring(buf2)); ! ! RegCloseKey(regKey2); } + len = sizeof(buf); + } *************** *** 586,589 **** --- 593,599 ---- } + for(int i = 0; i < tmp_dns.size(); i++) + if(tmp_dns[i].size() > 0) + split(tmp_dns[i], ',', dns_list); #endif |