xref: /illumos-gate/usr/src/lib/libdtrace/common/ip.sed.in (revision 8c69cc8fbe729fa7b091e901c4b50508ccc6bb33)
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
41SED_REPLACE(AF_INET)
42SED_REPLACE(AF_INET6)
43
44SED_REPLACE(IPH_DF)
45SED_REPLACE(IPH_MF)
46
47SED_REPLACE(IPPROTO_IP)
48SED_REPLACE(IPPROTO_HOPOPTS)
49SED_REPLACE(IPPROTO_ICMP)
50SED_REPLACE(IPPROTO_IGMP)
51SED_REPLACE(IPPROTO_GGP)
52SED_REPLACE(IPPROTO_ENCAP)
53SED_REPLACE(IPPROTO_TCP)
54SED_REPLACE(IPPROTO_EGP)
55SED_REPLACE(IPPROTO_PUP)
56SED_REPLACE(IPPROTO_UDP)
57SED_REPLACE(IPPROTO_IDP)
58SED_REPLACE(IPPROTO_IPV6)
59SED_REPLACE(IPPROTO_ROUTING)
60SED_REPLACE(IPPROTO_FRAGMENT)
61SED_REPLACE(IPPROTO_RSVP)
62SED_REPLACE(IPPROTO_ESP)
63SED_REPLACE(IPPROTO_AH)
64SED_REPLACE(IPPROTO_ICMPV6)
65SED_REPLACE(IPPROTO_NONE)
66SED_REPLACE(IPPROTO_DSTOPTS)
67SED_REPLACE(IPPROTO_HELLO)
68SED_REPLACE(IPPROTO_ND)
69SED_REPLACE(IPPROTO_EON)
70SED_REPLACE(IPPROTO_OSPF)
71SED_REPLACE(IPPROTO_PIM)
72SED_REPLACE(IPPROTO_SCTP)
73SED_REPLACE(IPPROTO_RAW)
74SED_REPLACE(IPPROTO_MAX)
75
76SED_REPLACE(TCP_MIN_HEADER_LENGTH)
77
78SED_REPLACE(GLOBAL_NETSTACKID)
79