pripv6.c revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner/* ***** BEGIN LICENSE BLOCK *****
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * Version: MPL 1.1/GPL 2.0/LGPL 2.1
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * The contents of this file are subject to the Mozilla Public License Version
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * 1.1 (the "License"); you may not use this file except in compliance with
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * the License. You may obtain a copy of the License at
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * Software distributed under the License is distributed on an "AS IS" basis,
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * for the specific language governing rights and limitations under the
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * The Original Code is the Netscape Portable Runtime (NSPR).
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * The Initial Developer of the Original Code is
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * Netscape Communications Corporation.
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * Portions created by the Initial Developer are Copyright (C) 1998-2000
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * the Initial Developer. All Rights Reserved.
b23a7923c0fe493ed4beebaf775ad634ea217080Ali Bahrami * Contributor(s):
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * Alternatively, the contents of this file may be used under the terms of
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * either the GNU General Public License Version 2 or later (the "GPL"), or
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * in which case the provisions of the GPL or the LGPL are applicable instead
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * of those above. If you wish to allow use of your version of this file only
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * under the terms of either the GPL or the LGPL, and not to allow others to
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * use your version of this file under the terms of the MPL, indicate your
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * decision by deleting the provisions above and replace them with the notice
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * and other provisions required by the GPL or the LGPL. If you do not delete
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * the provisions above, a recipient may use your version of this file under
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * the terms of any one of the MPL, the GPL or the LGPL.
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner * ***** END LICENSE BLOCK ***** */
b23a7923c0fe493ed4beebaf775ad634ea217080Ali Bahrami** Description: Support for various functions unique to IPv6
e4d060fb4c00d44cd578713eb9a921f594b733b8Sam Falkner#if !defined(_PR_INET6) || defined(_PR_INET6_PROBE)
return PR_FAILURE;
return PR_FAILURE;
return PR_FAILURE;
return PR_FAILURE;
return PR_FAILURE;
return PR_FAILURE;
return NULL;
if (addr)
return NULL;
if (addr)
return nbytes;
return nbytes;
return result;
return result;
return result;
#if defined(_PR_INET6_PROBE)
static PRBool
_pr_probe_ipv6_presence(void)
return PR_FALSE;
return PR_FALSE;
return _pr_test_ipv6_socket();
#if defined(_PR_INET6_PROBE)
return PR_SUCCESS;
ipv6_to_v4_tcpMethods.setsocketoption = Ipv6ToIpv4SetSocketOption;
ipv6_to_v4_tcpMethods.setsocketoption = Ipv6ToIpv4SetSocketOption;
return PR_SUCCESS;
goto errorExit;
goto errorExit;
return PR_SUCCESS;
if (ipv6_fd)
return PR_FAILURE;