1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Allow layer-2 sending for non-Ethernet links; MAC addr optional

This commit is contained in:
dmiller
2025-06-26 19:03:01 +00:00
parent f2028a2007
commit fc71b7544d
5 changed files with 82 additions and 45 deletions

View File

@@ -167,7 +167,8 @@ class FPNetworkControl {
void response_reception_handler(nsock_pool nsp, nsock_event nse, void *arg);
bool request_slots(size_t num_packets);
int cc_report_final_timeout();
// Do we need to send l2 (ethernet) frames?
bool l2_frames() { return (rawsd < 0); }
};
/* +-----------+
@@ -249,7 +250,7 @@ class FPPacket {
int setTime(const struct timeval *tv = NULL);
struct timeval getTime() const;
int setPacket(PacketElement *pkt);
int setEthernet(const u8 *src_mac, const u8 *dst_mac, const char *devname);
int setEthernet(const Target *target);
const struct eth_nfo *getEthernet() const;
const PacketElement *getPacket() const;
size_t getLength() const;