summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-12 15:00:15 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-12 15:00:15 +0000
commitdf49c60c9671e4a28e636964d744c1f59fb6cb68 (patch)
treeeabd85e189514ad412a35414ba5d483dcda3ef1f /cpukit/libnetworking
parentPurged as many egcs references as possible. (diff)
downloadrtems-df49c60c9671e4a28e636964d744c1f59fb6cb68.tar.bz2
Merged from 4.5.0-beta3a
Diffstat (limited to 'cpukit/libnetworking')
-rw-r--r--cpukit/libnetworking/Makefile.am6
-rw-r--r--cpukit/libnetworking/arpa/Makefile.am14
-rw-r--r--cpukit/libnetworking/kern/Makefile.am4
-rw-r--r--cpukit/libnetworking/lib/Makefile.am4
-rw-r--r--cpukit/libnetworking/lib/rtems_bsdnet_ntp.c6
-rw-r--r--cpukit/libnetworking/libc/Makefile.am26
-rw-r--r--cpukit/libnetworking/machine/Makefile.am19
-rw-r--r--cpukit/libnetworking/memory.h5
-rw-r--r--cpukit/libnetworking/net/Makefile.am24
-rw-r--r--cpukit/libnetworking/net/if_loop.c1
-rw-r--r--cpukit/libnetworking/netinet/Makefile.am34
-rw-r--r--cpukit/libnetworking/netinet/in.h3
-rw-r--r--cpukit/libnetworking/nfs/Makefile.am22
-rw-r--r--cpukit/libnetworking/rtems/Makefile.am25
-rw-r--r--cpukit/libnetworking/rtems/rtems_syscall.c17
-rw-r--r--cpukit/libnetworking/sys/Makefile.am16
-rw-r--r--cpukit/libnetworking/sys/un.h68
-rw-r--r--cpukit/libnetworking/vm/Makefile.am19
-rw-r--r--cpukit/libnetworking/wrapup/Makefile.am6
19 files changed, 249 insertions, 70 deletions
diff --git a/cpukit/libnetworking/Makefile.am b/cpukit/libnetworking/Makefile.am
index ce9cf6c399..7e41fce2b3 100644
--- a/cpukit/libnetworking/Makefile.am
+++ b/cpukit/libnetworking/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
@@ -9,7 +9,7 @@ SUBDIRS = include arpa kern machine sys vm lib libc net netinet nfs rtems \
rtems_servers pppd rtems_webserver wrapup
EXTRA_DIST = CHANGELOG bpfilter.h loop.h netdb.h opt_ipfw.h opt_mrouting.h \
- opt_tcpdebug.h poll.h resolv.h syslog.h
+ opt_tcpdebug.h poll.h resolv.h syslog.h memory.h
include $(top_srcdir)/../../../automake/subdirs.am
include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/arpa/Makefile.am b/cpukit/libnetworking/arpa/Makefile.am
index dba97b83d5..6ee4bfbe74 100644
--- a/cpukit/libnetworking/arpa/Makefile.am
+++ b/cpukit/libnetworking/arpa/Makefile.am
@@ -4,6 +4,18 @@
AUTOMAKE_OPTIONS = foreign 1.4
-EXTRA_DIST = ftp.h inet.h nameser.h nameser_compat.h telnet.h
+H_FILES = ftp.h inet.h nameser.h nameser_compat.h telnet.h
+
+noinst_HEADERS = $(H_FILES)
+
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/arpa $(H_FILES:%=$(PROJECT_INCLUDE)/arpa/%)
+
+$(PROJECT_INCLUDE)/arpa:
+ @$(mkinstalldirs) $@
+
+$(PROJECT_INCLUDE)/arpa/%.h: %.h
+ $(INSTALL_DATA) $< $@
+
+all-local: $(PREINSTALL_FILES)
include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/kern/Makefile.am b/cpukit/libnetworking/kern/Makefile.am
index aedc2bbadf..878f23612e 100644
--- a/cpukit/libnetworking/kern/Makefile.am
+++ b/cpukit/libnetworking/kern/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/cpukit/libnetworking/lib/Makefile.am b/cpukit/libnetworking/lib/Makefile.am
index 5f8d151e13..64e3a0e8f4 100644
--- a/cpukit/libnetworking/lib/Makefile.am
+++ b/cpukit/libnetworking/lib/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c b/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c
index 11b0cef63a..54974aa332 100644
--- a/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c
+++ b/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c
@@ -111,7 +111,7 @@ rtems_bsdnet_synchronize_ntp (int interval, rtems_task_priority priority)
printf ("Can't set socket receive timeout: %s", strerror (errno));
return -1;
}
- memset (&myAddr, sizeof myAddr, 0);
+ memset (&myAddr, 0, sizeof myAddr);
myAddr.sin_family = AF_INET;
myAddr.sin_port = htons (123);
myAddr.sin_addr.s_addr = htonl (INADDR_ANY);
@@ -126,14 +126,14 @@ rtems_bsdnet_synchronize_ntp (int interval, rtems_task_priority priority)
* server out there somewhere.
*/
if (rtems_bsdnet_ntpserver_count > 0) {
- memset (&farAddr, sizeof farAddr, 0);
+ memset (&farAddr, 0, sizeof farAddr);
farAddr.sin_family = AF_INET;
farAddr.sin_port = htons (123);
/*
* For now, try only the first server.
*/
farAddr.sin_addr = rtems_bsdnet_ntpserver[0];
- memset (&packet, sizeof packet, 0);
+ memset (&packet, 0, sizeof packet);
packet.li_vn_mode = (3 << 3) | 3; /* NTP version 3, client */
i = sendto (s, &packet, sizeof packet, 0, (struct sockaddr *)&farAddr, sizeof farAddr);
if (i != sizeof packet) {
diff --git a/cpukit/libnetworking/libc/Makefile.am b/cpukit/libnetworking/libc/Makefile.am
index 57b2b412f2..aca9052ee2 100644
--- a/cpukit/libnetworking/libc/Makefile.am
+++ b/cpukit/libnetworking/libc/Makefile.am
@@ -1,20 +1,21 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4 no-installman
LIBNAME = lib.a
LIB = $(ARCH)/$(LIBNAME)
-C_FILES = base64.c gethostbydns.c gethostbyht.c gethostbynis.c \
- gethostnamadr.c getnetbydns.c getnetbyht.c getnetbynis.c getnetnamadr.c \
- getproto.c getprotoent.c getprotoname.c getservbyname.c getservbyport.c \
- getservent.c herror.c inet_addr.c inet_lnaof.c inet_makeaddr.c \
- inet_network.c inet_ntoa.c inet_ntop.c inet_pton.c map_v4v6.c \
- nsap_addr.c ns_name.c ns_netint.c ns_parse.c ns_print.c ns_ttl.c \
- res_comp.c res_data.c res_debug.c res_init.c res_mkquery.c \
- res_mkupdate.c res_query.c res_send.c res_stubs.c res_update.c strsep.c
+C_FILES = addr2ascii.c ascii2addr.c base64.c gethostbydns.c gethostbyht.c \
+ gethostbynis.c gethostnamadr.c getnetbydns.c getnetbyht.c getnetbynis.c \
+ getnetnamadr.c getproto.c getprotoent.c getprotoname.c getservbyname.c \
+ getservbyport.c getservent.c herror.c inet_addr.c inet_lnaof.c \
+ inet_makeaddr.c inet_netof.c inet_network.c inet_ntoa.c inet_ntop.c \
+ inet_pton.c linkaddr.c map_v4v6.c nsap_addr.c ns_name.c ns_netint.c \
+ ns_parse.c ns_print.c ns_ttl.c res_comp.c res_data.c res_debug.c \
+ res_init.c res_mkquery.c res_mkupdate.c res_query.c res_send.c \
+ res_stubs.c res_update.c strsep.c
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
OBJS = $(C_O_FILES)
@@ -30,8 +31,7 @@ man_MANS = addr2ascii.3 byteorder.3 ethers.3 gethostbyname.3 getnetent.3 \
# Add local stuff here using +=
#
-AM_CPPFLAGS += -DNOPOLL -DNOSELECT
-AM_CPPFLAGS += -U__STRICT_ANSI__
+AM_CPPFLAGS += -DNOPOLL -DNOSELECT -U__STRICT_ANSI__
$(LIB): $(OBJS)
$(make-library)
@@ -47,7 +47,7 @@ EXTRA_DIST = addr2ascii.3 addr2ascii.c ascii2addr.c base64.c byteorder.3 \
getprotoent.c getprotoname.c getservbyname.c getservbyport.c \
getservent.3 getservent.c herror.c inet.3 inet_addr.c inet_lnaof.c \
inet_makeaddr.c inet_net_ntop.c inet_net_pton.c inet_neta.c inet_netof.c \
- inet_network.c inet_ntoa.c inet_ntop.c inet_pton.c iso_addr.3 iso_addr.c \
+ inet_netof.c inet_network.c inet_ntoa.c inet_ntop.c inet_pton.c map_v4v6.c \
linkaddr.3 linkaddr.c map_v4v6.c ns.3 ns_addr.c ns_name.c ns_netint.c \
ns_ntoa.c ns_parse.c ns_print.c ns_ttl.c nsap_addr.c rcmd.3 rcmd.c \
recv.c res_comp.c res_config.h res_data.c res_debug.c res_init.c \
diff --git a/cpukit/libnetworking/machine/Makefile.am b/cpukit/libnetworking/machine/Makefile.am
index 11e23bf86c..e703d0b82b 100644
--- a/cpukit/libnetworking/machine/Makefile.am
+++ b/cpukit/libnetworking/machine/Makefile.am
@@ -1,10 +1,23 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
-EXTRA_DIST = conf.h cpu.h cpufunc.h endian.h in_cksum.h limits.h param.h \
+H_FILES = conf.h cpu.h cpufunc.h endian.h in_cksum.h limits.h param.h \
types.h vmparam.h
+noinst_HEADERS = $(H_FILES)
+
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/machine \
+ $(H_FILES:%=$(PROJECT_INCLUDE)/machine/%)
+
+$(PROJECT_INCLUDE)/machine:
+ @$(mkinstalldirs) $@
+
+$(PROJECT_INCLUDE)/machine/%.h: %.h
+ $(INSTALL_DATA) $< $@
+
+all-local: $(PREINSTALL_FILES)
+
include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/memory.h b/cpukit/libnetworking/memory.h
index e69de29bb2..7ef4cda388 100644
--- a/cpukit/libnetworking/memory.h
+++ b/cpukit/libnetworking/memory.h
@@ -0,0 +1,5 @@
+/*
+ * Dummy include file for FreeBSD routines
+ */
+
+#include <string.h>
diff --git a/cpukit/libnetworking/net/Makefile.am b/cpukit/libnetworking/net/Makefile.am
index d965963974..eda18a9c76 100644
--- a/cpukit/libnetworking/net/Makefile.am
+++ b/cpukit/libnetworking/net/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -26,12 +26,24 @@ AM_CPPFLAGS += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
$(LIB): $(OBJS)
$(make-library)
-all-local: $(ARCH) $(OBJS) $(LIB)
+all-local: $(PREINSTALL_FILES) $(ARCH) $(OBJS) $(LIB)
.PRECIOUS: $(LIB)
-EXTRA_DIST = bpf.h ethernet.h if.c if.h if_arp.h if_dl.h if_ethersubr.c \
- if_llc.h if_loop.c if_ppp.h if_types.h netisr.h ppp-comp.h ppp_defs.h \
- radix.c radix.h raw_cb.c raw_cb.h raw_usrreq.c route.c route.h rtsock.c
+EXTRA_DIST = if.c if_ethersubr.c if_loop.c \
+ radix.c raw_cb.c raw_usrreq.c route.c rtsock.c
+
+H_FILES = bpf.h ethernet.h if.h if_arp.h if_dl.h if_llc.h if_ppp.h if_types.h \
+ netisr.h ppp-comp.h ppp_defs.h radix.h raw_cb.h route.h
+
+noinst_HEADERS = $(H_FILES)
+
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/net $(H_FILES:%=$(PROJECT_INCLUDE)/net/%)
+
+$(PROJECT_INCLUDE)/net:
+ @$(mkinstalldirs) $@
+
+$(PROJECT_INCLUDE)/net/%.h: %.h
+ $(INSTALL_DATA) $< $@
include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/net/if_loop.c b/cpukit/libnetworking/net/if_loop.c
index 3823c28744..345730c729 100644
--- a/cpukit/libnetworking/net/if_loop.c
+++ b/cpukit/libnetworking/net/if_loop.c
@@ -118,6 +118,7 @@ rtems_bsdnet_loopattach(dummy)
ifp->if_type = IFT_LOOP;
ifp->if_hdrlen = 0;
ifp->if_addrlen = 0;
+ ifp->if_snd.ifq_maxlen = ifqmaxlen;
if_attach(ifp);
#if NBPFILTER > 0
bpfattach(ifp, DLT_NULL, sizeof(u_int));
diff --git a/cpukit/libnetworking/netinet/Makefile.am b/cpukit/libnetworking/netinet/Makefile.am
index f967b65cd7..dedeb31ac7 100644
--- a/cpukit/libnetworking/netinet/Makefile.am
+++ b/cpukit/libnetworking/netinet/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -28,16 +28,30 @@ AM_CPPFLAGS += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
$(LIB): $(OBJS)
$(make-library)
-all-local: $(ARCH) $(OBJS) $(LIB)
+all-local: $(PREINSTALL_FILES) $(ARCH) $(OBJS) $(LIB)
.PRECIOUS: $(LIB)
-EXTRA_DIST = icmp_var.h if_ether.c if_ether.h igmp.c igmp.h igmp_var.h in.c \
- in.h in_cksum.c in_cksum_i386.c in_cksum_m68k.c in_cksum_powerpc.c \
- in_pcb.c in_pcb.h in_proto.c in_rmx.c in_systm.h in_var.h ip.h \
- ip_divert.c ip_fw.c ip_fw.h ip_icmp.c ip_icmp.h ip_input.c ip_mroute.c \
- ip_mroute.h ip_output.c ip_var.h raw_ip.c tcp.h tcp_debug.c tcp_debug.h \
- tcp_fsm.h tcp_input.c tcp_output.c tcp_seq.h tcp_subr.c tcp_timer.c \
- tcp_timer.h tcp_usrreq.c tcp_var.h tcpip.h udp.h udp_usrreq.c udp_var.h
+EXTRA_DIST = if_ether.c igmp.c igmp_var.h in.c in_cksum.c in_cksum_i386.c \
+ in_cksum_m68k.c in_cksum_powerpc.c in_pcb.c in_proto.c in_rmx.c \
+ ip_divert.c ip_fw.c ip_icmp.c ip_input.c ip_mroute.c ip_output.c \
+ raw_ip.c tcp_debug.c tcp_input.c tcp_output.c tcp_subr.c tcp_timer.c \
+ tcp_usrreq.c udp_usrreq.c
+
+H_FILES = icmp_var.h if_ether.h igmp.h igmp_var.h in.h \
+ in_pcb.h in_systm.h in_var.h ip.h ip_fw.h ip_icmp.h \
+ ip_mroute.h ip_var.h tcp.h tcp_debug.h tcp_fsm.h tcp_seq.h \
+ tcp_timer.h tcp_var.h tcpip.h udp.h udp_var.h
+
+noinst_HEADERS = $(H_FILES)
+
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/netinet \
+ $(H_FILES:%=$(PROJECT_INCLUDE)/netinet/%)
+
+$(PROJECT_INCLUDE)/netinet:
+ @$(mkinstalldirs) $@
+
+$(PROJECT_INCLUDE)/netinet/%.h: %.h
+ $(INSTALL_DATA) $< $@
include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/netinet/in.h b/cpukit/libnetworking/netinet/in.h
index ba3cbb21cc..36d2d4e867 100644
--- a/cpukit/libnetworking/netinet/in.h
+++ b/cpukit/libnetworking/netinet/in.h
@@ -255,6 +255,9 @@ struct in_addr {
#define INADDR_MAX_LOCAL_GROUP (u_long)0xe00000ff /* 224.0.0.255 */
#define IN_LOOPBACKNET 127 /* official! */
+#ifndef INADDR_LOOPBACK
+#define INADDR_LOOPBACK (u_long)0x7F000001 /* 127.0.0.1 */
+#endif
/*
* Socket address, internet style.
diff --git a/cpukit/libnetworking/nfs/Makefile.am b/cpukit/libnetworking/nfs/Makefile.am
index 51184e47ae..9a8b43e31a 100644
--- a/cpukit/libnetworking/nfs/Makefile.am
+++ b/cpukit/libnetworking/nfs/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -25,11 +25,23 @@ AM_CPPFLAGS += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
$(LIB): $(OBJS)
$(make-library)
-all-local: $(ARCH) $(OBJS) $(LIB)
+all-local: $(PREINSTALL_FILES) $(ARCH) $(OBJS) $(LIB)
.PRECIOUS: $(LIB)
-EXTRA_DIST = bootp_subr.c krpc.h nfs.h nfsdiskless.h nfsproto.h rpcv2.h \
- xdr_subs.h
+EXTRA_DIST = bootp_subr.c
+
+H_FILES = krpc.h nfs.h nfsdiskless.h nfsproto.h rpcv2.h xdr_subs.h
+
+noinst_HEADERS = $(H_FILES)
+
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/nfs $(H_FILES:%=$(PROJECT_INCLUDE)/nfs/%)
+
+$(PROJECT_INCLUDE)/nfs:
+ @$(mkinstalldirs) $@
+
+$(PROJECT_INCLUDE)/nfs/%.h: %.h
+ $(INSTALL_DATA) $< $@
+
include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/rtems/Makefile.am b/cpukit/libnetworking/rtems/Makefile.am
index 28df4629c4..dfcac20c4b 100644
--- a/cpukit/libnetworking/rtems/Makefile.am
+++ b/cpukit/libnetworking/rtems/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -15,6 +15,19 @@ C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
OBJS = $(C_O_FILES)
+H_FILES = rtems_bsdnet.h rtems_bsdnet_internal.h tftp.h
+
+noinst_HEADERS = $(H_FILES)
+
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems $(H_FILES:%=$(PROJECT_INCLUDE)/rtems/%)
+
+$(PROJECT_INCLUDE)/rtems:
+ @$(mkinstalldirs) $@
+
+$(PROJECT_INCLUDE)/rtems/%.h: %.h
+ $(INSTALL_DATA) $< $@
+
+
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../automake/lib.am
@@ -28,14 +41,12 @@ AM_CPPFLAGS += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
$(LIB): $(OBJS)
$(make-library)
-all-local: $(ARCH) $(OBJS) $(LIB)
+all-local: $(PREINSTALL_FILES) $(ARCH) $(OBJS) $(LIB)
.PRECIOUS: $(LIB)
-EXTRA_DIST = issetugid.c rtems_bootp.c rtems_bsdnet.h \
- rtems_bsdnet_internal.h rtems_glue.c rtems_select.c rtems_showicmpstat.c \
+EXTRA_DIST = issetugid.c rtems_bootp.c rtems_glue.c rtems_select.c rtems_showicmpstat.c \
rtems_showifstat.c rtems_showipstat.c rtems_showmbuf.c rtems_showroute.c \
- rtems_showtcpstat.c rtems_showudpstat.c rtems_syscall.c sghostname.c \
- tftp.h
+ rtems_showtcpstat.c rtems_showudpstat.c rtems_syscall.c sghostname.c
include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/rtems/rtems_syscall.c b/cpukit/libnetworking/rtems/rtems_syscall.c
index 05217f7212..d04ae95afb 100644
--- a/cpukit/libnetworking/rtems/rtems_syscall.c
+++ b/cpukit/libnetworking/rtems/rtems_syscall.c
@@ -136,11 +136,8 @@ connect (int s, struct sockaddr *name, int namelen)
return -1;
}
error = soconnect (so, nam);
- if (error) {
- errno = error;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
+ if (error)
+ goto bad;
if ((so->so_state & SS_NBIO) && (so->so_state & SS_ISCONNECTING)) {
m_freem(nam);
errno = EINPROGRESS;
@@ -148,15 +145,20 @@ connect (int s, struct sockaddr *name, int namelen)
return -1;
}
while ((so->so_state & SS_ISCONNECTING) && so->so_error == 0) {
- so->so_error = soconnsleep (so);
+ error = soconnsleep (so);
+ if (error)
+ break;
}
if (error == 0) {
error = so->so_error;
so->so_error = 0;
}
+ bad:
so->so_state &= ~SS_ISCONNECTING;
m_freem (nam);
- if (error == 0)
+ if (error)
+ errno = error;
+ else
ret = 0;
rtems_bsdnet_semaphore_release ();
return ret;
@@ -605,6 +607,7 @@ getpeersockname (int s, struct sockaddr *name, int *namelen, int pflag)
else
error = (*so->so_proto->pr_usrreqs->pru_sockaddr)(so, m);
if (error) {
+ m_freem(m);
errno = error;
rtems_bsdnet_semaphore_release ();
return -1;
diff --git a/cpukit/libnetworking/sys/Makefile.am b/cpukit/libnetworking/sys/Makefile.am
index 3fe88aff59..07888ddcc7 100644
--- a/cpukit/libnetworking/sys/Makefile.am
+++ b/cpukit/libnetworking/sys/Makefile.am
@@ -4,10 +4,22 @@
AUTOMAKE_OPTIONS = foreign 1.4
-EXTRA_DIST = buf.h callout.h cdefs.h conf.h domain.h filio.h ioccom.h \
+H_FILES = buf.h callout.h cdefs.h conf.h domain.h filio.h ioccom.h \
ioctl.h kernel.h libkern.h malloc.h mbuf.h mount.h param.h proc.h \
protosw.h queue.h reboot.h resourcevar.h rtprio.h select.h signalvar.h \
socket.h socketvar.h sockio.h sysctl.h syslimits.h syslog.h systm.h \
- ttycom.h ttydefaults.h ucred.h uio.h
+ ttycom.h ttydefaults.h ucred.h uio.h un.h
+
+noinst_HEADERS = $(H_FILES)
+
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/sys $(H_FILES:%=$(PROJECT_INCLUDE)/sys/%)
+
+$(PROJECT_INCLUDE)/sys:
+ @$(mkinstalldirs) $@
+
+$(PROJECT_INCLUDE)/sys/%.h: %.h
+ $(INSTALL_DATA) $< $@
+
+all-local: $(PREINSTALL_FILES)
include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/sys/un.h b/cpukit/libnetworking/sys/un.h
index e69de29bb2..d742bb7d5d 100644
--- a/cpukit/libnetworking/sys/un.h
+++ b/cpukit/libnetworking/sys/un.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * 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. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. 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 THE REGENTS 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 REGENTS 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.
+ *
+ * @(#)un.h 8.3 (Berkeley) 2/19/95
+ * $FreeBSD: src/sys/sys/un.h,v 1.17 1999/12/29 04:24:49 peter Exp $
+ */
+
+#ifndef _SYS_UN_H_
+#define _SYS_UN_H_
+
+/*
+ * Definitions for UNIX IPC domain.
+ */
+struct sockaddr_un {
+ u_char sun_len; /* sockaddr len including null */
+ u_char sun_family; /* AF_UNIX */
+ char sun_path[104]; /* path name (gag) */
+};
+
+#ifdef _KERNEL
+struct mbuf;
+struct socket;
+
+int uipc_usrreq __P((struct socket *so, int req, struct mbuf *m,
+ struct mbuf *nam, struct mbuf *control));
+int unp_connect2 __P((struct socket *so, struct socket *so2));
+void unp_dispose __P((struct mbuf *m));
+int unp_externalize __P((struct mbuf *rights));
+void unp_init __P((void));
+extern struct pr_usrreqs uipc_usrreqs;
+#else /* !_KERNEL */
+
+/* actual length of an initialized sockaddr_un */
+#define SUN_LEN(su) \
+ (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
+
+#endif /* _KERNEL */
+
+#endif /* !_SYS_UN_H_ */
diff --git a/cpukit/libnetworking/vm/Makefile.am b/cpukit/libnetworking/vm/Makefile.am
index 3f307c7cfb..b72458f6cc 100644
--- a/cpukit/libnetworking/vm/Makefile.am
+++ b/cpukit/libnetworking/vm/Makefile.am
@@ -1,9 +1,22 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
-EXTRA_DIST = vm.h vm_extern.h vm_kern.h vm_param.h
+H_FILES = vm.h vm_extern.h vm_kern.h vm_param.h
+
+noinst_HEADERS = $(H_FILES)
+
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/vm \
+ $(H_FILES:%=$(PROJECT_INCLUDE)/vm/%)
+
+$(PROJECT_INCLUDE)/vm:
+ @$(mkinstalldirs) $@
+
+$(PROJECT_INCLUDE)/vm/%.h: %.h
+ $(INSTALL_DATA) $< $@
+
+all-local: $(PREINSTALL_FILES)
include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/wrapup/Makefile.am b/cpukit/libnetworking/wrapup/Makefile.am
index 5d2a73a05e..5553252d11 100644
--- a/cpukit/libnetworking/wrapup/Makefile.am
+++ b/cpukit/libnetworking/wrapup/Makefile.am
@@ -1,12 +1,12 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
if HAS_POSIX
POSIX_PIECES = rtems_webserver
-endif
+endif
NET_O_PIECES = kern lib libc net netinet nfs rtems rtems_servers pppd \
$(POSIX_PIECES)