udp.h revision 166841
1139823Simp/*- 21541Srgrimes * Copyright (c) 1982, 1986, 1993 3166841Srwatson * The Regents of the University of California. 4166841Srwatson * All rights reserved. 51541Srgrimes * 61541Srgrimes * Redistribution and use in source and binary forms, with or without 71541Srgrimes * modification, are permitted provided that the following conditions 81541Srgrimes * are met: 91541Srgrimes * 1. Redistributions of source code must retain the above copyright 101541Srgrimes * notice, this list of conditions and the following disclaimer. 111541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 121541Srgrimes * notice, this list of conditions and the following disclaimer in the 131541Srgrimes * documentation and/or other materials provided with the distribution. 141541Srgrimes * 4. Neither the name of the University nor the names of its contributors 151541Srgrimes * may be used to endorse or promote products derived from this software 161541Srgrimes * without specific prior written permission. 171541Srgrimes * 181541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 191541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 201541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 211541Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 221541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 231541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 241541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 251541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 261541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 271541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 281541Srgrimes * SUCH DAMAGE. 291541Srgrimes * 301541Srgrimes * @(#)udp.h 8.1 (Berkeley) 6/10/93 3150477Speter * $FreeBSD: head/sys/netinet/udp.h 166841 2007-02-20 10:13:11Z rwatson $ 321541Srgrimes */ 331541Srgrimes 342169Spaul#ifndef _NETINET_UDP_H_ 35166841Srwatson#define _NETINET_UDP_H_ 362169Spaul 371541Srgrimes/* 38166841Srwatson * UDP protocol header. 391541Srgrimes * Per RFC 768, September, 1981. 401541Srgrimes */ 411541Srgrimesstruct udphdr { 421541Srgrimes u_short uh_sport; /* source port */ 431541Srgrimes u_short uh_dport; /* destination port */ 4419183Sfenner u_short uh_ulen; /* udp length */ 451541Srgrimes u_short uh_sum; /* udp checksum */ 461541Srgrimes}; 472169Spaul 482169Spaul#endif 49