view lib/net.c @ 900:edd8e6fd418d

Attached is a pretty simple implementation of lsub. It doesn't implement any of the flags/options, but does the raw output.
author Andre Renaud <andre@bluewatersys.com>
date Tue, 14 May 2013 17:42:11 -0500
parents aca8323e2690
children e11684e3bbc5
line wrap: on
line source

#include "toys.h"
#include "toynet.h"

int xsocket(int domain, int type, int protocol)
{
  int fd = socket(domain, type, protocol);

  if (fd < 0) perror_exit("socket %x %x", type, protocol);
  return fd;
}