Mark Pizzolato
e82910570f
ETHER: Add support to determine host NIC address without ifconfig
...
- Recent Linux versions don't install ifconfig by default and now use
the new ip command for network details.
- Avoid writing command results to a temp file and use popen instead.
2021-01-31 12:56:05 -08:00
Mark Pizzolato
beaa1e7387
ETHER: Properly support builds when pcap isn't available
2020-12-24 21:38:22 -08:00
Mark Pizzolato
bcaf577d21
ETHER: Reorg for warning free build with and without Ethernet support
2020-12-11 07:18:59 -08:00
Mark Pizzolato
2f38b5f779
ETHER: Proper cleanup while getting Linux system id
2020-12-11 07:18:43 -08:00
Lars Brinkhoff
970fb8ec95
PDP10, ETHER, VIDEO, VAX: Fix set but unused variables.
2020-11-25 04:50:47 -08:00
Mark Pizzolato
31606161ce
SCP: Avoid potential compiler warnings
...
Essentially all are non-functional problems but silencing them is a good idea
2020-10-09 05:09:41 -07:00
Mark Pizzolato
5e46b298f1
ETHER: Silence several Coverity warnings.
...
Most were noise and non-issues, but the change from fclose() to
pclose() was absolutely needed.
A false positive remains regarding tun variable going out of scope.
Under the conditions where a resource leak could occur, the tun
variable is saved in *fd_handle and thus not leaked.
2020-08-08 17:52:04 -07:00
Mark Pizzolato
782ee133df
ETHER: Update comments and network notes to describe Npcap support
2020-06-13 14:40:17 -07:00
Mark Pizzolato
8c57893675
ETHER: Avoid potential compiler warning about version string overrun
...
gcc 9.3.0 on Ubuntu 20.04 somehow knows that the length of the
string pcap_lib_version() returns can be 256 bytes long. It then
generates a warning about truncation potential. The problematic
code path will only be executed on Windows with an old version of
Npcap, but the compiler can't know that. Make the local buffer
larger to silence the resulting noise.
2020-05-08 05:28:52 -07:00
Mark Pizzolato
07c274ac97
ETHER: Restore support fir Windows Npcap as Ethernet packet API
...
Version of Npcap 0.9990 restores full WinPcap functionality
As discussed in nmap/nmap#1929 and nmap/nmap#1343
2020-04-06 10:36:31 -07:00
Ryo Kogulé
7fe9434528
ETHER: Fix tap support on OS/X
...
As reported in #823
2020-03-22 09:19:25 -07:00
Mark Pizzolato
b3214fcb59
ETHER: Emit advice when asynch operation is attempted without USE_READER_THREAD
2020-03-10 19:53:25 -07:00
Mark Pizzolato
de335bfd6a
ETHER: Silence Coverity indicated potential issues
2020-03-07 22:36:24 -08:00
Mark Pizzolato
565596a5af
ETHER: Minor adjustments for building on the simh 3.x codebase
2020-03-06 15:32:12 -08:00
Mark Pizzolato
721e2f42c5
ETHER: Report Windows Npcap as unsupported in the Ethernet version string
...
Current versions of Npcap can talk directly to the host system's network
stack. This defect was just discovered. Fortunately, WinPcap 4.1.3 works
as needed and is still functional on Windows 10.
As discussed in nmap/nmap#1929 and nmap/nmap#1343
2020-02-19 01:39:13 -08:00
Mark Pizzolato
27ebb9a8ee
ETHER: Fix typo in comment
2020-02-16 17:13:38 -08:00
Mark Pizzolato
9ba85568ac
ETHER: Review and revise code to address Coverity endianness concerns
2020-01-30 21:46:20 -08:00
Mark Pizzolato
15590be464
ETHER: Avoid potential memory leak on network shutdown.
2020-01-30 04:26:36 -08:00
Mark Pizzolato
829e64ae67
ETHER: Fix Coverity identified issues
...
- Let dynamically loaded (Shared Library) routines do argument checking
if they've been successfully loaded.
- Properly cast file descriptors into SOCKET when stored in the fd_handle
- Clean up error paths when opening tun/tap transports - potential leaks.
- Avoid possible string overflow when opening a tap device on Linux
- Try another way to ignore a return from fread() without getting
warnings.
2020-01-30 02:26:20 -08:00
Mark Pizzolato
30c182a10c
ETHER: Clean compile warning on Windows compiled as C++
2020-01-29 11:33:41 -08:00
Mark Pizzolato
c88a450628
ETHER: Restore missing _eth_devices() stub when networking is disabled
2020-01-23 23:42:28 -08:00
Mark Pizzolato
ff0ee479a2
ETHER: Simplify error messages when dynamic libpcap loading fails
...
Only issue load failure message once per execution.
2020-01-23 22:40:18 -08:00
Mark Pizzolato
b18912cda8
SCP: Silence GCC optimizer warnings about unused function results
2019-12-30 15:33:51 -08:00
Mark Pizzolato
108291b3d4
ETHER: Fix fault when parsing bad NAT: parameters adding better error reporting
2019-09-05 17:40:16 -07:00
Mark Pizzolato
7398e63b00
ETHER: Only reference pcap_lib_version() when HAVE_PCAP_NETWORK is defined
2019-09-03 00:39:09 -07:00
Mark Pizzolato
a031e69881
ETHER: Fix additional race when closing a NAT(slirp) network connected device
2019-08-23 23:55:41 -07:00
Mark Pizzolato
6a193c032d
ETHER: Fix possible race conditions when closing a network device
...
Added pcap version to the SCP output of SHOW VERSION command.
2019-08-13 20:04:09 -07:00
Mark Pizzolato
b1f3441f7f
ETHER: Start newly opened interfaces blocking all packets
...
A device simulator is responsible for specifying exactly what categories of
packets it wants to receive. It should do that after having opened the device.
This change avoids collecting packets that aren't actually interesting until
after the device designates which packets it is interested in.
2019-05-07 18:41:36 -07:00
Mark Pizzolato
5343dae137
ETHER: Fix potential compile warning about buffer overrun
2019-04-16 15:56:32 -07:00
Mark Pizzolato
456aa3ed5d
ETHER: Gracefully handle dynamic pcap library initialization errors
...
- Test BPF using all available Ethernet capable interfaces
2019-04-15 16:49:08 -07:00
Mark Pizzolato
c7b0928b33
SCP: Avoid potential buffer overruns by using strlcpy() and strlcat()
2019-03-08 12:31:01 -08:00
Mark Pizzolato
a1ecce16bf
ETHER: Add tests for crc and bpf filter construction logic
2019-02-02 12:44:09 -08:00
Mark Pizzolato
f7a17cae15
ETHER: Fix BPF filter generation for promiscuous mode when reflections
2019-01-29 23:03:04 -08:00
Mark Pizzolato
68e442358b
ETHER: Issue normal messages with sim_messagef() when appropriate
2019-01-22 13:56:12 -08:00
Mark Pizzolato
efd52d96bd
ETHER: Explicitly allow MAC address to be the host interface MAC address
...
A warning will be issued unless an attach is done with the -Q switch.
2019-01-22 13:36:19 -08:00
Mark Pizzolato
ad40f57809
ETHER: Force a dedicated interface "up" if it is down
2019-01-20 18:23:49 -08:00
Mark Pizzolato
6f1255c142
ETHER: Fix reflection count error logic recently broken
...
Removed overloaded ambiguous return values from eth_reflect() and
eth_check_address_conflic().
2019-01-20 15:02:25 -08:00
Mark Pizzolato
7478ddc7d4
ETHER: Reject invalid MAC addresses while looking for address conflicts
2019-01-11 23:08:20 -08:00
Mark Pizzolato
8385ef50a6
ETHER: Only convert attach argument to lower case when it contains a ':'
2018-10-10 08:30:00 -07:00
Mark Pizzolato
6e65b635e3
ETHER: Accept upper or lower attach transport types (UDP, TAP, VDE, NAT)
2018-10-09 23:23:39 -07:00
Mark Pizzolato
0e544b71ff
SCP: Fix various compiler warnings
2018-09-28 18:05:39 -07:00
Mark Pizzolato
0daa80e03d
SCP: Add support for library unit test routines
2018-08-26 18:15:30 -07:00
Jordi Guillaumes Pons
2924b338df
ETHER: Allow VDE connections to specify a particular virtual switch port
...
Syntax: attach XXX vde:/switch-path{:port}
Port is optional, if not specified VDE will choose (and maybe create) one
automatically
2018-01-27 03:10:02 -08:00
Mark Pizzolato
e058b0124b
ETHER: Allow clean build with USE_NETWORK and not USE_READER_THREAD
2017-06-04 11:13:37 -07:00
Mark Pizzolato
2c6c8f4ef8
SCP: Always invoke strlcpy, strlcat, strcasecmp and strcasencmp vs sim_ forms
2017-05-07 19:19:55 -07:00
Mark Pizzolato
f5a1048101
ETHER: Explicitly use GetModuleHandleA API when finding DLL entry points
2017-05-07 19:00:49 -07:00
Mark Pizzolato
168d0d9c47
SCP: add generic length limted and case independent string for all platforms
2017-04-22 21:28:48 -07:00
Mark Pizzolato
c48b254228
ETHER: Fix packet length check to properly accomodate CRC data if needed
...
As discussed in #419
2017-04-03 14:49:54 -07:00
Mark Pizzolato
f4b7d1fbf8
SCP: Migrate some use of strcat() to sim_strlcat()
2017-03-27 08:23:03 -07:00
Mark Pizzolato
2d5711961f
ETHER: Fix potential unterminated string (COVERITY)
2017-03-11 09:17:40 -08:00