mirror of
https://github.com/nmap/nmap.git
synced 2026-10-20 19:01:56 +00:00
Abstract some things to move #includes out of headers.
This commit is contained in:
parent
a2c75e0ef4
commit
ae10c8a19d
5 changed files with 35 additions and 36 deletions
|
|
@ -147,6 +147,36 @@
|
|||
|
||||
extern NmapOps o;
|
||||
|
||||
u16 UltraProbe::sport() const {
|
||||
switch (mypspec.proto) {
|
||||
case IPPROTO_TCP:
|
||||
return probes.IP.pd.tcp.sport;
|
||||
case IPPROTO_UDP:
|
||||
return probes.IP.pd.udp.sport;
|
||||
case IPPROTO_SCTP:
|
||||
return probes.IP.pd.sctp.sport;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
/* not reached */
|
||||
}
|
||||
|
||||
u16 UltraProbe::dport() const {
|
||||
switch (mypspec.proto) {
|
||||
case IPPROTO_TCP:
|
||||
return mypspec.pd.tcp.dport;
|
||||
case IPPROTO_UDP:
|
||||
return mypspec.pd.udp.dport;
|
||||
case IPPROTO_SCTP:
|
||||
return mypspec.pd.sctp.dport;
|
||||
default:
|
||||
/* dport() can get called for other protos if we
|
||||
* get ICMP responses during IP proto scans. */
|
||||
return 0;
|
||||
}
|
||||
/* not reached */
|
||||
}
|
||||
|
||||
/* Pass an arp packet, including ethernet header. Must be 42bytes */
|
||||
|
||||
void UltraProbe::setARP(u8 *arppkt, u32 arplen) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue