Commit Graph

9 Commits

Author SHA1 Message Date
Gerald Combs cf2b47c142 More size_t fixes.
svn path=/trunk/; revision=28004
2009-04-08 18:19:10 +00:00
Bill Meier 0095250d83 From Jakub Zawadzki: Glib2 g_snprintf doesn't return -1;
Also: from me: fix an "off by 1" issue in inet_ntop_4
   which could result in a trailing character of the
   output string being truncated rather than an ENOSPC
   error being reported.
   

svn path=/trunk/; revision=27766
2009-03-18 00:03:41 +00:00
Bill Meier 55905b97a8 strcpy-->g-strlcpy; Also: Add $Id$
svn path=/trunk/; revision=27744
2009-03-16 19:30:25 +00:00
Gerald Combs f60e81aaac Fix compilation under VS6 (hopefully without breaking compilation
anywhere else).  Instead of using getaddrinfo() and getnameinfo(),
promote inet_pton.c and inet_ntop.c to the top level and use those
routines instead.

(It's 2007, for crying out loud.  Why is this even an issue?)

svn path=/trunk/; revision=22075
2007-06-11 18:26:09 +00:00
Gilbert Ramirez 26bda31ed9 Move inet_*.[ch] files to epan.
svn path=/trunk/; revision=2494
2000-10-14 04:31:26 +00:00
Laurent Deniel 6a480953a9 Miscellaneous code cleaning
- add <stdarg.h> or <varargs.h> in snprintf.h
  and remove those inclusions in the other #ifdef NEED_SNPRINTF_H codes

- remove the check of multiple inclusions in source (.c)  code
  (there is a bit loss of _cpp_ performance, but I prefer the gain of
   code reading and maintenance; and nowadays, disk caches and VM are
   correctly optimized ;-).

- protect all (well almost) header files against multiple inclusions

- add header (i.e. GPL license) in some include files

- reorganize a bit the way header files are included:

  First:
  #include <system_include_files>
  #include <external_package_include_files (e.g. gtk, glib etc.)>
  Then
  #include "ethereal_include_files"

  with the correct HAVE_XXX or NEED_XXX protections.

- add some HAVE_XXX checks before including some system header files

- add the same HAVE_XXX in wiretap as in ethereal

Please forgive me, if I break something (I've only compiled and regression
tested on Linux).

svn path=/trunk/; revision=2254
2000-08-11 13:37:21 +00:00
Gilbert Ramirez 1990d5fb5c Some initial changes for win32 support, but not all.
Added lots of #ifdef HAVE_*_H wrappers.
Added some #defines in config.h.win32
Check for more headers in configure.in
Added prototype for inet_aton() in inet_v6defs.h.
Changed "BYTE" token (i.e., #define) in ascend-gramamr.y because it
conflicts with a windows definition. Use HEXBYTE instead.

svn path=/trunk/; revision=1448
2000-01-10 17:33:17 +00:00
Guy Harris ae276ffe20 Make it build on systems lacking "inet_pton()", "inet_ntop()", and a
definition of "AF_INET6".  Declare those functions and, if it's not
defined, define "AF_INET6" in "inet_v6defs.h", and arrange to include
it if "inet_ntop()" is missing.  (Systems will probably have both of
them or lack both of them, and we may choose not to use the system's
"inet_pton()" because it's buggy, so base the decision on whether to
include "inet_v6defs.h" on whether we're using the system's
"inet_ntop()" or not.)  Fix some macro references in "Makefile.am" and
"configure.in".

svn path=/trunk/; revision=830
1999-10-14 06:55:11 +00:00
Jun-ichiro itojun Hagino 831497b33e use inet_pton() and inet_ntop(), which are RFC2553 standard function
for converting IPv[46] numeric notation to/from binary form.
recent BIND includes those functions so fallback is not necessary on
most of the platforms.
sorry if it raises any portability problem on other platforms.

remove partial inclusion of inet_ntop() in packet-ipv6.c.

move ip6_to_str() to packet.c, it fits better there than packet-ipv6.c.

svn path=/trunk/; revision=829
1999-10-14 05:41:33 +00:00