~ubuntu-branches/ubuntu/intrepid/djbdns/intrepid-security

« back to all changes in this revision

Viewing changes to socket_tcp.c

  • Committer: Bazaar Package Importer
  • Author(s): Gerrit Pape
  • Date: 2008-03-02 23:22:04 UTC
  • Revision ID: james.westby@ubuntu.com-20080302232204-wa3owprcpeiyu8kj
Tags: upstream-1.05
ImportĀ upstreamĀ versionĀ 1.05

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <sys/types.h>
 
2
#include <sys/param.h>
 
3
#include <sys/socket.h>
 
4
#include <netinet/in.h>
 
5
#include <unistd.h>
 
6
#include "ndelay.h"
 
7
#include "socket.h"
 
8
 
 
9
int socket_tcp(void)
 
10
{
 
11
  int s;
 
12
 
 
13
  s = socket(AF_INET,SOCK_STREAM,0);
 
14
  if (s == -1) return -1;
 
15
  if (ndelay_on(s) == -1) { close(s); return -1; }
 
16
  return s;
 
17
}