From 9652be3de8913e528f86d9d4d2643db6c472f9fe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Feb 1997 04:08:52 +0000 Subject: update from main archive 970217 --- sysdeps/unix/sysv/linux/netinet/udp.h | 46 +++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 13 deletions(-) (limited to 'sysdeps/unix/sysv/linux/netinet/udp.h') diff --git a/sysdeps/unix/sysv/linux/netinet/udp.h b/sysdeps/unix/sysv/linux/netinet/udp.h index b088838ccb..9ee66f0fce 100644 --- a/sysdeps/unix/sysv/linux/netinet/udp.h +++ b/sysdeps/unix/sysv/linux/netinet/udp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 93, 95, 96, 97 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,20 +16,40 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _NETINET_UDP_H -#define _NETINET_UDP_H 1 +/* + * Copyright (c) 1982, 1986 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ -#include +#ifndef __NETINET_UDP_H +#define __NETINET_UDP_H 1 -/* The Internet RFC 768 specifies this format for the UDP protocol. */ -struct udphdr - { - u_short uh_sport; /* Source port. */ - u_short uh_dport; /* Destination port. */ - u_short uh_ulen; /* UDP length. */ - u_short uh_sum; /* UDP checksum. */ - }; +#include +#include -#define SOL_UDP 17 /* UDP level. */ +__BEGIN_DECLS + +/* UDP header as specified by RFC 768, August 1980. */ +#ifdef __FAVOR_BSD +struct udphdr { + u_int16_t uh_sport; /* source port */ + u_int16_t uh_dport; /* destination port */ + u_int16_t uh_ulen; /* udp length */ + u_int16_t uh_sum; /* udp checksum */ +}; +#else + +struct udphdr { + u_int16_t source; + u_int16_t dest; + u_int16_t len; + u_int16_t check; +}; +#endif + +#define SOL_UDP 17 /* sockopt level for UDP */ + +__END_DECLS #endif /* netinet/udp.h */ -- cgit v1.2.3-70-g09d2