xref: /netbsd-src/external/bsd/tcpdump/dist/udp.h (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
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 	uint16_t	uh_sport;		/* source port */
38 	uint16_t	uh_dport;		/* destination port */
39 	uint16_t	uh_ulen;		/* udp length */
40 	uint16_t	uh_sum;			/* udp checksum */
41 };
42 
43 #ifndef NAMESERVER_PORT
44 #define NAMESERVER_PORT			53
45 #endif
46 #ifndef TACACS_DB_PORT
47 #define TACACS_DB_PORT			65	/*XXX*/
48 #endif
49 #ifndef ORACLE_SQLNET_PORT
50 #define ORACLE_SQLNET_PORT		66	/*XXX*/
51 #endif
52 #ifndef BOOTPS_PORT
53 #define BOOTPS_PORT			67	/* RFC951 */
54 #endif
55 #ifndef BOOTPC_PORT
56 #define BOOTPC_PORT			68	/* RFC951 */
57 #endif
58 #ifndef TFTP_PORT
59 #define TFTP_PORT			69	/*XXX*/
60 #endif
61 #ifndef KERBEROS_PORT
62 #define KERBEROS_PORT			88	/*XXX*/
63 #endif
64 #ifndef SUNRPC_PORT
65 #define SUNRPC_PORT			111	/*XXX*/
66 #endif
67 #ifndef NTP_PORT
68 #define NTP_PORT			123	/*XXX*/
69 #endif
70 #ifndef NETBIOS_NS_PORT
71 #define NETBIOS_NS_PORT			137	/* RFC 1001, RFC 1002 */
72 #endif
73 #ifndef NETBIOS_DGRAM_PORT
74 #define NETBIOS_DGRAM_PORT		138	/* RFC 1001, RFC 1002 */
75 #endif
76 #ifndef NETBIOS_SSN_PORT
77 #define NETBIOS_SSN_PORT		139	/* RFC 1001, RFC 1002 */
78 #endif
79 #ifndef SNMP_PORT
80 #define SNMP_PORT			161	/*XXX*/
81 #endif
82 #ifndef SNMPTRAP_PORT
83 #define SNMPTRAP_PORT			162	/*XXX*/
84 #endif
85 #ifndef BGP_PORT
86 #define BGP_PORT			179	/*XXX*/
87 #endif
88 #ifndef APPLETALK_RTMP_PORT
89 #define APPLETALK_RTMP_PORT		201	/*XXX*/
90 #endif
91 #ifndef APPLETALK_NB_PORT
92 #define APPLETALK_NB_PORT		202	/*XXX*/
93 #endif
94 #ifndef APPLETALK_ECHO
95 #define APPLETALK_ECHO			204	/*XXX*/
96 #endif
97 #ifndef APPLETALK_ZONE_INFO_PORT
98 #define APPLETALK_ZONE_INFO_PORT	206	/*XXX*/
99 #endif
100 #ifndef LDAP_PORT
101 #define LDAP_PORT			389	/*XXX*/
102 #endif
103 #ifndef HTTPS_PORT
104 #define HTTPS_PORT			443	/*XXX*/
105 #endif
106 #ifndef MICROSOFT_DS_PORT
107 #define MICROSOFT_DS_PORT		445	/*XXX*/
108 #endif
109 #ifndef KERBEROS5_PASSWD_PORT
110 #define KERBEROS5_PASSWD_PORT		464	/* PER IANA */
111 #endif
112 #ifndef CISCO_AUTORP_PORT
113 #define CISCO_AUTORP_PORT		496	/*XXX*/
114 #endif
115 #ifndef ISAKMP_PORT
116 #define ISAKMP_PORT			500	/*XXX*/
117 #endif
118 #ifndef SYSLOG_PORT
119 #define SYSLOG_PORT			514	/* rfc3164 */
120 #endif
121 #ifndef RIP_PORT
122 #define RIP_PORT			520	/*XXX*/
123 #endif
124 #ifndef RIPNG_PORT
125 #define RIPNG_PORT			521	/* RFC 2080 */
126 #endif
127 #ifndef TIMED_PORT
128 #define TIMED_PORT			525	/*XXX*/
129 #endif
130 #ifndef KERBEROS_LOGIN_PORT
131 #define KERBEROS_LOGIN_PORT		543	/*XXX*/
132 #endif
133 #ifndef KERBEROS_SHELL_PORT
134 #define KERBEROS_SHELL_PORT		544	/*XXX*/
135 #endif
136 #ifndef DHCP6_SERV_PORT
137 #define DHCP6_SERV_PORT			546	/*XXX*/
138 #endif
139 #ifndef DHCP6_CLI_PORT
140 #define DHCP6_CLI_PORT			547	/*XXX*/
141 #endif
142 #ifndef LDAPS_PORT
143 #define LDAPS_PORT			636	/*XXX - LDAP over TLS/SSL */
144 #endif
145 #ifndef LDP_PORT
146 #define LDP_PORT			646
147 #endif
148 #ifndef DHCP_FAILOVER_PORT
149 #define DHCP_FAILOVER_PORT		647	/*XXX*/
150 #endif
151 #ifndef AQDV_PORT
152 #define AODV_PORT			654	/*XXX*/
153 #endif
154 #ifndef OLSR_PORT
155 #define OLSR_PORT			698	/* rfc3626 */
156 #endif
157 #ifndef LMP_PORT
158 #define LMP_PORT			701	/* rfc4204 */
159 #endif
160 #ifndef CISCO_TDP_PORT
161 #define CISCO_TDP_PORT			711	/*XXX*/
162 #endif
163 #ifndef KERBEROS_ADM_PORT
164 #define KERBEROS_ADM_PORT		749	/*XXX - Kerberos v5 */
165 #endif
166 #ifndef KERBEROS_SEC_PORT
167 #define KERBEROS_SEC_PORT		750	/*XXX - Kerberos v4 */
168 #endif
169 #ifndef RSYNC_PORT
170 #define RSYNC_PORT			873	/*XXX*/
171 #endif
172 #ifndef LWRES_PORT
173 #define LWRES_PORT			921	/*XXX*/
174 #endif
175 #ifndef OPENSSL_PORT
176 #define OPENSSL_PORT			1194	/*XXX*/
177 #endif
178 #ifndef LOTUS_NOTES_PORT
179 #define LOTUS_NOTES_PORT		1352	/*XXX*/
180 #endif
181 #ifndef MS_SQL_SERVER_PORT
182 #define MS_SQL_SERVER_PORT		1433	/*XXX*/
183 #endif
184 #ifndef MS_SQL_SERVER_MONITOR
185 #define MS_SQL_SERVER_MONITOR		1434	/*XXX*/
186 #endif
187 #ifndef INGRESLOCK_PORT
188 #define INGRESLOCK_PORT			1524	/*XXX*/
189 #endif
190 #ifndef VQP_PORT
191 #define VQP_PORT			1589	/*XXX*/
192 #endif
193 #ifndef RADIUS_PORT
194 #define RADIUS_PORT			1645	/*XXX*/
195 #endif
196 #ifndef RADIUS_ACCOUNTING_PORT
197 #define RADIUS_ACCOUNTING_PORT		1646
198 #endif
199 #ifndef RADIUS_CISCO_COA_PORT
200 #define RADIUS_CISCO_COA_PORT		1700
201 #endif
202 #ifndef L2TP_PORT
203 #define L2TP_PORT			1701	/*XXX*/
204 #endif
205 #ifndef RADIUS_NEW_PORT
206 #define RADIUS_NEW_PORT			1812	/*XXX*/
207 #endif
208 #ifndef RADIUS_NEW_ACCOUNTING_PORT
209 #define RADIUS_NEW_ACCOUNTING_PORT	1813
210 #endif
211 #ifndef HSRP_PORT
212 #define HSRP_PORT			1985	/*XXX*/
213 #endif
214 #ifndef NFS_DAEMON_PORT
215 #define NFS_DAEMON_PORT			2049	/*XXX*/
216 #endif
217 #ifndef ZEPHYR_SRV_PORT
218 #define ZEPHYR_SRV_PORT			2103	/*XXX*/
219 #endif
220 #ifndef ZEPHYR_CLI_PORT
221 #define ZEPHYR_CLT_PORT			2104	/*XXX*/
222 #endif
223 #ifndef MYSQL_PORT
224 #define MYSQL_PORT			3306	/*XXX*/
225 #endif
226 #ifndef MS_RDP_PORT
227 #define MS_RDP_PORT			3389	/*XXX*/
228 #endif
229 #ifndef VAT_PORT
230 #define VAT_PORT			3456	/*XXX*/
231 #endif
232 #ifndef MPLS_LSP_PING_PORT
233 #define MPLS_LSP_PING_PORT		3503	/* draft-ietf-mpls-lsp-ping-02.txt */
234 #endif
235 #ifndef SUBVERSION_PORT
236 #define SUBVERSION_PORT			3690	/*XXX*/
237 #endif
238 #ifndef BFD_CONTROL_PORT
239 #define BFD_CONTROL_PORT		3784	/* RFC 5881 */
240 #endif
241 #ifndef BFD_ECHO_PORT
242 #define BFD_ECHO_PORT			3785	/* RFC 5881 */
243 #endif
244 #ifndef RADIUS_COA_PORT
245 #define RADIUS_COA_PORT			3799	/* RFC 5176 */
246 #endif
247 #ifndef NFS_LOCK_DAEMON_PORT
248 #define NFS_LOCK_DAEMON_PORT		4045	/*XXX*/
249 #endif
250 #ifndef LISP_CONTROL_PORT
251 #define LISP_CONTROL_PORT		4342	/* RFC 6830 */
252 #endif
253 #ifndef ISAKMP_PORT_NATT
254 #define ISAKMP_PORT_NATT		4500	/* rfc3948 */
255 #endif
256 #ifndef WB_PORT
257 #define WB_PORT				4567
258 #endif
259 #ifndef VXLAN_PORT
260 #define VXLAN_PORT			4789	/* RFC 7348 */
261 #endif
262 #ifndef VXLAN_GPE_PORT
263 #define VXLAN_GPE_PORT			4790	/* draft-ietf-nvo3-vxlan-gpe-01 */
264 #endif
265 #ifndef SIP_DS_PORT
266 #define SIP_DS_PORT			5059	/*XXX*/
267 #endif
268 #ifndef SIP_PORT
269 #define SIP_PORT			5060
270 #endif
271 #ifndef MULTICASTDNS_PORT
272 #define MULTICASTDNS_PORT		5353	/* RFC 6762 */
273 #endif
274 #ifndef AHCP_PORT
275 #define AHCP_PORT			5359	/* draft-chroboczek-ahcp-00 */
276 #endif
277 #ifndef GENEVE_PORT
278 #define GENEVE_PORT			6081	/* draft-gross-geneve-02 */
279 #endif
280 #ifndef SFLOW_PORT
281 #define SFLOW_PORT			6343	/* http://www.sflow.org/developers/specifications.php */
282 #endif
283 #ifndef BABEL_PORT
284 #define BABEL_PORT			6696	/* RFC 6126 errata */
285 #endif
286 #ifndef BABEL_PORT_OLD
287 #define BABEL_PORT_OLD			6697	/* RFC 6126 */
288 #endif
289 #ifndef RX_PORT_LOW
290 #define RX_PORT_LOW			7000	/*XXX*/
291 #endif
292 #ifndef RX_PORT_HIGH
293 #define RX_PORT_HIGH			7009	/*XXX*/
294 #endif
295 #ifndef ISAKMP_PORT_USER1
296 #define ISAKMP_PORT_USER1		7500	/*XXX - nonstandard*/
297 #endif
298 #ifndef HNCP_PORT
299 #define HNCP_PORT			8231	/* RFC 7788 */
300 #endif
301 #ifndef OTV_PORT
302 #define OTV_PORT			8472	/* draft-hasmit-otv-04 */
303 #endif
304 #ifndef ISAKMP_PORT_USER2
305 #define ISAKMP_PORT_USER2		8500	/*XXX - nonstandard*/
306 #endif
307 #ifndef LWAPP_DATA_PORT
308 #define LWAPP_DATA_PORT			12222	/* RFC 5412 */
309 #endif
310 #ifndef LWAPP_CONTROL_PORT
311 #define LWAPP_CONTROL_PORT		12223	/* RFC 5412 */
312 #endif
313