michael@0: /*- michael@0: * Copyright (c) 2006-2007, by Cisco Systems, Inc. All rights reserved. michael@0: * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. michael@0: * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. michael@0: * michael@0: * Redistribution and use in source and binary forms, with or without michael@0: * modification, are permitted provided that the following conditions are met: michael@0: * michael@0: * a) Redistributions of source code must retain the above copyright notice, michael@0: * this list of conditions and the following disclaimer. michael@0: * michael@0: * b) Redistributions in binary form must reproduce the above copyright michael@0: * notice, this list of conditions and the following disclaimer in michael@0: * the documentation and/or other materials provided with the distribution. michael@0: * michael@0: * c) Neither the name of Cisco Systems, Inc. nor the names of its michael@0: * contributors may be used to endorse or promote products derived michael@0: * from this software without specific prior written permission. michael@0: * michael@0: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS michael@0: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, michael@0: * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE michael@0: * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE michael@0: * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR michael@0: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF michael@0: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS michael@0: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN michael@0: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) michael@0: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF michael@0: * THE POSSIBILITY OF SUCH DAMAGE. michael@0: */ michael@0: michael@0: #ifdef __FreeBSD__ michael@0: #include michael@0: __FBSDID("$FreeBSD: head/sys/netinet/sctp_os.h 235828 2012-05-23 11:26:28Z tuexen $"); michael@0: #endif michael@0: michael@0: #ifndef _NETINET_SCTP_OS_H_ michael@0: #define _NETINET_SCTP_OS_H_ michael@0: michael@0: /* michael@0: * General kernel memory allocation: michael@0: * SCTP_MALLOC(element, type, size, name) michael@0: * SCTP_FREE(element) michael@0: * Kernel memory allocation for "soname"- memory must be zeroed. michael@0: * SCTP_MALLOC_SONAME(name, type, size) michael@0: * SCTP_FREE_SONAME(name) michael@0: */ michael@0: michael@0: /* michael@0: * Zone(pool) allocation routines: MUST be defined for each OS. michael@0: * zone = zone/pool pointer. michael@0: * name = string name of the zone/pool. michael@0: * size = size of each zone/pool element. michael@0: * number = number of elements in zone/pool. michael@0: * type = structure type to allocate michael@0: * michael@0: * sctp_zone_t michael@0: * SCTP_ZONE_INIT(zone, name, size, number) michael@0: * SCTP_ZONE_GET(zone, type) michael@0: * SCTP_ZONE_FREE(zone, element) michael@0: * SCTP_ZONE_DESTROY(zone) michael@0: */ michael@0: michael@0: #if defined(__FreeBSD__) michael@0: #include michael@0: #else michael@0: #define MODULE_GLOBAL(_B) (_B) michael@0: #endif michael@0: michael@0: #if defined(__Userspace__) michael@0: #include michael@0: #endif michael@0: michael@0: #if defined(__APPLE__) michael@0: #include michael@0: #endif michael@0: michael@0: #if defined(__Panda__) michael@0: #include michael@0: #endif michael@0: michael@0: #if defined(__Windows__) michael@0: #include michael@0: #endif michael@0: michael@0: /* All os's must implement this address gatherer. If michael@0: * no VRF's exist, then vrf 0 is the only one and all michael@0: * addresses and ifn's live here. michael@0: */ michael@0: #define SCTP_DEFAULT_VRF 0 michael@0: void sctp_init_vrf_list(int vrfid); michael@0: michael@0: #endif