xref: /freebsd/sys/netinet/udp.h (revision 3329b236599c2765e7c57d82c718ff5d7c2e28b9)
1c398230bSWarner Losh /*-
2df8bae1dSRodney W. Grimes  * Copyright (c) 1982, 1986, 1993
33329b236SRobert Watson  *	The Regents of the University of California.
43329b236SRobert Watson  * All rights reserved.
5df8bae1dSRodney W. Grimes  *
6df8bae1dSRodney W. Grimes  * Redistribution and use in source and binary forms, with or without
7df8bae1dSRodney W. Grimes  * modification, are permitted provided that the following conditions
8df8bae1dSRodney W. Grimes  * are met:
9df8bae1dSRodney W. Grimes  * 1. Redistributions of source code must retain the above copyright
10df8bae1dSRodney W. Grimes  *    notice, this list of conditions and the following disclaimer.
11df8bae1dSRodney W. Grimes  * 2. Redistributions in binary form must reproduce the above copyright
12df8bae1dSRodney W. Grimes  *    notice, this list of conditions and the following disclaimer in the
13df8bae1dSRodney W. Grimes  *    documentation and/or other materials provided with the distribution.
14df8bae1dSRodney W. Grimes  * 4. Neither the name of the University nor the names of its contributors
15df8bae1dSRodney W. Grimes  *    may be used to endorse or promote products derived from this software
16df8bae1dSRodney W. Grimes  *    without specific prior written permission.
17df8bae1dSRodney W. Grimes  *
18df8bae1dSRodney W. Grimes  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19df8bae1dSRodney W. Grimes  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20df8bae1dSRodney W. Grimes  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21df8bae1dSRodney W. Grimes  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22df8bae1dSRodney W. Grimes  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23df8bae1dSRodney W. Grimes  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24df8bae1dSRodney W. Grimes  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25df8bae1dSRodney W. Grimes  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26df8bae1dSRodney W. Grimes  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27df8bae1dSRodney W. Grimes  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28df8bae1dSRodney W. Grimes  * SUCH DAMAGE.
29df8bae1dSRodney W. Grimes  *
30df8bae1dSRodney W. Grimes  *	@(#)udp.h	8.1 (Berkeley) 6/10/93
31c3aac50fSPeter Wemm  * $FreeBSD$
32df8bae1dSRodney W. Grimes  */
33df8bae1dSRodney W. Grimes 
34707f139eSPaul Richards #ifndef _NETINET_UDP_H_
35707f139eSPaul Richards #define	_NETINET_UDP_H_
36707f139eSPaul Richards 
37df8bae1dSRodney W. Grimes /*
383329b236SRobert Watson  * UDP protocol header.
39df8bae1dSRodney W. Grimes  * Per RFC 768, September, 1981.
40df8bae1dSRodney W. Grimes  */
41df8bae1dSRodney W. Grimes struct udphdr {
42df8bae1dSRodney W. Grimes 	u_short	uh_sport;		/* source port */
43df8bae1dSRodney W. Grimes 	u_short	uh_dport;		/* destination port */
44430d30d8SBill Fenner 	u_short	uh_ulen;		/* udp length */
45df8bae1dSRodney W. Grimes 	u_short	uh_sum;			/* udp checksum */
46df8bae1dSRodney W. Grimes };
47707f139eSPaul Richards 
48707f139eSPaul Richards #endif
49