sctp_os.h revision 166675
1163953Srrs/*- 2166675Srrs * Copyright (c) 2006-2007, Cisco Systems, Inc. All rights reserved. 3163953Srrs * 4163953Srrs * Redistribution and use in source and binary forms, with or without 5163953Srrs * modification, are permitted provided that the following conditions are met: 6163953Srrs * 7163953Srrs * a) Redistributions of source code must retain the above copyright notice, 8163953Srrs * this list of conditions and the following disclaimer. 9163953Srrs * 10163953Srrs * b) Redistributions in binary form must reproduce the above copyright 11163953Srrs * notice, this list of conditions and the following disclaimer in 12163953Srrs * the documentation and/or other materials provided with the distribution. 13163953Srrs * 14163953Srrs * c) Neither the name of Cisco Systems, Inc. nor the names of its 15163953Srrs * contributors may be used to endorse or promote products derived 16163953Srrs * from this software without specific prior written permission. 17163953Srrs * 18163953Srrs * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19163953Srrs * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 20163953Srrs * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21163953Srrs * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 22163953Srrs * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23163953Srrs * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24163953Srrs * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25163953Srrs * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26163953Srrs * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27163953Srrs * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 28163953Srrs * THE POSSIBILITY OF SUCH DAMAGE. 29163953Srrs */ 30163954Srrs#include <sys/cdefs.h> 31163953Srrs__FBSDID("$FreeBSD: head/sys/netinet/sctp_os.h 166675 2007-02-12 23:24:31Z rrs $"); 32163953Srrs#ifndef __sctp_os_h__ 33163953Srrs#define __sctp_os_h__ 34163953Srrs 35163953Srrs/* 36163953Srrs * General kernel memory allocation: 37163953Srrs * SCTP_MALLOC(element, type, size, name) 38163953Srrs * SCTP_FREE(element) 39163953Srrs * Kernel memory allocation for "soname"- memory must be zeroed. 40163953Srrs * SCTP_MALLOC_SONAME(name, type, size) 41163953Srrs * SCTP_FREE_SONAME(name) 42163953Srrs */ 43163953Srrs 44163953Srrs/* 45163953Srrs * Zone(pool) allocation routines: MUST be defined for each OS. 46163953Srrs * zone = zone/pool pointer. 47163953Srrs * name = string name of the zone/pool. 48163953Srrs * size = size of each zone/pool element. 49163953Srrs * number = number of elements in zone/pool. 50166675Srrs * type = structure type to allocate 51163953Srrs * 52163953Srrs * sctp_zone_t 53163953Srrs * SCTP_ZONE_INIT(zone, name, size, number) 54166675Srrs * SCTP_ZONE_GET(zone, type) 55163953Srrs * SCTP_ZONE_FREE(zone, element) 56163953Srrs * SCTP_ZONE_DESTROY(zone) 57163953Srrs */ 58163953Srrs 59163953Srrs#include <netinet/sctp_os_bsd.h> 60163953Srrs 61163953Srrs 62163953Srrs 63165647Srrs 64166086Srrs 65163953Srrs#endif 66