1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/other-licenses/android/ns_netint.c Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,72 @@ 1.4 +/* $NetBSD: ns_netint.c,v 1.2 2004/05/20 20:19:00 christos Exp $ */ 1.5 + 1.6 +/* 1.7 + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 1.8 + * Copyright (c) 1996,1999 by Internet Software Consortium. 1.9 + * 1.10 + * Permission to use, copy, modify, and distribute this software for any 1.11 + * purpose with or without fee is hereby granted, provided that the above 1.12 + * copyright notice and this permission notice appear in all copies. 1.13 + * 1.14 + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES 1.15 + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1.16 + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 1.17 + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1.18 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1.19 + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 1.20 + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1.21 + */ 1.22 + 1.23 +/* 1.24 + * This version of this file is derived from Android 2.3 "Gingerbread", 1.25 + * which contains uncredited changes by Android/Google developers. It has 1.26 + * been modified in 2011 for use in the Android build of Mozilla Firefox by 1.27 + * Mozilla contributors (including Michael Edwards <m.k.edwards@gmail.com>, 1.28 + * and Steve Workman <sjhworkman@gmail.com>). 1.29 + * These changes are offered under the same license as the original NetBSD 1.30 + * file, whose copyright and license are unchanged above. 1.31 + */ 1.32 + 1.33 +#define ANDROID_CHANGES 1 1.34 +#define MOZILLA_NECKO_EXCLUDE_CODE 1 1.35 + 1.36 +#include <sys/cdefs.h> 1.37 +#ifndef lint 1.38 +#ifdef notdef 1.39 +static const char rcsid[] = "Id: ns_netint.c,v 1.1.206.1 2004/03/09 08:33:44 marka Exp"; 1.40 +#else 1.41 +__RCSID("$NetBSD: ns_netint.c,v 1.2 2004/05/20 20:19:00 christos Exp $"); 1.42 +#endif 1.43 +#endif 1.44 + 1.45 +/* Import. */ 1.46 + 1.47 +#include "arpa_nameser.h" 1.48 + 1.49 +/* Public. */ 1.50 + 1.51 +u_int16_t 1.52 +ns_get16(const u_char *src) { 1.53 + u_int dst; 1.54 + 1.55 + NS_GET16(dst, src); 1.56 + return (dst); 1.57 +} 1.58 + 1.59 +u_int32_t 1.60 +ns_get32(const u_char *src) { 1.61 + u_long dst; 1.62 + 1.63 + NS_GET32(dst, src); 1.64 + return (dst); 1.65 +} 1.66 + 1.67 +void 1.68 +ns_put16(u_int16_t src, u_char *dst) { 1.69 + NS_PUT16(src, dst); 1.70 +} 1.71 + 1.72 +void 1.73 +ns_put32(u_int32_t src, u_char *dst) { 1.74 + NS_PUT32(src, dst); 1.75 +}