1685295f4SBill Fenner /* 2685295f4SBill Fenner * Copyright (c) 1982, 1986, 1993 3685295f4SBill Fenner * The Regents of the University of California. All rights reserved. 4685295f4SBill Fenner * 5685295f4SBill Fenner * Redistribution and use in source and binary forms, with or without 6685295f4SBill Fenner * modification, are permitted provided that the following conditions 7685295f4SBill Fenner * are met: 8685295f4SBill Fenner * 1. Redistributions of source code must retain the above copyright 9685295f4SBill Fenner * notice, this list of conditions and the following disclaimer. 10685295f4SBill Fenner * 2. Redistributions in binary form must reproduce the above copyright 11685295f4SBill Fenner * notice, this list of conditions and the following disclaimer in the 12685295f4SBill Fenner * documentation and/or other materials provided with the distribution. 13685295f4SBill Fenner * 3. All advertising materials mentioning features or use of this software 14685295f4SBill Fenner * must display the following acknowledgement: 15685295f4SBill Fenner * This product includes software developed by the University of 16685295f4SBill Fenner * California, Berkeley and its contributors. 17685295f4SBill Fenner * 4. Neither the name of the University nor the names of its contributors 18685295f4SBill Fenner * may be used to endorse or promote products derived from this software 19685295f4SBill Fenner * without specific prior written permission. 20685295f4SBill Fenner * 21685295f4SBill Fenner * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22685295f4SBill Fenner * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23685295f4SBill Fenner * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24685295f4SBill Fenner * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25685295f4SBill Fenner * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26685295f4SBill Fenner * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27685295f4SBill Fenner * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28685295f4SBill Fenner * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29685295f4SBill Fenner * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30685295f4SBill Fenner * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31685295f4SBill Fenner * SUCH DAMAGE. 32685295f4SBill Fenner * 33685295f4SBill Fenner * @(#)udp.h 8.1 (Berkeley) 6/10/93 34685295f4SBill Fenner */ 35685295f4SBill Fenner 36685295f4SBill Fenner /* 37685295f4SBill Fenner * Udp protocol header. 38685295f4SBill Fenner * Per RFC 768, September, 1981. 39685295f4SBill Fenner */ 40685295f4SBill Fenner struct udphdr { 41ee67461eSJoseph Mingrone nd_uint16_t uh_sport; /* source port */ 42ee67461eSJoseph Mingrone nd_uint16_t uh_dport; /* destination port */ 43ee67461eSJoseph Mingrone nd_uint16_t uh_ulen; /* udp length */ 44ee67461eSJoseph Mingrone nd_uint16_t uh_sum; /* udp checksum */ 45685295f4SBill Fenner }; 465b0fe478SBruce M Simpson 473340d773SGleb Smirnoff #ifndef NAMESERVER_PORT 483340d773SGleb Smirnoff #define NAMESERVER_PORT 53 493340d773SGleb Smirnoff #endif 503340d773SGleb Smirnoff #ifndef BOOTPS_PORT 518bdc5a62SPatrick Kelsey #define BOOTPS_PORT 67 /* RFC951 */ 523340d773SGleb Smirnoff #endif 533340d773SGleb Smirnoff #ifndef BOOTPC_PORT 548bdc5a62SPatrick Kelsey #define BOOTPC_PORT 68 /* RFC951 */ 553340d773SGleb Smirnoff #endif 563340d773SGleb Smirnoff #ifndef TFTP_PORT 575b0fe478SBruce M Simpson #define TFTP_PORT 69 /*XXX*/ 583340d773SGleb Smirnoff #endif 593340d773SGleb Smirnoff #ifndef KERBEROS_PORT 605b0fe478SBruce M Simpson #define KERBEROS_PORT 88 /*XXX*/ 613340d773SGleb Smirnoff #endif 623340d773SGleb Smirnoff #ifndef SUNRPC_PORT 635b0fe478SBruce M Simpson #define SUNRPC_PORT 111 /*XXX*/ 643340d773SGleb Smirnoff #endif 653340d773SGleb Smirnoff #ifndef NTP_PORT 665b0fe478SBruce M Simpson #define NTP_PORT 123 /*XXX*/ 673340d773SGleb Smirnoff #endif 683340d773SGleb Smirnoff #ifndef NETBIOS_NS_PORT 693340d773SGleb Smirnoff #define NETBIOS_NS_PORT 137 /* RFC 1001, RFC 1002 */ 703340d773SGleb Smirnoff #endif 713340d773SGleb Smirnoff #ifndef NETBIOS_DGRAM_PORT 723340d773SGleb Smirnoff #define NETBIOS_DGRAM_PORT 138 /* RFC 1001, RFC 1002 */ 733340d773SGleb Smirnoff #endif 743340d773SGleb Smirnoff #ifndef SNMP_PORT 753340d773SGleb Smirnoff #define SNMP_PORT 161 /*XXX*/ 763340d773SGleb Smirnoff #endif 773340d773SGleb Smirnoff #ifndef SNMPTRAP_PORT 785b0fe478SBruce M Simpson #define SNMPTRAP_PORT 162 /*XXX*/ 793340d773SGleb Smirnoff #endif 80ee67461eSJoseph Mingrone #ifndef PTP_EVENT_PORT 81ee67461eSJoseph Mingrone #define PTP_EVENT_PORT 319 /* IANA */ 823340d773SGleb Smirnoff #endif 83ee67461eSJoseph Mingrone #ifndef PTP_GENERAL_PORT 84ee67461eSJoseph Mingrone #define PTP_GENERAL_PORT 320 /* IANA */ 853340d773SGleb Smirnoff #endif 863340d773SGleb Smirnoff #ifndef CISCO_AUTORP_PORT 875b0fe478SBruce M Simpson #define CISCO_AUTORP_PORT 496 /*XXX*/ 883340d773SGleb Smirnoff #endif 893340d773SGleb Smirnoff #ifndef ISAKMP_PORT 903340d773SGleb Smirnoff #define ISAKMP_PORT 500 /*XXX*/ 913340d773SGleb Smirnoff #endif 923340d773SGleb Smirnoff #ifndef SYSLOG_PORT 933340d773SGleb Smirnoff #define SYSLOG_PORT 514 /* rfc3164 */ 943340d773SGleb Smirnoff #endif 953340d773SGleb Smirnoff #ifndef RIP_PORT 963340d773SGleb Smirnoff #define RIP_PORT 520 /*XXX*/ 973340d773SGleb Smirnoff #endif 983340d773SGleb Smirnoff #ifndef RIPNG_PORT 998bdc5a62SPatrick Kelsey #define RIPNG_PORT 521 /* RFC 2080 */ 1003340d773SGleb Smirnoff #endif 1013340d773SGleb Smirnoff #ifndef TIMED_PORT 1023340d773SGleb Smirnoff #define TIMED_PORT 525 /*XXX*/ 1033340d773SGleb Smirnoff #endif 1043340d773SGleb Smirnoff #ifndef DHCP6_SERV_PORT 1055b0fe478SBruce M Simpson #define DHCP6_SERV_PORT 546 /*XXX*/ 1063340d773SGleb Smirnoff #endif 1073340d773SGleb Smirnoff #ifndef DHCP6_CLI_PORT 1085b0fe478SBruce M Simpson #define DHCP6_CLI_PORT 547 /*XXX*/ 1093340d773SGleb Smirnoff #endif 1103340d773SGleb Smirnoff #ifndef LDP_PORT 1113340d773SGleb Smirnoff #define LDP_PORT 646 1123340d773SGleb Smirnoff #endif 113*0a7e5f1fSJoseph Mingrone #ifndef AODV_PORT 1143340d773SGleb Smirnoff #define AODV_PORT 654 /*XXX*/ 1153340d773SGleb Smirnoff #endif 1163340d773SGleb Smirnoff #ifndef OLSR_PORT 1173340d773SGleb Smirnoff #define OLSR_PORT 698 /* rfc3626 */ 1183340d773SGleb Smirnoff #endif 1193340d773SGleb Smirnoff #ifndef LMP_PORT 1203340d773SGleb Smirnoff #define LMP_PORT 701 /* rfc4204 */ 1213340d773SGleb Smirnoff #endif 1223340d773SGleb Smirnoff #ifndef KERBEROS_SEC_PORT 1233340d773SGleb Smirnoff #define KERBEROS_SEC_PORT 750 /*XXX - Kerberos v4 */ 1243340d773SGleb Smirnoff #endif 1253340d773SGleb Smirnoff #ifndef LWRES_PORT 1263340d773SGleb Smirnoff #define LWRES_PORT 921 /*XXX*/ 1273340d773SGleb Smirnoff #endif 1283340d773SGleb Smirnoff #ifndef VQP_PORT 1293340d773SGleb Smirnoff #define VQP_PORT 1589 /*XXX*/ 1303340d773SGleb Smirnoff #endif 1313340d773SGleb Smirnoff #ifndef RADIUS_PORT 1323340d773SGleb Smirnoff #define RADIUS_PORT 1645 /*XXX*/ 1333340d773SGleb Smirnoff #endif 1343340d773SGleb Smirnoff #ifndef RADIUS_ACCOUNTING_PORT 1353340d773SGleb Smirnoff #define RADIUS_ACCOUNTING_PORT 1646 1363340d773SGleb Smirnoff #endif 1373340d773SGleb Smirnoff #ifndef RADIUS_CISCO_COA_PORT 1383340d773SGleb Smirnoff #define RADIUS_CISCO_COA_PORT 1700 1393340d773SGleb Smirnoff #endif 1403340d773SGleb Smirnoff #ifndef L2TP_PORT 1413340d773SGleb Smirnoff #define L2TP_PORT 1701 /*XXX*/ 1423340d773SGleb Smirnoff #endif 1433340d773SGleb Smirnoff #ifndef RADIUS_NEW_PORT 1443340d773SGleb Smirnoff #define RADIUS_NEW_PORT 1812 /*XXX*/ 1453340d773SGleb Smirnoff #endif 1463340d773SGleb Smirnoff #ifndef RADIUS_NEW_ACCOUNTING_PORT 1473340d773SGleb Smirnoff #define RADIUS_NEW_ACCOUNTING_PORT 1813 1483340d773SGleb Smirnoff #endif 1493340d773SGleb Smirnoff #ifndef HSRP_PORT 1503340d773SGleb Smirnoff #define HSRP_PORT 1985 /*XXX*/ 1513340d773SGleb Smirnoff #endif 1523340d773SGleb Smirnoff #ifndef ZEPHYR_SRV_PORT 1533340d773SGleb Smirnoff #define ZEPHYR_SRV_PORT 2103 /*XXX*/ 1543340d773SGleb Smirnoff #endif 155*0a7e5f1fSJoseph Mingrone #ifndef ZEPHYR_CLT_PORT 1563340d773SGleb Smirnoff #define ZEPHYR_CLT_PORT 2104 /*XXX*/ 1573340d773SGleb Smirnoff #endif 1583340d773SGleb Smirnoff #ifndef VAT_PORT 1593340d773SGleb Smirnoff #define VAT_PORT 3456 /*XXX*/ 1603340d773SGleb Smirnoff #endif 1613340d773SGleb Smirnoff #ifndef MPLS_LSP_PING_PORT 1623340d773SGleb Smirnoff #define MPLS_LSP_PING_PORT 3503 /* draft-ietf-mpls-lsp-ping-02.txt */ 1633340d773SGleb Smirnoff #endif 1643340d773SGleb Smirnoff #ifndef BFD_CONTROL_PORT 1653340d773SGleb Smirnoff #define BFD_CONTROL_PORT 3784 /* RFC 5881 */ 1663340d773SGleb Smirnoff #endif 1673340d773SGleb Smirnoff #ifndef BFD_ECHO_PORT 1683340d773SGleb Smirnoff #define BFD_ECHO_PORT 3785 /* RFC 5881 */ 1693340d773SGleb Smirnoff #endif 1703340d773SGleb Smirnoff #ifndef RADIUS_COA_PORT 1713340d773SGleb Smirnoff #define RADIUS_COA_PORT 3799 /* RFC 5176 */ 1723340d773SGleb Smirnoff #endif 1733340d773SGleb Smirnoff #ifndef LISP_CONTROL_PORT 1743340d773SGleb Smirnoff #define LISP_CONTROL_PORT 4342 /* RFC 6830 */ 1753340d773SGleb Smirnoff #endif 1763340d773SGleb Smirnoff #ifndef ISAKMP_PORT_NATT 1773340d773SGleb Smirnoff #define ISAKMP_PORT_NATT 4500 /* rfc3948 */ 1783340d773SGleb Smirnoff #endif 1793340d773SGleb Smirnoff #ifndef WB_PORT 1803340d773SGleb Smirnoff #define WB_PORT 4567 1813340d773SGleb Smirnoff #endif 182ee67461eSJoseph Mingrone #ifndef BFD_MULTIHOP_PORT 183ee67461eSJoseph Mingrone #define BFD_MULTIHOP_PORT 4784 /* RFC 5883 */ 184ee67461eSJoseph Mingrone #endif 1853340d773SGleb Smirnoff #ifndef VXLAN_PORT 1863340d773SGleb Smirnoff #define VXLAN_PORT 4789 /* RFC 7348 */ 1873340d773SGleb Smirnoff #endif 1883340d773SGleb Smirnoff #ifndef VXLAN_GPE_PORT 1893340d773SGleb Smirnoff #define VXLAN_GPE_PORT 4790 /* draft-ietf-nvo3-vxlan-gpe-01 */ 1903340d773SGleb Smirnoff #endif 1913340d773SGleb Smirnoff #ifndef SIP_PORT 1923340d773SGleb Smirnoff #define SIP_PORT 5060 1933340d773SGleb Smirnoff #endif 1943340d773SGleb Smirnoff #ifndef MULTICASTDNS_PORT 1953340d773SGleb Smirnoff #define MULTICASTDNS_PORT 5353 /* RFC 6762 */ 1963340d773SGleb Smirnoff #endif 1973340d773SGleb Smirnoff #ifndef AHCP_PORT 1983c602fabSXin LI #define AHCP_PORT 5359 /* draft-chroboczek-ahcp-00 */ 1993340d773SGleb Smirnoff #endif 2003340d773SGleb Smirnoff #ifndef GENEVE_PORT 2013340d773SGleb Smirnoff #define GENEVE_PORT 6081 /* draft-gross-geneve-02 */ 2023340d773SGleb Smirnoff #endif 2033340d773SGleb Smirnoff #ifndef SFLOW_PORT 204ee67461eSJoseph Mingrone #define SFLOW_PORT 6343 /* https://sflow.org/developers/specifications.php */ 205ee67461eSJoseph Mingrone #endif 206ee67461eSJoseph Mingrone #ifndef MPLS_PORT 207ee67461eSJoseph Mingrone #define MPLS_PORT 6635 /* RFC 7510 */ 2083340d773SGleb Smirnoff #endif 2093340d773SGleb Smirnoff #ifndef BABEL_PORT 2108bdc5a62SPatrick Kelsey #define BABEL_PORT 6696 /* RFC 6126 errata */ 2113340d773SGleb Smirnoff #endif 2123340d773SGleb Smirnoff #ifndef BABEL_PORT_OLD 2138bdc5a62SPatrick Kelsey #define BABEL_PORT_OLD 6697 /* RFC 6126 */ 2145b0fe478SBruce M Simpson #endif 215ee67461eSJoseph Mingrone #ifndef BFD_LAG_PORT 216ee67461eSJoseph Mingrone #define BFD_LAG_PORT 6784 /* RFC 7310 */ 217ee67461eSJoseph Mingrone #endif 2183340d773SGleb Smirnoff #ifndef RX_PORT_LOW 2193340d773SGleb Smirnoff #define RX_PORT_LOW 7000 /*XXX*/ 2203340d773SGleb Smirnoff #endif 2213340d773SGleb Smirnoff #ifndef RX_PORT_HIGH 2223340d773SGleb Smirnoff #define RX_PORT_HIGH 7009 /*XXX*/ 2233340d773SGleb Smirnoff #endif 2243340d773SGleb Smirnoff #ifndef ISAKMP_PORT_USER1 2253340d773SGleb Smirnoff #define ISAKMP_PORT_USER1 7500 /*XXX - nonstandard*/ 2263340d773SGleb Smirnoff #endif 2273340d773SGleb Smirnoff #ifndef HNCP_PORT 2283340d773SGleb Smirnoff #define HNCP_PORT 8231 /* RFC 7788 */ 2293340d773SGleb Smirnoff #endif 2303340d773SGleb Smirnoff #ifndef OTV_PORT 2313340d773SGleb Smirnoff #define OTV_PORT 8472 /* draft-hasmit-otv-04 */ 2323340d773SGleb Smirnoff #endif 2333340d773SGleb Smirnoff #ifndef ISAKMP_PORT_USER2 2343340d773SGleb Smirnoff #define ISAKMP_PORT_USER2 8500 /*XXX - nonstandard*/ 2353340d773SGleb Smirnoff #endif 2363340d773SGleb Smirnoff #ifndef LWAPP_DATA_PORT 2373340d773SGleb Smirnoff #define LWAPP_DATA_PORT 12222 /* RFC 5412 */ 2383340d773SGleb Smirnoff #endif 2393340d773SGleb Smirnoff #ifndef LWAPP_CONTROL_PORT 2403340d773SGleb Smirnoff #define LWAPP_CONTROL_PORT 12223 /* RFC 5412 */ 2413340d773SGleb Smirnoff #endif 242ee67461eSJoseph Mingrone #ifndef ZEP_PORT 243ee67461eSJoseph Mingrone #define ZEP_PORT 17754 /* XXX */ 244ee67461eSJoseph Mingrone #endif 245ee67461eSJoseph Mingrone #ifndef SOMEIP_PORT 246ee67461eSJoseph Mingrone #define SOMEIP_PORT 30490 /* https://www.autosar.org/standards/foundation */ 247ee67461eSJoseph Mingrone #endif 248*0a7e5f1fSJoseph Mingrone #ifndef BCM_LI_PORT 249*0a7e5f1fSJoseph Mingrone #define BCM_LI_PORT 49152 /* SDK default */ 250*0a7e5f1fSJoseph Mingrone #endif 251