view toynet.h @ 1098:46d83f3c7546 draft

Here's a revised cpio. I've reduced the use of malloc(), dropped an extra function call, and -at least in theory- allowed proper handling of non-regular files. (If we have a file we can't read, we still should record it when it's of a type where file content is ignored).
author Isaac Dunham <ibid.ag@gmail.com>
date Sun, 27 Oct 2013 19:11:07 -0500
parents aca8323e2690
children
line wrap: on
line source

// 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>