Deleted Added
sdiff udiff text old ( 53024 ) new ( 80486 )
full compact
1/*
2 * (C)opyright 1992-1998 Darren Reed. (from tcplog)
3 *
4 * Redistribution and use in source and binary forms are permitted
5 * provided that this notice is preserved and due credit is given
6 * to the original author and the contributors.
7 */
8
9#include <stdio.h>
10#include <netdb.h>
11#include <ctype.h>
12#include <fcntl.h>
13#include <signal.h>
14#include <errno.h>

--- 20 unchanged lines hidden (view full) ---

35#include <netinet/udp.h>
36#include <netinet/udp_var.h>
37#include <netinet/tcp.h>
38
39#include "ipsend.h"
40
41#if !defined(lint)
42static const char sccsid[] = "@(#)sdlpi.c 1.3 10/30/95 (C)1995 Darren Reed";
43static const char rcsid[] = "@(#)$Id: sdlpi.c,v 2.1 1999/08/04 17:31:13 darrenr Exp $";
44#endif
45
46#define CHUNKSIZE 8192
47#define BUFSPACE (4*CHUNKSIZE)
48
49
50/*
51 * Be careful to only include those defined in the flags option for the
52 * interface are included in the header size.
53 */
54int initdevice(device, sport, tout)
55char *device;
56int sport, tout;
57{
58 char devname[16], *s, buf[256];
59 int i, fd;
60
61 (void) sprintf(devname, "/dev/%s", device);
62
63 s = devname + 5;
64 while (*s && !isdigit(*s))
65 s++;
66 if (!*s)
67 {
68 fprintf(stderr, "bad device name %s\n", devname);
69 exit(-1);

--- 64 unchanged lines hidden ---