00001 #ifndef _UDP_H 00002 #define _UDP_H 00003 00004 /* 00005 * Copyright (C) 2001-2002 by egnite Software GmbH. All rights reserved. 00006 * 00007 * Redistribution and use in source and binary forms, with or without 00008 * modification, are permitted provided that the following conditions 00009 * are met: 00010 * 00011 * 1. Redistributions of source code must retain the above copyright 00012 * notice, this list of conditions and the following disclaimer. 00013 * 2. Redistributions in binary form must reproduce the above copyright 00014 * notice, this list of conditions and the following disclaimer in the 00015 * documentation and/or other materials provided with the distribution. 00016 * 3. All advertising materials mentioning features or use of this 00017 * software must display the following acknowledgement: 00018 * 00019 * This product includes software developed by egnite Software GmbH 00020 * and its contributors. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS 00023 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00024 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00025 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE 00026 * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00027 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00028 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 00029 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 00030 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00031 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 00032 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00033 * SUCH DAMAGE. 00034 * 00035 * For additional information see http://www.ethernut.de/ 00036 * 00037 * - 00038 * Portions Copyright (c) 1983, 1993 by 00039 * The Regents of the University of California. All rights reserved. 00040 * 00041 * Redistribution and use in source and binary forms, with or without 00042 * modification, are permitted provided that the following conditions 00043 * are met: 00044 * 1. Redistributions of source code must retain the above copyright 00045 * notice, this list of conditions and the following disclaimer. 00046 * 2. Redistributions in binary form must reproduce the above copyright 00047 * notice, this list of conditions and the following disclaimer in the 00048 * documentation and/or other materials provided with the distribution. 00049 * 3. All advertising materials mentioning features or use of this software 00050 * must display the following acknowledgement: 00051 * This product includes software developed by the University of 00052 * California, Berkeley and its contributors. 00053 * 4. Neither the name of the University nor the names of its contributors 00054 * may be used to endorse or promote products derived from this software 00055 * without specific prior written permission. 00056 * 00057 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 00058 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00059 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00060 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 00061 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00062 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00063 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00064 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00065 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00066 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00067 * SUCH DAMAGE. 00068 * - 00069 * Portions Copyright (c) 1993 by Digital Equipment Corporation. 00070 * 00071 * Permission to use, copy, modify, and distribute this software for any 00072 * purpose with or without fee is hereby granted, provided that the above 00073 * copyright notice and this permission notice appear in all copies, and that 00074 * the name of Digital Equipment Corporation not be used in advertising or 00075 * publicity pertaining to distribution of the document or software without 00076 * specific, written prior permission. 00077 * 00078 * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL 00079 * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES 00080 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT 00081 * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 00082 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 00083 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 00084 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 00085 * SOFTWARE. 00086 */ 00087 00088 /* 00089 * $Log: udp.h,v $ 00090 * Revision 1.2 2003/01/24 12:01:08 przemko 00091 * Obciecie dosowych znakow konca lini 00092 * 00093 * Revision 1.1.1.1 2002/12/07 07:16:53 marwi 00094 * 00095 * 00096 * Revision 1.2 2002/08/01 19:50:38 harald 00097 * First public release 00098 * 00099 * Revision 1.1 2002/08/01 17:34:30 harald 00100 * First check in 00101 * 00102 */ 00103 00104 #include "types.h" 00105 00110 00111 typedef struct udphdr { 00112 u_short uh_sport; 00113 u_short uh_dport; 00114 u_short uh_ulen; 00115 u_short uh_sum; 00116 } UDPHDR; 00117 00120 extern int UdpInput(u_short port, u_short tms); 00121 extern int UdpOutput(u_long dip, u_short dport, u_short sport, u_short len); 00122 00123 #endif