mirror of
https://github.com/nmap/nmap.git
synced 2026-01-02 12:59:02 +00:00
Fix indentation leading to gcc warnings.
This commit is contained in:
@@ -199,7 +199,7 @@ int Crypto::aes128_cbc_encrypt(u8 *inbuff, size_t inlen, u8 *dst_buff, u8 *key,
|
||||
/* Do not encrypt, just set the plaintext */
|
||||
for(size_t i=0; i<inlen; i++)
|
||||
dst_buff[i]=inbuff[i];
|
||||
return OP_SUCCESS;
|
||||
return OP_SUCCESS;
|
||||
} /* End of aes128_cbc_encrypt() */
|
||||
|
||||
|
||||
|
||||
@@ -994,7 +994,7 @@ int NpingTarget::setProbeSentICMP(u16 id, u16 seq){
|
||||
current_stat=(current_stat+1)%MAX_SENTPROBEINFO_ENTRIES;
|
||||
if( total_stats< MAX_SENTPROBEINFO_ENTRIES)
|
||||
total_stats++;
|
||||
return OP_SUCCESS;
|
||||
return OP_SUCCESS;
|
||||
} /* End of setProbeSentARP() */
|
||||
|
||||
|
||||
|
||||
@@ -687,36 +687,36 @@ int ProbeMode::createIPv4(IPv4Header *i, PacketElement *next_element, const char
|
||||
* class.
|
||||
* @return OP_SUCCESS on success and fatal()s in case of failure. */
|
||||
int ProbeMode::createIPv6(IPv6Header *i, PacketElement *next_element, const char *next_proto, NpingTarget *target){
|
||||
if( i==NULL || next_proto==NULL || target==NULL)
|
||||
if( i==NULL || next_proto==NULL || target==NULL)
|
||||
nping_fatal(QT_3,"createIPv6(): NULL pointer supplied.");
|
||||
|
||||
/* Set datagram payload */
|
||||
i->setNextElement( next_element );
|
||||
/* Set datagram payload */
|
||||
i->setNextElement( next_element );
|
||||
|
||||
i->setVersion();
|
||||
i->setTrafficClass( o.getTrafficClass() );
|
||||
i->setFlowLabel( o.getFlowLabel() );
|
||||
i->setNextHeader(next_proto);
|
||||
i->setPayloadLength();
|
||||
i->setDestinationAddress( target->getIPv6Address_u8() );
|
||||
i->setVersion();
|
||||
i->setTrafficClass( o.getTrafficClass() );
|
||||
i->setFlowLabel( o.getFlowLabel() );
|
||||
i->setNextHeader(next_proto);
|
||||
i->setPayloadLength();
|
||||
i->setDestinationAddress( target->getIPv6Address_u8() );
|
||||
|
||||
/* Hop Limit */
|
||||
if ( o.issetTraceroute() ){
|
||||
i->setHopLimit( o.getCurrentRound() );
|
||||
}else{
|
||||
i->setHopLimit( o.getHopLimit() );
|
||||
}
|
||||
/* Hop Limit */
|
||||
if ( o.issetTraceroute() ){
|
||||
i->setHopLimit( o.getCurrentRound() );
|
||||
}else{
|
||||
i->setHopLimit( o.getHopLimit() );
|
||||
}
|
||||
|
||||
/* Source IP */
|
||||
if( o.issetIPv6SourceAddress() ){
|
||||
i->setSourceAddress( o.getIPv6SourceAddress() );
|
||||
}else{
|
||||
if ( target->getIPv6SourceAddress_u8() != NULL )
|
||||
i->setSourceAddress( target->getIPv6SourceAddress_u8() );
|
||||
else
|
||||
nping_fatal(QT_3, "createIPv6(): Cannot determine Source IPv6 Address");
|
||||
}
|
||||
return OP_SUCCESS;
|
||||
/* Source IP */
|
||||
if( o.issetIPv6SourceAddress() ){
|
||||
i->setSourceAddress( o.getIPv6SourceAddress() );
|
||||
}else{
|
||||
if ( target->getIPv6SourceAddress_u8() != NULL )
|
||||
i->setSourceAddress( target->getIPv6SourceAddress_u8() );
|
||||
else
|
||||
nping_fatal(QT_3, "createIPv6(): Cannot determine Source IPv6 Address");
|
||||
}
|
||||
return OP_SUCCESS;
|
||||
} /* End of createIPv6() */
|
||||
|
||||
|
||||
|
||||
@@ -1486,9 +1486,9 @@ int obtainRawSocket(){
|
||||
}else{
|
||||
if ((rawipsd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0 )
|
||||
nping_fatal(QT_3,"Couldn't acquire IPv4 raw socket. Are you root?");
|
||||
/* Tell the kernel we are including our own IP Header (call to
|
||||
* setsockopt passing option IP_HDRINCL) */
|
||||
sethdrinclude(rawipsd);
|
||||
/* Tell the kernel we are including our own IP Header (call to
|
||||
* setsockopt passing option IP_HDRINCL) */
|
||||
sethdrinclude(rawipsd);
|
||||
}
|
||||
|
||||
/* Allow broadcast addresses */
|
||||
|
||||
Reference in New Issue
Block a user