other-licenses/android/ns_netint.c

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /*	$NetBSD: ns_netint.c,v 1.2 2004/05/20 20:19:00 christos Exp $	*/
     3 /*
     4  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
     5  * Copyright (c) 1996,1999 by Internet Software Consortium.
     6  *
     7  * Permission to use, copy, modify, and distribute this software for any
     8  * purpose with or without fee is hereby granted, provided that the above
     9  * copyright notice and this permission notice appear in all copies.
    10  *
    11  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
    12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    13  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
    14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
    17  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    18  */
    20 /*
    21  * This version of this file is derived from Android 2.3 "Gingerbread",
    22  * which contains uncredited changes by Android/Google developers.  It has
    23  * been modified in 2011 for use in the Android build of Mozilla Firefox by
    24  * Mozilla contributors (including Michael Edwards <m.k.edwards@gmail.com>,
    25  * and Steve Workman <sjhworkman@gmail.com>).
    26  * These changes are offered under the same license as the original NetBSD
    27  * file, whose copyright and license are unchanged above.
    28  */
    30 #define ANDROID_CHANGES 1
    31 #define MOZILLA_NECKO_EXCLUDE_CODE 1
    33 #include <sys/cdefs.h>
    34 #ifndef lint
    35 #ifdef notdef
    36 static const char rcsid[] = "Id: ns_netint.c,v 1.1.206.1 2004/03/09 08:33:44 marka Exp";
    37 #else
    38 __RCSID("$NetBSD: ns_netint.c,v 1.2 2004/05/20 20:19:00 christos Exp $");
    39 #endif
    40 #endif
    42 /* Import. */
    44 #include "arpa_nameser.h"
    46 /* Public. */
    48 u_int16_t
    49 ns_get16(const u_char *src) {
    50 	u_int dst;
    52 	NS_GET16(dst, src);
    53 	return (dst);
    54 }
    56 u_int32_t
    57 ns_get32(const u_char *src) {
    58 	u_long dst;
    60 	NS_GET32(dst, src);
    61 	return (dst);
    62 }
    64 void
    65 ns_put16(u_int16_t src, u_char *dst) {
    66 	NS_PUT16(src, dst);
    67 }
    69 void
    70 ns_put32(u_int32_t src, u_char *dst) {
    71 	NS_PUT32(src, dst);
    72 }

mercurial