141c99275SPeter Avalos /* 241c99275SPeter Avalos * Copyright (c) 1982, 1986, 1993 341c99275SPeter Avalos * The Regents of the University of California. All rights reserved. 441c99275SPeter Avalos * 541c99275SPeter Avalos * Redistribution and use in source and binary forms, with or without 641c99275SPeter Avalos * modification, are permitted provided that the following conditions 741c99275SPeter Avalos * are met: 841c99275SPeter Avalos * 1. Redistributions of source code must retain the above copyright 941c99275SPeter Avalos * notice, this list of conditions and the following disclaimer. 1041c99275SPeter Avalos * 2. Redistributions in binary form must reproduce the above copyright 1141c99275SPeter Avalos * notice, this list of conditions and the following disclaimer in the 1241c99275SPeter Avalos * documentation and/or other materials provided with the distribution. 1341c99275SPeter Avalos * 3. All advertising materials mentioning features or use of this software 1441c99275SPeter Avalos * must display the following acknowledgement: 1541c99275SPeter Avalos * This product includes software developed by the University of 1641c99275SPeter Avalos * California, Berkeley and its contributors. 1741c99275SPeter Avalos * 4. Neither the name of the University nor the names of its contributors 1841c99275SPeter Avalos * may be used to endorse or promote products derived from this software 1941c99275SPeter Avalos * without specific prior written permission. 2041c99275SPeter Avalos * 2141c99275SPeter Avalos * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2241c99275SPeter Avalos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2341c99275SPeter Avalos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2441c99275SPeter Avalos * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2541c99275SPeter Avalos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2641c99275SPeter Avalos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2741c99275SPeter Avalos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2841c99275SPeter Avalos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2941c99275SPeter Avalos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3041c99275SPeter Avalos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3141c99275SPeter Avalos * SUCH DAMAGE. 3241c99275SPeter Avalos * 3341c99275SPeter Avalos * @(#)udp.h 8.1 (Berkeley) 6/10/93 3441c99275SPeter Avalos */ 3541c99275SPeter Avalos 3641c99275SPeter Avalos /* 3741c99275SPeter Avalos * Udp protocol header. 3841c99275SPeter Avalos * Per RFC 768, September, 1981. 3941c99275SPeter Avalos */ 4041c99275SPeter Avalos struct udphdr { 41*ed775ee7SAntonio Huete Jimenez nd_uint16_t uh_sport; /* source port */ 42*ed775ee7SAntonio Huete Jimenez nd_uint16_t uh_dport; /* destination port */ 43*ed775ee7SAntonio Huete Jimenez nd_uint16_t uh_ulen; /* udp length */ 44*ed775ee7SAntonio Huete Jimenez nd_uint16_t uh_sum; /* udp checksum */ 4541c99275SPeter Avalos }; 4641c99275SPeter Avalos 47411677aeSAaron LI #ifndef NAMESERVER_PORT 48411677aeSAaron LI #define NAMESERVER_PORT 53 49411677aeSAaron LI #endif 50411677aeSAaron LI #ifndef BOOTPS_PORT 51411677aeSAaron LI #define BOOTPS_PORT 67 /* RFC951 */ 52411677aeSAaron LI #endif 53411677aeSAaron LI #ifndef BOOTPC_PORT 54411677aeSAaron LI #define BOOTPC_PORT 68 /* RFC951 */ 55411677aeSAaron LI #endif 56411677aeSAaron LI #ifndef TFTP_PORT 5741c99275SPeter Avalos #define TFTP_PORT 69 /*XXX*/ 58411677aeSAaron LI #endif 59411677aeSAaron LI #ifndef KERBEROS_PORT 6041c99275SPeter Avalos #define KERBEROS_PORT 88 /*XXX*/ 61411677aeSAaron LI #endif 62411677aeSAaron LI #ifndef SUNRPC_PORT 6341c99275SPeter Avalos #define SUNRPC_PORT 111 /*XXX*/ 64411677aeSAaron LI #endif 65411677aeSAaron LI #ifndef NTP_PORT 6641c99275SPeter Avalos #define NTP_PORT 123 /*XXX*/ 67411677aeSAaron LI #endif 68411677aeSAaron LI #ifndef NETBIOS_NS_PORT 69411677aeSAaron LI #define NETBIOS_NS_PORT 137 /* RFC 1001, RFC 1002 */ 70411677aeSAaron LI #endif 71411677aeSAaron LI #ifndef NETBIOS_DGRAM_PORT 72411677aeSAaron LI #define NETBIOS_DGRAM_PORT 138 /* RFC 1001, RFC 1002 */ 73411677aeSAaron LI #endif 74411677aeSAaron LI #ifndef SNMP_PORT 75411677aeSAaron LI #define SNMP_PORT 161 /*XXX*/ 76411677aeSAaron LI #endif 77411677aeSAaron LI #ifndef SNMPTRAP_PORT 7841c99275SPeter Avalos #define SNMPTRAP_PORT 162 /*XXX*/ 79411677aeSAaron LI #endif 80*ed775ee7SAntonio Huete Jimenez #ifndef PTP_EVENT_PORT 81*ed775ee7SAntonio Huete Jimenez #define PTP_EVENT_PORT 319 /* IANA */ 82411677aeSAaron LI #endif 83*ed775ee7SAntonio Huete Jimenez #ifndef PTP_GENERAL_PORT 84*ed775ee7SAntonio Huete Jimenez #define PTP_GENERAL_PORT 320 /* IANA */ 85411677aeSAaron LI #endif 86411677aeSAaron LI #ifndef CISCO_AUTORP_PORT 8741c99275SPeter Avalos #define CISCO_AUTORP_PORT 496 /*XXX*/ 88411677aeSAaron LI #endif 89411677aeSAaron LI #ifndef ISAKMP_PORT 90411677aeSAaron LI #define ISAKMP_PORT 500 /*XXX*/ 91411677aeSAaron LI #endif 92411677aeSAaron LI #ifndef SYSLOG_PORT 93411677aeSAaron LI #define SYSLOG_PORT 514 /* rfc3164 */ 94411677aeSAaron LI #endif 95411677aeSAaron LI #ifndef RIP_PORT 96411677aeSAaron LI #define RIP_PORT 520 /*XXX*/ 97411677aeSAaron LI #endif 98411677aeSAaron LI #ifndef RIPNG_PORT 99411677aeSAaron LI #define RIPNG_PORT 521 /* RFC 2080 */ 100411677aeSAaron LI #endif 101411677aeSAaron LI #ifndef TIMED_PORT 102411677aeSAaron LI #define TIMED_PORT 525 /*XXX*/ 103411677aeSAaron LI #endif 104411677aeSAaron LI #ifndef DHCP6_SERV_PORT 10541c99275SPeter Avalos #define DHCP6_SERV_PORT 546 /*XXX*/ 106411677aeSAaron LI #endif 107411677aeSAaron LI #ifndef DHCP6_CLI_PORT 10841c99275SPeter Avalos #define DHCP6_CLI_PORT 547 /*XXX*/ 109411677aeSAaron LI #endif 110411677aeSAaron LI #ifndef LDP_PORT 111411677aeSAaron LI #define LDP_PORT 646 112411677aeSAaron LI #endif 113411677aeSAaron LI #ifndef AQDV_PORT 114411677aeSAaron LI #define AODV_PORT 654 /*XXX*/ 115411677aeSAaron LI #endif 116411677aeSAaron LI #ifndef OLSR_PORT 117411677aeSAaron LI #define OLSR_PORT 698 /* rfc3626 */ 118411677aeSAaron LI #endif 119411677aeSAaron LI #ifndef LMP_PORT 120411677aeSAaron LI #define LMP_PORT 701 /* rfc4204 */ 121411677aeSAaron LI #endif 122411677aeSAaron LI #ifndef KERBEROS_SEC_PORT 123411677aeSAaron LI #define KERBEROS_SEC_PORT 750 /*XXX - Kerberos v4 */ 124411677aeSAaron LI #endif 125411677aeSAaron LI #ifndef LWRES_PORT 126411677aeSAaron LI #define LWRES_PORT 921 /*XXX*/ 127411677aeSAaron LI #endif 128411677aeSAaron LI #ifndef VQP_PORT 129411677aeSAaron LI #define VQP_PORT 1589 /*XXX*/ 130411677aeSAaron LI #endif 131411677aeSAaron LI #ifndef RADIUS_PORT 132411677aeSAaron LI #define RADIUS_PORT 1645 /*XXX*/ 133411677aeSAaron LI #endif 134411677aeSAaron LI #ifndef RADIUS_ACCOUNTING_PORT 135411677aeSAaron LI #define RADIUS_ACCOUNTING_PORT 1646 136411677aeSAaron LI #endif 137411677aeSAaron LI #ifndef RADIUS_CISCO_COA_PORT 138411677aeSAaron LI #define RADIUS_CISCO_COA_PORT 1700 139411677aeSAaron LI #endif 140411677aeSAaron LI #ifndef L2TP_PORT 141411677aeSAaron LI #define L2TP_PORT 1701 /*XXX*/ 142411677aeSAaron LI #endif 143411677aeSAaron LI #ifndef RADIUS_NEW_PORT 144411677aeSAaron LI #define RADIUS_NEW_PORT 1812 /*XXX*/ 145411677aeSAaron LI #endif 146411677aeSAaron LI #ifndef RADIUS_NEW_ACCOUNTING_PORT 147411677aeSAaron LI #define RADIUS_NEW_ACCOUNTING_PORT 1813 148411677aeSAaron LI #endif 149411677aeSAaron LI #ifndef HSRP_PORT 150411677aeSAaron LI #define HSRP_PORT 1985 /*XXX*/ 151411677aeSAaron LI #endif 152411677aeSAaron LI #ifndef ZEPHYR_SRV_PORT 153411677aeSAaron LI #define ZEPHYR_SRV_PORT 2103 /*XXX*/ 154411677aeSAaron LI #endif 155411677aeSAaron LI #ifndef ZEPHYR_CLI_PORT 156411677aeSAaron LI #define ZEPHYR_CLT_PORT 2104 /*XXX*/ 157411677aeSAaron LI #endif 158411677aeSAaron LI #ifndef VAT_PORT 159411677aeSAaron LI #define VAT_PORT 3456 /*XXX*/ 160411677aeSAaron LI #endif 161411677aeSAaron LI #ifndef MPLS_LSP_PING_PORT 162411677aeSAaron LI #define MPLS_LSP_PING_PORT 3503 /* draft-ietf-mpls-lsp-ping-02.txt */ 163411677aeSAaron LI #endif 164*ed775ee7SAntonio Huete Jimenez #ifndef BCM_LI_PORT 165*ed775ee7SAntonio Huete Jimenez #define BCM_LI_PORT 49152 /* SDK default */ 166411677aeSAaron LI #endif 167411677aeSAaron LI #ifndef BFD_CONTROL_PORT 168411677aeSAaron LI #define BFD_CONTROL_PORT 3784 /* RFC 5881 */ 169411677aeSAaron LI #endif 170411677aeSAaron LI #ifndef BFD_ECHO_PORT 171411677aeSAaron LI #define BFD_ECHO_PORT 3785 /* RFC 5881 */ 172411677aeSAaron LI #endif 173411677aeSAaron LI #ifndef RADIUS_COA_PORT 174411677aeSAaron LI #define RADIUS_COA_PORT 3799 /* RFC 5176 */ 175411677aeSAaron LI #endif 176411677aeSAaron LI #ifndef LISP_CONTROL_PORT 177411677aeSAaron LI #define LISP_CONTROL_PORT 4342 /* RFC 6830 */ 178411677aeSAaron LI #endif 179411677aeSAaron LI #ifndef ISAKMP_PORT_NATT 180411677aeSAaron LI #define ISAKMP_PORT_NATT 4500 /* rfc3948 */ 181411677aeSAaron LI #endif 182411677aeSAaron LI #ifndef WB_PORT 183411677aeSAaron LI #define WB_PORT 4567 184411677aeSAaron LI #endif 185*ed775ee7SAntonio Huete Jimenez #ifndef BFD_MULTIHOP_PORT 186*ed775ee7SAntonio Huete Jimenez #define BFD_MULTIHOP_PORT 4784 /* RFC 5883 */ 187*ed775ee7SAntonio Huete Jimenez #endif 188411677aeSAaron LI #ifndef VXLAN_PORT 189411677aeSAaron LI #define VXLAN_PORT 4789 /* RFC 7348 */ 190411677aeSAaron LI #endif 191411677aeSAaron LI #ifndef VXLAN_GPE_PORT 192411677aeSAaron LI #define VXLAN_GPE_PORT 4790 /* draft-ietf-nvo3-vxlan-gpe-01 */ 193411677aeSAaron LI #endif 194411677aeSAaron LI #ifndef SIP_PORT 195411677aeSAaron LI #define SIP_PORT 5060 196411677aeSAaron LI #endif 197411677aeSAaron LI #ifndef MULTICASTDNS_PORT 198411677aeSAaron LI #define MULTICASTDNS_PORT 5353 /* RFC 6762 */ 199411677aeSAaron LI #endif 200411677aeSAaron LI #ifndef AHCP_PORT 201411677aeSAaron LI #define AHCP_PORT 5359 /* draft-chroboczek-ahcp-00 */ 202411677aeSAaron LI #endif 203411677aeSAaron LI #ifndef GENEVE_PORT 204411677aeSAaron LI #define GENEVE_PORT 6081 /* draft-gross-geneve-02 */ 205411677aeSAaron LI #endif 206411677aeSAaron LI #ifndef SFLOW_PORT 207*ed775ee7SAntonio Huete Jimenez #define SFLOW_PORT 6343 /* https://sflow.org/developers/specifications.php */ 208*ed775ee7SAntonio Huete Jimenez #endif 209*ed775ee7SAntonio Huete Jimenez #ifndef MPLS_PORT 210*ed775ee7SAntonio Huete Jimenez #define MPLS_PORT 6635 /* RFC 7510 */ 211411677aeSAaron LI #endif 212411677aeSAaron LI #ifndef BABEL_PORT 213411677aeSAaron LI #define BABEL_PORT 6696 /* RFC 6126 errata */ 214411677aeSAaron LI #endif 215411677aeSAaron LI #ifndef BABEL_PORT_OLD 216411677aeSAaron LI #define BABEL_PORT_OLD 6697 /* RFC 6126 */ 217411677aeSAaron LI #endif 218*ed775ee7SAntonio Huete Jimenez #ifndef BFD_LAG_PORT 219*ed775ee7SAntonio Huete Jimenez #define BFD_LAG_PORT 6784 /* RFC 7310 */ 220*ed775ee7SAntonio Huete Jimenez #endif 221411677aeSAaron LI #ifndef RX_PORT_LOW 222411677aeSAaron LI #define RX_PORT_LOW 7000 /*XXX*/ 223411677aeSAaron LI #endif 224411677aeSAaron LI #ifndef RX_PORT_HIGH 225411677aeSAaron LI #define RX_PORT_HIGH 7009 /*XXX*/ 226411677aeSAaron LI #endif 227411677aeSAaron LI #ifndef ISAKMP_PORT_USER1 228411677aeSAaron LI #define ISAKMP_PORT_USER1 7500 /*XXX - nonstandard*/ 229411677aeSAaron LI #endif 230411677aeSAaron LI #ifndef HNCP_PORT 231411677aeSAaron LI #define HNCP_PORT 8231 /* RFC 7788 */ 232411677aeSAaron LI #endif 233411677aeSAaron LI #ifndef OTV_PORT 234411677aeSAaron LI #define OTV_PORT 8472 /* draft-hasmit-otv-04 */ 235411677aeSAaron LI #endif 236411677aeSAaron LI #ifndef ISAKMP_PORT_USER2 237411677aeSAaron LI #define ISAKMP_PORT_USER2 8500 /*XXX - nonstandard*/ 238411677aeSAaron LI #endif 239411677aeSAaron LI #ifndef LWAPP_DATA_PORT 240411677aeSAaron LI #define LWAPP_DATA_PORT 12222 /* RFC 5412 */ 241411677aeSAaron LI #endif 242411677aeSAaron LI #ifndef LWAPP_CONTROL_PORT 243411677aeSAaron LI #define LWAPP_CONTROL_PORT 12223 /* RFC 5412 */ 24441c99275SPeter Avalos #endif 245*ed775ee7SAntonio Huete Jimenez #ifndef ZEP_PORT 246*ed775ee7SAntonio Huete Jimenez #define ZEP_PORT 17754 /* XXX */ 247*ed775ee7SAntonio Huete Jimenez #endif 248*ed775ee7SAntonio Huete Jimenez #ifndef SOMEIP_PORT 249*ed775ee7SAntonio Huete Jimenez #define SOMEIP_PORT 30490 /* https://www.autosar.org/standards/foundation */ 250*ed775ee7SAntonio Huete Jimenez #endif 251