|
38 | 38 | #include <pcap-types.h> |
39 | 39 | #ifndef _WIN32 |
40 | 40 | #include <sys/param.h> |
41 | | -#ifndef MSDOS |
42 | 41 | #include <sys/file.h> |
43 | | -#endif |
44 | 42 | #include <sys/ioctl.h> |
45 | 43 | #include <sys/socket.h> |
46 | 44 | #ifdef HAVE_SYS_SOCKIO_H |
@@ -71,10 +69,6 @@ struct rtentry; /* declarations in <net/if.h> */ |
71 | 69 | #include "os-proto.h" |
72 | 70 | #endif |
73 | 71 |
|
74 | | -#ifdef MSDOS |
75 | | -#include "pcap-dos.h" |
76 | | -#endif |
77 | | - |
78 | 72 | #include "pcap-int.h" |
79 | 73 |
|
80 | 74 | #include "optimize.h" |
@@ -1508,13 +1502,10 @@ pcap_freealldevs(pcap_if_t *alldevs) |
1508 | 1502 | * it actually returns the names of all interfaces, with a NUL separator |
1509 | 1503 | * between them; some callers may depend on that. |
1510 | 1504 | * |
1511 | | - * MS-DOS has its own pcap_lookupdev(), but that might be useful only |
1512 | | - * as an optimization. |
1513 | | - * |
1514 | 1505 | * In all other cases, we just use pcap_findalldevs() to get a list of |
1515 | 1506 | * devices, and pick from that list. |
1516 | 1507 | */ |
1517 | | -#if !defined(HAVE_PACKET32) && !defined(MSDOS) |
| 1508 | +#if !defined(HAVE_PACKET32) |
1518 | 1509 | /* |
1519 | 1510 | * Return the name of a network interface attached to the system, or NULL |
1520 | 1511 | * if none can be found. The interface must be configured up; the |
@@ -1585,9 +1576,9 @@ pcap_lookupdev(char *errbuf) |
1585 | 1576 | pcap_freealldevs(alldevs); |
1586 | 1577 | return (ret); |
1587 | 1578 | } |
1588 | | -#endif /* !defined(HAVE_PACKET32) && !defined(MSDOS) */ |
| 1579 | +#endif /* !defined(HAVE_PACKET32) */ |
1589 | 1580 |
|
1590 | | -#if !defined(_WIN32) && !defined(MSDOS) |
| 1581 | +#if !defined(_WIN32) |
1591 | 1582 | /* |
1592 | 1583 | * We don't just fetch the entire list of devices, search for the |
1593 | 1584 | * particular device, and use its first IPv4 address, as that's too |
@@ -1709,7 +1700,7 @@ pcap_lookupnet(const char *device, bpf_u_int32 *netp, bpf_u_int32 *maskp, |
1709 | 1700 | *netp &= *maskp; |
1710 | 1701 | return (0); |
1711 | 1702 | } |
1712 | | -#endif /* !defined(_WIN32) && !defined(MSDOS) */ |
| 1703 | +#endif /* !defined(_WIN32) */ |
1713 | 1704 |
|
1714 | 1705 | #ifdef ENABLE_REMOTE |
1715 | 1706 | #include "pcap-rpcap.h" |
@@ -2512,10 +2503,8 @@ pcap_alloc_pcap_t(char *ebuf, size_t total_size, size_t private_offset) |
2512 | 2503 | p->handle = INVALID_HANDLE_VALUE; /* not opened yet */ |
2513 | 2504 | #else /* _WIN32 */ |
2514 | 2505 | p->fd = -1; /* not opened yet */ |
2515 | | -#ifndef MSDOS |
2516 | 2506 | p->selectable_fd = -1; |
2517 | 2507 | p->required_select_timeout = NULL; |
2518 | | -#endif /* MSDOS */ |
2519 | 2508 | #endif /* _WIN32 */ |
2520 | 2509 |
|
2521 | 2510 | /* |
@@ -3565,7 +3554,7 @@ pcap_fileno(pcap_t *p) |
3565 | 3554 | } |
3566 | 3555 | #endif /* _WIN32 */ |
3567 | 3556 |
|
3568 | | -#if !defined(_WIN32) && !defined(MSDOS) |
| 3557 | +#if !defined(_WIN32) |
3569 | 3558 | int |
3570 | 3559 | pcap_get_selectable_fd(pcap_t *p) |
3571 | 3560 | { |
@@ -3616,7 +3605,7 @@ pcap_getnonblock(pcap_t *p, char *errbuf) |
3616 | 3605 | * Get the current non-blocking mode setting, under the assumption that |
3617 | 3606 | * it's just the standard POSIX non-blocking flag. |
3618 | 3607 | */ |
3619 | | -#if !defined(_WIN32) && !defined(MSDOS) |
| 3608 | +#if !defined(_WIN32) |
3620 | 3609 | int |
3621 | 3610 | pcap_getnonblock_fd(pcap_t *p) |
3622 | 3611 | { |
@@ -3656,7 +3645,7 @@ pcap_setnonblock(pcap_t *p, int nonblock, char *errbuf) |
3656 | 3645 | return (ret); |
3657 | 3646 | } |
3658 | 3647 |
|
3659 | | -#if !defined(_WIN32) && !defined(MSDOS) |
| 3648 | +#if !defined(_WIN32) |
3660 | 3649 | /* |
3661 | 3650 | * Set non-blocking mode, under the assumption that it's just the |
3662 | 3651 | * standard POSIX non-blocking flag. (This can be called by the |
@@ -4094,7 +4083,7 @@ pcap_cleanup_live_common(pcap_t *p) |
4094 | 4083 | p->tstamp_precision_count = 0; |
4095 | 4084 | } |
4096 | 4085 | pcap_freecode(&p->fcode); |
4097 | | -#if !defined(_WIN32) && !defined(MSDOS) |
| 4086 | +#if !defined(_WIN32) |
4098 | 4087 | if (p->fd >= 0) { |
4099 | 4088 | close(p->fd); |
4100 | 4089 | p->fd = -1; |
|
0 commit comments