This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: Factorize Linux and Hurd's net/{ethernet,if_ether,if_arp,if_ppp,route}.h


Hello,

Roland McGrath, le Wed 07 Jan 2009 18:05:04 -0800, a écrit :
> Let's instead move all those linux versions to sysdeps/gnu/net/*.h.

Ok, here is a patch, see diffstat below.  I still had to update
if_ether.h to Linux' content.  While I was at it, I factorized if_ppp.h and
route.h as well.

 sysdeps/gnu/Makefile                   |    5 +
 sysdeps/gnu/net/ethernet.h             |   84 ++++++++++++++++++
 sysdeps/gnu/net/if_arp.h               |  182 +++++++++++++++++++++++++++++++++++++++++
 sysdeps/gnu/net/if_ether.h             |  110 ++++++++++++++++++++++++
 sysdeps/gnu/net/if_ppp.h               |  169 ++++++++++++++++++++++++++++++++++++++
 sysdeps/gnu/net/route.h                |  145 ++++++++++++++++++++++++++++++++
 sysdeps/gnu/netinet/if_ether.h         |   26 +++++
 sysdeps/mach/hurd/Makefile             |    5 -
 sysdeps/mach/hurd/net/ethernet.h       |   76 -----------------
 sysdeps/mach/hurd/net/if_arp.h         |  145 --------------------------------
 sysdeps/mach/hurd/net/if_ether.h       |   85 -------------------
 sysdeps/mach/hurd/net/if_ppp.h         |  169 --------------------------------------
 sysdeps/mach/hurd/net/route.h          |  141 -------------------------------
 sysdeps/unix/sysv/linux/Makefile       |    3 
 sysdeps/unix/sysv/linux/net/ethernet.h |   84 ------------------
 sysdeps/unix/sysv/linux/net/if_arp.h   |  182 -----------------------------------------
 sysdeps/unix/sysv/linux/net/if_ether.h |    6 +
 sysdeps/unix/sysv/linux/net/if_ppp.h   |  169 --------------------------------------
 sysdeps/unix/sysv/linux/net/route.h    |  145 --------------------------------
 19 files changed, 728 insertions(+), 1203 deletions(-)

Samuel

2009-01-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* sysdeps/mach/hurd/Makefile (sysdep_headers) [subdir=socket]:
	Remove net/ethernet.h net/if_arp.h net/if_ether.h net/if_ppp.h
	net/route.h.
	* sysdeps/gnu/Makefile (sysdep_headers) [subdir=socket]:
	Add net/ethernet.h net/if_arp.h net/if_ether.h net/if_ppp.h
	net/route.h.
	* sysdeps/unix/sysv/linux/Makefile (sysdep_headers)
	[subdir=socket]: Remove net/ethernet.h net/if_arp.h net/if_ppp.h
	net/route.h

	* sysdeps/mach/hurd/net/ethernet.h: Remove file.
	* sysdeps/unix/sysv/linux/net/ethernet.h: Move file to...
	* sysdeps/gnu/net/ethernet.h: ... this, and include
	<net/if_ether.h> instead of <linux/if_ether.h>.
	* sysdeps/unix/sysv/linux/net/if_ether.h: New file, includes
	<linux/if_ether.h>.

	* sysdeps/mach/hurd/net/if_ether.h: Move file to...
	* sysdeps/gnu/net/if_ether.h: ... this.
        (ETH_FC_LEN,ETH_P_IEEEPUPAT,ETH_P_8021Q,ETH_P_PAUSE,ETH_P_SLOW,
	ETH_P_WCCP,ETH_P_PPP_DISC,ETH_P_PPP_SES,ETH_P_MPLS_UC,
	ETH_P_MPLS_MC,ETH_P_ATMMPOA,ETH_P_ATMFATE,ETH_P_AOE,ETH_P_TIPC,
	ETH_P_CAN,ETH_P_MOBITEX,ETH_P_CONTROL,ETH_P_IRDA,ETH_P_ECONET,
	ETH_P_HDLC,ETH_P_ARCNET): New macros.
	(ETH_P_ECHO): Remove macro.
	(ETH_P_PUP): Change value from 0x400 to 0x200.
        (struct ethhdr): Add packed attribute.

	* sysdeps/unix/sysv/linux/net/if_arp.h: Move file to...
	* sysdeps/gnu/net/if_arp.h: ... this.
	* sysdeps/mach/hurd/net/if_arp.h: Remove file.

	* sysdeps/unix/sysv/linux/net/if_ppp.h: Move file to...
	* sysdeps/gnu/net/if_ppp.h: ... this.
	* sysdeps/mach/hurd/net/if_ppp.h: Remove file.

	* sysdeps/unix/sysv/linux/net/route.h: Move file to...
	* sysdeps/gnu/net/route.h: ... this.
	* sysdeps/mach/hurd/net/route.h: Remove file.

Index: sysdeps/mach/hurd/Makefile
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/mach/hurd/Makefile,v
retrieving revision 1.96
diff -u -p -r1.96 Makefile
--- sysdeps/mach/hurd/Makefile	7 Jan 2009 01:59:31 -0000	1.96
+++ sysdeps/mach/hurd/Makefile	9 Jan 2009 23:37:11 -0000
@@ -206,9 +206,4 @@ ifeq ($(subdir),sunrpc)
 sysdep_headers += nfs/nfs.h
 endif
 
-ifeq ($(subdir),socket)
-sysdep_headers += net/ethernet.h net/if_arp.h net/if_ether.h net/if_ppp.h \
-		  net/route.h
-endif
-
 endif	# in-Makerules
Index: sysdeps/gnu/Makefile
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/gnu/Makefile,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile
--- sysdeps/gnu/Makefile	28 Feb 2006 07:05:45 -0000	1.22
+++ sysdeps/gnu/Makefile	9 Jan 2009 23:37:11 -0000
@@ -77,3 +77,8 @@ endif
 ifeq ($(subdir),misc)
 sysdep_headers += sys/mtio.h
 endif
+
+ifeq ($(subdir),socket)
+sysdep_headers += net/ethernet.h net/if_arp.h net/if_ether.h net/if_ppp.h \
+		  net/route.h
+endif
Index: sysdeps/gnu/net/ethernet.h
===================================================================
RCS file: sysdeps/gnu/net/ethernet.h
diff -N sysdeps/gnu/net/ethernet.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sysdeps/gnu/net/ethernet.h	9 Jan 2009 23:37:11 -0000
@@ -0,0 +1,84 @@
+/* Copyright (C) 1997, 1999, 2001, 2008 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* Based on the FreeBSD version of this file. Curiously, that file
+   lacks a copyright in the header. */
+
+#ifndef __NET_ETHERNET_H
+#define __NET_ETHERNET_H 1
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <net/if_ether.h>     /* IEEE 802.3 Ethernet constants */
+
+__BEGIN_DECLS
+
+/* This is a name for the 48 bit ethernet address available on many
+   systems.  */
+struct ether_addr
+{
+  u_int8_t ether_addr_octet[ETH_ALEN];
+} __attribute__ ((__packed__));
+
+/* 10Mb/s ethernet header */
+struct ether_header
+{
+  u_int8_t  ether_dhost[ETH_ALEN];	/* destination eth addr	*/
+  u_int8_t  ether_shost[ETH_ALEN];	/* source ether addr	*/
+  u_int16_t ether_type;		        /* packet type ID field	*/
+} __attribute__ ((__packed__));
+
+/* Ethernet protocol ID's */
+#define	ETHERTYPE_PUP		0x0200          /* Xerox PUP */
+#define ETHERTYPE_SPRITE	0x0500		/* Sprite */
+#define	ETHERTYPE_IP		0x0800		/* IP */
+#define	ETHERTYPE_ARP		0x0806		/* Address resolution */
+#define	ETHERTYPE_REVARP	0x8035		/* Reverse ARP */
+#define ETHERTYPE_AT		0x809B		/* AppleTalk protocol */
+#define ETHERTYPE_AARP		0x80F3		/* AppleTalk ARP */
+#define	ETHERTYPE_VLAN		0x8100		/* IEEE 802.1Q VLAN tagging */
+#define ETHERTYPE_IPX		0x8137		/* IPX */
+#define	ETHERTYPE_IPV6		0x86dd		/* IP protocol version 6 */
+#define ETHERTYPE_LOOPBACK	0x9000		/* used to test interfaces */
+
+
+#define	ETHER_ADDR_LEN	ETH_ALEN                 /* size of ethernet addr */
+#define	ETHER_TYPE_LEN	2                        /* bytes in type field */
+#define	ETHER_CRC_LEN	4                        /* bytes in CRC field */
+#define	ETHER_HDR_LEN	ETH_HLEN                 /* total octets in header */
+#define	ETHER_MIN_LEN	(ETH_ZLEN + ETHER_CRC_LEN) /* min packet length */
+#define	ETHER_MAX_LEN	(ETH_FRAME_LEN + ETHER_CRC_LEN) /* max packet length */
+
+/* make sure ethenet length is valid */
+#define	ETHER_IS_VALID_LEN(foo)	\
+	((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
+
+/*
+ * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
+ * (type-ETHERTYPE_TRAIL)*512 bytes of data followed
+ * by an ETHER type (as given above) and then the (variable-length) header.
+ */
+#define	ETHERTYPE_TRAIL		0x1000		/* Trailer packet */
+#define	ETHERTYPE_NTRAILER	16
+
+#define	ETHERMTU	ETH_DATA_LEN
+#define	ETHERMIN	(ETHER_MIN_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN)
+
+__END_DECLS
+
+#endif	/* net/ethernet.h */
Index: sysdeps/gnu/net/if_arp.h
===================================================================
RCS file: sysdeps/gnu/net/if_arp.h
diff -N sysdeps/gnu/net/if_arp.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sysdeps/gnu/net/if_arp.h	9 Jan 2009 23:37:11 -0000
@@ -0,0 +1,182 @@
+/* Definitions for Address Resolution Protocol.
+   Copyright (C) 1997,1999,2001,2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* Based on the 4.4BSD and Linux version of this file.  */
+
+#ifndef _NET_IF_ARP_H
+
+#define _NET_IF_ARP_H 1
+#include <sys/cdefs.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+__BEGIN_DECLS
+
+/* Some internals from deep down in the kernel.  */
+#define MAX_ADDR_LEN	7
+
+
+/* This structure defines an ethernet arp header.  */
+
+/* ARP protocol opcodes. */
+#define	ARPOP_REQUEST	1		/* ARP request.  */
+#define	ARPOP_REPLY	2		/* ARP reply.  */
+#define	ARPOP_RREQUEST	3		/* RARP request.  */
+#define	ARPOP_RREPLY	4		/* RARP reply.  */
+#define	ARPOP_InREQUEST	8		/* InARP request.  */
+#define	ARPOP_InREPLY	9		/* InARP reply.  */
+#define	ARPOP_NAK	10		/* (ATM)ARP NAK.  */
+
+/* See RFC 826 for protocol description.  ARP packets are variable
+   in size; the arphdr structure defines the fixed-length portion.
+   Protocol type values are the same as those for 10 Mb/s Ethernet.
+   It is followed by the variable-sized fields ar_sha, arp_spa,
+   arp_tha and arp_tpa in that order, according to the lengths
+   specified.  Field names used correspond to RFC 826.  */
+
+struct arphdr
+  {
+    unsigned short int ar_hrd;		/* Format of hardware address.  */
+    unsigned short int ar_pro;		/* Format of protocol address.  */
+    unsigned char ar_hln;		/* Length of hardware address.  */
+    unsigned char ar_pln;		/* Length of protocol address.  */
+    unsigned short int ar_op;		/* ARP opcode (command).  */
+#if 0
+    /* Ethernet looks like this : This bit is variable sized
+       however...  */
+    unsigned char __ar_sha[ETH_ALEN];	/* Sender hardware address.  */
+    unsigned char __ar_sip[4];		/* Sender IP address.  */
+    unsigned char __ar_tha[ETH_ALEN];	/* Target hardware address.  */
+    unsigned char __ar_tip[4];		/* Target IP address.  */
+#endif
+  };
+
+
+/* ARP protocol HARDWARE identifiers. */
+#define ARPHRD_NETROM	0		/* From KA9Q: NET/ROM pseudo. */
+#define ARPHRD_ETHER 	1		/* Ethernet 10/100Mbps.  */
+#define	ARPHRD_EETHER	2		/* Experimental Ethernet.  */
+#define	ARPHRD_AX25	3		/* AX.25 Level 2.  */
+#define	ARPHRD_PRONET	4		/* PROnet token ring.  */
+#define	ARPHRD_CHAOS	5		/* Chaosnet.  */
+#define	ARPHRD_IEEE802	6		/* IEEE 802.2 Ethernet/TR/TB.  */
+#define	ARPHRD_ARCNET	7		/* ARCnet.  */
+#define	ARPHRD_APPLETLK	8		/* APPLEtalk.  */
+#define	ARPHRD_DLCI	15		/* Frame Relay DLCI.  */
+#define	ARPHRD_ATM	19		/* ATM.  */
+#define	ARPHRD_METRICOM	23		/* Metricom STRIP (new IANA id).  */
+#define ARPHRD_IEEE1394	24		/* IEEE 1394 IPv4 - RFC 2734.  */
+#define ARPHRD_EUI64		27		/* EUI-64.  */
+#define ARPHRD_INFINIBAND	32		/* InfiniBand.  */
+
+/* Dummy types for non ARP hardware */
+#define ARPHRD_SLIP	256
+#define ARPHRD_CSLIP	257
+#define ARPHRD_SLIP6	258
+#define ARPHRD_CSLIP6	259
+#define ARPHRD_RSRVD	260		/* Notional KISS type.  */
+#define ARPHRD_ADAPT	264
+#define ARPHRD_ROSE	270
+#define ARPHRD_X25	271		/* CCITT X.25.  */
+#define ARPHRD_HWX25	272		/* Boards with X.25 in firmware.  */
+#define ARPHRD_PPP	512
+#define ARPHRD_CISCO	513		/* Cisco HDLC.  */
+#define ARPHRD_HDLC	ARPHRD_CISCO
+#define ARPHRD_LAPB	516		/* LAPB.  */
+#define ARPHRD_DDCMP	517		/* Digital's DDCMP.  */
+#define	ARPHRD_RAWHDLC	518		/* Raw HDLC.  */
+
+#define ARPHRD_TUNNEL	768		/* IPIP tunnel.  */
+#define ARPHRD_TUNNEL6	769		/* IPIP6 tunnel.  */
+#define ARPHRD_FRAD	770             /* Frame Relay Access Device.  */
+#define ARPHRD_SKIP	771		/* SKIP vif.  */
+#define ARPHRD_LOOPBACK	772		/* Loopback device.  */
+#define ARPHRD_LOCALTLK 773		/* Localtalk device.  */
+#define ARPHRD_FDDI	774		/* Fiber Distributed Data Interface. */
+#define ARPHRD_BIF	775             /* AP1000 BIF.  */
+#define ARPHRD_SIT	776		/* sit0 device - IPv6-in-IPv4.  */
+#define ARPHRD_IPDDP	777		/* IP-in-DDP tunnel.  */
+#define ARPHRD_IPGRE	778		/* GRE over IP.  */
+#define ARPHRD_PIMREG	779		/* PIMSM register interface.  */
+#define ARPHRD_HIPPI	780		/* High Performance Parallel I'face. */
+#define ARPHRD_ASH	781		/* (Nexus Electronics) Ash.  */
+#define ARPHRD_ECONET	782		/* Acorn Econet.  */
+#define ARPHRD_IRDA	783		/* Linux-IrDA.  */
+#define ARPHRD_FCPP	784		/* Point to point fibrechanel.  */
+#define ARPHRD_FCAL	785		/* Fibrechanel arbitrated loop.  */
+#define ARPHRD_FCPL	786		/* Fibrechanel public loop.  */
+#define ARPHRD_FCFABRIC 787		/* Fibrechanel fabric.  */
+#define ARPHRD_IEEE802_TR 800		/* Magic type ident for TR.  */
+#define ARPHRD_IEEE80211 801		/* IEEE 802.11.  */
+#define ARPHRD_IEEE80211_PRISM 802	/* IEEE 802.11 + Prism2 header.  */
+#define ARPHRD_IEEE80211_RADIOTAP 803	/* IEEE 802.11 + radiotap header.  */
+
+#define ARPHRD_VOID	  0xFFFF	/* Void type, nothing is known.  */
+#define ARPHRD_NONE	  0xFFFE	/* Zero header length.  */
+
+
+/* ARP ioctl request.  */
+struct arpreq
+  {
+    struct sockaddr arp_pa;		/* Protocol address.  */
+    struct sockaddr arp_ha;		/* Hardware address.  */
+    int arp_flags;			/* Flags.  */
+    struct sockaddr arp_netmask;	/* Netmask (only for proxy arps).  */
+    char arp_dev[16];
+  };
+
+struct arpreq_old
+  {
+    struct sockaddr arp_pa;		/* Protocol address.  */
+    struct sockaddr arp_ha;		/* Hardware address.  */
+    int arp_flags;			/* Flags.  */
+    struct sockaddr arp_netmask;	/* Netmask (only for proxy arps).  */
+  };
+
+/* ARP Flag values.  */
+#define ATF_COM		0x02		/* Completed entry (ha valid).  */
+#define	ATF_PERM	0x04		/* Permanent entry.  */
+#define	ATF_PUBL	0x08		/* Publish entry.  */
+#define	ATF_USETRAILERS	0x10		/* Has requested trailers.  */
+#define ATF_NETMASK     0x20            /* Want to use a netmask (only
+					   for proxy entries).  */
+#define ATF_DONTPUB	0x40		/* Don't answer this addresses.  */
+#define ATF_MAGIC	0x80		/* Automatically added entry.  */
+
+
+/* Support for the user space arp daemon, arpd.  */
+#define ARPD_UPDATE	0x01
+#define ARPD_LOOKUP	0x02
+#define ARPD_FLUSH	0x03
+
+struct arpd_request
+  {
+    unsigned short int req;		/* Request type.  */
+    u_int32_t ip;			/* IP address of entry.  */
+    unsigned long int dev;		/* Device entry is tied to.  */
+    unsigned long int stamp;
+    unsigned long int updated;
+    unsigned char ha[MAX_ADDR_LEN];	/* Hardware address.  */
+  };
+
+__END_DECLS
+
+#endif	/* net/if_arp.h */
Index: sysdeps/gnu/net/if_ether.h
===================================================================
RCS file: sysdeps/gnu/net/if_ether.h
diff -N sysdeps/gnu/net/if_ether.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sysdeps/gnu/net/if_ether.h	9 Jan 2009 23:37:11 -0000
@@ -0,0 +1,110 @@
+/* Copyright (C) 1997,2008 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _NET_IF_ETHER_H
+#define _NET_IF_ETHER_H	1
+
+/*
+ *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
+ *	and FCS/CRC (frame check sequence).
+ */
+
+#define ETH_ALEN	6		/* Octets in one ethernet addr	 */
+#define ETH_HLEN	14		/* Total octets in header.	 */
+#define ETH_ZLEN	60		/* Min. octets in frame sans FCS */
+#define ETH_DATA_LEN	1500		/* Max. octets in payload	 */
+#define ETH_FRAME_LEN	1514		/* Max. octets in frame sans FCS */
+#define ETH_FCS_LEN	4		/* Octets in the FCS		 */
+
+/*
+ *	These are the defined Ethernet Protocol ID's.
+ */
+
+#define ETH_P_LOOP	0x0060		/* Ethernet Loopback packet	*/
+#define ETH_P_PUP	0x0200		/* Xerox PUP packet		*/
+#define ETH_P_PUPAT	0x0201		/* Xerox PUP Addr Trans packet	*/
+#define ETH_P_IP	0x0800		/* Internet Protocol packet	*/
+#define ETH_P_X25	0x0805		/* CCITT X.25			*/
+#define ETH_P_ARP	0x0806		/* Address Resolution packet	*/
+#define	ETH_P_BPQ	0x08FF		/* G8BPQ AX.25 Ethernet Packet	[ NOT AN OFFICIALLY REGISTERED ID ] */
+#define ETH_P_IEEEPUP	0x0a00		/* Xerox IEEE802.3 PUP packet */
+#define ETH_P_IEEEPUPAT	0x0a01		/* Xerox IEEE802.3 PUP Addr Trans packet */
+#define ETH_P_DEC       0x6000          /* DEC Assigned proto           */
+#define ETH_P_DNA_DL    0x6001          /* DEC DNA Dump/Load            */
+#define ETH_P_DNA_RC    0x6002          /* DEC DNA Remote Console       */
+#define ETH_P_DNA_RT    0x6003          /* DEC DNA Routing              */
+#define ETH_P_LAT       0x6004          /* DEC LAT                      */
+#define ETH_P_DIAG      0x6005          /* DEC Diagnostics              */
+#define ETH_P_CUST      0x6006          /* DEC Customer use             */
+#define ETH_P_SCA       0x6007          /* DEC Systems Comms Arch       */
+#define ETH_P_RARP      0x8035		/* Reverse Addr Res packet	*/
+#define ETH_P_ATALK	0x809B		/* Appletalk DDP		*/
+#define ETH_P_AARP	0x80F3		/* Appletalk AARP		*/
+#define ETH_P_8021Q	0x8100          /* 802.1Q VLAN Extended Header  */
+#define ETH_P_IPX	0x8137		/* IPX over DIX			*/
+#define ETH_P_IPV6	0x86DD		/* IPv6 over bluebook		*/
+#define ETH_P_PAUSE	0x8808		/* IEEE Pause frames. See 802.3 31B */
+#define ETH_P_SLOW	0x8809		/* Slow Protocol. See 802.3ad 43B */
+#define ETH_P_WCCP	0x883E		/* Web-cache coordination protocol
+					 * defined in draft-wilson-wrec-wccp-v2-00.txt */
+#define ETH_P_PPP_DISC	0x8863		/* PPPoE discovery messages     */
+#define ETH_P_PPP_SES	0x8864		/* PPPoE session messages	*/
+#define ETH_P_MPLS_UC	0x8847		/* MPLS Unicast traffic		*/
+#define ETH_P_MPLS_MC	0x8848		/* MPLS Multicast traffic	*/
+#define ETH_P_ATMMPOA	0x884c		/* MultiProtocol Over ATM	*/
+#define ETH_P_ATMFATE	0x8884		/* Frame-based ATM Transport
+					 * over Ethernet
+					 */
+#define ETH_P_AOE	0x88A2		/* ATA over Ethernet		*/
+#define ETH_P_TIPC	0x88CA		/* TIPC 			*/
+
+/*
+ *	Non DIX types. Won't clash for 1500 types.
+ */
+
+#define ETH_P_802_3	0x0001		/* Dummy type for 802.3 frames  */
+#define ETH_P_AX25	0x0002		/* Dummy protocol id for AX.25  */
+#define ETH_P_ALL	0x0003		/* Every packet (be careful!!!) */
+#define ETH_P_802_2	0x0004		/* 802.2 frames 		*/
+#define ETH_P_SNAP	0x0005		/* Internal only		*/
+#define ETH_P_DDCMP     0x0006          /* DEC DDCMP: Internal only     */
+#define ETH_P_WAN_PPP   0x0007          /* Dummy type for WAN PPP frames*/
+#define ETH_P_PPP_MP    0x0008          /* Dummy type for PPP MP frames */
+#define ETH_P_LOCALTALK 0x0009		/* Localtalk pseudo type 	*/
+#define ETH_P_CAN	0x000C		/* Controller Area Network      */
+#define ETH_P_PPPTALK	0x0010		/* Dummy type for Atalk over PPP*/
+#define ETH_P_TR_802_2	0x0011		/* 802.2 frames 		*/
+#define ETH_P_MOBITEX	0x0015		/* Mobitex (kaz@cafe.net)	*/
+#define ETH_P_CONTROL	0x0016		/* Card specific control frames */
+#define ETH_P_IRDA	0x0017		/* Linux-IrDA			*/
+#define ETH_P_ECONET	0x0018		/* Acorn Econet			*/
+#define ETH_P_HDLC	0x0019		/* HDLC frames			*/
+#define ETH_P_ARCNET	0x001A		/* 1A for ArcNet :-)            */
+
+/*
+ *	This is an Ethernet frame header.
+ */
+
+struct ethhdr
+{
+  unsigned char	h_dest[ETH_ALEN];	/* destination eth addr	*/
+  unsigned char	h_source[ETH_ALEN];	/* source ether addr	*/
+  unsigned short int h_proto;		/* packet type ID field	*/
+} __attribute__((packed));
+
+#endif	/* net/if_ether.h */
Index: sysdeps/gnu/net/if_ppp.h
===================================================================
RCS file: sysdeps/gnu/net/if_ppp.h
diff -N sysdeps/gnu/net/if_ppp.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sysdeps/gnu/net/if_ppp.h	9 Jan 2009 23:37:12 -0000
@@ -0,0 +1,169 @@
+/*	From: if_ppp.h,v 1.3 1995/06/12 11:36:50 paulus Exp */
+
+/*
+ * if_ppp.h - Point-to-Point Protocol definitions.
+ *
+ * Copyright (c) 1989 Carnegie Mellon University. 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+/*
+ *  ==FILEVERSION 960926==
+ *
+ *  NOTE TO MAINTAINERS:
+ *     If you modify this file at all, please set the above date.
+ *     if_ppp.h is shipped with a PPP distribution as well as with the kernel;
+ *     if everyone increases the FILEVERSION number above, then scripts
+ *     can do the right thing when deciding whether to install a new if_ppp.h
+ *     file.  Don't change the format of that line otherwise, so the
+ *     installation script can recognize it.
+ */
+
+
+#ifndef __NET_IF_PPP_H
+#define __NET_IF_PPP_H 1
+
+#include <sys/types.h>
+#include <sys/cdefs.h>
+
+#include <net/if.h>
+#include <sys/ioctl.h>
+#include <net/ppp_defs.h>
+
+__BEGIN_DECLS
+
+/*
+ * Packet sizes
+ */
+
+#define	PPP_MTU		1500	/* Default MTU (size of Info field) */
+#define PPP_MAXMRU	65000	/* Largest MRU we allow */
+#define PPP_VERSION	"2.2.0"
+#define PPP_MAGIC	0x5002	/* Magic value for the ppp structure */
+#define PROTO_IPX	0x002b	/* protocol numbers */
+#define PROTO_DNA_RT    0x0027  /* DNA Routing */
+
+
+/*
+ * Bit definitions for flags.
+ */
+
+#define SC_COMP_PROT	0x00000001	/* protocol compression (output) */
+#define SC_COMP_AC	0x00000002	/* header compression (output) */
+#define	SC_COMP_TCP	0x00000004	/* TCP (VJ) compression (output) */
+#define SC_NO_TCP_CCID	0x00000008	/* disable VJ connection-id comp. */
+#define SC_REJ_COMP_AC	0x00000010	/* reject adrs/ctrl comp. on input */
+#define SC_REJ_COMP_TCP	0x00000020	/* reject TCP (VJ) comp. on input */
+#define SC_CCP_OPEN	0x00000040	/* Look at CCP packets */
+#define SC_CCP_UP	0x00000080	/* May send/recv compressed packets */
+#define SC_ENABLE_IP	0x00000100	/* IP packets may be exchanged */
+#define SC_COMP_RUN	0x00001000	/* compressor has been inited */
+#define SC_DECOMP_RUN	0x00002000	/* decompressor has been inited */
+#define SC_DEBUG	0x00010000	/* enable debug messages */
+#define SC_LOG_INPKT	0x00020000	/* log contents of good pkts recvd */
+#define SC_LOG_OUTPKT	0x00040000	/* log contents of pkts sent */
+#define SC_LOG_RAWIN	0x00080000	/* log all chars received */
+#define SC_LOG_FLUSH	0x00100000	/* log all chars flushed */
+#define	SC_MASK		0x0fE0ffff	/* bits that user can change */
+
+/* state bits */
+#define	SC_ESCAPED	0x80000000	/* saw a PPP_ESCAPE */
+#define	SC_FLUSH	0x40000000	/* flush input until next PPP_FLAG */
+#define SC_VJ_RESET	0x20000000	/* Need to reset the VJ decompressor */
+#define SC_XMIT_BUSY	0x10000000	/* ppp_write_wakeup is active */
+#define SC_RCV_ODDP	0x08000000	/* have rcvd char with odd parity */
+#define SC_RCV_EVNP	0x04000000	/* have rcvd char with even parity */
+#define SC_RCV_B7_1	0x02000000	/* have rcvd char with bit 7 = 1 */
+#define SC_RCV_B7_0	0x01000000	/* have rcvd char with bit 7 = 0 */
+#define SC_DC_FERROR	0x00800000	/* fatal decomp error detected */
+#define SC_DC_ERROR	0x00400000	/* non-fatal decomp error detected */
+
+/*
+ * Ioctl definitions.
+ */
+
+struct npioctl {
+    int		protocol;	/* PPP protocol, e.g. PPP_IP */
+    enum NPmode	mode;
+};
+
+/* Structure describing a CCP configuration option, for PPPIOCSCOMPRESS */
+struct ppp_option_data {
+	u_int8_t  *ptr;
+	u_int32_t length;
+	int	  transmit;
+};
+
+struct ifpppstatsreq {
+  struct ifreq	   b;
+  struct ppp_stats stats;			/* statistic information */
+};
+
+struct ifpppcstatsreq {
+  struct ifreq		b;
+  struct ppp_comp_stats stats;
+};
+
+#define ifr__name       b.ifr_ifrn.ifrn_name
+#define stats_ptr       b.ifr_ifru.ifru_data
+
+/*
+ * Ioctl definitions.
+ */
+
+#define	PPPIOCGFLAGS	_IOR('t', 90, int)	/* get configuration flags */
+#define	PPPIOCSFLAGS	_IOW('t', 89, int)	/* set configuration flags */
+#define	PPPIOCGASYNCMAP	_IOR('t', 88, int)	/* get async map */
+#define	PPPIOCSASYNCMAP	_IOW('t', 87, int)	/* set async map */
+#define	PPPIOCGUNIT	_IOR('t', 86, int)	/* get ppp unit number */
+#define	PPPIOCGRASYNCMAP _IOR('t', 85, int)	/* get receive async map */
+#define	PPPIOCSRASYNCMAP _IOW('t', 84, int)	/* set receive async map */
+#define	PPPIOCGMRU	_IOR('t', 83, int)	/* get max receive unit */
+#define	PPPIOCSMRU	_IOW('t', 82, int)	/* set max receive unit */
+#define	PPPIOCSMAXCID	_IOW('t', 81, int)	/* set VJ max slot ID */
+#define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm) /* get extended ACCM */
+#define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm) /* set extended ACCM */
+#define PPPIOCXFERUNIT	_IO('t', 78)		/* transfer PPP unit */
+#define PPPIOCSCOMPRESS	_IOW('t', 77, struct ppp_option_data)
+#define PPPIOCGNPMODE	_IOWR('t', 76, struct npioctl) /* get NP mode */
+#define PPPIOCSNPMODE	_IOW('t', 75, struct npioctl)  /* set NP mode */
+#define PPPIOCGDEBUG	_IOR('t', 65, int)	/* Read debug level */
+#define PPPIOCSDEBUG	_IOW('t', 64, int)	/* Set debug level */
+#define PPPIOCGIDLE	_IOR('t', 63, struct ppp_idle) /* get idle time */
+
+#define SIOCGPPPSTATS   (SIOCDEVPRIVATE + 0)
+#define SIOCGPPPVER     (SIOCDEVPRIVATE + 1)  /* NEVER change this!! */
+#define SIOCGPPPCSTATS  (SIOCDEVPRIVATE + 2)
+
+#if !defined(ifr_mtu)
+#define ifr_mtu	ifr_ifru.ifru_metric
+#endif
+
+__END_DECLS
+
+#endif /* net/if_ppp.h */
Index: sysdeps/gnu/net/route.h
===================================================================
RCS file: sysdeps/gnu/net/route.h
diff -N sysdeps/gnu/net/route.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sysdeps/gnu/net/route.h	9 Jan 2009 23:37:12 -0000
@@ -0,0 +1,145 @@
+/* Copyright (C) 1997, 2002 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* Based on the 4.4BSD and Linux version of this file.  */
+
+#ifndef _NET_ROUTE_H
+#define _NET_ROUTE_H	1
+
+#include <features.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <bits/wordsize.h>
+
+
+/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */
+struct rtentry
+  {
+    unsigned long int rt_pad1;
+    struct sockaddr rt_dst;		/* Target address.  */
+    struct sockaddr rt_gateway;		/* Gateway addr (RTF_GATEWAY).  */
+    struct sockaddr rt_genmask;		/* Target network mask (IP).  */
+    unsigned short int rt_flags;
+    short int rt_pad2;
+    unsigned long int rt_pad3;
+    unsigned char rt_tos;
+    unsigned char rt_class;
+#if __WORDSIZE == 64
+    short int rt_pad4[3];
+#else
+    short int rt_pad4;
+#endif
+    short int rt_metric;		/* +1 for binary compatibility!  */
+    char *rt_dev;			/* Forcing the device at add.  */
+    unsigned long int rt_mtu;		/* Per route MTU/Window.  */
+    unsigned long int rt_window;	/* Window clamping.  */
+    unsigned short int rt_irtt;		/* Initial RTT.  */
+  };
+/* Compatibility hack.  */
+#define rt_mss	rt_mtu
+
+
+struct in6_rtmsg
+  {
+    struct in6_addr rtmsg_dst;
+    struct in6_addr rtmsg_src;
+    struct in6_addr rtmsg_gateway;
+    u_int32_t rtmsg_type;
+    u_int16_t rtmsg_dst_len;
+    u_int16_t rtmsg_src_len;
+    u_int32_t rtmsg_metric;
+    unsigned long int rtmsg_info;
+    u_int32_t rtmsg_flags;
+    int rtmsg_ifindex;
+  };
+
+
+#define	RTF_UP		0x0001		/* Route usable.  */
+#define	RTF_GATEWAY	0x0002		/* Destination is a gateway.  */
+
+#define	RTF_HOST	0x0004		/* Host entry (net otherwise).  */
+#define RTF_REINSTATE	0x0008		/* Reinstate route after timeout.  */
+#define	RTF_DYNAMIC	0x0010		/* Created dyn. (by redirect).  */
+#define	RTF_MODIFIED	0x0020		/* Modified dyn. (by redirect).  */
+#define RTF_MTU		0x0040		/* Specific MTU for this route.  */
+#define RTF_MSS		RTF_MTU		/* Compatibility.  */
+#define RTF_WINDOW	0x0080		/* Per route window clamping.  */
+#define RTF_IRTT	0x0100		/* Initial round trip time.  */
+#define RTF_REJECT	0x0200		/* Reject route.  */
+#define	RTF_STATIC	0x0400		/* Manually injected route.  */
+#define	RTF_XRESOLVE	0x0800		/* External resolver.  */
+#define RTF_NOFORWARD   0x1000		/* Forwarding inhibited.  */
+#define RTF_THROW	0x2000		/* Go to next class.  */
+#define RTF_NOPMTUDISC  0x4000		/* Do not send packets with DF.  */
+
+/* for IPv6 */
+#define RTF_DEFAULT	0x00010000	/* default - learned via ND	*/
+#define RTF_ALLONLINK	0x00020000	/* fallback, no routers on link	*/
+#define RTF_ADDRCONF	0x00040000	/* addrconf route - RA		*/
+
+#define RTF_LINKRT	0x00100000	/* link specific - device match	*/
+#define RTF_NONEXTHOP	0x00200000	/* route with no nexthop	*/
+
+#define RTF_CACHE	0x01000000	/* cache entry			*/
+#define RTF_FLOW	0x02000000	/* flow significant route	*/
+#define RTF_POLICY	0x04000000	/* policy route			*/
+
+#define RTCF_VALVE	0x00200000
+#define RTCF_MASQ	0x00400000
+#define RTCF_NAT	0x00800000
+#define RTCF_DOREDIRECT 0x01000000
+#define RTCF_LOG	0x02000000
+#define RTCF_DIRECTSRC	0x04000000
+
+#define RTF_LOCAL	0x80000000
+#define RTF_INTERFACE	0x40000000
+#define RTF_MULTICAST	0x20000000
+#define RTF_BROADCAST	0x10000000
+#define RTF_NAT		0x08000000
+
+#define RTF_ADDRCLASSMASK	0xF8000000
+#define RT_ADDRCLASS(flags)	((__u_int32_t) flags >> 23)
+
+#define RT_TOS(tos)		((tos) & IPTOS_TOS_MASK)
+
+#define RT_LOCALADDR(flags)	((flags & RTF_ADDRCLASSMASK) \
+				 == (RTF_LOCAL|RTF_INTERFACE))
+
+#define RT_CLASS_UNSPEC		0
+#define RT_CLASS_DEFAULT	253
+
+#define RT_CLASS_MAIN		254
+#define RT_CLASS_LOCAL		255
+#define RT_CLASS_MAX		255
+
+
+#define RTMSG_ACK		NLMSG_ACK
+#define RTMSG_OVERRUN		NLMSG_OVERRUN
+
+#define RTMSG_NEWDEVICE		0x11
+#define RTMSG_DELDEVICE		0x12
+#define RTMSG_NEWROUTE		0x21
+#define RTMSG_DELROUTE		0x22
+#define RTMSG_NEWRULE		0x31
+#define RTMSG_DELRULE		0x32
+#define RTMSG_CONTROL		0x40
+
+#define RTMSG_AR_FAILED		0x51	/* Address Resolution failed.  */
+
+#endif /* net/route.h */
Index: sysdeps/gnu/netinet/if_ether.h
===================================================================
RCS file: sysdeps/gnu/netinet/if_ether.h
diff -N sysdeps/gnu/netinet/if_ether.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sysdeps/gnu/netinet/if_ether.h	9 Jan 2009 23:37:12 -0000
@@ -0,0 +1,26 @@
+/* Copyright (C) 2008 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef __NETINET_IF_ETHER_H
+
+#define __NETINET_IF_ETHER_H	1
+
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+
+#endif /* netinet/if_ether.h */
Index: sysdeps/mach/hurd/net/ethernet.h
===================================================================
RCS file: sysdeps/mach/hurd/net/ethernet.h
diff -N sysdeps/mach/hurd/net/ethernet.h
--- sysdeps/mach/hurd/net/ethernet.h	6 Jul 2001 04:55:59 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,76 +0,0 @@
-/* Copyright (C) 1997 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-/* Based on the FreeBSD version of this file. Curiously, that file
-   lacks a copyright in the header. */
-
-#ifndef __NET_ETHERNET_H
-#define __NET_ETHERNET_H 1
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <net/if_ether.h>     /* IEEE 802.3 Ethernet constants */
-
-__BEGIN_DECLS
-
-/* This is a name for the 48 bit ethernet address available on many
-   systems.  */
-struct ether_addr
-{
-  u_int8_t ether_addr_octet[ETH_ALEN];
-};
-
-/* 10Mb/s ethernet header */
-struct ether_header
-{
-  u_int8_t  ether_dhost[ETH_ALEN];	/* destination eth addr	*/
-  u_int8_t  ether_shost[ETH_ALEN];	/* source ether addr	*/
-  u_int16_t ether_type;		        /* packet type ID field	*/
-};
-
-/* Ethernet protocol ID's */
-#define	ETHERTYPE_PUP		0x0200          /* Xerox PUP */
-#define	ETHERTYPE_IP		0x0800		/* IP */
-#define	ETHERTYPE_ARP		0x0806		/* Address resolution */
-#define	ETHERTYPE_REVARP	0x8035		/* Reverse ARP */
-
-#define	ETHER_ADDR_LEN	ETH_ALEN                 /* size of ethernet addr */
-#define	ETHER_TYPE_LEN	2                        /* bytes in type field */
-#define	ETHER_CRC_LEN	4                        /* bytes in CRC field */
-#define	ETHER_HDR_LEN	ETH_HLEN                 /* total octets in header */
-#define	ETHER_MIN_LEN	(ETH_ZLEN + ETH_CRC_LEN) /* min packet length */
-#define	ETHER_MAX_LEN	(ETH_FRAME_LEN + ETH_CRC_LEN) /* max packet length */
-
-/* make sure ethenet length is valid */
-#define	ETHER_IS_VALID_LEN(foo)	\
-	((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
-
-/*
- * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
- * (type-ETHERTYPE_TRAIL)*512 bytes of data followed
- * by an ETHER type (as given above) and then the (variable-length) header.
- */
-#define	ETHERTYPE_TRAIL		0x1000		/* Trailer packet */
-#define	ETHERTYPE_NTRAILER	16
-
-#define	ETHERMTU	ETH_DATA_LEN
-#define	ETHERMIN	(ETHER_MIN_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
-
-__END_DECLS
-
-#endif /* net/ethernet.h */
Index: sysdeps/mach/hurd/net/if_arp.h
===================================================================
RCS file: sysdeps/mach/hurd/net/if_arp.h
diff -N sysdeps/mach/hurd/net/if_arp.h
--- sysdeps/mach/hurd/net/if_arp.h	6 Jul 2001 04:55:59 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,145 +0,0 @@
-/* Definitions for Address Resolution Protocol.
-   Copyright (C) 1997 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-/* Based on the 4.4BSD and Linux version of this file.  */
-
-#ifndef _NET_IF_ARP_H
-
-#define _NET_IF_ARP_H 1
-#include <sys/cdefs.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-__BEGIN_DECLS
-
-/* Some internals from deep down in the kernel.  */
-#define MAX_ADDR_LEN	7
-
-
-/* This structure defines an ethernet arp header.  */
-
-/* ARP protocol opcodes. */
-#define	ARPOP_REQUEST	1		/* ARP request.  */
-#define	ARPOP_REPLY	2		/* ARP reply.  */
-#define	ARPOP_RREQUEST	3		/* RARP request.  */
-#define	ARPOP_RREPLY	4		/* RARP reply.  */
-
-/* See RFC 826 for protocol description.  ARP packets are variable
-   in size; the arphdr structure defines the fixed-length portion.
-   Protocol type values are the same as those for 10 Mb/s Ethernet.
-   It is followed by the variable-sized fields ar_sha, arp_spa,
-   arp_tha and arp_tpa in that order, according to the lengths
-   specified.  Field names used correspond to RFC 826.  */
-
-struct arphdr
-  {
-    unsigned short int ar_hrd;		/* Format of hardware address.  */
-    unsigned short int ar_pro;		/* Format of protocol address.  */
-    unsigned char ar_hln;		/* Length of hardware address.  */
-    unsigned char ar_pln;		/* Length of protocol address.  */
-    unsigned short int ar_op;		/* ARP opcode (command).  */
-#if 0
-    /* Ethernet looks like this : This bit is variable sized
-       however...  */
-    unsigned char __ar_sha[ETH_ALEN];	/* Sender hardware address.  */
-    unsigned char __ar_sip[4];		/* Sender IP address.  */
-    unsigned char __ar_tha[ETH_ALEN];	/* Target hardware address.  */
-    unsigned char __ar_tip[4];		/* Target IP address.  */
-#endif
-  };
-
-
-/* ARP protocol HARDWARE identifiers. */
-#define ARPHRD_NETROM	0		/* From KA9Q: NET/ROM pseudo. */
-#define ARPHRD_ETHER 	1		/* Ethernet 10Mbps.  */
-#define	ARPHRD_EETHER	2		/* Experimental Ethernet.  */
-#define	ARPHRD_AX25	3		/* AX.25 Level 2.  */
-#define	ARPHRD_PRONET	4		/* PROnet token ring.  */
-#define	ARPHRD_CHAOS	5		/* Chaosnet.  */
-#define	ARPHRD_IEEE802	6		/* IEEE 802.2 Ethernet/TR/TB.  */
-#define	ARPHRD_ARCNET	7		/* ARCnet.  */
-#define	ARPHRD_APPLETLK	8		/* APPLEtalk.  */
-#define ARPHRD_DLCI	15		/* Frame Relay DLCI.  */
-#define ARPHRD_METRICOM	23		/* Metricom STRIP (new IANA id).  */
-
-/* Dummy types for non ARP hardware */
-#define ARPHRD_SLIP	256
-#define ARPHRD_CSLIP	257
-#define ARPHRD_SLIP6	258
-#define ARPHRD_CSLIP6	259
-#define ARPHRD_RSRVD	260		/* Notional KISS type.  */
-#define ARPHRD_ADAPT	264
-#define ARPHRD_ROSE	270
-#define ARPHRD_X25	271		/* CCITT X.25.  */
-#define ARPHRD_PPP	512
-#define ARPHRD_HDLC	513		/* (Cisco) HDLC.  */
-#define ARPHRD_LAPB	516		/* LAPB.  */
-
-#define ARPHRD_TUNNEL	768		/* IPIP tunnel.  */
-#define ARPHRD_TUNNEL6	769		/* IPIP6 tunnel.  */
-#define ARPHRD_FRAD	770             /* Frame Relay Access Device.  */
-#define ARPHRD_SKIP	771		/* SKIP vif.  */
-#define ARPHRD_LOOPBACK	772		/* Loopback device.  */
-#define ARPHRD_LOCALTLK 773		/* Localtalk device.  */
-#define ARPHRD_FDDI	774		/* Fiber Distributed Data Interface. */
-#define ARPHRD_BIF      775             /* AP1000 BIF.  */
-#define ARPHRD_SIT	776		/* sit0 device - IPv6-in-IPv4.  */
-
-
-/* ARP ioctl request.  */
-struct arpreq
-  {
-    struct sockaddr arp_pa;		/* Protocol address.  */
-    struct sockaddr arp_ha;		/* Hardware address.  */
-    int arp_flags;			/* Flags.  */
-    struct sockaddr arp_netmask;	/* Netmask (only for proxy arps).  */
-    char arp_dev[16];
-  };
-
-/* ARP Flag values.  */
-#define ATF_COM		0x02		/* Completed entry (ha valid).  */
-#define	ATF_PERM	0x04		/* Permanent entry.  */
-#define	ATF_PUBL	0x08		/* Publish entry.  */
-#define	ATF_USETRAILERS	0x10		/* Has requested trailers.  */
-#define ATF_NETMASK     0x20            /* Want to use a netmask (only
-					   for proxy entries).  */
-#define ATF_DONTPUB	0x40		/* Don't answer this addresses.  */
-#define ATF_MAGIC	0x80		/* Automatically added entry.  */
-
-
-/* Support for the user space arp daemon, arpd.  */
-#define ARPD_UPDATE	0x01
-#define ARPD_LOOKUP	0x02
-#define ARPD_FLUSH	0x03
-
-struct arpd_request
-  {
-    unsigned short int req;		/* Request type.  */
-    u_int32_t ip;			/* IP address of entry.  */
-    unsigned long int dev;		/* Device entry is tied to.  */
-    unsigned long int stamp;
-    unsigned long int updated;
-    unsigned char ha[MAX_ADDR_LEN];	/* Hardware address.  */
-  };
-
-__END_DECLS
-
-#endif	/* net/if_arp.h */
Index: sysdeps/mach/hurd/net/if_ether.h
===================================================================
RCS file: sysdeps/mach/hurd/net/if_ether.h
diff -N sysdeps/mach/hurd/net/if_ether.h
--- sysdeps/mach/hurd/net/if_ether.h	6 Jul 2001 04:55:59 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,85 +0,0 @@
-/* Copyright (C) 1997 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _NET_IF_ETHER_H
-#define _NET_IF_ETHER_H	1
-
-/*
- *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
- *	and FCS/CRC (frame check sequence).
- */
-
-#define ETH_ALEN	6		/* Octets in one ethernet addr	 */
-#define ETH_HLEN	14		/* Total octets in header.	 */
-#define ETH_ZLEN	60		/* Min. octets in frame sans FCS */
-#define ETH_DATA_LEN	1500		/* Max. octets in payload	 */
-#define ETH_FRAME_LEN	1514		/* Max. octets in frame sans FCS */
-
-/*
- *	These are the defined Ethernet Protocol ID's.
- */
-
-#define ETH_P_LOOP	0x0060		/* Ethernet Loopback packet	*/
-#define ETH_P_ECHO	0x0200		/* Ethernet Echo packet		*/
-#define ETH_P_PUP	0x0400		/* Xerox PUP packet		*/
-#define ETH_P_IP	0x0800		/* Internet Protocol packet	*/
-#define ETH_P_X25	0x0805		/* CCITT X.25			*/
-#define ETH_P_ARP	0x0806		/* Address Resolution packet	*/
-#define	ETH_P_BPQ	0x08FF		/* G8BPQ AX.25 Ethernet Packet	[ NOT AN OFFICIALLY REGISTERED ID ] */
-#define ETH_P_DEC       0x6000          /* DEC Assigned proto           */
-#define ETH_P_DNA_DL    0x6001          /* DEC DNA Dump/Load            */
-#define ETH_P_DNA_RC    0x6002          /* DEC DNA Remote Console       */
-#define ETH_P_DNA_RT    0x6003          /* DEC DNA Routing              */
-#define ETH_P_LAT       0x6004          /* DEC LAT                      */
-#define ETH_P_DIAG      0x6005          /* DEC Diagnostics              */
-#define ETH_P_CUST      0x6006          /* DEC Customer use             */
-#define ETH_P_SCA       0x6007          /* DEC Systems Comms Arch       */
-#define ETH_P_RARP      0x8035		/* Reverse Addr Res packet	*/
-#define ETH_P_ATALK	0x809B		/* Appletalk DDP		*/
-#define ETH_P_AARP	0x80F3		/* Appletalk AARP		*/
-#define ETH_P_IPX	0x8137		/* IPX over DIX			*/
-#define ETH_P_IPV6	0x86DD		/* IPv6 over bluebook		*/
-
-/*
- *	Non DIX types. Won't clash for 1500 types.
- */
-
-#define ETH_P_802_3	0x0001		/* Dummy type for 802.3 frames  */
-#define ETH_P_AX25	0x0002		/* Dummy protocol id for AX.25  */
-#define ETH_P_ALL	0x0003		/* Every packet (be careful!!!) */
-#define ETH_P_802_2	0x0004		/* 802.2 frames 		*/
-#define ETH_P_SNAP	0x0005		/* Internal only		*/
-#define ETH_P_DDCMP     0x0006          /* DEC DDCMP: Internal only     */
-#define ETH_P_WAN_PPP   0x0007          /* Dummy type for WAN PPP frames*/
-#define ETH_P_PPP_MP    0x0008          /* Dummy type for PPP MP frames */
-#define ETH_P_LOCALTALK 0x0009		/* Localtalk pseudo type 	*/
-#define ETH_P_PPPTALK	0x0010		/* Dummy type for Atalk over PPP*/
-#define ETH_P_TR_802_2	0x0011		/* 802.2 frames 		*/
-
-/*
- *	This is an Ethernet frame header.
- */
-
-struct ethhdr
-{
-  unsigned char	h_dest[ETH_ALEN];	/* destination eth addr	*/
-  unsigned char	h_source[ETH_ALEN];	/* source ether addr	*/
-  unsigned short int h_proto;		/* packet type ID field	*/
-};
-
-#endif	/* net/if_ether.h */
Index: sysdeps/mach/hurd/net/if_ppp.h
===================================================================
RCS file: sysdeps/mach/hurd/net/if_ppp.h
diff -N sysdeps/mach/hurd/net/if_ppp.h
--- sysdeps/mach/hurd/net/if_ppp.h	20 Aug 2002 21:50:05 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,169 +0,0 @@
-/*	From: if_ppp.h,v 1.3 1995/06/12 11:36:50 paulus Exp */
-
-/*
- * if_ppp.h - Point-to-Point Protocol definitions.
- *
- * Copyright (c) 1989 Carnegie Mellon University. 
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
- * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-/*
- *  ==FILEVERSION 960926==
- *
- *  NOTE TO MAINTAINERS:
- *     If you modify this file at all, please set the above date.
- *     if_ppp.h is shipped with a PPP distribution as well as with the kernel;
- *     if everyone increases the FILEVERSION number above, then scripts
- *     can do the right thing when deciding whether to install a new if_ppp.h
- *     file.  Don't change the format of that line otherwise, so the
- *     installation script can recognize it.
- */
-
-
-#ifndef __NET_IF_PPP_H
-#define __NET_IF_PPP_H 1
-
-#include <sys/types.h>
-#include <sys/cdefs.h>
-
-#include <net/if.h>
-#include <sys/ioctl.h>
-#include <net/ppp_defs.h>
-
-__BEGIN_DECLS
-
-/*
- * Packet sizes
- */
-
-#define	PPP_MTU		1500	/* Default MTU (size of Info field) */
-#define PPP_MAXMRU	65000	/* Largest MRU we allow */
-#define PPP_VERSION	"2.2.0"
-#define PPP_MAGIC	0x5002	/* Magic value for the ppp structure */
-#define PROTO_IPX	0x002b	/* protocol numbers */
-#define PROTO_DNA_RT    0x0027  /* DNA Routing */
-
-
-/*
- * Bit definitions for flags.
- */
-
-#define SC_COMP_PROT	0x00000001	/* protocol compression (output) */
-#define SC_COMP_AC	0x00000002	/* header compression (output) */
-#define	SC_COMP_TCP	0x00000004	/* TCP (VJ) compression (output) */
-#define SC_NO_TCP_CCID	0x00000008	/* disable VJ connection-id comp. */
-#define SC_REJ_COMP_AC	0x00000010	/* reject adrs/ctrl comp. on input */
-#define SC_REJ_COMP_TCP	0x00000020	/* reject TCP (VJ) comp. on input */
-#define SC_CCP_OPEN	0x00000040	/* Look at CCP packets */
-#define SC_CCP_UP	0x00000080	/* May send/recv compressed packets */
-#define SC_ENABLE_IP	0x00000100	/* IP packets may be exchanged */
-#define SC_COMP_RUN	0x00001000	/* compressor has been inited */
-#define SC_DECOMP_RUN	0x00002000	/* decompressor has been inited */
-#define SC_DEBUG	0x00010000	/* enable debug messages */
-#define SC_LOG_INPKT	0x00020000	/* log contents of good pkts recvd */
-#define SC_LOG_OUTPKT	0x00040000	/* log contents of pkts sent */
-#define SC_LOG_RAWIN	0x00080000	/* log all chars received */
-#define SC_LOG_FLUSH	0x00100000	/* log all chars flushed */
-#define	SC_MASK		0x0fE0ffff	/* bits that user can change */
-
-/* state bits */
-#define	SC_ESCAPED	0x80000000	/* saw a PPP_ESCAPE */
-#define	SC_FLUSH	0x40000000	/* flush input until next PPP_FLAG */
-#define SC_VJ_RESET	0x20000000	/* Need to reset the VJ decompressor */
-#define SC_XMIT_BUSY	0x10000000	/* ppp_write_wakeup is active */
-#define SC_RCV_ODDP	0x08000000	/* have rcvd char with odd parity */
-#define SC_RCV_EVNP	0x04000000	/* have rcvd char with even parity */
-#define SC_RCV_B7_1	0x02000000	/* have rcvd char with bit 7 = 1 */
-#define SC_RCV_B7_0	0x01000000	/* have rcvd char with bit 7 = 0 */
-#define SC_DC_FERROR	0x00800000	/* fatal decomp error detected */
-#define SC_DC_ERROR	0x00400000	/* non-fatal decomp error detected */
-
-/*
- * Ioctl definitions.
- */
-
-struct npioctl {
-    int		protocol;	/* PPP protocol, e.g. PPP_IP */
-    enum NPmode	mode;
-};
-
-/* Structure describing a CCP configuration option, for PPPIOCSCOMPRESS */
-struct ppp_option_data {
-	u_int8_t  *ptr;
-	u_int32_t length;
-	int	  transmit;
-};
-
-struct ifpppstatsreq {
-  struct ifreq	   b;
-  struct ppp_stats stats;			/* statistic information */
-};
-
-struct ifpppcstatsreq {
-  struct ifreq		b;
-  struct ppp_comp_stats stats;
-};
-
-#define ifr__name       b.ifr_ifrn.ifrn_name
-#define stats_ptr       b.ifr_ifru.ifru_data
-
-/*
- * Ioctl definitions.
- */
-
-#define	PPPIOCGFLAGS	_IOR('t', 90, int)	/* get configuration flags */
-#define	PPPIOCSFLAGS	_IOW('t', 89, int)	/* set configuration flags */
-#define	PPPIOCGASYNCMAP	_IOR('t', 88, int)	/* get async map */
-#define	PPPIOCSASYNCMAP	_IOW('t', 87, int)	/* set async map */
-#define	PPPIOCGUNIT	_IOR('t', 86, int)	/* get ppp unit number */
-#define	PPPIOCGRASYNCMAP _IOR('t', 85, int)	/* get receive async map */
-#define	PPPIOCSRASYNCMAP _IOW('t', 84, int)	/* set receive async map */
-#define	PPPIOCGMRU	_IOR('t', 83, int)	/* get max receive unit */
-#define	PPPIOCSMRU	_IOW('t', 82, int)	/* set max receive unit */
-#define	PPPIOCSMAXCID	_IOW('t', 81, int)	/* set VJ max slot ID */
-#define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm) /* get extended ACCM */
-#define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm) /* set extended ACCM */
-#define PPPIOCXFERUNIT	_IO('t', 78)		/* transfer PPP unit */
-#define PPPIOCSCOMPRESS	_IOW('t', 77, struct ppp_option_data)
-#define PPPIOCGNPMODE	_IOWR('t', 76, struct npioctl) /* get NP mode */
-#define PPPIOCSNPMODE	_IOW('t', 75, struct npioctl)  /* set NP mode */
-#define PPPIOCGDEBUG	_IOR('t', 65, int)	/* Read debug level */
-#define PPPIOCSDEBUG	_IOW('t', 64, int)	/* Set debug level */
-#define PPPIOCGIDLE	_IOR('t', 63, struct ppp_idle) /* get idle time */
-
-#define SIOCGPPPSTATS   (SIOCDEVPRIVATE + 0)
-#define SIOCGPPPVER     (SIOCDEVPRIVATE + 1)  /* NEVER change this!! */
-#define SIOCGPPPCSTATS  (SIOCDEVPRIVATE + 2)
-
-#if !defined(ifr_mtu)
-#define ifr_mtu	ifr_ifru.ifru_metric
-#endif
-
-__END_DECLS
-
-#endif /* net/if_ppp.h */
Index: sysdeps/mach/hurd/net/route.h
===================================================================
RCS file: sysdeps/mach/hurd/net/route.h
diff -N sysdeps/mach/hurd/net/route.h
--- sysdeps/mach/hurd/net/route.h	6 Jul 2001 04:55:59 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,141 +0,0 @@
-/* Copyright (C) 1997 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-/* Based on the 4.4BSD and Linux version of this file.  */
-
-#ifndef _NET_ROUTE_H
-
-#define _NET_ROUTE_H	1
-#include <features.h>
-
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-
-
-/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */
-struct rtentry
-  {
-    unsigned long int rt_pad1;
-    struct sockaddr rt_dst;		/* Target address.  */
-    struct sockaddr rt_gateway;		/* Gateway addr (RTF_GATEWAY).  */
-    struct sockaddr rt_genmask;		/* Target network mask (IP).  */
-    unsigned short int rt_flags;
-    short int rt_pad2;
-    unsigned long int rt_pad3;
-    unsigned char rt_tos;
-    unsigned char rt_class;
-    short int rt_pad4;
-    short int rt_metric;		/* +1 for binary compatibility!  */
-    char *rt_dev;			/* Forcing the device at add.  */
-    unsigned long int rt_mtu;		/* Per route MTU/Window.  */
-    unsigned long int rt_window;	/* Window clamping.  */
-    unsigned short int rt_irtt;		/* Initial RTT.  */
-  };
-/* Compatibility hack.  */
-#define rt_mss	rt_mtu
-
-
-struct in6_rtmsg
-  {
-    struct in6_addr rtmsg_dst;
-    struct in6_addr rtmsg_src;
-    struct in6_addr rtmsg_gateway;
-    u_int32_t rtmsg_type;
-    u_int16_t rtmsg_dst_len;
-    u_int16_t rtmsg_src_len;
-    u_int32_t rtmsg_metric;
-    unsigned long int rtmsg_info;
-    u_int32_t rtmsg_flags;
-    int rtmsg_ifindex;
-  };
-
-
-#define	RTF_UP		0x0001		/* Route usable.  */
-#define	RTF_GATEWAY	0x0002		/* Destination is a gateway.  */
-
-#define	RTF_HOST	0x0004		/* Host entry (net otherwise).  */
-#define RTF_REINSTATE	0x0008		/* Reinstate route after timeout.  */
-#define	RTF_DYNAMIC	0x0010		/* Created dyn. (by redirect).  */
-#define	RTF_MODIFIED	0x0020		/* Modified dyn. (by redirect).  */
-#define RTF_MTU		0x0040		/* Specific MTU for this route.  */
-#define RTF_MSS		RTF_MTU		/* Compatibility.  */
-#define RTF_WINDOW	0x0080		/* Per route window clamping.  */
-#define RTF_IRTT	0x0100		/* Initial round trip time.  */
-#define RTF_REJECT	0x0200		/* Reject route.  */
-#define	RTF_STATIC	0x0400		/* Manually injected route.  */
-#define	RTF_XRESOLVE	0x0800		/* External resolver.  */
-#define RTF_NOFORWARD   0x1000		/* Forwarding inhibited.  */
-#define RTF_THROW	0x2000		/* Go to next class.  */
-#define RTF_NOPMTUDISC  0x4000		/* Do not send packets with DF.  */
-
-/* for IPv6 */
-#define RTF_DEFAULT	0x00010000	/* default - learned via ND	*/
-#define RTF_ALLONLINK	0x00020000	/* fallback, no routers on link	*/
-#define RTF_ADDRCONF	0x00040000	/* addrconf route - RA		*/
-
-#define RTF_LINKRT	0x00100000	/* link specific - device match	*/
-#define RTF_NONEXTHOP	0x00200000	/* route with no nexthop	*/
-
-#define RTF_CACHE	0x01000000	/* cache entry			*/
-#define RTF_FLOW	0x02000000	/* flow significant route	*/
-#define RTF_POLICY	0x04000000	/* policy route			*/
-
-#define RTCF_VALVE	0x00200000
-#define RTCF_MASQ	0x00400000
-#define RTCF_NAT	0x00800000
-#define RTCF_DOREDIRECT 0x01000000
-#define RTCF_LOG	0x02000000
-#define RTCF_DIRECTSRC	0x04000000
-
-#define RTF_LOCAL	0x80000000
-#define RTF_INTERFACE	0x40000000
-#define RTF_MULTICAST	0x20000000
-#define RTF_BROADCAST	0x10000000
-#define RTF_NAT		0x08000000
-
-#define RTF_ADDRCLASSMASK	0xF8000000
-#define RT_ADDRCLASS(flags)	((__u_int32_t) flags >> 23)
-
-#define RT_TOS(tos)		((tos) & IPTOS_TOS_MASK)
-
-#define RT_LOCALADDR(flags)	((flags & RTF_ADDRCLASSMASK) \
-				 == (RTF_LOCAL|RTF_INTERFACE))
-
-#define RT_CLASS_UNSPEC		0
-#define RT_CLASS_DEFAULT	253
-
-#define RT_CLASS_MAIN		254
-#define RT_CLASS_LOCAL		255
-#define RT_CLASS_MAX		255
-
-
-#define RTMSG_ACK		NLMSG_ACK
-#define RTMSG_OVERRUN		NLMSG_OVERRUN
-
-#define RTMSG_NEWDEVICE		0x11
-#define RTMSG_DELDEVICE		0x12
-#define RTMSG_NEWROUTE		0x21
-#define RTMSG_DELROUTE		0x22
-#define RTMSG_NEWRULE		0x31
-#define RTMSG_DELRULE		0x32
-#define RTMSG_CONTROL		0x40
-
-#define RTMSG_AR_FAILED		0x51	/* Address Resolution failed.  */
-
-#endif /* net/route.h */
Index: sysdeps/unix/sysv/linux/Makefile
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/Makefile,v
retrieving revision 1.160
diff -u -p -r1.160 Makefile
--- sysdeps/unix/sysv/linux/Makefile	12 Jun 2008 22:40:01 -0000	1.160
+++ sysdeps/unix/sysv/linux/Makefile	9 Jan 2009 23:37:12 -0000
@@ -97,8 +97,7 @@ sysdep_routines += ntp_gettime
 endif
 
 ifeq ($(subdir),socket)
-sysdep_headers += net/if_ppp.h net/ppp-comp.h \
-		  net/ppp_defs.h net/if_arp.h net/route.h net/ethernet.h \
+sysdep_headers += net/ppp-comp.h net/ppp_defs.h \
 		  net/if_slip.h net/if_packet.h net/if_shaper.h
 sysdep_routines += cmsg_nxthdr sa_len
 endif
Index: sysdeps/unix/sysv/linux/net/ethernet.h
===================================================================
RCS file: sysdeps/unix/sysv/linux/net/ethernet.h
diff -N sysdeps/unix/sysv/linux/net/ethernet.h
--- sysdeps/unix/sysv/linux/net/ethernet.h	8 Apr 2008 00:04:37 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,84 +0,0 @@
-/* Copyright (C) 1997, 1999, 2001, 2008 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-/* Based on the FreeBSD version of this file. Curiously, that file
-   lacks a copyright in the header. */
-
-#ifndef __NET_ETHERNET_H
-#define __NET_ETHERNET_H 1
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <linux/if_ether.h>     /* IEEE 802.3 Ethernet constants */
-
-__BEGIN_DECLS
-
-/* This is a name for the 48 bit ethernet address available on many
-   systems.  */
-struct ether_addr
-{
-  u_int8_t ether_addr_octet[ETH_ALEN];
-} __attribute__ ((__packed__));
-
-/* 10Mb/s ethernet header */
-struct ether_header
-{
-  u_int8_t  ether_dhost[ETH_ALEN];	/* destination eth addr	*/
-  u_int8_t  ether_shost[ETH_ALEN];	/* source ether addr	*/
-  u_int16_t ether_type;		        /* packet type ID field	*/
-} __attribute__ ((__packed__));
-
-/* Ethernet protocol ID's */
-#define	ETHERTYPE_PUP		0x0200          /* Xerox PUP */
-#define ETHERTYPE_SPRITE	0x0500		/* Sprite */
-#define	ETHERTYPE_IP		0x0800		/* IP */
-#define	ETHERTYPE_ARP		0x0806		/* Address resolution */
-#define	ETHERTYPE_REVARP	0x8035		/* Reverse ARP */
-#define ETHERTYPE_AT		0x809B		/* AppleTalk protocol */
-#define ETHERTYPE_AARP		0x80F3		/* AppleTalk ARP */
-#define	ETHERTYPE_VLAN		0x8100		/* IEEE 802.1Q VLAN tagging */
-#define ETHERTYPE_IPX		0x8137		/* IPX */
-#define	ETHERTYPE_IPV6		0x86dd		/* IP protocol version 6 */
-#define ETHERTYPE_LOOPBACK	0x9000		/* used to test interfaces */
-
-
-#define	ETHER_ADDR_LEN	ETH_ALEN                 /* size of ethernet addr */
-#define	ETHER_TYPE_LEN	2                        /* bytes in type field */
-#define	ETHER_CRC_LEN	4                        /* bytes in CRC field */
-#define	ETHER_HDR_LEN	ETH_HLEN                 /* total octets in header */
-#define	ETHER_MIN_LEN	(ETH_ZLEN + ETHER_CRC_LEN) /* min packet length */
-#define	ETHER_MAX_LEN	(ETH_FRAME_LEN + ETHER_CRC_LEN) /* max packet length */
-
-/* make sure ethenet length is valid */
-#define	ETHER_IS_VALID_LEN(foo)	\
-	((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
-
-/*
- * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
- * (type-ETHERTYPE_TRAIL)*512 bytes of data followed
- * by an ETHER type (as given above) and then the (variable-length) header.
- */
-#define	ETHERTYPE_TRAIL		0x1000		/* Trailer packet */
-#define	ETHERTYPE_NTRAILER	16
-
-#define	ETHERMTU	ETH_DATA_LEN
-#define	ETHERMIN	(ETHER_MIN_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN)
-
-__END_DECLS
-
-#endif	/* net/ethernet.h */
Index: sysdeps/unix/sysv/linux/net/if_arp.h
===================================================================
RCS file: sysdeps/unix/sysv/linux/net/if_arp.h
diff -N sysdeps/unix/sysv/linux/net/if_arp.h
--- sysdeps/unix/sysv/linux/net/if_arp.h	6 Jan 2006 12:26:57 -0000	1.19
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,182 +0,0 @@
-/* Definitions for Address Resolution Protocol.
-   Copyright (C) 1997,1999,2001,2006 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-/* Based on the 4.4BSD and Linux version of this file.  */
-
-#ifndef _NET_IF_ARP_H
-
-#define _NET_IF_ARP_H 1
-#include <sys/cdefs.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-__BEGIN_DECLS
-
-/* Some internals from deep down in the kernel.  */
-#define MAX_ADDR_LEN	7
-
-
-/* This structure defines an ethernet arp header.  */
-
-/* ARP protocol opcodes. */
-#define	ARPOP_REQUEST	1		/* ARP request.  */
-#define	ARPOP_REPLY	2		/* ARP reply.  */
-#define	ARPOP_RREQUEST	3		/* RARP request.  */
-#define	ARPOP_RREPLY	4		/* RARP reply.  */
-#define	ARPOP_InREQUEST	8		/* InARP request.  */
-#define	ARPOP_InREPLY	9		/* InARP reply.  */
-#define	ARPOP_NAK	10		/* (ATM)ARP NAK.  */
-
-/* See RFC 826 for protocol description.  ARP packets are variable
-   in size; the arphdr structure defines the fixed-length portion.
-   Protocol type values are the same as those for 10 Mb/s Ethernet.
-   It is followed by the variable-sized fields ar_sha, arp_spa,
-   arp_tha and arp_tpa in that order, according to the lengths
-   specified.  Field names used correspond to RFC 826.  */
-
-struct arphdr
-  {
-    unsigned short int ar_hrd;		/* Format of hardware address.  */
-    unsigned short int ar_pro;		/* Format of protocol address.  */
-    unsigned char ar_hln;		/* Length of hardware address.  */
-    unsigned char ar_pln;		/* Length of protocol address.  */
-    unsigned short int ar_op;		/* ARP opcode (command).  */
-#if 0
-    /* Ethernet looks like this : This bit is variable sized
-       however...  */
-    unsigned char __ar_sha[ETH_ALEN];	/* Sender hardware address.  */
-    unsigned char __ar_sip[4];		/* Sender IP address.  */
-    unsigned char __ar_tha[ETH_ALEN];	/* Target hardware address.  */
-    unsigned char __ar_tip[4];		/* Target IP address.  */
-#endif
-  };
-
-
-/* ARP protocol HARDWARE identifiers. */
-#define ARPHRD_NETROM	0		/* From KA9Q: NET/ROM pseudo. */
-#define ARPHRD_ETHER 	1		/* Ethernet 10/100Mbps.  */
-#define	ARPHRD_EETHER	2		/* Experimental Ethernet.  */
-#define	ARPHRD_AX25	3		/* AX.25 Level 2.  */
-#define	ARPHRD_PRONET	4		/* PROnet token ring.  */
-#define	ARPHRD_CHAOS	5		/* Chaosnet.  */
-#define	ARPHRD_IEEE802	6		/* IEEE 802.2 Ethernet/TR/TB.  */
-#define	ARPHRD_ARCNET	7		/* ARCnet.  */
-#define	ARPHRD_APPLETLK	8		/* APPLEtalk.  */
-#define	ARPHRD_DLCI	15		/* Frame Relay DLCI.  */
-#define	ARPHRD_ATM	19		/* ATM.  */
-#define	ARPHRD_METRICOM	23		/* Metricom STRIP (new IANA id).  */
-#define ARPHRD_IEEE1394	24		/* IEEE 1394 IPv4 - RFC 2734.  */
-#define ARPHRD_EUI64		27		/* EUI-64.  */
-#define ARPHRD_INFINIBAND	32		/* InfiniBand.  */
-
-/* Dummy types for non ARP hardware */
-#define ARPHRD_SLIP	256
-#define ARPHRD_CSLIP	257
-#define ARPHRD_SLIP6	258
-#define ARPHRD_CSLIP6	259
-#define ARPHRD_RSRVD	260		/* Notional KISS type.  */
-#define ARPHRD_ADAPT	264
-#define ARPHRD_ROSE	270
-#define ARPHRD_X25	271		/* CCITT X.25.  */
-#define ARPHRD_HWX25	272		/* Boards with X.25 in firmware.  */
-#define ARPHRD_PPP	512
-#define ARPHRD_CISCO	513		/* Cisco HDLC.  */
-#define ARPHRD_HDLC	ARPHRD_CISCO
-#define ARPHRD_LAPB	516		/* LAPB.  */
-#define ARPHRD_DDCMP	517		/* Digital's DDCMP.  */
-#define	ARPHRD_RAWHDLC	518		/* Raw HDLC.  */
-
-#define ARPHRD_TUNNEL	768		/* IPIP tunnel.  */
-#define ARPHRD_TUNNEL6	769		/* IPIP6 tunnel.  */
-#define ARPHRD_FRAD	770             /* Frame Relay Access Device.  */
-#define ARPHRD_SKIP	771		/* SKIP vif.  */
-#define ARPHRD_LOOPBACK	772		/* Loopback device.  */
-#define ARPHRD_LOCALTLK 773		/* Localtalk device.  */
-#define ARPHRD_FDDI	774		/* Fiber Distributed Data Interface. */
-#define ARPHRD_BIF	775             /* AP1000 BIF.  */
-#define ARPHRD_SIT	776		/* sit0 device - IPv6-in-IPv4.  */
-#define ARPHRD_IPDDP	777		/* IP-in-DDP tunnel.  */
-#define ARPHRD_IPGRE	778		/* GRE over IP.  */
-#define ARPHRD_PIMREG	779		/* PIMSM register interface.  */
-#define ARPHRD_HIPPI	780		/* High Performance Parallel I'face. */
-#define ARPHRD_ASH	781		/* (Nexus Electronics) Ash.  */
-#define ARPHRD_ECONET	782		/* Acorn Econet.  */
-#define ARPHRD_IRDA	783		/* Linux-IrDA.  */
-#define ARPHRD_FCPP	784		/* Point to point fibrechanel.  */
-#define ARPHRD_FCAL	785		/* Fibrechanel arbitrated loop.  */
-#define ARPHRD_FCPL	786		/* Fibrechanel public loop.  */
-#define ARPHRD_FCFABRIC 787		/* Fibrechanel fabric.  */
-#define ARPHRD_IEEE802_TR 800		/* Magic type ident for TR.  */
-#define ARPHRD_IEEE80211 801		/* IEEE 802.11.  */
-#define ARPHRD_IEEE80211_PRISM 802	/* IEEE 802.11 + Prism2 header.  */
-#define ARPHRD_IEEE80211_RADIOTAP 803	/* IEEE 802.11 + radiotap header.  */
-
-#define ARPHRD_VOID	  0xFFFF	/* Void type, nothing is known.  */
-#define ARPHRD_NONE	  0xFFFE	/* Zero header length.  */
-
-
-/* ARP ioctl request.  */
-struct arpreq
-  {
-    struct sockaddr arp_pa;		/* Protocol address.  */
-    struct sockaddr arp_ha;		/* Hardware address.  */
-    int arp_flags;			/* Flags.  */
-    struct sockaddr arp_netmask;	/* Netmask (only for proxy arps).  */
-    char arp_dev[16];
-  };
-
-struct arpreq_old
-  {
-    struct sockaddr arp_pa;		/* Protocol address.  */
-    struct sockaddr arp_ha;		/* Hardware address.  */
-    int arp_flags;			/* Flags.  */
-    struct sockaddr arp_netmask;	/* Netmask (only for proxy arps).  */
-  };
-
-/* ARP Flag values.  */
-#define ATF_COM		0x02		/* Completed entry (ha valid).  */
-#define	ATF_PERM	0x04		/* Permanent entry.  */
-#define	ATF_PUBL	0x08		/* Publish entry.  */
-#define	ATF_USETRAILERS	0x10		/* Has requested trailers.  */
-#define ATF_NETMASK     0x20            /* Want to use a netmask (only
-					   for proxy entries).  */
-#define ATF_DONTPUB	0x40		/* Don't answer this addresses.  */
-#define ATF_MAGIC	0x80		/* Automatically added entry.  */
-
-
-/* Support for the user space arp daemon, arpd.  */
-#define ARPD_UPDATE	0x01
-#define ARPD_LOOKUP	0x02
-#define ARPD_FLUSH	0x03
-
-struct arpd_request
-  {
-    unsigned short int req;		/* Request type.  */
-    u_int32_t ip;			/* IP address of entry.  */
-    unsigned long int dev;		/* Device entry is tied to.  */
-    unsigned long int stamp;
-    unsigned long int updated;
-    unsigned char ha[MAX_ADDR_LEN];	/* Hardware address.  */
-  };
-
-__END_DECLS
-
-#endif	/* net/if_arp.h */
Index: sysdeps/unix/sysv/linux/net/if_ether.h
===================================================================
RCS file: sysdeps/unix/sysv/linux/net/if_ether.h
diff -N sysdeps/unix/sysv/linux/net/if_ether.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sysdeps/unix/sysv/linux/net/if_ether.h	9 Jan 2009 23:37:12 -0000
@@ -0,0 +1,6 @@
+#ifndef _NET_IF_ETHER_H
+#define _NET_IF_ETHER_H 1
+
+#include <linux/if_ether.h>
+
+#endif /* net/if_ether.h */
Index: sysdeps/unix/sysv/linux/net/if_ppp.h
===================================================================
RCS file: sysdeps/unix/sysv/linux/net/if_ppp.h
diff -N sysdeps/unix/sysv/linux/net/if_ppp.h
--- sysdeps/unix/sysv/linux/net/if_ppp.h	20 Aug 2002 21:50:05 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,169 +0,0 @@
-/*	From: if_ppp.h,v 1.3 1995/06/12 11:36:50 paulus Exp */
-
-/*
- * if_ppp.h - Point-to-Point Protocol definitions.
- *
- * Copyright (c) 1989 Carnegie Mellon University. 
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
- * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-/*
- *  ==FILEVERSION 960926==
- *
- *  NOTE TO MAINTAINERS:
- *     If you modify this file at all, please set the above date.
- *     if_ppp.h is shipped with a PPP distribution as well as with the kernel;
- *     if everyone increases the FILEVERSION number above, then scripts
- *     can do the right thing when deciding whether to install a new if_ppp.h
- *     file.  Don't change the format of that line otherwise, so the
- *     installation script can recognize it.
- */
-
-
-#ifndef __NET_IF_PPP_H
-#define __NET_IF_PPP_H 1
-
-#include <sys/types.h>
-#include <sys/cdefs.h>
-
-#include <net/if.h>
-#include <sys/ioctl.h>
-#include <net/ppp_defs.h>
-
-__BEGIN_DECLS
-
-/*
- * Packet sizes
- */
-
-#define	PPP_MTU		1500	/* Default MTU (size of Info field) */
-#define PPP_MAXMRU	65000	/* Largest MRU we allow */
-#define PPP_VERSION	"2.2.0"
-#define PPP_MAGIC	0x5002	/* Magic value for the ppp structure */
-#define PROTO_IPX	0x002b	/* protocol numbers */
-#define PROTO_DNA_RT    0x0027  /* DNA Routing */
-
-
-/*
- * Bit definitions for flags.
- */
-
-#define SC_COMP_PROT	0x00000001	/* protocol compression (output) */
-#define SC_COMP_AC	0x00000002	/* header compression (output) */
-#define	SC_COMP_TCP	0x00000004	/* TCP (VJ) compression (output) */
-#define SC_NO_TCP_CCID	0x00000008	/* disable VJ connection-id comp. */
-#define SC_REJ_COMP_AC	0x00000010	/* reject adrs/ctrl comp. on input */
-#define SC_REJ_COMP_TCP	0x00000020	/* reject TCP (VJ) comp. on input */
-#define SC_CCP_OPEN	0x00000040	/* Look at CCP packets */
-#define SC_CCP_UP	0x00000080	/* May send/recv compressed packets */
-#define SC_ENABLE_IP	0x00000100	/* IP packets may be exchanged */
-#define SC_COMP_RUN	0x00001000	/* compressor has been inited */
-#define SC_DECOMP_RUN	0x00002000	/* decompressor has been inited */
-#define SC_DEBUG	0x00010000	/* enable debug messages */
-#define SC_LOG_INPKT	0x00020000	/* log contents of good pkts recvd */
-#define SC_LOG_OUTPKT	0x00040000	/* log contents of pkts sent */
-#define SC_LOG_RAWIN	0x00080000	/* log all chars received */
-#define SC_LOG_FLUSH	0x00100000	/* log all chars flushed */
-#define	SC_MASK		0x0fE0ffff	/* bits that user can change */
-
-/* state bits */
-#define	SC_ESCAPED	0x80000000	/* saw a PPP_ESCAPE */
-#define	SC_FLUSH	0x40000000	/* flush input until next PPP_FLAG */
-#define SC_VJ_RESET	0x20000000	/* Need to reset the VJ decompressor */
-#define SC_XMIT_BUSY	0x10000000	/* ppp_write_wakeup is active */
-#define SC_RCV_ODDP	0x08000000	/* have rcvd char with odd parity */
-#define SC_RCV_EVNP	0x04000000	/* have rcvd char with even parity */
-#define SC_RCV_B7_1	0x02000000	/* have rcvd char with bit 7 = 1 */
-#define SC_RCV_B7_0	0x01000000	/* have rcvd char with bit 7 = 0 */
-#define SC_DC_FERROR	0x00800000	/* fatal decomp error detected */
-#define SC_DC_ERROR	0x00400000	/* non-fatal decomp error detected */
-
-/*
- * Ioctl definitions.
- */
-
-struct npioctl {
-    int		protocol;	/* PPP protocol, e.g. PPP_IP */
-    enum NPmode	mode;
-};
-
-/* Structure describing a CCP configuration option, for PPPIOCSCOMPRESS */
-struct ppp_option_data {
-	u_int8_t  *ptr;
-	u_int32_t length;
-	int	  transmit;
-};
-
-struct ifpppstatsreq {
-  struct ifreq	   b;
-  struct ppp_stats stats;			/* statistic information */
-};
-
-struct ifpppcstatsreq {
-  struct ifreq		b;
-  struct ppp_comp_stats stats;
-};
-
-#define ifr__name       b.ifr_ifrn.ifrn_name
-#define stats_ptr       b.ifr_ifru.ifru_data
-
-/*
- * Ioctl definitions.
- */
-
-#define	PPPIOCGFLAGS	_IOR('t', 90, int)	/* get configuration flags */
-#define	PPPIOCSFLAGS	_IOW('t', 89, int)	/* set configuration flags */
-#define	PPPIOCGASYNCMAP	_IOR('t', 88, int)	/* get async map */
-#define	PPPIOCSASYNCMAP	_IOW('t', 87, int)	/* set async map */
-#define	PPPIOCGUNIT	_IOR('t', 86, int)	/* get ppp unit number */
-#define	PPPIOCGRASYNCMAP _IOR('t', 85, int)	/* get receive async map */
-#define	PPPIOCSRASYNCMAP _IOW('t', 84, int)	/* set receive async map */
-#define	PPPIOCGMRU	_IOR('t', 83, int)	/* get max receive unit */
-#define	PPPIOCSMRU	_IOW('t', 82, int)	/* set max receive unit */
-#define	PPPIOCSMAXCID	_IOW('t', 81, int)	/* set VJ max slot ID */
-#define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm) /* get extended ACCM */
-#define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm) /* set extended ACCM */
-#define PPPIOCXFERUNIT	_IO('t', 78)		/* transfer PPP unit */
-#define PPPIOCSCOMPRESS	_IOW('t', 77, struct ppp_option_data)
-#define PPPIOCGNPMODE	_IOWR('t', 76, struct npioctl) /* get NP mode */
-#define PPPIOCSNPMODE	_IOW('t', 75, struct npioctl)  /* set NP mode */
-#define PPPIOCGDEBUG	_IOR('t', 65, int)	/* Read debug level */
-#define PPPIOCSDEBUG	_IOW('t', 64, int)	/* Set debug level */
-#define PPPIOCGIDLE	_IOR('t', 63, struct ppp_idle) /* get idle time */
-
-#define SIOCGPPPSTATS   (SIOCDEVPRIVATE + 0)
-#define SIOCGPPPVER     (SIOCDEVPRIVATE + 1)  /* NEVER change this!! */
-#define SIOCGPPPCSTATS  (SIOCDEVPRIVATE + 2)
-
-#if !defined(ifr_mtu)
-#define ifr_mtu	ifr_ifru.ifru_metric
-#endif
-
-__END_DECLS
-
-#endif /* net/if_ppp.h */
Index: sysdeps/unix/sysv/linux/net/route.h
===================================================================
RCS file: sysdeps/unix/sysv/linux/net/route.h
diff -N sysdeps/unix/sysv/linux/net/route.h
--- sysdeps/unix/sysv/linux/net/route.h	3 Oct 2002 08:54:21 -0000	1.8
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,145 +0,0 @@
-/* Copyright (C) 1997, 2002 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-/* Based on the 4.4BSD and Linux version of this file.  */
-
-#ifndef _NET_ROUTE_H
-#define _NET_ROUTE_H	1
-
-#include <features.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <bits/wordsize.h>
-
-
-/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */
-struct rtentry
-  {
-    unsigned long int rt_pad1;
-    struct sockaddr rt_dst;		/* Target address.  */
-    struct sockaddr rt_gateway;		/* Gateway addr (RTF_GATEWAY).  */
-    struct sockaddr rt_genmask;		/* Target network mask (IP).  */
-    unsigned short int rt_flags;
-    short int rt_pad2;
-    unsigned long int rt_pad3;
-    unsigned char rt_tos;
-    unsigned char rt_class;
-#if __WORDSIZE == 64
-    short int rt_pad4[3];
-#else
-    short int rt_pad4;
-#endif
-    short int rt_metric;		/* +1 for binary compatibility!  */
-    char *rt_dev;			/* Forcing the device at add.  */
-    unsigned long int rt_mtu;		/* Per route MTU/Window.  */
-    unsigned long int rt_window;	/* Window clamping.  */
-    unsigned short int rt_irtt;		/* Initial RTT.  */
-  };
-/* Compatibility hack.  */
-#define rt_mss	rt_mtu
-
-
-struct in6_rtmsg
-  {
-    struct in6_addr rtmsg_dst;
-    struct in6_addr rtmsg_src;
-    struct in6_addr rtmsg_gateway;
-    u_int32_t rtmsg_type;
-    u_int16_t rtmsg_dst_len;
-    u_int16_t rtmsg_src_len;
-    u_int32_t rtmsg_metric;
-    unsigned long int rtmsg_info;
-    u_int32_t rtmsg_flags;
-    int rtmsg_ifindex;
-  };
-
-
-#define	RTF_UP		0x0001		/* Route usable.  */
-#define	RTF_GATEWAY	0x0002		/* Destination is a gateway.  */
-
-#define	RTF_HOST	0x0004		/* Host entry (net otherwise).  */
-#define RTF_REINSTATE	0x0008		/* Reinstate route after timeout.  */
-#define	RTF_DYNAMIC	0x0010		/* Created dyn. (by redirect).  */
-#define	RTF_MODIFIED	0x0020		/* Modified dyn. (by redirect).  */
-#define RTF_MTU		0x0040		/* Specific MTU for this route.  */
-#define RTF_MSS		RTF_MTU		/* Compatibility.  */
-#define RTF_WINDOW	0x0080		/* Per route window clamping.  */
-#define RTF_IRTT	0x0100		/* Initial round trip time.  */
-#define RTF_REJECT	0x0200		/* Reject route.  */
-#define	RTF_STATIC	0x0400		/* Manually injected route.  */
-#define	RTF_XRESOLVE	0x0800		/* External resolver.  */
-#define RTF_NOFORWARD   0x1000		/* Forwarding inhibited.  */
-#define RTF_THROW	0x2000		/* Go to next class.  */
-#define RTF_NOPMTUDISC  0x4000		/* Do not send packets with DF.  */
-
-/* for IPv6 */
-#define RTF_DEFAULT	0x00010000	/* default - learned via ND	*/
-#define RTF_ALLONLINK	0x00020000	/* fallback, no routers on link	*/
-#define RTF_ADDRCONF	0x00040000	/* addrconf route - RA		*/
-
-#define RTF_LINKRT	0x00100000	/* link specific - device match	*/
-#define RTF_NONEXTHOP	0x00200000	/* route with no nexthop	*/
-
-#define RTF_CACHE	0x01000000	/* cache entry			*/
-#define RTF_FLOW	0x02000000	/* flow significant route	*/
-#define RTF_POLICY	0x04000000	/* policy route			*/
-
-#define RTCF_VALVE	0x00200000
-#define RTCF_MASQ	0x00400000
-#define RTCF_NAT	0x00800000
-#define RTCF_DOREDIRECT 0x01000000
-#define RTCF_LOG	0x02000000
-#define RTCF_DIRECTSRC	0x04000000
-
-#define RTF_LOCAL	0x80000000
-#define RTF_INTERFACE	0x40000000
-#define RTF_MULTICAST	0x20000000
-#define RTF_BROADCAST	0x10000000
-#define RTF_NAT		0x08000000
-
-#define RTF_ADDRCLASSMASK	0xF8000000
-#define RT_ADDRCLASS(flags)	((__u_int32_t) flags >> 23)
-
-#define RT_TOS(tos)		((tos) & IPTOS_TOS_MASK)
-
-#define RT_LOCALADDR(flags)	((flags & RTF_ADDRCLASSMASK) \
-				 == (RTF_LOCAL|RTF_INTERFACE))
-
-#define RT_CLASS_UNSPEC		0
-#define RT_CLASS_DEFAULT	253
-
-#define RT_CLASS_MAIN		254
-#define RT_CLASS_LOCAL		255
-#define RT_CLASS_MAX		255
-
-
-#define RTMSG_ACK		NLMSG_ACK
-#define RTMSG_OVERRUN		NLMSG_OVERRUN
-
-#define RTMSG_NEWDEVICE		0x11
-#define RTMSG_DELDEVICE		0x12
-#define RTMSG_NEWROUTE		0x21
-#define RTMSG_DELROUTE		0x22
-#define RTMSG_NEWRULE		0x31
-#define RTMSG_DELRULE		0x32
-#define RTMSG_CONTROL		0x40
-
-#define RTMSG_AR_FAILED		0x51	/* Address Resolution failed.  */
-
-#endif /* net/route.h */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]