2 * (C)opyright 1997-1998 Darren Reed. (from tcplog)
4 * See the IPFILTER.LICENCE file for details on licencing.
10 #include <sys/types.h>
11 #include <sys/param.h>
12 #include <sys/socket.h>
14 #include <sys/ioctl.h>
17 int initdevice(device
, sport
, tout
)
23 if ((fd
= socket(AF_DLI
, SOCK_RAW
, 0)) == -1)
30 * output an IP packet onto a fd opened for /dev/bpf
32 int sendip(fd
, pkt
, len
)
36 if (send(fd
, pkt
, len
, 0) == -1)
51 if ((s
= (char *)malloc(strlen(str
) + 1)))
52 return strcpy(s
, str
);
56 * (C)opyright 1997 Darren Reed. (from tcplog)
58 * Redistribution and use in source and binary forms are permitted
59 * provided that this notice is preserved and due credit is given
60 * to the original author and the contributors.
66 #include <sys/types.h>
67 #include <sys/param.h>
68 #include <sys/socket.h>
70 #include <sys/ioctl.h>
73 int initdevice(device
, sport
, tout
)
79 if ((fd
= socket(AF_DLI
, SOCK_RAW
, 0)) == -1)
86 * output an IP packet onto a fd opened for /dev/bpf
88 int sendip(fd
, pkt
, len
)
92 if (send(fd
, pkt
, len
, 0) == -1)
107 if ((s
= (char *)malloc(strlen(str
) + 1)))
108 return strcpy(s
, str
);