aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/netinet/udp.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/netinet/udp.h')
-rw-r--r--sysdeps/unix/sysv/linux/netinet/udp.h46
1 files changed, 33 insertions, 13 deletions
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 <sys/types.h>
+#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 <sys/cdefs.h>
+#include <sys/types.h>
-#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 */