~ubuntu-branches/ubuntu/edgy/curl/edgy

« back to all changes in this revision

Viewing changes to lib/inet_ntop.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-06-29 15:04:24 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060629150424-pn00qumt9sml8p4m
Tags: 7.15.4-1ubuntu1
Synchronize to Debian. Only change left: Removal of stunnel and
libdb4.2-dev build dependencies.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
 * Returns `dst' (as a const)
69
69
 * Note:
70
70
 *  - uses no statics
71
 
 *  - takes a u_char* not an in_addr as input
 
71
 *  - takes a unsigned char* not an in_addr as input
72
72
 */
73
 
static char *inet_ntop4 (const u_char *src, char *dst, size_t size)
 
73
static char *inet_ntop4 (const unsigned char *src, char *dst, size_t size)
74
74
{
75
75
#if defined(HAVE_INET_NTOA_R_2_ARGS)
76
76
  const char *ptr;
97
97
/*
98
98
 * Convert IPv6 binary address into presentation (printable) format.
99
99
 */
100
 
static char *inet_ntop6 (const u_char *src, char *dst, size_t size)
 
100
static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size)
101
101
{
102
102
  /*
103
103
   * Note that int32_t and int16_t need only be "at least" large enough
208
208
{
209
209
  switch (af) {
210
210
  case AF_INET:
211
 
    return inet_ntop4((const u_char*)src, buf, size);
 
211
    return inet_ntop4((const unsigned char*)src, buf, size);
212
212
#ifdef ENABLE_IPV6
213
213
  case AF_INET6:
214
 
    return inet_ntop6((const u_char*)src, buf, size);
 
214
    return inet_ntop6((const unsigned char*)src, buf, size);
215
215
#endif
216
216
  default:
217
217
    SET_ERRNO(EAFNOSUPPORT);