1 /* 2 * Copyright (c) 1982, 1986, 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. Neither the name of the University nor the names of its contributors 14 * may be used to endorse or promote products derived from this software 15 * without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)udp.h 8.1 (Berkeley) 6/10/93 30 */ 31 32 /* 33 * Udp protocol header. 34 * Per RFC 768, September, 1981. 35 */ 36 struct udphdr { 37 nd_uint16_t uh_sport; /* source port */ 38 nd_uint16_t uh_dport; /* destination port */ 39 nd_uint16_t uh_ulen; /* udp length */ 40 nd_uint16_t uh_sum; /* udp checksum */ 41 }; 42 43 #ifndef NAMESERVER_PORT 44 #define NAMESERVER_PORT 53 45 #endif 46 #ifndef BOOTPS_PORT 47 #define BOOTPS_PORT 67 /* RFC951 */ 48 #endif 49 #ifndef BOOTPC_PORT 50 #define BOOTPC_PORT 68 /* RFC951 */ 51 #endif 52 #ifndef TFTP_PORT 53 #define TFTP_PORT 69 /*XXX*/ 54 #endif 55 #ifndef KERBEROS_PORT 56 #define KERBEROS_PORT 88 /*XXX*/ 57 #endif 58 #ifndef SUNRPC_PORT 59 #define SUNRPC_PORT 111 /*XXX*/ 60 #endif 61 #ifndef NTP_PORT 62 #define NTP_PORT 123 /*XXX*/ 63 #endif 64 #ifndef NETBIOS_NS_PORT 65 #define NETBIOS_NS_PORT 137 /* RFC 1001, RFC 1002 */ 66 #endif 67 #ifndef NETBIOS_DGRAM_PORT 68 #define NETBIOS_DGRAM_PORT 138 /* RFC 1001, RFC 1002 */ 69 #endif 70 #ifndef SNMP_PORT 71 #define SNMP_PORT 161 /*XXX*/ 72 #endif 73 #ifndef SNMPTRAP_PORT 74 #define SNMPTRAP_PORT 162 /*XXX*/ 75 #endif 76 #ifndef PTP_EVENT_PORT 77 #define PTP_EVENT_PORT 319 /* IANA */ 78 #endif 79 #ifndef PTP_GENERAL_PORT 80 #define PTP_GENERAL_PORT 320 /* IANA */ 81 #endif 82 #ifndef CISCO_AUTORP_PORT 83 #define CISCO_AUTORP_PORT 496 /*XXX*/ 84 #endif 85 #ifndef ISAKMP_PORT 86 #define ISAKMP_PORT 500 /*XXX*/ 87 #endif 88 #ifndef SYSLOG_PORT 89 #define SYSLOG_PORT 514 /* rfc3164 */ 90 #endif 91 #ifndef RIP_PORT 92 #define RIP_PORT 520 /*XXX*/ 93 #endif 94 #ifndef RIPNG_PORT 95 #define RIPNG_PORT 521 /* RFC 2080 */ 96 #endif 97 #ifndef TIMED_PORT 98 #define TIMED_PORT 525 /*XXX*/ 99 #endif 100 #ifndef DHCP6_SERV_PORT 101 #define DHCP6_SERV_PORT 546 /*XXX*/ 102 #endif 103 #ifndef DHCP6_CLI_PORT 104 #define DHCP6_CLI_PORT 547 /*XXX*/ 105 #endif 106 #ifndef LDP_PORT 107 #define LDP_PORT 646 108 #endif 109 #ifndef AQDV_PORT 110 #define AODV_PORT 654 /*XXX*/ 111 #endif 112 #ifndef OLSR_PORT 113 #define OLSR_PORT 698 /* rfc3626 */ 114 #endif 115 #ifndef LMP_PORT 116 #define LMP_PORT 701 /* rfc4204 */ 117 #endif 118 #ifndef KERBEROS_SEC_PORT 119 #define KERBEROS_SEC_PORT 750 /*XXX - Kerberos v4 */ 120 #endif 121 #ifndef LWRES_PORT 122 #define LWRES_PORT 921 /*XXX*/ 123 #endif 124 #ifndef VQP_PORT 125 #define VQP_PORT 1589 /*XXX*/ 126 #endif 127 #ifndef RADIUS_PORT 128 #define RADIUS_PORT 1645 /*XXX*/ 129 #endif 130 #ifndef RADIUS_ACCOUNTING_PORT 131 #define RADIUS_ACCOUNTING_PORT 1646 132 #endif 133 #ifndef RADIUS_CISCO_COA_PORT 134 #define RADIUS_CISCO_COA_PORT 1700 135 #endif 136 #ifndef L2TP_PORT 137 #define L2TP_PORT 1701 /*XXX*/ 138 #endif 139 #ifndef RADIUS_NEW_PORT 140 #define RADIUS_NEW_PORT 1812 /*XXX*/ 141 #endif 142 #ifndef RADIUS_NEW_ACCOUNTING_PORT 143 #define RADIUS_NEW_ACCOUNTING_PORT 1813 144 #endif 145 #ifndef HSRP_PORT 146 #define HSRP_PORT 1985 /*XXX*/ 147 #endif 148 #ifndef ZEPHYR_SRV_PORT 149 #define ZEPHYR_SRV_PORT 2103 /*XXX*/ 150 #endif 151 #ifndef ZEPHYR_CLI_PORT 152 #define ZEPHYR_CLT_PORT 2104 /*XXX*/ 153 #endif 154 #ifndef VAT_PORT 155 #define VAT_PORT 3456 /*XXX*/ 156 #endif 157 #ifndef MPLS_LSP_PING_PORT 158 #define MPLS_LSP_PING_PORT 3503 /* draft-ietf-mpls-lsp-ping-02.txt */ 159 #endif 160 #ifndef BCM_LI_PORT 161 #define BCM_LI_PORT 49152 /* SDK default */ 162 #endif 163 #ifndef BFD_CONTROL_PORT 164 #define BFD_CONTROL_PORT 3784 /* RFC 5881 */ 165 #endif 166 #ifndef BFD_ECHO_PORT 167 #define BFD_ECHO_PORT 3785 /* RFC 5881 */ 168 #endif 169 #ifndef RADIUS_COA_PORT 170 #define RADIUS_COA_PORT 3799 /* RFC 5176 */ 171 #endif 172 #ifndef LISP_CONTROL_PORT 173 #define LISP_CONTROL_PORT 4342 /* RFC 6830 */ 174 #endif 175 #ifndef ISAKMP_PORT_NATT 176 #define ISAKMP_PORT_NATT 4500 /* rfc3948 */ 177 #endif 178 #ifndef WB_PORT 179 #define WB_PORT 4567 180 #endif 181 #ifndef BFD_MULTIHOP_PORT 182 #define BFD_MULTIHOP_PORT 4784 /* RFC 5883 */ 183 #endif 184 #ifndef VXLAN_PORT 185 #define VXLAN_PORT 4789 /* RFC 7348 */ 186 #endif 187 #ifndef VXLAN_GPE_PORT 188 #define VXLAN_GPE_PORT 4790 /* draft-ietf-nvo3-vxlan-gpe-01 */ 189 #endif 190 #ifndef SIP_PORT 191 #define SIP_PORT 5060 192 #endif 193 #ifndef MULTICASTDNS_PORT 194 #define MULTICASTDNS_PORT 5353 /* RFC 6762 */ 195 #endif 196 #ifndef AHCP_PORT 197 #define AHCP_PORT 5359 /* draft-chroboczek-ahcp-00 */ 198 #endif 199 #ifndef GENEVE_PORT 200 #define GENEVE_PORT 6081 /* draft-gross-geneve-02 */ 201 #endif 202 #ifndef SFLOW_PORT 203 #define SFLOW_PORT 6343 /* https://sflow.org/developers/specifications.php */ 204 #endif 205 #ifndef MPLS_PORT 206 #define MPLS_PORT 6635 /* RFC 7510 */ 207 #endif 208 #ifndef BABEL_PORT 209 #define BABEL_PORT 6696 /* RFC 6126 errata */ 210 #endif 211 #ifndef BABEL_PORT_OLD 212 #define BABEL_PORT_OLD 6697 /* RFC 6126 */ 213 #endif 214 #ifndef BFD_LAG_PORT 215 #define BFD_LAG_PORT 6784 /* RFC 7310 */ 216 #endif 217 #ifndef RX_PORT_LOW 218 #define RX_PORT_LOW 7000 /*XXX*/ 219 #endif 220 #ifndef RX_PORT_HIGH 221 #define RX_PORT_HIGH 7009 /*XXX*/ 222 #endif 223 #ifndef ISAKMP_PORT_USER1 224 #define ISAKMP_PORT_USER1 7500 /*XXX - nonstandard*/ 225 #endif 226 #ifndef HNCP_PORT 227 #define HNCP_PORT 8231 /* RFC 7788 */ 228 #endif 229 #ifndef OTV_PORT 230 #define OTV_PORT 8472 /* draft-hasmit-otv-04 */ 231 #endif 232 #ifndef ISAKMP_PORT_USER2 233 #define ISAKMP_PORT_USER2 8500 /*XXX - nonstandard*/ 234 #endif 235 #ifndef LWAPP_DATA_PORT 236 #define LWAPP_DATA_PORT 12222 /* RFC 5412 */ 237 #endif 238 #ifndef LWAPP_CONTROL_PORT 239 #define LWAPP_CONTROL_PORT 12223 /* RFC 5412 */ 240 #endif 241 #ifndef ZEP_PORT 242 #define ZEP_PORT 17754 /* XXX */ 243 #endif 244 #ifndef SOMEIP_PORT 245 #define SOMEIP_PORT 30490 /* https://www.autosar.org/standards/foundation */ 246 #endif 247