1
/* $Id: xprobe.h,v 1.7 2005/02/13 18:41:31 mederchik Exp $ */
3
** Copyright (C) 2001 Fyodor Yarochkin <fygrave@tigerteam.net>,
4
** Ofir Arkin <ofir@sys-security.com>
6
** This program is free software; you can redistribute it and/or modify
7
** it under the terms of the GNU General Public License as published by
8
** the Free Software Foundation; either version 2 of the License, or
9
** (at your option) any later version.
12
** This program is distributed in the hope that it will be useful,
13
** but WITHOUT ANY WARRANTY; without even the implied warranty of
14
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
** GNU General Public License for more details.
17
** You should have received a copy of the GNU General Public License
18
** along with this program; if not, write to the Free Software
19
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40
#include <sys/param.h>
44
#define bzero(x,y) memset((void *)x,(int)0,(size_t) y)
45
#define bcopy(x,y,z) memcpy((void *)y, (const void *)x, (size_t) z)
58
#include <sys/types.h>
61
#include <sys/ioctl.h>
69
#ifndef _BSD_SOCKLEN_T_
70
#define _BSD_SOCKLEN_T_ unsigned int
72
#include <sys/socket.h>
74
#include <net/route.h>
75
#include <netinet/in.h>
76
#include <arpa/nameser.h>
77
#include <netinet/in_systm.h>
78
#include <netinet/ip.h>
80
//#include <netinet/ip_var.h>
83
#endif /* __linux__ */
84
#include <netinet/ip_icmp.h>
85
// #include <netinet/tcp.h>
89
#if !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(SOLARIS) && !defined(__sgi)
90
#include <net/ethernet.h>
94
#include <sys/sockio.h>
96
#define INADDR_NONE -1
100
#include <netinet/if_ether.h>
102
#include <arpa/inet.h>
104
// #include <math.h> /* conflicts with <string>
118
/* some types correction */
119
#if defined(__FreeBSD__) || defined(__linux__)
120
#define TIMEZONE_T struct timezone
122
#define TIMEZONE_T unsigned long
125
#define IF_NAMESIZE 16
129
/* linux and OpenBSD want ip offset in network order, others: in host
133
#if defined(__linux__) || defined(__OpenBSD__)
134
#define IPOFF_FIX(off) htons((unsigned short)(off))
136
#define IPOFF_FIX(off) (off)
139
#define IFRLEN(ifrptr) (ifrptr->ifr_addr.sa_len + sizeof(ifrptr->ifr_name))
142
#include "xprobe_timeval.h"
148
#endif /* XPROBE_H */