]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/tcpdump/udp.h
Merge compiler-rt release_40 branch r292009.
[FreeBSD/FreeBSD.git] / contrib / tcpdump / udp.h
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. 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  *
33  *      @(#)udp.h       8.1 (Berkeley) 6/10/93
34  */
35
36 /*
37  * Udp protocol header.
38  * Per RFC 768, September, 1981.
39  */
40 struct udphdr {
41         uint16_t        uh_sport;               /* source port */
42         uint16_t        uh_dport;               /* destination port */
43         uint16_t        uh_ulen;                /* udp length */
44         uint16_t        uh_sum;                 /* udp checksum */
45 };
46
47 #define BOOTPS_PORT 67          /* RFC951 */
48 #define BOOTPC_PORT 68          /* RFC951 */
49 #define TFTP_PORT 69            /*XXX*/
50 #define KERBEROS_PORT 88        /*XXX*/
51 #define SUNRPC_PORT 111         /*XXX*/
52 #define SNMP_PORT 161           /*XXX*/
53 #define NTP_PORT 123            /*XXX*/
54 #define SNMPTRAP_PORT 162       /*XXX*/
55 #define ISAKMP_PORT 500         /*XXX*/
56 #define SYSLOG_PORT 514         /* rfc3164 */
57 #define TIMED_PORT 525          /*XXX*/
58 #define RIP_PORT 520            /*XXX*/
59 #define LDP_PORT 646
60 #define AODV_PORT 654           /*XXX*/
61 #define OLSR_PORT 698           /* rfc3626 */
62 #define KERBEROS_SEC_PORT 750   /*XXX*/
63 #define L2TP_PORT 1701          /*XXX*/
64 #define SIP_PORT 5060
65 #define ISAKMP_PORT_NATT  4500  /* rfc3948 */
66 #define ISAKMP_PORT_USER1 7500  /*XXX - nonstandard*/
67 #define ISAKMP_PORT_USER2 8500  /*XXX - nonstandard*/
68 #define RX_PORT_LOW 7000        /*XXX*/
69 #define RX_PORT_HIGH 7009       /*XXX*/
70 #define NETBIOS_NS_PORT   137
71 #define NETBIOS_DGRAM_PORT   138
72 #define CISCO_AUTORP_PORT 496   /*XXX*/
73 #define RADIUS_PORT 1645
74 #define RADIUS_NEW_PORT 1812
75 #define RADIUS_ACCOUNTING_PORT 1646
76 #define RADIUS_NEW_ACCOUNTING_PORT 1813
77 #define RADIUS_COA_PORT 3799
78 #define HSRP_PORT 1985          /*XXX*/
79 #define LMP_PORT                701 /* rfc4204 */
80 #define LWRES_PORT              921
81 #define VQP_PORT                1589
82 #define ZEPHYR_SRV_PORT         2103
83 #define ZEPHYR_CLT_PORT         2104
84 #define VAT_PORT                3456
85 #define MPLS_LSP_PING_PORT      3503 /* draft-ietf-mpls-lsp-ping-02.txt */
86 #define BFD_CONTROL_PORT        3784 /* draft-katz-ward-bfd-v4v6-1hop-00.txt */
87 #define BFD_ECHO_PORT           3785 /* draft-katz-ward-bfd-v4v6-1hop-00.txt */
88 #define WB_PORT                 4567
89 #define SFLOW_PORT              6343 /* http://www.sflow.org/developers/specifications.php */
90 #define LWAPP_DATA_PORT         12222 /* RFC 5412 */
91 #define LWAPP_CONTROL_PORT      12223 /* RFC 5412 */
92 #define OTV_PORT                8472  /* draft-hasmit-otv-04 */
93 #define VXLAN_PORT              4789  /* RFC 7348 */
94 #define GENEVE_PORT             6081  /* draft-gross-geneve-02 */
95
96 #ifdef INET6
97 #define RIPNG_PORT              521   /* RFC 2080 */
98 #define DHCP6_SERV_PORT 546     /*XXX*/
99 #define DHCP6_CLI_PORT 547      /*XXX*/
100 #define AHCP_PORT 5359          /* draft-chroboczek-ahcp-00 */
101 #define BABEL_PORT              6696  /* RFC 6126 errata */
102 #define BABEL_PORT_OLD          6697  /* RFC 6126 */
103 #endif