mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Added ND ping for local IPv6 nets, merging from /nmap-exp/weilin/nmap-nd.
This commit is contained in:
parent
737035118a
commit
1dcf652410
16 changed files with 707 additions and 33 deletions
|
|
@ -306,6 +306,14 @@ const struct in_addr *Target::v4sourceip() const {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// Returns IPv6 host address or NULL if unavailable.
|
||||
const struct in6_addr *Target::v6sourceip() const {
|
||||
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &sourcesock;
|
||||
if (sin6->sin6_family == AF_INET6) {
|
||||
return &(sin6->sin6_addr);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* You can set to NULL to erase a name or if it failed to resolve -- or
|
||||
just don't call this if it fails to resolve */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue