mirror of
https://github.com/nmap/nmap.git
synced 2025-12-24 00:19:01 +00:00
constify the pointer passed to magic_tcpudp_cksum.
This commit is contained in:
2
tcpip.cc
2
tcpip.cc
@@ -1012,7 +1012,7 @@ unsigned short in_cksum(u16 *ptr,int nbytes) {
|
|||||||
sections 3.2, 11.3, and 17.3. */
|
sections 3.2, 11.3, and 17.3. */
|
||||||
unsigned short magic_tcpudp_cksum(const struct in_addr *src,
|
unsigned short magic_tcpudp_cksum(const struct in_addr *src,
|
||||||
const struct in_addr *dst,
|
const struct in_addr *dst,
|
||||||
u8 proto, u16 len, char *hstart)
|
u8 proto, u16 len, const void *hstart)
|
||||||
{
|
{
|
||||||
struct pseudo {
|
struct pseudo {
|
||||||
struct in_addr src;
|
struct in_addr src;
|
||||||
|
|||||||
2
tcpip.h
2
tcpip.h
@@ -481,7 +481,7 @@ unsigned short in_cksum(u16 *ptr,int nbytes);
|
|||||||
|
|
||||||
unsigned short magic_tcpudp_cksum(const struct in_addr *src,
|
unsigned short magic_tcpudp_cksum(const struct in_addr *src,
|
||||||
const struct in_addr *dst,
|
const struct in_addr *dst,
|
||||||
u8 proto, u16 len, char *hstart);
|
u8 proto, u16 len, const void *hstart);
|
||||||
|
|
||||||
/* Build and send a raw tcp packet. If TTL is -1, a partially random
|
/* Build and send a raw tcp packet. If TTL is -1, a partially random
|
||||||
(but likely large enough) one is chosen */
|
(but likely large enough) one is chosen */
|
||||||
|
|||||||
Reference in New Issue
Block a user