svn path=/trunk/; revision=18687
int inet_aton(const char *cp, struct in_addr *inp)
{
inp->S_un.S_addr = inet_addr(cp);
int inet_aton(const char *cp, struct in_addr *inp)
{
inp->S_un.S_addr = inet_addr(cp);
ipv4addrs(char * buf)
{
char *tmp;
ipv4addrs(char * buf)
{
char *tmp;
int i = 0;
note("Input: %s\n", buf);
int i = 0;
note("Input: %s\n", buf);
do {
tmp = strtok(buf, " ");
note("got %s\n", tmp);
do {
tmp = strtok(buf, " ");
note("got %s\n", tmp);
- jnk = inet_addr( tmp );
- if( tmp ) i++;
+ if( tmp && inet_aton(tmp, &jnk) ) i++;
buf = NULL;
} while( tmp );
buf = NULL;
} while( tmp );
extern DWORD DSLeaseIpAddress( PipeSendFunc Send, COMM_DHCP_REQ *Req );
extern DWORD DSRenewIpAddressLease( PipeSendFunc Send, COMM_DHCP_REQ *Req );
extern DWORD DSReleaseIpAddressLease( PipeSendFunc Send, COMM_DHCP_REQ *Req );
extern DWORD DSLeaseIpAddress( PipeSendFunc Send, COMM_DHCP_REQ *Req );
extern DWORD DSRenewIpAddressLease( PipeSendFunc Send, COMM_DHCP_REQ *Req );
extern DWORD DSReleaseIpAddressLease( PipeSendFunc Send, COMM_DHCP_REQ *Req );
+extern int inet_aton(const char *s, struct in_addr *addr);
int warn( char *format, ... );
#endif/*ROSDHCP_H*/
int warn( char *format, ... );
#endif/*ROSDHCP_H*/