1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. 23 */ 24 25 /* 26 * This file is a sed script which is first preprocessed by cpp or cc -E to 27 * define a set of sed directives which replace #define tokens with their 28 * values. After preprocessing, the sed script is run over ip.d.in to 29 * replace the #define tokens listed below to create the finished ip.d. 30 * Refer to the rules in libdtrace/Makefile.com for more information. 31 */ 32 33 #include <sys/netstack.h> 34 #include <sys/socket.h> 35 #include <netinet/in.h> 36 #include <inet/ip.h> 37 #include <inet/tcp.h> 38 39 #define SED_REPLACE(x) s/#x/x/g 40 41 SED_REPLACE(AF_INET) 42 SED_REPLACE(AF_INET6) 43 44 SED_REPLACE(IPH_DF) 45 SED_REPLACE(IPH_MF) 46 47 SED_REPLACE(IPPROTO_IP) 48 SED_REPLACE(IPPROTO_HOPOPTS) 49 SED_REPLACE(IPPROTO_ICMP) 50 SED_REPLACE(IPPROTO_IGMP) 51 SED_REPLACE(IPPROTO_GGP) 52 SED_REPLACE(IPPROTO_ENCAP) 53 SED_REPLACE(IPPROTO_TCP) 54 SED_REPLACE(IPPROTO_EGP) 55 SED_REPLACE(IPPROTO_PUP) 56 SED_REPLACE(IPPROTO_UDP) 57 SED_REPLACE(IPPROTO_IDP) 58 SED_REPLACE(IPPROTO_IPV6) 59 SED_REPLACE(IPPROTO_ROUTING) 60 SED_REPLACE(IPPROTO_FRAGMENT) 61 SED_REPLACE(IPPROTO_RSVP) 62 SED_REPLACE(IPPROTO_ESP) 63 SED_REPLACE(IPPROTO_AH) 64 SED_REPLACE(IPPROTO_ICMPV6) 65 SED_REPLACE(IPPROTO_NONE) 66 SED_REPLACE(IPPROTO_DSTOPTS) 67 SED_REPLACE(IPPROTO_HELLO) 68 SED_REPLACE(IPPROTO_ND) 69 SED_REPLACE(IPPROTO_EON) 70 SED_REPLACE(IPPROTO_OSPF) 71 SED_REPLACE(IPPROTO_PIM) 72 SED_REPLACE(IPPROTO_SCTP) 73 SED_REPLACE(IPPROTO_RAW) 74 SED_REPLACE(IPPROTO_MAX) 75 76 SED_REPLACE(TCP_MIN_HEADER_LENGTH) 77 78 SED_REPLACE(GLOBAL_NETSTACKID)