home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue2 / SDL.ARC / !unixlib / source / clib / netinet / h / udp < prev   
Encoding:
Text File  |  2004-09-05  |  2.1 KB  |  72 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /usr/local/cvsroot/gccsdk/unixlib/source/clib/netinet/udp.h,v $
  4.  * $Date: 2002/12/22 18:22:28 $
  5.  * $Revision: 1.4 $
  6.  * $State: Exp $
  7.  * $Author: admin $
  8.  *
  9.  ***************************************************************************/
  10.  
  11. /*
  12.  * File taken from glibc 2.2.5.
  13.  * Following changes were made:
  14.  *  <none>
  15.  */
  16.  
  17. /* Copyright (C) 1991, 92, 93, 95, 96, 97 Free Software Foundation, Inc.
  18.    This file is part of the GNU C Library.
  19.  
  20.    The GNU C Library is free software; you can redistribute it and/or
  21.    modify it under the terms of the GNU Lesser General Public
  22.    License as published by the Free Software Foundation; either
  23.    version 2.1 of the License, or (at your option) any later version.
  24.  
  25.    The GNU C Library is distributed in the hope that it will be useful,
  26.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  27.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  28.    Lesser General Public License for more details.
  29.  
  30.    You should have received a copy of the GNU Lesser General Public
  31.    License along with the GNU C Library; if not, write to the Free
  32.    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  33.    02111-1307 USA.  */
  34.  
  35. /*
  36.  * Copyright (c) 1982, 1986 Regents of the University of California.
  37.  * All rights reserved.  The Berkeley software License Agreement
  38.  * specifies the terms and conditions for redistribution.
  39.  */
  40.  
  41. #ifndef __NETINET_UDP_H
  42. #define __NETINET_UDP_H    1
  43.  
  44. #include <unixlib/features.h>
  45. #include <sys/types.h>
  46.  
  47. __BEGIN_DECLS
  48.  
  49. /* UDP header as specified by RFC 768, August 1980. */
  50. #ifdef __FAVOR_BSD
  51. struct udphdr {
  52.          u_int16_t uh_sport;           /* source port */
  53.          u_int16_t uh_dport;           /* destination port */
  54.          u_int16_t uh_ulen;            /* udp length */
  55.          u_int16_t uh_sum;             /* udp checksum */
  56. };
  57. #else
  58.  
  59. struct udphdr {
  60.   u_int16_t    source;
  61.   u_int16_t    dest;
  62.   u_int16_t    len;
  63.   u_int16_t    check;
  64. };
  65. #endif
  66.  
  67. #define SOL_UDP            17      /* sockopt level for UDP */
  68.  
  69. __END_DECLS
  70.  
  71. #endif /* netinet/udp.h */
  72.