pcap-dbus.c - D-Bus capture support
pcap-dbus.h - D-Bus capture support
pcap-dlpi.c - Data Link Provider Interface support
- pcap-dos.c - removed in 2023, after libpcap 1.9
+ pcap-dos.c - removed in 2023, after libpcap 1.10
pcap-dpdk.c - DPDK device support
pcap-dpdk.h - DPDK device support
pcap-enet.c - enet support
#include <stdarg.h>
#include <stdio.h>
-#ifdef MSDOS
-#include "pcap-dos.h"
-#endif
-
#include "pcap-int.h"
#include "extract.h"
abort(); /* mask is zero */
return (u_int)bit;
}
-#elif (defined(MSDOS) && defined(__WATCOMC__)) || defined(STRINGS_H_DECLARES_FFS)
- /*
- * MS-DOS with Watcom C, which has <strings.h> and declares ffs() there,
- * or some other platform (UN*X conforming to a sufficient recent version
- * of the Single UNIX Specification).
- */
- #include <strings.h>
- #define lowest_set_bit(mask) (u_int)((ffs((mask)) - 1))
-#elif (defined(MSDOS) && defined(__DJGPP__)) || defined(__hpux)
- /*
- * MS-DOS with DJGPP or HP-UX 11i v3, which declare ffs() in <string.h>,
- * which we've already included. Place this branch after the <strings.h>
- * branch, in case a later release of HP-UX makes the declaration available
- * via the standard header.
- */
- #define lowest_set_bit(mask) ((u_int)(ffs((mask)) - 1))
#else
/*
* None of the above.
#include <pcap/pcap.h>
-#ifdef MSDOS
- #include <fcntl.h>
- #include <io.h>
-#endif
-
#include "varattrs.h"
#include "fmtutils.h"
*/
int bpf_codegen_flags;
-#if !defined(_WIN32) && !defined(MSDOS)
int selectable_fd; /* FD on which select()/poll()/epoll_wait()/kevent()/etc. can be done */
/*
* prepared not to see any packets from the attempt.
*/
const struct timeval *required_select_timeout;
-#endif
/*
* Placeholder for filter code if bpf not in kernel.
/*
* Routines that most pcap implementations can use for non-blocking mode.
*/
-#if !defined(_WIN32) && !defined(MSDOS)
+#if !defined(_WIN32)
int pcap_getnonblock_fd(pcap_t *);
int pcap_setnonblock_fd(pcap_t *p, int);
#endif
typedef struct pcap_if_list pcap_if_list_t;
typedef int (*get_if_flags_func)(const char *, bpf_u_int32 *, char *);
int pcap_platform_finddevs(pcap_if_list_t *, char *);
-#if !defined(_WIN32) && !defined(MSDOS)
+#if !defined(_WIN32)
int pcap_findalldevs_interfaces(pcap_if_list_t *, char *,
int (*)(const char *), get_if_flags_func);
#endif
#include <pcap-types.h>
#ifndef _WIN32
#include <sys/param.h>
-#ifndef MSDOS
#include <sys/file.h>
-#endif
#include <sys/ioctl.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_SOCKIO_H
#include "os-proto.h"
#endif
-#ifdef MSDOS
-#include "pcap-dos.h"
-#endif
-
#include "pcap-int.h"
#include "optimize.h"
* it actually returns the names of all interfaces, with a NUL separator
* between them; some callers may depend on that.
*
- * MS-DOS has its own pcap_lookupdev(), but that might be useful only
- * as an optimization.
- *
* In all other cases, we just use pcap_findalldevs() to get a list of
* devices, and pick from that list.
*/
-#if !defined(HAVE_PACKET32) && !defined(MSDOS)
+#if !defined(HAVE_PACKET32)
/*
* Return the name of a network interface attached to the system, or NULL
* if none can be found. The interface must be configured up; the
pcap_freealldevs(alldevs);
return (ret);
}
-#endif /* !defined(HAVE_PACKET32) && !defined(MSDOS) */
+#endif /* !defined(HAVE_PACKET32) */
-#if !defined(_WIN32) && !defined(MSDOS)
+#if !defined(_WIN32)
/*
* We don't just fetch the entire list of devices, search for the
* particular device, and use its first IPv4 address, as that's too
*netp &= *maskp;
return (0);
}
-#endif /* !defined(_WIN32) && !defined(MSDOS) */
+#endif /* !defined(_WIN32) */
#ifdef ENABLE_REMOTE
#include "pcap-rpcap.h"
p->handle = INVALID_HANDLE_VALUE; /* not opened yet */
#else /* _WIN32 */
p->fd = -1; /* not opened yet */
-#ifndef MSDOS
p->selectable_fd = -1;
p->required_select_timeout = NULL;
-#endif /* MSDOS */
#endif /* _WIN32 */
/*
}
#endif /* _WIN32 */
-#if !defined(_WIN32) && !defined(MSDOS)
+#if !defined(_WIN32)
int
pcap_get_selectable_fd(pcap_t *p)
{
* Get the current non-blocking mode setting, under the assumption that
* it's just the standard POSIX non-blocking flag.
*/
-#if !defined(_WIN32) && !defined(MSDOS)
+#if !defined(_WIN32)
int
pcap_getnonblock_fd(pcap_t *p)
{
return (ret);
}
-#if !defined(_WIN32) && !defined(MSDOS)
+#if !defined(_WIN32)
/*
* Set non-blocking mode, under the assumption that it's just the
* standard POSIX non-blocking flag. (This can be called by the
p->tstamp_precision_count = 0;
}
pcap_freecode(&p->fcode);
-#if !defined(_WIN32) && !defined(MSDOS)
+#if !defined(_WIN32)
if (p->fd >= 0) {
close(p->fd);
p->fd = -1;
*/
#if defined(_WIN32)
#define SET_BINMODE(f) _setmode(_fileno(f), _O_BINARY)
-#elif defined(MSDOS)
- #if defined(__HIGHC__)
- #define SET_BINMODE(f) setmode(f, O_BINARY)
- #else
- #define SET_BINMODE(f) setmode(fileno(f), O_BINARY)
- #endif
#endif
static int
*/
#if defined(_WIN32)
#define SET_BINMODE(f) _setmode(_fileno(f), _O_BINARY)
-#elif defined(MSDOS)
- #if defined(__HIGHC__)
- #define SET_BINMODE(f) setmode(f, O_BINARY)
- #else
- #define SET_BINMODE(f) setmode(fileno(f), O_BINARY)
- #endif
#endif
/*