1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-01 20:39:02 +00:00

Kris Katterjohn patches for code clean up, iana ip assignment update, fixe fileexistsandisreadable

This commit is contained in:
fyodor
2006-12-12 09:56:15 +00:00
parent f17f2265ea
commit 8e2de50dd3
10 changed files with 67 additions and 115 deletions

19
tcpip.h
View File

@@ -183,9 +183,6 @@ void *realloc();
#include <netinet/ip.h>
#define NETINET_IP_H
#endif
#ifndef __FAVOR_BSD
#define __FAVOR_BSD
#endif
#ifndef NETINET_TCP_H /* why the HELL does OpenBSD not do this? */
#include <netinet/tcp.h> /*#include <netinet/ip_tcp.h>*/
#define NETINET_TCP_H
@@ -240,10 +237,6 @@ typedef enum { devt_ethernet, devt_loopback, devt_p2p, devt_other } devtype;
#include "nmap.h"
#include "global_structures.h"
#ifndef TCPIP_DEBUGGING
#define TCPIP_DEBUGGING 0
#endif
/* Explicit Congestion Notification (rfc 2481/3168) */
#ifndef TH_ECE
#define TH_ECE 0x40
@@ -513,6 +506,10 @@ bool routethrough(const struct sockaddr_storage * const dest,
unsigned short in_cksum(u16 *ptr,int nbytes);
unsigned short magic_tcpudp_cksum(const struct in_addr *src,
const struct in_addr *dst,
u8 proto, u16 len, char *hstart);
/* Build and send a raw tcp packet. If TTL is -1, a partially random
(but likely large enough) one is chosen */
int send_tcp_raw( int sd, struct eth_nfo *eth,
@@ -770,17 +767,9 @@ int recvtime(int sd, char *buf, int len, int seconds, int *timedout);
/* Sets a pcap filter function -- makes SOCK_RAW reads easier */
#ifndef WINIP_H
typedef int (*PFILTERFN)(const char *packet, unsigned int len); /* 1 to keep */
void set_pcap_filter(const char *device, pcap_t *pd, char *bpf, ...);
#endif
/* Just accept everything ... TODO: Need a better approach than this flt_
stuff */
int flt_all(const char *packet, unsigned int len);
int flt_icmptcp(const char *packet, unsigned int len);
int flt_icmptcp_2port(const char *packet, unsigned int len);
int flt_icmptcp_5port(const char *packet, unsigned int len);
#endif /*TCPIP_H*/