The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 1982, 1986, 1990, 1993 |
| 3 | * The Regents of the University of California. All rights reserved. |
| 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions |
| 7 | * are met: |
| 8 | * 1. Redistributions of source code must retain the above copyright |
| 9 | * notice, this list of conditions and the following disclaimer. |
| 10 | * 2. Redistributions in binary form must reproduce the above copyright |
| 11 | * notice, this list of conditions and the following disclaimer in the |
| 12 | * documentation and/or other materials provided with the distribution. |
| 13 | * 3. All advertising materials mentioning features or use of this software |
| 14 | * must display the following acknowledgement: |
| 15 | * This product includes software developed by the University of |
| 16 | * California, Berkeley and its contributors. |
| 17 | * 4. Neither the name of the University nor the names of its contributors |
| 18 | * may be used to endorse or promote products derived from this software |
| 19 | * without specific prior written permission. |
| 20 | * |
| 21 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 27 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 31 | * SUCH DAMAGE. |
| 32 | * |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 33 | * From: |
| 34 | * @(#)in.h 8.3 (Berkeley) 1/3/94 |
| 35 | * $FreeBSD: src/sys/netinet/in.h,v 1.38.2.3 1999/08/29 16:29:34 peter Exp $ |
| 36 | */ |
| 37 | |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 38 | extern const struct tok ipproto_values[]; |
Elliott Hughes | cec480a | 2017-12-19 16:54:57 -0800 | [diff] [blame] | 39 | extern const char *netdb_protoname (const nd_uint8_t); |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 40 | |
| 41 | #ifndef IPPROTO_IP |
| 42 | #define IPPROTO_IP 0 /* dummy for IP */ |
| 43 | #endif |
| 44 | #ifndef IPPROTO_HOPOPTS |
| 45 | #define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */ |
| 46 | #endif |
| 47 | #ifndef IPPROTO_ICMP |
| 48 | #define IPPROTO_ICMP 1 /* control message protocol */ |
| 49 | #endif |
| 50 | #ifndef IPPROTO_IGMP |
| 51 | #define IPPROTO_IGMP 2 /* group mgmt protocol */ |
| 52 | #endif |
| 53 | #ifndef IPPROTO_IPV4 |
| 54 | #define IPPROTO_IPV4 4 |
| 55 | #endif |
| 56 | #ifndef IPPROTO_TCP |
| 57 | #define IPPROTO_TCP 6 /* tcp */ |
| 58 | #endif |
| 59 | #ifndef IPPROTO_EGP |
| 60 | #define IPPROTO_EGP 8 /* exterior gateway protocol */ |
| 61 | #endif |
| 62 | #ifndef IPPROTO_PIGP |
| 63 | #define IPPROTO_PIGP 9 |
| 64 | #endif |
| 65 | #ifndef IPPROTO_UDP |
| 66 | #define IPPROTO_UDP 17 /* user datagram protocol */ |
| 67 | #endif |
| 68 | #ifndef IPPROTO_DCCP |
| 69 | #define IPPROTO_DCCP 33 /* datagram congestion control protocol */ |
| 70 | #endif |
| 71 | #ifndef IPPROTO_IPV6 |
| 72 | #define IPPROTO_IPV6 41 |
| 73 | #endif |
| 74 | #ifndef IPPROTO_ROUTING |
| 75 | #define IPPROTO_ROUTING 43 /* IPv6 routing header */ |
| 76 | #endif |
| 77 | #ifndef IPPROTO_FRAGMENT |
| 78 | #define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */ |
| 79 | #endif |
| 80 | #ifndef IPPROTO_RSVP |
| 81 | #define IPPROTO_RSVP 46 /* resource reservation */ |
| 82 | #endif |
| 83 | #ifndef IPPROTO_GRE |
| 84 | #define IPPROTO_GRE 47 /* General Routing Encap. */ |
| 85 | #endif |
| 86 | #ifndef IPPROTO_ESP |
| 87 | #define IPPROTO_ESP 50 /* SIPP Encap Sec. Payload */ |
| 88 | #endif |
| 89 | #ifndef IPPROTO_AH |
| 90 | #define IPPROTO_AH 51 /* SIPP Auth Header */ |
| 91 | #endif |
| 92 | #ifndef IPPROTO_MOBILE |
| 93 | #define IPPROTO_MOBILE 55 |
| 94 | #endif |
| 95 | #ifndef IPPROTO_ICMPV6 |
| 96 | #define IPPROTO_ICMPV6 58 /* ICMPv6 */ |
| 97 | #endif |
| 98 | #ifndef IPPROTO_NONE |
| 99 | #define IPPROTO_NONE 59 /* IPv6 no next header */ |
| 100 | #endif |
| 101 | #ifndef IPPROTO_DSTOPTS |
| 102 | #define IPPROTO_DSTOPTS 60 /* IPv6 destination options */ |
| 103 | #endif |
| 104 | #ifndef IPPROTO_MOBILITY_OLD |
| 105 | /* |
| 106 | * The current Protocol Numbers list says that the IP protocol number for |
| 107 | * mobility headers is 135; it cites draft-ietf-mobileip-ipv6-24, but |
| 108 | * that draft doesn't actually give a number. |
| 109 | * |
| 110 | * It appears that 62 used to be used, even though that's assigned to |
| 111 | * a protocol called CFTP; however, the only reference for CFTP is a |
| 112 | * Network Message from BBN back in 1982, so, for now, we support 62, |
Elliott Hughes | cec480a | 2017-12-19 16:54:57 -0800 | [diff] [blame] | 113 | * as well as 135, as a protocol number for mobility headers. |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 114 | */ |
| 115 | #define IPPROTO_MOBILITY_OLD 62 |
| 116 | #endif |
| 117 | #ifndef IPPROTO_ND |
| 118 | #define IPPROTO_ND 77 /* Sun net disk proto (temp.) */ |
| 119 | #endif |
| 120 | #ifndef IPPROTO_EIGRP |
| 121 | #define IPPROTO_EIGRP 88 /* Cisco/GXS IGRP */ |
| 122 | #endif |
| 123 | #ifndef IPPROTO_OSPF |
| 124 | #define IPPROTO_OSPF 89 |
| 125 | #endif |
| 126 | #ifndef IPPROTO_PIM |
| 127 | #define IPPROTO_PIM 103 |
| 128 | #endif |
| 129 | #ifndef IPPROTO_IPCOMP |
| 130 | #define IPPROTO_IPCOMP 108 |
| 131 | #endif |
| 132 | #ifndef IPPROTO_VRRP |
| 133 | #define IPPROTO_VRRP 112 |
| 134 | #endif |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 135 | #ifndef IPPROTO_CARP |
| 136 | #define IPPROTO_CARP 112 |
| 137 | #endif |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 138 | #ifndef IPPROTO_PGM |
| 139 | #define IPPROTO_PGM 113 |
| 140 | #endif |
| 141 | #ifndef IPPROTO_SCTP |
| 142 | #define IPPROTO_SCTP 132 |
| 143 | #endif |
| 144 | #ifndef IPPROTO_MOBILITY |
| 145 | #define IPPROTO_MOBILITY 135 |
| 146 | #endif |