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