changeset 1104:e11684e3bbc5

Merge toynet.h into toys.h: musl supports it and micromanaging uClibc config options isn't very interesting anymore.
author Rob Landley <rob@landley.net>
date Sat, 02 Nov 2013 14:24:33 -0500
parents bc09fa708d94
children 1bca28705a87
files lib/net.c toynet.h toys.h toys/other/netcat.c toys/other/vconfig.c toys/pending/dhcp.c toys/pending/dhcpd.c toys/pending/ifconfig.c toys/pending/nbd_client.c toys/pending/netstat.c toys/pending/route.c toys/pending/syslogd.c toys/pending/traceroute.c
diffstat 13 files changed, 11 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/lib/net.c	Sat Nov 02 11:07:25 2013 -0500
+++ b/lib/net.c	Sat Nov 02 14:24:33 2013 -0500
@@ -1,5 +1,4 @@
 #include "toys.h"
-#include "toynet.h"
 
 int xsocket(int domain, int type, int protocol)
 {
--- a/toynet.h	Sat Nov 02 11:07:25 2013 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-// Included after toys.h, for network stuff.  Some build environments
-// don't include network support, so we shouldn't include it unless we're
-// going to build it.
-
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <poll.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-
--- a/toys.h	Sat Nov 02 11:07:25 2013 -0500
+++ b/toys.h	Sat Nov 02 14:24:33 2013 -0500
@@ -55,6 +55,17 @@
 #include <wchar.h>
 #include <wctype.h>
 
+// Networking stuff
+
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <poll.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+
 #include "lib/lib.h"
 #include "toys/e2fs.h"
 
--- a/toys/other/netcat.c	Sat Nov 02 11:07:25 2013 -0500
+++ b/toys/other/netcat.c	Sat Nov 02 14:24:33 2013 -0500
@@ -42,7 +42,6 @@
 
 #define FOR_netcat
 #include "toys.h"
-#include "toynet.h"
 
 GLOBALS(
   char *filename;        // -f read from filename instead of network
--- a/toys/other/vconfig.c	Sat Nov 02 11:07:25 2013 -0500
+++ b/toys/other/vconfig.c	Sat Nov 02 14:24:33 2013 -0500
@@ -24,7 +24,6 @@
 */
 
 #include "toys.h"
-#include "toynet.h"
 #include <linux/if_vlan.h>
 #include <linux/sockios.h>
 
--- a/toys/pending/dhcp.c	Sat Nov 02 11:07:25 2013 -0500
+++ b/toys/pending/dhcp.c	Sat Nov 02 14:24:33 2013 -0500
@@ -47,7 +47,6 @@
 
 #define FOR_dhcp
 #include "toys.h"
-#include "toynet.h"
 
 // TODO: headers not in posix:
 #include <netinet/ip.h>
--- a/toys/pending/dhcpd.c	Sat Nov 02 11:07:25 2013 -0500
+++ b/toys/pending/dhcpd.c	Sat Nov 02 14:24:33 2013 -0500
@@ -25,7 +25,6 @@
 #define FOR_dhcpd
 
 #include "toys.h"
-#include "toynet.h"
 #include <linux/sockios.h> 
 #include <linux/if_ether.h>
 
--- a/toys/pending/ifconfig.c	Sat Nov 02 11:07:25 2013 -0500
+++ b/toys/pending/ifconfig.c	Sat Nov 02 14:24:33 2013 -0500
@@ -30,7 +30,6 @@
 
 #define FOR_ifconfig
 #include "toys.h"
-#include "toynet.h"
 
 #include <net/if_arp.h>
 #include <net/ethernet.h>
--- a/toys/pending/nbd_client.c	Sat Nov 02 11:07:25 2013 -0500
+++ b/toys/pending/nbd_client.c	Sat Nov 02 14:24:33 2013 -0500
@@ -32,7 +32,6 @@
 
 #define FOR_nbd_client
 #include "toys.h"
-#include "toynet.h"
 
 #define NBD_SET_SOCK          _IO(0xab, 0)
 #define NBD_SET_BLKSIZE       _IO(0xab, 1)
--- a/toys/pending/netstat.c	Sat Nov 02 11:07:25 2013 -0500
+++ b/toys/pending/netstat.c	Sat Nov 02 14:24:33 2013 -0500
@@ -29,7 +29,6 @@
 
 #define FOR_netstat
 #include "toys.h"
-#include "toynet.h"
 #include <net/route.h>
 
 typedef union _iaddr {
--- a/toys/pending/route.c	Sat Nov 02 11:07:25 2013 -0500
+++ b/toys/pending/route.c	Sat Nov 02 14:24:33 2013 -0500
@@ -21,7 +21,6 @@
 
 #define FOR_route
 #include "toys.h"
-#include "toynet.h"
 #include <net/route.h>
 #include <sys/param.h>
 
--- a/toys/pending/syslogd.c	Sat Nov 02 11:07:25 2013 -0500
+++ b/toys/pending/syslogd.c	Sat Nov 02 14:24:33 2013 -0500
@@ -35,7 +35,6 @@
 #define FOR_syslogd
 #define SYSLOG_NAMES
 #include "toys.h"
-#include "toynet.h"
 
 // UNIX Sockets for listening
 struct unsocks {
--- a/toys/pending/traceroute.c	Sat Nov 02 11:07:25 2013 -0500
+++ b/toys/pending/traceroute.c	Sat Nov 02 14:24:33 2013 -0500
@@ -36,7 +36,6 @@
 */
 #define FOR_traceroute
 #include "toys.h"
-#include "toynet.h"
 #include <netinet/udp.h>
 #include <netinet/ip_icmp.h>