Re: the alternative function for inet_aton

2011-07-05 Thread C. P. Ghost
On Mon, Jul 4, 2011 at 8:05 PM, ahmad javadi
 wrote:
> hi
> I use " inet_aton"  function in the kernel socket programming but i have the
> following warrning:
> "crypto.c:63: warning: implicit declaration of function 'inet_aton'
> crypto.c:63: warning: nested extern declaration of  'inet_aton'
> "
> this function required that "" be included but this folder did
> not exit in the my freebsd.

There's probably a typo in your #include: replace the "," with a "."
and try again.

On my 8.2-STABLE system, /usr/include/arpa/inet.h exists,
and defines inet_aton() just fine:

% grep 'inet_aton' /usr/include/arpa/inet.h
#define inet_aton   __inet_aton
int  inet_aton(const char *, struct in_addr *);

> Please help me to find solution or to use alternative function.
> thanks

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: the alternative function for inet_aton

2011-07-04 Thread Polytropon
On Mon, 4 Jul 2011 23:57:34 +0430, ahmad javadi wrote:
> the   /usr/include/arpa is exit but i dont know how install it .
> so how can i install this header file?

If /usr/include/arpa exists and contains the following
files, everything is okay (7-STABLE here, may have different
content on 8):

% ls /usr/include/arpa
ftp.h nameser.h telnet.h
inet.hnameser_compat.h  tftp.h

There is no need to install something. Just make sure you
don't override cc's -I parameter (in cc call or Makefile).



If you need to install the files - i. e. they are NOT present
in /usr/include/arpa, get the sources matching your OS version
(from the DVD, per FTP or via CVS - consult the FreeBSD Handbook
for the respective procedures, e. g. installing the "src-all"
install set from the CD if you're using RELEASE). Then do:

# cd /usr/src/include/arpa
# make install

I've _not_ tested that, but it should install the files mentioned
above to the correct location. Okay, basically you could simply
cope the files if it fails... :-)



PS. I've re-included the list, hope that's okay.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: the alternative function for inet_aton

2011-07-04 Thread Polytropon
On Mon, 4 Jul 2011 22:35:28 +0430, ahmad javadi wrote:
> hi
> I use " inet_aton"  function in the kernel socket programming but i have the
> following warrning:
> "crypto.c:63: warning: implicit declaration of function 'inet_aton'
> crypto.c:63: warning: nested extern declaration of  'inet_aton'
> "
> this function required that "" be included but this folder did
> not exit in the my freebsd.

Does the directory /usr/include/arpa _not_ exist, or just the
file inet.h in that directory? (If this is, your system include
files are incomplete.)

I also assume that "inet comma h" is a typo, and you've used
#include  ("inet dot h") correctly. I also assume
you didn't modify the settings from where header files included
with #include <...> should be imported (cc -I).

Which FreeBSD version do you use? I'm using 7-STABLE here and
the file is present, it also contains the function prototype.

#define inet_aton   __inet_aton
int  inet_aton(const char *, struct in_addr *);

If you've installed the sources (at the correct version of the
OS you're using), you can find /usr/src/include/arpa with the
file, and you should be able to "make install" (not tested here)
from there to install arpa/inet.h into the correct location.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


the alternative function for inet_aton

2011-07-04 Thread ahmad javadi
hi
I use " inet_aton"  function in the kernel socket programming but i have the
following warrning:
"crypto.c:63: warning: implicit declaration of function 'inet_aton'
crypto.c:63: warning: nested extern declaration of  'inet_aton'
"
this function required that "" be included but this folder did
not exit in the my freebsd.
Please help me to find solution or to use alternative function.
thanks
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"