common.h revision aa92d85b088543197e9fb4594eb30d5215fca2c1
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * CDDL HEADER START
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * The contents of this file are subject to the terms of the
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * Common Development and Distribution License (the "License").
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * You may not use this file except in compliance with the License.
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * See the License for the specific language governing permissions
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * and limitations under the License.
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * When distributing Covered Code, include this CDDL HEADER in each
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * If applicable, add the following below this CDDL HEADER, with the
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * fields enclosed by brackets "[]" replaced with your own identifying
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * information: Portions Copyright [yyyy] [name of copyright owner]
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * CDDL HEADER END
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * Use is subject to license terms.
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje/* Copyright (c) 1990 Mentat Inc. */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje#pragma ident "%Z%%M% %I% %E% SMI"
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * WARNING: This file contains implementation-specific constants, typedefs
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * and macros which may change from release to release.
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setjeextern "C" {
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje#define nilp(t) ((t *)0)
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje#define nil(t) ((t)0)
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setjetypedef int (*pfi_t)();
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setjetypedef void (*pfv_t)();
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje#define BE32_EQL(a, b) (((uint8_t *)a)[0] == ((uint8_t *)b)[0] && \
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje#define BE16_EQL(a, b) (((uint8_t *)a)[0] == ((uint8_t *)b)[0] && \
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje#define BE16_TO_U16(a) ((((uint16_t)((uint8_t *)a)[0] << 8) | \
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje#define BE32_TO_U32(a) ((((uint32_t)((uint8_t *)a)[0]) << 24) | \
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje#define U16_TO_BE16(u, a) ((((uint8_t *)a)[0] = (uint8_t)((u) >> 8)), \
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje#define U32_TO_BE32(u, a) ((((uint8_t *)a)[0] = (uint8_t)((u) >> 24)), \
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * Local Environment Definition, this may and should override the
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * the default definitions above where the local environment differs.
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gwextern void *inet_minor_create(char *, dev_t, dev_t, int);
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gwextern void inet_minor_destroy(void *);
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw#endif /* _KERNEL */
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw#endif /* _INET_COMMON_H */