aboutsummaryrefslogtreecommitdiffstats
path: root/lib/misc.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-10-18 18:44:25 +0200
committerJelmer Vernooij <jelmer@samba.org>2007-10-18 18:44:25 +0200
commite9b755e3726fa41ac2d4ed1c3a6192d1af68edbc (patch)
treee9940f353e77d615eed2e89479d5038c40fc3e92 /lib/misc.c
parentc511365ddc57359ab3020ccbd3f20e23b55ba5ca (diff)
Use standard functions for dealing with both IPv6 and IPv4.
Diffstat (limited to 'lib/misc.c')
-rw-r--r--lib/misc.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/lib/misc.c b/lib/misc.c
index 5e385d4a..ceba9d95 100644
--- a/lib/misc.c
+++ b/lib/misc.c
@@ -321,46 +321,6 @@ char *strip_newlines( char *source )
return source;
}
-#ifdef IPV6
-/* Wrap an IPv4 address into IPv6 space. Not thread-safe... */
-char *ipv6_wrap( char *src )
-{
- static char dst[64];
- int i;
-
- for( i = 0; src[i]; i ++ )
- if( ( src[i] < '0' || src[i] > '9' ) && src[i] != '.' )
- break;
-
- /* Hmm, it's not even an IP... */
- if( src[i] )
- return src;
-
- g_snprintf( dst, sizeof( dst ), "::ffff:%s", src );
-
- return dst;
-}
-
-/* Unwrap an IPv4 address into IPv6 space. Thread-safe, because it's very simple. :-) */
-char *ipv6_unwrap( char *src )
-{
- int i;
-
- if( g_strncasecmp( src, "::ffff:", 7 ) != 0 )
- return src;
-
- for( i = 7; src[i]; i ++ )
- if( ( src[i] < '0' || src[i] > '9' ) && src[i] != '.' )
- break;
-
- /* Hmm, it's not even an IP... */
- if( src[i] )
- return src;
-
- return ( src + 7 );
-}
-#endif
-
/* Convert from one charset to another.
from_cs, to_cs: Source and destination charsets