1f8829a4aSRandall Stewart /*- 2f42a358aSRandall Stewart * Copyright (c) 2006-2007, Cisco Systems, Inc. All rights reserved. 3f8829a4aSRandall Stewart * 4f8829a4aSRandall Stewart * Redistribution and use in source and binary forms, with or without 5f8829a4aSRandall Stewart * modification, are permitted provided that the following conditions are met: 6f8829a4aSRandall Stewart * 7f8829a4aSRandall Stewart * a) Redistributions of source code must retain the above copyright notice, 8f8829a4aSRandall Stewart * this list of conditions and the following disclaimer. 9f8829a4aSRandall Stewart * 10f8829a4aSRandall Stewart * b) Redistributions in binary form must reproduce the above copyright 11f8829a4aSRandall Stewart * notice, this list of conditions and the following disclaimer in 12f8829a4aSRandall Stewart * the documentation and/or other materials provided with the distribution. 13f8829a4aSRandall Stewart * 14f8829a4aSRandall Stewart * c) Neither the name of Cisco Systems, Inc. nor the names of its 15f8829a4aSRandall Stewart * contributors may be used to endorse or promote products derived 16f8829a4aSRandall Stewart * from this software without specific prior written permission. 17f8829a4aSRandall Stewart * 18f8829a4aSRandall Stewart * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19f8829a4aSRandall Stewart * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 20f8829a4aSRandall Stewart * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21f8829a4aSRandall Stewart * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 22f8829a4aSRandall Stewart * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23f8829a4aSRandall Stewart * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24f8829a4aSRandall Stewart * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25f8829a4aSRandall Stewart * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26f8829a4aSRandall Stewart * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27f8829a4aSRandall Stewart * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 28f8829a4aSRandall Stewart * THE POSSIBILITY OF SUCH DAMAGE. 29f8829a4aSRandall Stewart */ 3073932c69SRandall Stewart #include <sys/cdefs.h> 31f8829a4aSRandall Stewart __FBSDID("$FreeBSD$"); 32f8829a4aSRandall Stewart #ifndef __sctp_os_h__ 33f8829a4aSRandall Stewart #define __sctp_os_h__ 34f8829a4aSRandall Stewart 35f8829a4aSRandall Stewart /* 36f8829a4aSRandall Stewart * General kernel memory allocation: 37f8829a4aSRandall Stewart * SCTP_MALLOC(element, type, size, name) 38f8829a4aSRandall Stewart * SCTP_FREE(element) 39f8829a4aSRandall Stewart * Kernel memory allocation for "soname"- memory must be zeroed. 40f8829a4aSRandall Stewart * SCTP_MALLOC_SONAME(name, type, size) 41f8829a4aSRandall Stewart * SCTP_FREE_SONAME(name) 42f8829a4aSRandall Stewart */ 43f8829a4aSRandall Stewart 44f8829a4aSRandall Stewart /* 45f8829a4aSRandall Stewart * Zone(pool) allocation routines: MUST be defined for each OS. 46f8829a4aSRandall Stewart * zone = zone/pool pointer. 47f8829a4aSRandall Stewart * name = string name of the zone/pool. 48f8829a4aSRandall Stewart * size = size of each zone/pool element. 49f8829a4aSRandall Stewart * number = number of elements in zone/pool. 50f42a358aSRandall Stewart * type = structure type to allocate 51f8829a4aSRandall Stewart * 52f8829a4aSRandall Stewart * sctp_zone_t 53f8829a4aSRandall Stewart * SCTP_ZONE_INIT(zone, name, size, number) 54f42a358aSRandall Stewart * SCTP_ZONE_GET(zone, type) 55f8829a4aSRandall Stewart * SCTP_ZONE_FREE(zone, element) 56f8829a4aSRandall Stewart * SCTP_ZONE_DESTROY(zone) 57f8829a4aSRandall Stewart */ 58f8829a4aSRandall Stewart 59f8829a4aSRandall Stewart #include <netinet/sctp_os_bsd.h> 60f8829a4aSRandall Stewart 61f8829a4aSRandall Stewart 62f8829a4aSRandall Stewart 63139bc87fSRandall Stewart 6493164cf9SRandall Stewart 65f8829a4aSRandall Stewart #endif 66