Requirements for UDNS Install

T kyer xdtrq at ananzi.co.za
Sat Dec 10 01:34:52 MSK 2005


Hi Michael

Thanks for your prompt reply. MSVC may be the compiler that
MS builds  Windows with, but its many library files are
proprietary. If any source code is built with theses
proprietary files it is then very difficult to compile the
source with any other compiler. Enough said.

Now for the windows headers. This is the latest version
provided with gcc and is only a few months old.


With windows ipconfig /all at the command prompt will
reveal the DNS Servers and should be listed. Except it only
works if one is using an smtp/pop server. I have an ISP
that uses webmail only so I am out of luck. There are many
users with this arrangement so why not use a text file
where the user can include available free primary and
secondary DNS servers. Something like this - 
120.120.120.120;
121.121.121.121;
with the ";" used as a delineator and the first IP address
would be the primary followed by the secondary DNS.

If there is functionality available on WindowsNT line it
usually means that certain dlls are present. Not all the
time but most. So importing the missing dlls into Win 98
might do the trick. We'll have to find which dlls are
missing.


Can you please use -k switch ... I can do it but I have to
do it from the command line as I don't believe its possible
from the IDE. Here's the problem it works alright but I
can't stop the scrolling within the DOS Window. /p is
supposed to pause the scrolling at window end but it
doesn't work. Unless you know the instruction I can only
include gaps and the tail end of the compilation record
with the terminated version.

I have included the two files you made available
udns_resolver.c & inet_ntop.c. I even tried a copy of
getopt.c getopt.h. Need a revised copy of Makefile for
Windows  and the "friends" you mentioned thanks.

Following please find the latest compiled error list:

Compiler: Default compiler
Executing  make...
make.exe -f "Makefile" all
gcc -Wall -W -Wmissing-prototypes -O2 -DHAVE_POLL -c
udns_dn.c gcc -Wall -W -Wmissing-prototypes -O2 -DHAVE_POLL
-c udns_dntosp.c gcc -Wall -W -Wmissing-prototypes -O2
-DHAVE_POLL -c udns_parse.c gcc -Wall -W
-Wmissing-prototypes -O2 -DHAVE_POLL -c udns_resolver.c
udns_resolver.c: In function `dns_add_serv_internal':
udns_resolver.c:266: warning: implicit declaration of
function `inet_pton' udns_resolver.c: In function
`dns_firstid':
udns_resolver.c:445: warning: implicit declaration of
function `gettimeofday'
udns_resolver.c:446: warning: implicit declaration of
function `getpid'
udns_resolver.c: At top level:
udns_resolver.c:453: error: syntax error before
"PIP_ADAPTER_ADDRESSES"
udns_resolver.c: In function `dns_initns_iphlpapi':
udns_resolver.c:459: error: `PIP_ADAPTER_ADDRESSES'
undeclared (first use in this function)
udns_resolver.c:459: error: (Each undeclared identifier is
reported only once
udns_resolver.c:459: error: for each function it appears
in.)
udns_resolver.c:459: error: syntax error before "pAddr"
udns_resolver.c:460: error:
`PIP_ADAPTER_DNS_SERVER_ADDRESS' undeclared (first use in
this function)
udns_resolver.c:469: error: `iphlp' undeclared (first use
in this function)
udns_resolver.c:472: warning: implicit declaration of
function `GetAdAddrs'
udns_resolver.c:474: error: `pAddrBuf' undeclared (first
use in this function)
udns_resolver.c:478: error: `pAddr' undeclared (first use
in this function)
udns_resolver.c:481: error: `pDnsAddr' undeclared (first
use in this function) udns_resolver.c: In function
`dns_ioevent': udns_resolver.c:1056: warning: comparison
between signed and unsigned
udns_resolver.c:1065: warning: comparison between signed
and unsigned
udns_resolver.c: In function `dns_resolve':
udns_resolver.c:1294: warning: comparison between signed
and unsigned udns_resolver.c: At top level:
udns_resolver.c:397: warning: 'dns_set_srch_internal'
defined but not used make.exe: *** [udns_resolver.o] Error
1 Execution terminated

gcc -Wall -W -Wmissing-prototypes -O2 -DHAVE_POLL -c
udns_dn.c
gcc -Wall -W -Wmissing-prototypes -O2 -DHAVE_POLL -c
udns_dntosp.c
gcc -Wall -W -Wmissing-prototypes -O2 -DHAVE_POLL -c
udns_parse.c
gcc -Wall -W -Wmissing-prototypes -O2 -DHAVE_POLL -c
udns_resolver.c


udns_resolver.c: In function `dns_add_serv_internal':
udns_resolver.c:258: error: `EOVERFLOW' undeclared (first
use in this function)
udns_resolver.c:258: error: (Each undeclared identifier is
reported only once
udns_resolver.c:258: error: for each function it appears
in.)
udns_resolver.c:258: warning: left-hand operand of comma
expression has no effec
t
udns_resolver.c:264: warning: implicit declaration of
function `inet_pton'
udns_resolver.c: In function `dns_add_serv_s_internal':
udns_resolver.c:304: error: `EOVERFLOW' undeclared (first
use in this function)
udns_resolver.c:304: warning: left-hand operand of comma
expression has no effec
t
udns_resolver.c: In function `dns_add_srch_internal':
udns_resolver.c:383: error: `EOVERFLOW' undeclared (first
use in this function)
udns_resolver.c:383: warning: left-hand operand of comma
expression has no effec
t
udns_resolver.c: In function `dns_firstid':
udns_resolver.c:443: warning: implicit declaration of
function `gettimeofday'
udns_resolver.c:444: warning: implicit declaration of
function `getpid'
udns_resolver.c: At top level:
udns_resolver.c:451: error: syntax error before
"PIP_ADAPTER_ADDRESSES"
udns_resolver.c: In function `dns_initns_iphlpapi':
udns_resolver.c:457: error: `PIP_ADAPTER_ADDRESSES'
undeclared (first use in thi
s function)
udns_resolver.c:457: error: syntax error before "pAddr"
udns_resolver.c:458: error: `PIP_ADAP




se in this function)
udns_resolver.c:464: error: `HANDLE_ERROR' undeclared
(first use in this functio
n)
udns_resolver.c:467: error: `iphlp' undeclared (first use
in this function)
udns_resolver.c:470: warning: implicit declaration of
function `GetAdAddrs'
udns_resolver.c:472: error: `pAddrBuf' undeclared (first
use in this function)




udns_resolver.c:476: error: `pAddr' undeclared (first use
in this function)
udns_resolver.c:479: error: `pDnsAddr' undeclared (first
use in this function)
udns_resolver.c: In function `dns_initns_registry':
udns_resolver.c:510: warning: passing arg 4 of
`RegQueryValueExA' from incompat
ble pointer type




udns_resolver.c:510: warning: passing arg 5 of
`RegQueryValueExA' from incompati
ble pointer type
udns_resolver.c:510: error: too few arguments to function
`RegQueryValueExA'
udns_resolver.c: In function `dns_close':
udns_resolver.c:754: warning: implicit declaration of
function `close'
udns_resolver.c: In function `dns_ioevent':
udns_resolver.c:1054: warning: comparison between signed
and unsigned
udns_resolver.c:1063: warning: comparison between signed
and unsigned
udns_resolver.c:1254:3: warning: #warning fixme:
poll()/select() on WIN32 (WaitF
orMultipleObjects?)
udns_resolver.c: In function `dns_resolve':
udns_resolver.c:1257: error: storage size of 'pfd' isn't
known
udns_resolver.c:1283: error: `POLLIN' undeclared (first use
in this function)
udns_resolver.c:1291: warning: implicit declaration of
function `poll'
udns_resolver.c:1257: warning: unused variable `pfd'
udns_resolver.c: At top level:
udns_resolver.c:395: warning: 'dns_set_srch_internal'
defined but not used
D:\DEV-CPP\BIN\MAKE.EXE: *** [udns_resolver.o] Error 1
gcc -Wall -W -Wmissing-prototypes -O2 -DHAVE_POLL -c
udns_misc.c
gcc -Wall -W -Wmissing-prototypes -O2 -DHAVE_POLL -c
udns_rr_a.c
gcc -Wall -W -Wmissing-prototypes -O2 -DHAVE_POLL -c
udns_rr_ptr.c
gcc -Wall -W -Wmissing-prototypes -O2 -DHAVE_POLL -c
udns_rr_mx.c
gcc -Wall -W -Wmissing-prototypes -O2 -DHAVE_POLL -c
udns_rr_txt.c
gcc -Wall -W -Wmissing-prototypes -O2 -DHAVE_POLL -c
udns_bl.c
gcc -Wall -W -Wmissing-prototypes -O2 -DHAVE_POLL -c
udns_rr_srv.c
Generating udns_codes.c
Syntax error
process_begin: CreateProcess((null), mv udns_codes.c.tmp
udns_codes.c, ...) fail
ed.
make (e=2): The system cannot find the file specified.
D:\DEV-CPP\BIN\MAKE.EXE: *** [udns_codes.c] Error 2
D:\DEV-CPP\BIN\MAKE.EXE: Target `all' not remade because of
errors.






I've included iphlpapi.h for your perusal - 

#ifndef _IPHLPAPI_H
#define _IPHLPAPI_H
#if __GNUC__ >=3
#pragma GCC system_header
#endif

#include <iprtrmib.h>
#include <ipexport.h>
#include <iptypes.h>
#ifdef __cplusplus
extern "C" {
#endif
DWORD WINAPI
AddIPAddress(IPAddr,IPMask,DWORD,PULONG,PULONG);
DWORD WINAPI CreateIpForwardEntry(PMIB_IPFORWARDROW);
DWORD WINAPI CreateIpNetEntry(PMIB_IPNETROW);
DWORD WINAPI CreateProxyArpEntry(DWORD,DWORD,DWORD);
DWORD WINAPI DeleteIPAddress(ULONG);
DWORD WINAPI DeleteIpForwardEntry(PMIB_IPFORWARDROW);
DWORD WINAPI DeleteIpNetEntry(PMIB_IPNETROW);
DWORD WINAPI DeleteProxyArpEntry(DWORD,DWORD,DWORD);
DWORD WINAPI EnableRouter(HANDLE*,OVERLAPPED*);
DWORD WINAPI FlushIpNetTable(DWORD);
DWORD WINAPI GetAdapterIndex(LPWSTR,PULONG);
DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO,PULONG);
DWORD WINAPI GetBestInterface(IPAddr,PDWORD);
DWORD WINAPI GetBestRoute(DWORD,DWORD,PMIB_IPFORWARDROW);
DWORD WINAPI GetFriendlyIfIndex(DWORD);
DWORD WINAPI GetIcmpStatistics(PMIB_ICMP);
DWORD WINAPI GetIfEntry(PMIB_IFROW);
DWORD WINAPI GetIfTable(PMIB_IFTABLE,PULONG,BOOL);
DWORD WINAPI GetInterfaceInfo(PIP_INTERFACE_INFO,PULONG);
DWORD WINAPI GetIpAddrTable(PMIB_IPADDRTABLE,PULONG,BOOL);
DWORD WINAPI
GetIpForwardTable(PMIB_IPFORWARDTABLE,PULONG,BOOL);
DWORD WINAPI GetIpNetTable(PMIB_IPNETTABLE,PULONG,BOOL);
DWORD WINAPI GetIpStatistics(PMIB_IPSTATS);
DWORD WINAPI GetNetworkParams(PFIXED_INFO,PULONG);
DWORD WINAPI GetNumberOfInterfaces(PDWORD);
DWORD WINAPI GetPerAdapterInfo(ULONG,PIP_PER_ADAPTER_INFO,
PULONG);
BOOL WINAPI GetRTTAndHopCount(IPAddr,PULONG,ULONG,PULONG);
DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS);
DWORD WINAPI GetTcpTable(PMIB_TCPTABLE,PDWORD,BOOL);
DWORD WINAPI
GetUniDirectionalAdapterInfo(PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS,PULONG);
DWORD WINAPI GetUdpStatistics(PMIB_UDPSTATS);
DWORD WINAPI GetUdpTable(PMIB_UDPTABLE,PDWORD,BOOL);
DWORD WINAPI IpReleaseAddress(PIP_ADAPTER_INDEX_MAP);
DWORD WINAPI IpRenewAddress(PIP_ADAPTER_INDEX_MAP);
DWORD WINAPI NotifyAddrChange(PHANDLE,LPOVERLAPPED);
DWORD WINAPI NotifyRouteChange(PHANDLE,LPOVERLAPPED);
DWORD WINAPI SendARP(IPAddr,IPAddr,PULONG,PULONG);
DWORD WINAPI SetIfEntry(PMIB_IFROW);
DWORD WINAPI SetIpForwardEntry(PMIB_IPFORWARDROW);
DWORD WINAPI SetIpNetEntry(PMIB_IPNETROW);
DWORD WINAPI SetIpStatistics(PMIB_IPSTATS);
DWORD WINAPI SetIpTTL(UINT);
DWORD WINAPI SetTcpEntry(PMIB_TCPROW);
DWORD WINAPI UnenableRouter(OVERLAPPED*, LPDWORD);
#ifdef __cplusplus
}
#endif
#endif /* _IPHLPAPI_H */


Regards 

Thaya



More information about the udns mailing list