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 { 41*3c602fabSXin LI uint16_t uh_sport; /* source port */ 42*3c602fabSXin LI uint16_t uh_dport; /* destination port */ 43*3c602fabSXin LI uint16_t uh_ulen; /* udp length */ 44*3c602fabSXin LI uint16_t uh_sum; /* udp checksum */ 45685295f4SBill Fenner }; 465b0fe478SBruce M Simpson 475b0fe478SBruce M Simpson #define TFTP_PORT 69 /*XXX*/ 485b0fe478SBruce M Simpson #define KERBEROS_PORT 88 /*XXX*/ 495b0fe478SBruce M Simpson #define SUNRPC_PORT 111 /*XXX*/ 505b0fe478SBruce M Simpson #define SNMP_PORT 161 /*XXX*/ 515b0fe478SBruce M Simpson #define NTP_PORT 123 /*XXX*/ 525b0fe478SBruce M Simpson #define SNMPTRAP_PORT 162 /*XXX*/ 535b0fe478SBruce M Simpson #define ISAKMP_PORT 500 /*XXX*/ 541de50e9fSSam Leffler #define SYSLOG_PORT 514 /* rfc3164 */ 555b0fe478SBruce M Simpson #define TIMED_PORT 525 /*XXX*/ 565b0fe478SBruce M Simpson #define RIP_PORT 520 /*XXX*/ 575b0fe478SBruce M Simpson #define LDP_PORT 646 585b0fe478SBruce M Simpson #define AODV_PORT 654 /*XXX*/ 59b5bfcb5dSMax Laier #define OLSR_PORT 698 /* rfc3626 */ 605b0fe478SBruce M Simpson #define KERBEROS_SEC_PORT 750 /*XXX*/ 615b0fe478SBruce M Simpson #define L2TP_PORT 1701 /*XXX*/ 621de50e9fSSam Leffler #define SIP_PORT 5060 631de50e9fSSam Leffler #define ISAKMP_PORT_NATT 4500 /* rfc3948 */ 645b0fe478SBruce M Simpson #define ISAKMP_PORT_USER1 7500 /*XXX - nonstandard*/ 655b0fe478SBruce M Simpson #define ISAKMP_PORT_USER2 8500 /*XXX - nonstandard*/ 665b0fe478SBruce M Simpson #define RX_PORT_LOW 7000 /*XXX*/ 675b0fe478SBruce M Simpson #define RX_PORT_HIGH 7009 /*XXX*/ 685b0fe478SBruce M Simpson #define NETBIOS_NS_PORT 137 695b0fe478SBruce M Simpson #define NETBIOS_DGRAM_PORT 138 705b0fe478SBruce M Simpson #define CISCO_AUTORP_PORT 496 /*XXX*/ 715b0fe478SBruce M Simpson #define RADIUS_PORT 1645 725b0fe478SBruce M Simpson #define RADIUS_NEW_PORT 1812 735b0fe478SBruce M Simpson #define RADIUS_ACCOUNTING_PORT 1646 745b0fe478SBruce M Simpson #define RADIUS_NEW_ACCOUNTING_PORT 1813 755b0fe478SBruce M Simpson #define HSRP_PORT 1985 /*XXX*/ 76b5bfcb5dSMax Laier #define LMP_PORT 701 /* rfc4204 */ 775b0fe478SBruce M Simpson #define LWRES_PORT 921 78a5779b6eSRui Paulo #define VQP_PORT 1589 795b0fe478SBruce M Simpson #define ZEPHYR_SRV_PORT 2103 805b0fe478SBruce M Simpson #define ZEPHYR_CLT_PORT 2104 81*3c602fabSXin LI #define VAT_PORT 3456 825b0fe478SBruce M Simpson #define MPLS_LSP_PING_PORT 3503 /* draft-ietf-mpls-lsp-ping-02.txt */ 835b0fe478SBruce M Simpson #define BFD_CONTROL_PORT 3784 /* draft-katz-ward-bfd-v4v6-1hop-00.txt */ 845b0fe478SBruce M Simpson #define BFD_ECHO_PORT 3785 /* draft-katz-ward-bfd-v4v6-1hop-00.txt */ 85*3c602fabSXin LI #define WB_PORT 4567 86a5779b6eSRui Paulo #define SFLOW_PORT 6343 /* http://www.sflow.org/developers/specifications.php */ 87a5779b6eSRui Paulo #define LWAPP_DATA_PORT 12222 /* draft-ohara-capwap-lwapp-04.txt */ 88a5779b6eSRui Paulo #define LWAPP_CONTROL_PORT 12223 /* draft-ohara-capwap-lwapp-04.txt */ 89d03c0883SXin LI #define OTV_PORT 8472 /* draft-hasmit-otv-04 */ 90*3c602fabSXin LI #define VXLAN_PORT 4789 /* draft-mahalingam-dutt-dcops-vxlan-04 */ 915b0fe478SBruce M Simpson 925b0fe478SBruce M Simpson #ifdef INET6 935b0fe478SBruce M Simpson #define RIPNG_PORT 521 /*XXX*/ 945b0fe478SBruce M Simpson #define DHCP6_SERV_PORT 546 /*XXX*/ 955b0fe478SBruce M Simpson #define DHCP6_CLI_PORT 547 /*XXX*/ 96*3c602fabSXin LI #define AHCP_PORT 5359 /* draft-chroboczek-ahcp-00 */ 97cac3dcd5SXin LI #define BABEL_PORT 6696 98cac3dcd5SXin LI #define BABEL_PORT_OLD 6697 995b0fe478SBruce M Simpson #endif 100